tca-api-headless

Specimen

A workshop that doesn't exist

Kettenblatt is a fictional bike workshop. Its site lives in the same TYPO3 instance, is delivered by the same extension and rendered here in a look of its own. It carries what a product page doesn't need: German in free mode, a content type outside the catalog, a deeper menu, definition lists, a price table and photographs.

Everything in it is invented, including the photographs: they are generated images.

Proofregions.main[0]

Request GET /website/_api/headless_pages/2016 #/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": 2240,
  "CType": "text",
  "header": "A workshop that doesn't exist",
  "header_layout": 0,
  "header_position": "",
  "header_link": null,
  "subheader": "",
  "bodytext": [
    {
      "_type": "block",
      "_key": "k0",
      "style": "normal",
      "markDefs": [],
      "children": [
        {
          "_type": "span",
          "_key": "k1",
          "marks": [],
          "text": "Kettenblatt is a fictional bike workshop. Its site lives in the same TYPO3 instance, is delivered by the same extension and rendered here in a look of its own. It carries what a product page doesn't need: German in free mode, a content type outside the catalog, a deeper menu, definition lists, a price table and photographs."
        }
      ]
    },
    {
      "_type": "block",
      "_key": "k2",
      "style": "normal",
      "markDefs": [],
      "children": [
        {
          "_type": "span",
          "_key": "k3",
          "marks": [],
          "text": "Everything in it is invented, including the photographs: they are generated images."
        }
      ]
    }
  ],
  "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;
};

Visit Kettenblatt

Proofregions.main[1]

Request GET /website/_api/headless_pages/2016 #/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": 2241,
  "CType": "header",
  "header": "Visit Kettenblatt",
  "header_layout": 0,
  "header_position": "",
  "header_link": {
    "href": "https://typo3.example/kettenblatt/",
    "target": null,
    "title": null
  },
  "subheader": "",
  "layout": 0,
  "frame_class": "default",
  "space_before_class": "",
  "space_after_class": ""
}

Generated TypeScript type

type HeadlessContentHeaderRead = {
    "@type"?: string;
    "@id"?: string;
    uid?: number;
    CType: "header";
    header?: string;
    header_layout?: number;
    header_position?: string;
    header_link?: components["schemas"]["HeadlessLink"] | null;
    subheader?: string;
    layout?: number;
    frame_class?: string;
    space_before_class?: string;
    space_after_class?: string;
};

The front door

The brick front of the workshop with open wooden doors and two bikes outside
Proofregions.aside[0]

Request GET /website/_api/headless_pages/2016 #/regions/aside/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": 2242,
  "CType": "image",
  "header": "The front door",
  "header_layout": 0,
  "header_position": "",
  "header_link": null,
  "subheader": "",
  "image": [
    {
      "uid": 3006,
      "name": "workshop-front.jpg",
      "extension": "jpg",
      "publicUrl": "/fileadmin/kettenblatt/workshop-front.jpg",
      "mimeType": "image/jpeg",
      "fileSize": 308152,
      "metadata": {
        "title": null,
        "alternative": "The brick front of the workshop with open wooden doors and two bikes outside",
        "description": null,
        "copyright": null
      },
      "cropVariants": {}
    }
  ],
  "layout": 0,
  "frame_class": "default",
  "space_before_class": "",
  "space_after_class": ""
}

Generated TypeScript type

type HeadlessContentImageRead = {
    "@type"?: string;
    "@id"?: string;
    uid?: number;
    CType: "image";
    header?: string;
    header_layout?: number;
    header_position?: string;
    header_link?: components["schemas"]["HeadlessLink"] | null;
    subheader?: string;
    image?: components["schemas"]["FileObject"][];
    layout?: number;
    frame_class?: string;
    space_before_class?: string;
    space_after_class?: string;
};

Where to look

  • German home page: an element of its own, another order
  • Visit: a content type outside the catalog
  • Bikes: three subpages, a deeper menu
  • Repairs: a definition list and a price table
  • Workshop: English only, missing from the German menu
Proofregions.aside[1]

Request GET /website/_api/headless_pages/2016 #/regions/aside/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": 2243,
  "CType": "bullets",
  "header": "Where to look",
  "header_layout": 0,
  "header_position": "",
  "header_link": null,
  "subheader": "",
  "bullets_type": 0,
  "bodytext": [
    "German home page: an element of its own, another order",
    "Visit: a content type outside the catalog",
    "Bikes: three subpages, a deeper menu",
    "Repairs: a definition list and a price table",
    "Workshop: English only, missing from the German menu"
  ],
  "layout": 0,
  "frame_class": "default",
  "space_before_class": "",
  "space_after_class": ""
}

Generated TypeScript type

type HeadlessContentBulletsRead = {
    "@type"?: string;
    "@id"?: string;
    uid?: number;
    CType: "bullets";
    header?: string;
    header_layout?: number;
    header_position?: string;
    header_link?: components["schemas"]["HeadlessLink"] | null;
    subheader?: string;
    bullets_type?: number;
    bodytext?: components["schemas"]["HeadlessBulletList"];
    layout?: number;
    frame_class?: string;
    space_before_class?: string;
    space_after_class?: string;
};