tca-api-headless

Features

Six parts of the API, each on a page of its own. Every page shows its content beside the response it came from, and a piece of Kettenblatt, a fictional bike workshop rendered by the same API.

Proofregions.intro[0]

Request GET /website/_api/headless_pages/2002 #/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": 2020,
  "CType": "text",
  "header": "Features",
  "header_layout": 0,
  "header_position": "",
  "header_link": null,
  "subheader": "",
  "bodytext": [
    {
      "_type": "block",
      "_key": "k1",
      "style": "normal",
      "markDefs": [
        {
          "_key": "k0",
          "_type": "link",
          "href": "https://typo3.example/website/specimen",
          "target": null,
          "title": null
        }
      ],
      "children": [
        {
          "_type": "span",
          "_key": "k2",
          "marks": [],
          "text": "Six parts of the API, each on a page of its own. Every page shows its content beside the response it came from, and a piece of "
        },
        {
          "_type": "span",
          "_key": "k3",
          "marks": [
            "k0"
          ],
          "text": "Kettenblatt"
        },
        {
          "_type": "span",
          "_key": "k4",
          "marks": [],
          "text": ", a fictional bike workshop rendered by the same API."
        }
      ]
    }
  ],
  "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;
};

Pages and regions

Content grouped by the column identifiers of the backend layout, inherited or set per site.

Proofregions.entries[0]

Request GET /website/_api/headless_pages/2002 #/regions/entries/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": 2021,
  "CType": "textmedia",
  "header": "Pages and regions",
  "header_layout": 0,
  "header_position": "",
  "header_link": {
    "href": "https://typo3.example/website/features/regions",
    "target": null,
    "title": null
  },
  "subheader": "",
  "bodytext": [
    {
      "_type": "block",
      "_key": "k0",
      "style": "normal",
      "markDefs": [],
      "children": [
        {
          "_type": "span",
          "_key": "k1",
          "marks": [],
          "text": "Content grouped by the column identifiers of the backend layout, inherited or set per site."
        }
      ]
    }
  ],
  "assets": [
    {
      "uid": 2020,
      "name": "regions.jpg",
      "extension": "jpg",
      "publicUrl": "/fileadmin/website/plates/regions.jpg",
      "mimeType": "image/jpeg",
      "fileSize": 125517,
      "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;
};

Content and rich text

Ten content types, each with its own schema. Rich text as Portable Text, lists and tables as data.

Proofregions.entries[1]

Request GET /website/_api/headless_pages/2002 #/regions/entries/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": 2022,
  "CType": "textmedia",
  "header": "Content and rich text",
  "header_layout": 0,
  "header_position": "",
  "header_link": {
    "href": "https://typo3.example/website/features/content",
    "target": null,
    "title": null
  },
  "subheader": "",
  "bodytext": [
    {
      "_type": "block",
      "_key": "k0",
      "style": "normal",
      "markDefs": [],
      "children": [
        {
          "_type": "span",
          "_key": "k1",
          "marks": [],
          "text": "Ten content types, each with its own schema. Rich text as Portable Text, lists and tables as data."
        }
      ]
    }
  ],
  "assets": [
    {
      "uid": 2021,
      "name": "content.jpg",
      "extension": "jpg",
      "publicUrl": "/fileadmin/website/plates/content.jpg",
      "mimeType": "image/jpeg",
      "fileSize": 248813,
      "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;
};

Navigation

A page tree in one request, absolute URLs in the request language, a depth you choose.

Proofregions.entries[2]

Request GET /website/_api/headless_pages/2002 #/regions/entries/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": 2023,
  "CType": "textmedia",
  "header": "Navigation",
  "header_layout": 0,
  "header_position": "",
  "header_link": {
    "href": "https://typo3.example/website/features/navigation",
    "target": null,
    "title": null
  },
  "subheader": "",
  "bodytext": [
    {
      "_type": "block",
      "_key": "k0",
      "style": "normal",
      "markDefs": [],
      "children": [
        {
          "_type": "span",
          "_key": "k1",
          "marks": [],
          "text": "A page tree in one request, absolute URLs in the request language, a depth you choose."
        }
      ]
    }
  ],
  "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;
};

Routing and SEO

From a path to a page, with the SEO fields and a meta object for the head.

Proofregions.entries[3]

Request GET /website/_api/headless_pages/2002 #/regions/entries/3 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": 2024,
  "CType": "textmedia",
  "header": "Routing and SEO",
  "header_layout": 0,
  "header_position": "",
  "header_link": {
    "href": "https://typo3.example/website/features/routing-seo",
    "target": null,
    "title": null
  },
  "subheader": "",
  "bodytext": [
    {
      "_type": "block",
      "_key": "k0",
      "style": "normal",
      "markDefs": [],
      "children": [
        {
          "_type": "span",
          "_key": "k1",
          "marks": [],
          "text": "From a path to a page, with the SEO fields and a meta object for the head."
        }
      ]
    }
  ],
  "assets": [
    {
      "uid": 2023,
      "name": "routing.jpg",
      "extension": "jpg",
      "publicUrl": "/fileadmin/website/plates/routing.jpg",
      "mimeType": "image/jpeg",
      "fileSize": 161591,
      "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;
};

Translations

Strict, fallback and free mode, linked by the uid of the default language.

Proofregions.entries[4]

Request GET /website/_api/headless_pages/2002 #/regions/entries/4 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": 2025,
  "CType": "textmedia",
  "header": "Translations",
  "header_layout": 0,
  "header_position": "",
  "header_link": {
    "href": "https://typo3.example/website/features/translations",
    "target": null,
    "title": null
  },
  "subheader": "",
  "bodytext": [
    {
      "_type": "block",
      "_key": "k0",
      "style": "normal",
      "markDefs": [],
      "children": [
        {
          "_type": "span",
          "_key": "k1",
          "marks": [],
          "text": "Strict, fallback and free mode, linked by the uid of the default language."
        }
      ]
    }
  ],
  "assets": [
    {
      "uid": 2024,
      "name": "translations.jpg",
      "extension": "jpg",
      "publicUrl": "/fileadmin/website/plates/translations.jpg",
      "mimeType": "image/jpeg",
      "fileSize": 156553,
      "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;
};

Links

Typolinks arrive resolved: absolute href, target and title.

Proofregions.entries[5]

Request GET /website/_api/headless_pages/2002 #/regions/entries/5 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": 2026,
  "CType": "textmedia",
  "header": "Links",
  "header_layout": 0,
  "header_position": "",
  "header_link": {
    "href": "https://typo3.example/website/features/links",
    "target": null,
    "title": null
  },
  "subheader": "",
  "bodytext": [
    {
      "_type": "block",
      "_key": "k0",
      "style": "normal",
      "markDefs": [],
      "children": [
        {
          "_type": "span",
          "_key": "k1",
          "marks": [],
          "text": "Typolinks arrive resolved: absolute href, target and title."
        }
      ]
    }
  ],
  "assets": [
    {
      "uid": 2025,
      "name": "links.jpg",
      "extension": "jpg",
      "publicUrl": "/fileadmin/website/plates/links.jpg",
      "mimeType": "image/jpeg",
      "fileSize": 169605,
      "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;
};