Content
Last updated
Last updated
The Metadata API enables you to interact with database table content (database records). The following are various of examples of how to create, update, delete, and truncate content.
In this example, we will create content. The endpoint requires a workspace ID and table ID. In addition, the name of the field(s) and value(s) that you wish to create.
Example response body:
To update an existing record, the content ID (primary ID of the record) is also required. In this example, we will update the price from the above example to be 500
The Metadata is flexible with updates: We only need to pass what we want to update. For example, if we want all the other fields to remain the same for ID 11 but want to update price then we can just pass the new value for price.
Example response body:
Deleting content is straightforward, it requires the content ID, table ID, and workspace ID.
The response will be null since we are just deleting a record.
Truncate content will clear all the content of a table. You can optionally reset the primary key back to 1 for the table.
The response will be null since we are truncating the table.
This action cannot be done and will result in the loss of content (records).
To see examples of getting content via browse and search please visit the next page: