Navigation
One request returns a page and its subpages as a tree: titles, slugs, doktype and absolute URLs in the request language. The menu at the top of this page and the page list in the footer were built from it.
Proofregions.intro[0]
Request GET / #/regions/intro/0 Status 200
Recorded at build time from TYPO3 14.3. Host replaced with typo3.example; the data is unchanged. Full JSON response
JSON response
{
"uid": 2060,
"CType": "textmedia",
"header": "Navigation",
"header_layout": 0,
"header_position": "",
"header_link": null,
"subheader": "",
"bodytext": [
{
"_type": "block",
"_key": "k0",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k1",
"marks": [],
"text": "One request returns a page and its subpages as a tree: titles, slugs, doktype and absolute URLs in the request language. The menu at the top of this page and the page list in the footer were built from it."
}
]
}
],
"assets": [
{
"uid": 2022,
"name": "navigation.jpg",
"extension": "jpg",
"publicUrl": "/fileadmin/website/plates/navigation.jpg",
"mimeType": "image/jpeg",
"fileSize": 156840,
"metadata": {
"title": null,
"description": null
}
}
],
"layout": 0,
"frame_class": "default",
"space_before_class": "",
"space_after_class": ""
}Generated TypeScript type
type HeadlessContentTextmediaRead = {
"@type"?: string;
"@id"?: string;
uid?: number;
CType: "textmedia";
header?: string;
header_layout?: number;
header_position?: string;
header_link?: components["schemas"]["HeadlessLink"] | null;
subheader?: string;
bodytext?: components["schemas"]["PortableText"];
assets?: components["schemas"]["FileObject"][];
layout?: number;
frame_class?: string;
space_before_class?: string;
space_after_class?: string;
};
Depth
Without a parameter the tree goes down navigation.depth levels, one on this request:
GET /_api/headless_navigation/2000?depth=1 - tca-api-headless
/- Quick start
/quick-start - Features
/features - Contract
/contract - Specimen
/specimen - Extensions
/extensions - Sitemap
/sitemap - Colophon
/colophon
- Quick start
Response 200GET /website/_api/headless_navigation/2000?depth=1
Request GET / Status 200
Recorded at build time from TYPO3 14.3. Host replaced with typo3.example; the data is unchanged. Full JSON response
JSON response
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2000",
"uid": 2000,
"title": "tca-api-headless",
"nav_title": "",
"slug": "/",
"doktype": 1,
"url": "https://typo3.example/website/",
"children": [
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2001",
"uid": 2001,
"title": "Quick start",
"nav_title": "",
"slug": "/quick-start",
"doktype": 1,
"url": "https://typo3.example/website/quick-start",
"children": []
},
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2002",
"uid": 2002,
"title": "Features",
"nav_title": "",
"slug": "/features",
"doktype": 1,
"url": "https://typo3.example/website/features",
"children": []
},
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2014",
"uid": 2014,
"title": "Contract",
"nav_title": "",
"slug": "/contract",
"doktype": 1,
"url": "https://typo3.example/website/contract",
"children": []
},
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2016",
"uid": 2016,
"title": "Specimen",
"nav_title": "",
"slug": "/specimen",
"doktype": 1,
"url": "https://typo3.example/website/specimen",
"children": []
},
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2015",
"uid": 2015,
"title": "Extensions",
"nav_title": "",
"slug": "/extensions",
"doktype": 1,
"url": "https://typo3.example/website/extensions",
"children": []
},
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2017",
"uid": 2017,
"title": "Sitemap",
"nav_title": "",
"slug": "/sitemap",
"doktype": 1,
"url": "https://typo3.example/website/sitemap",
"children": []
},
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2004",
"uid": 2004,
"title": "Colophon",
"nav_title": "",
"slug": "/colophon",
"doktype": 1,
"url": "https://typo3.example/website/colophon",
"children": []
}
]
}Generated TypeScript type
type HeadlessNavigationRead = {
"@type"?: string;
"@id"?: string;
uid: number;
title?: string;
nav_title?: string;
slug?: string | null;
doktype?: 1 | 3 | 4;
url: string;
children: components["schemas"]["HeadlessNavigationRead"][];
};A higher depth is capped to navigation.maxDepth, four on this site. This request asks for nine:
GET /_api/headless_navigation/2002?depth=9 - Features
/features - Pages and regions
/features/ regions - Content and rich text
/features/ content - Navigation
/features/ navigation - Routing and SEO
/features/ routing-seo - Translations
/features/ translations - Links
/features/ links
- Pages and regions
Response 200GET /website/_api/headless_navigation/2002?depth=9
Request GET / Status 200
Recorded at build time from TYPO3 14.3. Host replaced with typo3.example; the data is unchanged. Full JSON response
JSON response
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2002",
"uid": 2002,
"title": "Features",
"nav_title": "",
"slug": "/features",
"doktype": 1,
"url": "https://typo3.example/website/features",
"children": [
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2003",
"uid": 2003,
"title": "Pages and regions",
"nav_title": "",
"slug": "/features/regions",
"doktype": 1,
"url": "https://typo3.example/website/features/regions",
"children": []
},
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2009",
"uid": 2009,
"title": "Content and rich text",
"nav_title": "",
"slug": "/features/content",
"doktype": 1,
"url": "https://typo3.example/website/features/content",
"children": []
},
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2010",
"uid": 2010,
"title": "Navigation",
"nav_title": "",
"slug": "/features/navigation",
"doktype": 1,
"url": "https://typo3.example/website/features/navigation",
"children": []
},
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2011",
"uid": 2011,
"title": "Routing and SEO",
"nav_title": "",
"slug": "/features/routing-seo",
"doktype": 1,
"url": "https://typo3.example/website/features/routing-seo",
"children": []
},
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2012",
"uid": 2012,
"title": "Translations",
"nav_title": "",
"slug": "/features/translations",
"doktype": 1,
"url": "https://typo3.example/website/features/translations",
"children": []
},
{
"@type": "HeadlessNavigation",
"@id": "/_api/headless_navigation/2013",
"uid": 2013,
"title": "Links",
"nav_title": "",
"slug": "/features/links",
"doktype": 1,
"url": "https://typo3.example/website/features/links",
"children": []
}
]
}Generated TypeScript type
type HeadlessNavigationRead = {
"@type"?: string;
"@id"?: string;
uid: number;
title?: string;
nav_title?: string;
slug?: string | null;
doktype?: 1 | 3 | 4;
url: string;
children: components["schemas"]["HeadlessNavigationRead"][];
};Proofregions.main[0]
Request GET / #/regions/main/0 Status 200
Recorded at build time from TYPO3 14.3. Host replaced with typo3.example; the data is unchanged. Full JSON response
JSON response
{
"uid": 2061,
"CType": "text",
"header": "Depth",
"header_layout": 0,
"header_position": "",
"header_link": null,
"subheader": "",
"bodytext": [
{
"_type": "block",
"_key": "k0",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k1",
"marks": [],
"text": "Without a parameter the tree goes down "
},
{
"_type": "span",
"_key": "k2",
"marks": [
"code"
],
"text": "navigation.depth"
},
{
"_type": "span",
"_key": "k3",
"marks": [],
"text": " levels, one on this request:"
}
]
},
{
"_type": "block",
"_key": "k4",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k5",
"marks": [
"code"
],
"text": "GET /_api/headless_navigation/2000?depth=1"
}
]
},
{
"_type": "block",
"_key": "k6",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k7",
"marks": [],
"text": "A higher "
},
{
"_type": "span",
"_key": "k8",
"marks": [
"code"
],
"text": "depth"
},
{
"_type": "span",
"_key": "k9",
"marks": [],
"text": " is capped to "
},
{
"_type": "span",
"_key": "k10",
"marks": [
"code"
],
"text": "navigation.maxDepth"
},
{
"_type": "span",
"_key": "k11",
"marks": [],
"text": ", four on this site. This request asks for nine:"
}
]
},
{
"_type": "block",
"_key": "k12",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k13",
"marks": [
"code"
],
"text": "GET /_api/headless_navigation/2002?depth=9"
}
]
}
],
"layout": 0,
"frame_class": "default",
"space_before_class": "",
"space_after_class": ""
}Generated TypeScript type
type HeadlessContentTextRead = {
"@type"?: string;
"@id"?: string;
uid?: number;
CType: "text";
header?: string;
header_layout?: number;
header_position?: string;
header_link?: components["schemas"]["HeadlessLink"] | null;
subheader?: string;
bodytext?: components["schemas"]["PortableText"];
layout?: number;
frame_class?: string;
space_before_class?: string;
space_after_class?: string;
};An invalid depth
A depth that is not a positive integer is a client error:
GET /_api/headless_navigation/2000?depth=all Response 400GET /website/_api/headless_navigation/2000?depth=all
Request GET / Status 400
Recorded at build time from TYPO3 14.3. Host replaced with typo3.example; the data is unchanged. Full JSON response
JSON response
{
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
"@type": "hydra:Error",
"hydra:title": "Bad Request",
"hydra:description": "The query parameter \"depth\" must be a positive integer."
}Generated TypeScript type
type HydraError = {
"@context"?: string;
"@type": string;
"hydra:title": string;
"hydra:description": string;
};Proofregions.main[1]
Request GET / #/regions/main/1 Status 200
Recorded at build time from TYPO3 14.3. Host replaced with typo3.example; the data is unchanged. Full JSON response
JSON response
{
"uid": 2062,
"CType": "text",
"header": "An invalid depth",
"header_layout": 0,
"header_position": "",
"header_link": null,
"subheader": "",
"bodytext": [
{
"_type": "block",
"_key": "k0",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k1",
"marks": [],
"text": "A depth that is not a positive integer is a client error:"
}
]
},
{
"_type": "block",
"_key": "k2",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k3",
"marks": [
"code"
],
"text": "GET /_api/headless_navigation/2000?depth=all"
}
]
}
],
"layout": 0,
"frame_class": "default",
"space_before_class": "",
"space_after_class": ""
}Generated TypeScript type
type HeadlessContentTextRead = {
"@type"?: string;
"@id"?: string;
uid?: number;
CType: "text";
header?: string;
header_layout?: number;
header_position?: string;
header_link?: components["schemas"]["HeadlessLink"] | null;
subheader?: string;
bodytext?: components["schemas"]["PortableText"];
layout?: number;
frame_class?: string;
space_before_class?: string;
space_after_class?: string;
};What a menu leaves out
The tree follows the rules of a frontend menu. Pages hidden in menus, pages not available in the language and the pages of other sites are left out, and a left-out page hides its subpages. This site's Meta page is hidden in menus, so the footer finds the imprint by a path lookup. The Colophon has no German translation, so the German menu doesn't list it.
Standard pages, links and shortcuts (doktype 1, 3 and 4) are listed and delivered; doktype tells them apart, and url is always the page's own URL. Other doktypes answer like a missing page.
Proofregions.main[2]
Request GET / #/regions/main/2 Status 200
Recorded at build time from TYPO3 14.3. Host replaced with typo3.example; the data is unchanged. Full JSON response
JSON response
{
"uid": 2063,
"CType": "text",
"header": "What a menu leaves out",
"header_layout": 0,
"header_position": "",
"header_link": null,
"subheader": "",
"bodytext": [
{
"_type": "block",
"_key": "k0",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k1",
"marks": [],
"text": "The tree follows the rules of a frontend menu. Pages hidden in menus, pages not available in the language and the pages of other sites are left out, and a left-out page hides its subpages. This site's Meta page is hidden in menus, so the footer finds the imprint by a path lookup. The Colophon has no German translation, so the German menu doesn't list it."
}
]
},
{
"_type": "block",
"_key": "k2",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k3",
"marks": [],
"text": "Standard pages, links and shortcuts (doktype 1, 3 and 4) are listed and delivered; "
},
{
"_type": "span",
"_key": "k4",
"marks": [
"code"
],
"text": "doktype"
},
{
"_type": "span",
"_key": "k5",
"marks": [],
"text": " tells them apart, and "
},
{
"_type": "span",
"_key": "k6",
"marks": [
"code"
],
"text": "url"
},
{
"_type": "span",
"_key": "k7",
"marks": [],
"text": " is always the page's own URL. Other doktypes answer like a missing page."
}
]
}
],
"layout": 0,
"frame_class": "default",
"space_before_class": "",
"space_after_class": ""
}Generated TypeScript type
type HeadlessContentTextRead = {
"@type"?: string;
"@id"?: string;
uid?: number;
CType: "text";
header?: string;
header_layout?: number;
header_position?: string;
header_link?: components["schemas"]["HeadlessLink"] | null;
subheader?: string;
bodytext?: components["schemas"]["PortableText"];
layout?: number;
frame_class?: string;
space_before_class?: string;
space_after_class?: string;
};