Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Menu Item

List all menu items

Query parameters

filter object
ids string

IDs to fetch, comma separated

Example: "42,554"

Returns

Returns an array of resource objects of type menu_item.

Examples

GET https://site-api.datocms.com/menu-items HTTP/1.1
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
X-Api-Version: 3
Terminal window
curl -g 'https://site-api.datocms.com/menu-items' \
\
-H "Authorization: Bearer YOUR-API-TOKEN" \
-H "Accept: application/json" \
-H "X-Api-Version: 3"
await fetch("https://site-api.datocms.com/menu-items", {
headers: {
Authorization: "Bearer YOUR-API-TOKEN",
Accept: "application/json",
"X-Api-Version": "3",
},
});
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: cache-control: max-age=0, private, must-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 28
{
"data": [
{
"type": "menu_item",
"id": "uinr2zfqQLeCo_1O0-ao-Q",
"relationships": {
"item_type": {
"data": {
"type": "item_type",
"id": "DxMaW10UQiCmZcuuA-IkkA"
}
},
"item_type_filter": {
"data": {
"type": "item_type_filter",
"id": "FF-P5of6Qp-DD2w0xoaa6Q"
}
},
"parent": {
"data": null
},
"children": {
"data": [
{
"type": "menu_item",
"id": "uinr2zfqQLeCo_1O0-ao-Q"
}
]
}
},
"attributes": {
"label": "Posts",
"position": 1,
"external_url": "",
"open_in_new_tab": true
}
}
]
}