Skip to content

Object Revisions

The following endpoints allow you to get Revision of your Object in your Bucket.

Quick Tip
Your read and write keys will be required to perform the following requests. These can be found in Your Bucket > Settings > API Access in your Bucket Dashboard .

Get Object Revisions

Get Object Revisions of Object with id in your Bucket.

ParameterRequiredTypeDefaultDescription
read_keyrequiredStringRestrict read access to your Bucket
queryJSONA JSON string to perform Object search and filtering. See Queries section for more detail.
show_metafieldsEnumfalsetrue, Shows metafields
propsStringDeclare which properties to return in comma-separated string. Reference full Object for all available properties. Example: ?props=id,title,metadata.author
sortEnumordercreated_at, -created_at, modified_at, -modified_at, random, order
limitNumber1000The number of Objects to return
skipNumber0The number of Objects to skip
prettyEnumfalsetrue, Makes the response more reader-friendly

Methods

GET $BASE_URL/buckets/${bucket_slug}/objects/${object_id}/revisions

Example Response

{
"revisions": [
{
"id": "5ff75368c2dfa81a91695cec",
"slug": "title-of-the-post",
"title": "Title of the Post",
"content": "",
"bucket": "5f7357124b331d76c08de989",
"created_at": "2021-01-07T18:31:04.005Z",
"modified_at": "2021-01-07T18:31:04.005Z",
"status": "published",
"published_at": "2021-01-07T18:31:04.005Z",
"object_id": "5ff75368c2dfa81a91695cec",
"type": "posts",
"metadata": null
},
{
"id": "5ff754491a90d61b34aacdbe",
"slug": "title-of-the-post",
"title": "This is updated Title",
"content": "",
"bucket": "5f7357124b331d76c08de989",
"created_at": "2021-01-07T18:34:49.828Z",
"modified_at": "2021-01-07T18:34:49.828Z",
"status": "published",
"published_at": "2021-01-07T18:31:04.005Z",
"object_id": "5ff75368c2dfa81a91695cec",
"type": "posts",
"metadata": null
}
],
"total": 4,
"limit": 2
}

Get Object Revision

Returns a single Revision by id from your Object.

ParameterRequiredTypeDefaultDescription
read_keyrequiredStringRestrict read access to your Bucket
show_metafieldsEnumfalsetrue, Shows metafields
propsStringDeclare which properties to return in comma-separated string. Reference full Object for all available properties. Example: ?props=id,title,metadata.author
prettyEnumfalsetrue, Makes the response more reader-friendly

Definition

GET $BASE_URL/buckets/${bucket_slug}/objects/${object_id}/revisions/${revision_id}

Example Response

{
"revision": {
"id": "5ff75368c2dfa81a91695cec",
"slug": "title-of-the-post",
"title": "Title of the Post",
"content": "",
"bucket": "5f7357124b331d76c08de989",
"created_at": "2021-01-07T18:31:04.005Z",
"modified_at": "2021-01-07T18:31:04.005Z",
"status": "published",
"published_at": "2021-01-07T18:31:04.005Z",
"object_id": "5ff75368c2dfa81a91695cec",
"type": "posts",
"metadata": null
}
}