Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Record version

Retrieve a record version

Returns

Returns a resource object of type item_version.

Examples

1
GET https://site-api.datocms.com/versions/:item_version_id HTTP/1.1
2
Authorization: Bearer YOUR-API-TOKEN
3
Accept: application/json
4
X-Api-Version: 3
Terminal window
1
curl -g 'https://site-api.datocms.com/versions/:item_version_id' \
2
\
3
-H "Authorization: Bearer YOUR-API-TOKEN" \
4
-H "Accept: application/json" \
5
-H "X-Api-Version: 3"
1
await fetch("https://site-api.datocms.com/versions/:item_version_id", {
2
headers: {
3
Authorization: "Bearer YOUR-API-TOKEN",
4
Accept: "application/json",
5
"X-Api-Version": "3",
6
},
7
});
1
HTTP/1.1 200 OK
2
Content-Type: application/json
3
Cache-Control: cache-control: max-age=0, private, must-revalidate
4
X-RateLimit-Limit: 30
5
X-RateLimit-Remaining: 28
6
7
{
8
"data": {
9
"type": "item_version",
10
"id": "59JSonvYTCOUDz_b7_6hvA",
11
"attributes": {
12
"title": "My first blog post!",
13
"content": "Lorem ipsum dolor sit amet...",
14
"category": "24",
15
"image": {
16
"alt": "Alt text",
17
"title": "Image title",
18
"custom_data": {},
19
"focal_point": null,
20
"upload_id": "20042921"
21
}
22
},
23
"relationships": {
24
"item_type": {
25
"data": {
26
"type": "item_type",
27
"id": "DxMaW10UQiCmZcuuA-IkkA"
28
}
29
},
30
"item": {
31
"data": {
32
"type": "item",
33
"id": "hWl-mnkWRYmMCSTq4z_piQ"
34
}
35
},
36
"editor": {
37
"data": {
38
"type": "account",
39
"id": "312"
40
}
41
}
42
},
43
"meta": {
44
"created_at": "2020-04-21T07:57:11.124Z",
45
"is_published": true,
46
"is_current": true
47
}
48
}
49
}