Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Record

Referenced records

List all records that link to a specific record

Query parameters

nested boolean

For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs

version null, enum

Retrieve only the selected type of version that is linked to the record; current, published or both

Example: "current"
current

Return records that in their latest version available link to the record

published

Return records that in their published version link to the record

published-or-current

Return records that either in their published version or in their latest version available link to the record

Returns

Returns an array of resource objects of type item.

Examples

1
GET https://site-api.datocms.com/items/:item_id/references 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/items/:item_id/references' \
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/items/:item_id/references", {
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
{
10
"type": "item",
11
"id": "hWl-mnkWRYmMCSTq4z_piQ",
12
"relationships": {
13
"item_type": {
14
"data": {
15
"type": "item_type",
16
"id": "DxMaW10UQiCmZcuuA-IkkA"
17
}
18
}
19
},
20
"attributes": {
21
"title": "My first blog post!",
22
"content": "Lorem ipsum dolor sit amet...",
23
"category": "24",
24
"image": {
25
"alt": "Alt text",
26
"title": "Image title",
27
"custom_data": {},
28
"focal_point": null,
29
"upload_id": "20042921"
30
}
31
},
32
"meta": {
33
"created_at": "2020-04-21T07:57:11.124Z",
34
"updated_at": "2020-04-21T07:57:11.124Z",
35
"published_at": "2020-04-21T07:57:11.124Z",
36
"first_published_at": "2020-04-21T07:57:11.124Z",
37
"publication_scheduled_at": "2020-04-21T07:57:11.124Z",
38
"unpublishing_scheduled_at": "2020-04-21T07:57:11.124Z",
39
"status": "published",
40
"is_current_version_valid": true,
41
"is_published_version_valid": true,
42
"current_version": "4234",
43
"stage": null
44
}
45
}
46
]
47
}