Vertrag
Der Vertrag
TCA API schreibt pro Site ein OpenAPI-Dokument, und tca-api-headless typisiert alles, was es hinzufügt: Regionen, jeden Inhaltstyp, Links, den Navigationsbaum und das Nachschlagen. Das ist das Dokument dieser Site, gelesen beim Bau dieser Seite:
GET /de/_api/openapi.json Download: website.json · website.d.ts
Pfade
| Methode | Pfad | Beschreibung |
|---|---|---|
GET | / | Get single HeadlessNavigation |
GET | / | Look up a page by its path |
GET | / | Get single HeadlessPages |
Schemas 34
Seiten und Navigation
HeadlessNavigationReadtype 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"][]; };HeadlessNavigationCollectiontype HeadlessNavigationCollection = { "@context"?: string; "@type"?: string; "@id"?: string; "hydra:totalItems"?: number; "hydra:member"?: components["schemas"]["HeadlessNavigationRead"][]; "hydra:view"?: { "@type"?: string; "hydra:first"?: string; "hydra:last"?: string; "hydra:previous"?: string | null; "hydra:next"?: string | null; }; "hydra:search"?: { "@type"?: string; "hydra:template"?: string; "hydra:variableRepresentation"?: string; "hydra:mapping"?: { "@type"?: string; variable?: string; property?: string; required?: boolean; }[]; }; };HeadlessPagesReadtype HeadlessPagesRead = { "@type"?: string; "@id"?: string; uid?: number; title?: string; slug?: string | null; seo_title?: string; description?: string | null; no_index?: number; no_follow?: number; canonical_link?: components["schemas"]["HeadlessLink"] | null; og_title?: string; og_description?: string | null; og_image?: components["schemas"]["FileObject"][]; breadcrumbs: components["schemas"]["HeadlessPagesBreadcrumb"][]; languages: components["schemas"]["HeadlessPagesLanguage"][]; meta: components["schemas"]["HeadlessPagesMeta"]; regions: { [key: string]: components["schemas"]["HeadlessContentRead"][]; }; shortcut?: components["schemas"]["HeadlessPagesShortcut"] | null; };HeadlessPagesCollectiontype HeadlessPagesCollection = { "@context"?: string; "@type"?: string; "@id"?: string; "hydra:totalItems"?: number; "hydra:member"?: components["schemas"]["HeadlessPagesLookup"][]; "hydra:view"?: { "@type"?: string; "hydra:first"?: string; "hydra:last"?: string; "hydra:previous"?: string | null; "hydra:next"?: string | null; }; "hydra:search"?: { "@type"?: string; "hydra:template"?: string; "hydra:variableRepresentation"?: string; "hydra:mapping"?: { "@type"?: string; variable?: string; property?: string; required?: boolean; }[]; }; redirect?: components["schemas"]["HeadlessPagesRedirect"]; };HeadlessPagesBreadcrumbtype HeadlessPagesBreadcrumb = { uid: number; title: string; nav_title: string; url: string; doktype: number; };HeadlessPagesLanguagetype HeadlessPagesLanguage = { languageId: number; locale: string; hreflang: string; title: string; url: string | null; available: boolean; active: boolean; };HeadlessPagesMetatype HeadlessPagesMeta = { robots: "index,follow" | "index,nofollow" | "noindex,follow" | "noindex,nofollow"; canonical: string | null; schema: { "@context": "https://schema.org"; "@type": "WebPage"; url: string; name: string; inLanguage: string; description?: string; }; alternates: { hreflang: string; href: string; }[]; };HeadlessPagesLookuptype HeadlessPagesLookup = { "@type": string; "@id": string; uid: number; };HeadlessPagesRedirecttype HeadlessPagesRedirect = { url: string; statusCode: number; };HeadlessPagesShortcuttype HeadlessPagesShortcut = { uid: number; url: string; };
Inhaltselemente
HeadlessContentTextReadtype 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; };HeadlessContentTextmediaReadtype 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; };HeadlessContentTextpicReadtype HeadlessContentTextpicRead = { "@type"?: string; "@id"?: string; uid?: number; CType: "textpic"; header?: string; header_layout?: number; header_position?: string; header_link?: components["schemas"]["HeadlessLink"] | null; subheader?: string; bodytext?: components["schemas"]["PortableText"]; image?: components["schemas"]["FileObject"][]; layout?: number; frame_class?: string; space_before_class?: string; space_after_class?: string; };HeadlessContentImageReadtype 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; };HeadlessContentHeaderReadtype 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; };HeadlessContentBulletsReadtype 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; };HeadlessContentTableReadtype HeadlessContentTableRead = { "@type"?: string; "@id"?: string; uid?: number; CType: "table"; header?: string; header_layout?: number; header_position?: string; header_link?: components["schemas"]["HeadlessLink"] | null; subheader?: string; bodytext?: components["schemas"]["HeadlessTable"]; table_caption?: string | null; layout?: number; frame_class?: string; space_before_class?: string; space_after_class?: string; table_header_position?: number; };HeadlessContentUploadsReadtype HeadlessContentUploadsRead = { "@type"?: string; "@id"?: string; uid?: number; CType: "uploads"; header?: string; header_layout?: number; header_position?: string; header_link?: components["schemas"]["HeadlessLink"] | null; subheader?: string; media?: components["schemas"]["FileObject"][]; layout?: number; frame_class?: string; space_before_class?: string; space_after_class?: string; };HeadlessContentHtmlReadtype HeadlessContentHtmlRead = { "@type"?: string; "@id"?: string; uid?: number; CType: "html"; header?: string; bodytext?: components["schemas"]["HeadlessHtml"]; layout?: number; frame_class?: string; space_before_class?: string; space_after_class?: string; };HeadlessContentShortcutReadtype HeadlessContentShortcutRead = { "@type"?: string; "@id"?: string; uid?: number; CType: "shortcut"; header?: string; layout?: number; frame_class?: string; space_before_class?: string; space_after_class?: string; records: components["schemas"]["HeadlessContentRead"][]; };HeadlessContentReadtype HeadlessContentRead = components["schemas"]["HeadlessContentTextRead"] | components["schemas"]["HeadlessContentTextmediaRead"] | components["schemas"]["HeadlessContentTextpicRead"] | components["schemas"]["HeadlessContentImageRead"] | components["schemas"]["HeadlessContentHeaderRead"] | components["schemas"]["HeadlessContentBulletsRead"] | components["schemas"]["HeadlessContentTableRead"] | components["schemas"]["HeadlessContentUploadsRead"] | components["schemas"]["HeadlessContentHtmlRead"] | components["schemas"]["HeadlessContentShortcutRead"];
HeadlessContentCollectiontype HeadlessContentCollection = { "@context"?: string; "@type"?: string; "@id"?: string; "hydra:totalItems"?: number; "hydra:member"?: components["schemas"]["HeadlessContentRead"][]; "hydra:view"?: { "@type"?: string; "hydra:first"?: string; "hydra:last"?: string; "hydra:previous"?: string | null; "hydra:next"?: string | null; }; "hydra:search"?: { "@type"?: string; "hydra:template"?: string; "hydra:variableRepresentation"?: string; "hydra:mapping"?: { "@type"?: string; variable?: string; property?: string; required?: boolean; }[]; }; };HeadlessBulletListtype HeadlessBulletList = string[] | { term: string; definition: string; }[];HeadlessTabletype HeadlessTable = { head: string[]; body: string[][]; foot: string[]; };
Rich Text
PortableTexttype PortableText = components["schemas"]["PortableTextBlock"][];
PortableTextBlocktype PortableTextBlock = { _type: "block"; _key: string; style: "normal" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "blockquote"; markDefs: components["schemas"]["PortableTextLink"][]; children: components["schemas"]["PortableTextSpan"][]; listItem?: "bullet" | "number"; level?: number; };PortableTextSpantype PortableTextSpan = { _type: "span"; _key: string; marks: string[]; text: string; };PortableTextLinktype PortableTextLink = { _type: "link"; _key: string; href: string; target: string | null; title: string | null; };
Links, Dateien und Protokoll
RelationStubtype RelationStub = { "@id": string; "@type": string; uid: number; };FileObjecttype FileObject = { uid?: number; name?: string; extension?: string; publicUrl?: string | null; mimeType?: string; fileSize?: number; metadata?: { title?: string | null; alternative?: string | null; description?: string | null; copyright?: string | null; }; width?: number; height?: number; cropVariants?: { [key: string]: { publicUrl?: string; width?: number; height?: number; }; }; };HydraErrortype HydraError = { "@context"?: string; "@type": string; "hydra:title": string; "hydra:description": string; };ValidationErrortype ValidationError = { "@context"?: string; "@type"?: string; "hydra:title"?: string; "hydra:description"?: string; violations?: { propertyPath?: string; message?: string; code?: string; }[]; };HeadlessHtmltype HeadlessHtml = string;
HeadlessLinktype HeadlessLink = { href: string; target: string | null; title: string | null; };
Antwort 200GET /website/de/_api/openapi.json
Anfrage GET / Status 200
Beim Build von TYPO3 14.3 aufgezeichnet. Host durch typo3.example ersetzt; die Daten sind unverändert. Vollständige JSON-Antwort
JSON-Antwort
{
"openapi": "3.1.0",
"info": {
"title": "TCA API",
"version": "1.0.0"
},
"paths": {/* 3 paths */},
"components": {
"schemas": {/* 34 schemas */},
"securitySchemes": {
"FrontendSession": {
"type": "apiKey",
"in": "cookie",
"name": "fe_typo_user",
"description": "TYPO3 frontend user session."
},
"BackendSession": {
"type": "apiKey",
"in": "cookie",
"name": "be_typo_user",
"description": "TYPO3 backend user session."
}
}
},
"tags": [
{
"name": "HeadlessContent"
},
{
"name": "HeadlessNavigation"
},
{
"name": "HeadlessPages"
}
]
}Abzugregions.main[0]
Anfrage GET / #/regions/main/0 Status 200
Beim Build von TYPO3 14.3 aufgezeichnet. Host durch typo3.example ersetzt; die Daten sind unverändert. Vollständige JSON-Antwort
JSON-Antwort
{
"uid": 2210,
"CType": "text",
"header": "Der Vertrag",
"header_layout": 0,
"header_position": "",
"header_link": null,
"subheader": "",
"bodytext": [
{
"_type": "block",
"_key": "k0",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k1",
"marks": [],
"text": "TCA API schreibt pro Site ein OpenAPI-Dokument, und tca-api-headless typisiert alles, was es hinzufügt: Regionen, jeden Inhaltstyp, Links, den Navigationsbaum und das Nachschlagen. Das ist das Dokument dieser Site, gelesen beim Bau dieser Seite:"
}
]
},
{
"_type": "block",
"_key": "k2",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k3",
"marks": [
"code"
],
"text": "GET /de/_api/openapi.json"
}
]
}
],
"layout": 0,
"frame_class": "default",
"space_before_class": "",
"space_after_class": ""
}Generierter TypeScript-Typ
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;
};Generiert, dann verglichen
Diese Site generiert ihre TypeScript-Deklarationen mit openapi-typescript aus diesem Dokument, und ihre CI schlägt fehl, wenn beide auseinanderlaufen. Jeder Abzug auf dieser Site zeigt den Typ seines Elements, ausgeschnitten aus diesen Deklarationen.
bunx openapi-typescript openapi.json -o src/api/schema.d.ts Das CLI schreibt dasselbe Dokument ohne Webanfrage:
vendor/bin/typo3 tca-api:openapi website --output openapi.json Abzugregions.main[1]
Anfrage GET / #/regions/main/1 Status 200
Beim Build von TYPO3 14.3 aufgezeichnet. Host durch typo3.example ersetzt; die Daten sind unverändert. Vollständige JSON-Antwort
JSON-Antwort
{
"uid": 2211,
"CType": "text",
"header": "Generiert, dann verglichen",
"header_layout": 0,
"header_position": "",
"header_link": null,
"subheader": "",
"bodytext": [
{
"_type": "block",
"_key": "k0",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k1",
"marks": [],
"text": "Diese Site generiert ihre TypeScript-Deklarationen mit openapi-typescript aus diesem Dokument, und ihre CI schlägt fehl, wenn beide auseinanderlaufen. Jeder Abzug auf dieser Site zeigt den Typ seines Elements, ausgeschnitten aus diesen Deklarationen."
}
]
},
{
"_type": "block",
"_key": "k2",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k3",
"marks": [
"code"
],
"text": "bunx openapi-typescript openapi.json -o src/api/schema.d.ts"
}
]
},
{
"_type": "block",
"_key": "k4",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k5",
"marks": [],
"text": "Das CLI schreibt dasselbe Dokument ohne Webanfrage:"
}
]
},
{
"_type": "block",
"_key": "k6",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k7",
"marks": [
"code"
],
"text": "vendor/bin/typo3 tca-api:openapi website --output openapi.json"
}
]
}
],
"layout": 0,
"frame_class": "default",
"space_before_class": "",
"space_after_class": ""
}Generierter TypeScript-Typ
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;
};Ein Dokument pro Site
Das Dokument gehört zu seiner Site. Kettenblatt erlaubt den Fallback-Typ menu_subpages, darum hat nur sein Dokument HeadlessContentFallbackRead, und sein Frontend braucht eigene Typen:
GET https://kettenblatt.example/de/_api/openapi.json Download: kettenblatt.json · kettenblatt.d.ts
Pfade
| Methode | Pfad | Beschreibung |
|---|---|---|
GET | / | Get single HeadlessNavigation |
GET | / | Look up a page by its path |
GET | / | Get single HeadlessPages |
Schemas 35
Seiten und Navigation
HeadlessNavigationReadtype 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"][]; };HeadlessNavigationCollectiontype HeadlessNavigationCollection = { "@context"?: string; "@type"?: string; "@id"?: string; "hydra:totalItems"?: number; "hydra:member"?: components["schemas"]["HeadlessNavigationRead"][]; "hydra:view"?: { "@type"?: string; "hydra:first"?: string; "hydra:last"?: string; "hydra:previous"?: string | null; "hydra:next"?: string | null; }; "hydra:search"?: { "@type"?: string; "hydra:template"?: string; "hydra:variableRepresentation"?: string; "hydra:mapping"?: { "@type"?: string; variable?: string; property?: string; required?: boolean; }[]; }; };HeadlessPagesReadtype HeadlessPagesRead = { "@type"?: string; "@id"?: string; uid?: number; title?: string; slug?: string | null; seo_title?: string; description?: string | null; no_index?: number; no_follow?: number; canonical_link?: components["schemas"]["HeadlessLink"] | null; og_title?: string; og_description?: string | null; og_image?: components["schemas"]["FileObject"][]; breadcrumbs: components["schemas"]["HeadlessPagesBreadcrumb"][]; languages: components["schemas"]["HeadlessPagesLanguage"][]; meta: components["schemas"]["HeadlessPagesMeta"]; regions: { [key: string]: (components["schemas"]["HeadlessContentRead"] | components["schemas"]["HeadlessContentFallbackRead"])[]; }; shortcut?: components["schemas"]["HeadlessPagesShortcut"] | null; };HeadlessPagesCollectiontype HeadlessPagesCollection = { "@context"?: string; "@type"?: string; "@id"?: string; "hydra:totalItems"?: number; "hydra:member"?: components["schemas"]["HeadlessPagesLookup"][]; "hydra:view"?: { "@type"?: string; "hydra:first"?: string; "hydra:last"?: string; "hydra:previous"?: string | null; "hydra:next"?: string | null; }; "hydra:search"?: { "@type"?: string; "hydra:template"?: string; "hydra:variableRepresentation"?: string; "hydra:mapping"?: { "@type"?: string; variable?: string; property?: string; required?: boolean; }[]; }; redirect?: components["schemas"]["HeadlessPagesRedirect"]; };HeadlessPagesBreadcrumbtype HeadlessPagesBreadcrumb = { uid: number; title: string; nav_title: string; url: string; doktype: number; };HeadlessPagesLanguagetype HeadlessPagesLanguage = { languageId: number; locale: string; hreflang: string; title: string; url: string | null; available: boolean; active: boolean; };HeadlessPagesMetatype HeadlessPagesMeta = { robots: "index,follow" | "index,nofollow" | "noindex,follow" | "noindex,nofollow"; canonical: string | null; schema: { "@context": "https://schema.org"; "@type": "WebPage"; url: string; name: string; inLanguage: string; description?: string; }; alternates: { hreflang: string; href: string; }[]; };HeadlessPagesLookuptype HeadlessPagesLookup = { "@type": string; "@id": string; uid: number; };HeadlessPagesRedirecttype HeadlessPagesRedirect = { url: string; statusCode: number; };HeadlessPagesShortcuttype HeadlessPagesShortcut = { uid: number; url: string; };
Inhaltselemente
HeadlessContentTextReadtype 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; };HeadlessContentTextmediaReadtype 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; };HeadlessContentTextpicReadtype HeadlessContentTextpicRead = { "@type"?: string; "@id"?: string; uid?: number; CType: "textpic"; header?: string; header_layout?: number; header_position?: string; header_link?: components["schemas"]["HeadlessLink"] | null; subheader?: string; bodytext?: components["schemas"]["PortableText"]; image?: components["schemas"]["FileObject"][]; layout?: number; frame_class?: string; space_before_class?: string; space_after_class?: string; };HeadlessContentImageReadtype 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; };HeadlessContentHeaderReadtype 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; };HeadlessContentBulletsReadtype 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; };HeadlessContentTableReadtype HeadlessContentTableRead = { "@type"?: string; "@id"?: string; uid?: number; CType: "table"; header?: string; header_layout?: number; header_position?: string; header_link?: components["schemas"]["HeadlessLink"] | null; subheader?: string; bodytext?: components["schemas"]["HeadlessTable"]; table_caption?: string | null; layout?: number; frame_class?: string; space_before_class?: string; space_after_class?: string; table_header_position?: number; };HeadlessContentUploadsReadtype HeadlessContentUploadsRead = { "@type"?: string; "@id"?: string; uid?: number; CType: "uploads"; header?: string; header_layout?: number; header_position?: string; header_link?: components["schemas"]["HeadlessLink"] | null; subheader?: string; media?: components["schemas"]["FileObject"][]; layout?: number; frame_class?: string; space_before_class?: string; space_after_class?: string; };HeadlessContentHtmlReadtype HeadlessContentHtmlRead = { "@type"?: string; "@id"?: string; uid?: number; CType: "html"; header?: string; bodytext?: components["schemas"]["HeadlessHtml"]; layout?: number; frame_class?: string; space_before_class?: string; space_after_class?: string; };HeadlessContentShortcutReadtype HeadlessContentShortcutRead = { "@type"?: string; "@id"?: string; uid?: number; CType: "shortcut"; header?: string; layout?: number; frame_class?: string; space_before_class?: string; space_after_class?: string; records: (components["schemas"]["HeadlessContentRead"] | components["schemas"]["HeadlessContentFallbackRead"])[]; };HeadlessContentReadtype HeadlessContentRead = components["schemas"]["HeadlessContentTextRead"] | components["schemas"]["HeadlessContentTextmediaRead"] | components["schemas"]["HeadlessContentTextpicRead"] | components["schemas"]["HeadlessContentImageRead"] | components["schemas"]["HeadlessContentHeaderRead"] | components["schemas"]["HeadlessContentBulletsRead"] | components["schemas"]["HeadlessContentTableRead"] | components["schemas"]["HeadlessContentUploadsRead"] | components["schemas"]["HeadlessContentHtmlRead"] | components["schemas"]["HeadlessContentShortcutRead"];
HeadlessContentCollectiontype HeadlessContentCollection = { "@context"?: string; "@type"?: string; "@id"?: string; "hydra:totalItems"?: number; "hydra:member"?: components["schemas"]["HeadlessContentRead"][]; "hydra:view"?: { "@type"?: string; "hydra:first"?: string; "hydra:last"?: string; "hydra:previous"?: string | null; "hydra:next"?: string | null; }; "hydra:search"?: { "@type"?: string; "hydra:template"?: string; "hydra:variableRepresentation"?: string; "hydra:mapping"?: { "@type"?: string; variable?: string; property?: string; required?: boolean; }[]; }; };HeadlessBulletListtype HeadlessBulletList = string[] | { term: string; definition: string; }[];HeadlessTabletype HeadlessTable = { head: string[]; body: string[][]; foot: string[]; };HeadlessContentFallbackReadtype HeadlessContentFallbackRead = { uid: number; CType: "menu_subpages"; header: string; };
Rich Text
PortableTexttype PortableText = components["schemas"]["PortableTextBlock"][];
PortableTextBlocktype PortableTextBlock = { _type: "block"; _key: string; style: "normal" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "blockquote"; markDefs: components["schemas"]["PortableTextLink"][]; children: components["schemas"]["PortableTextSpan"][]; listItem?: "bullet" | "number"; level?: number; };PortableTextSpantype PortableTextSpan = { _type: "span"; _key: string; marks: string[]; text: string; };PortableTextLinktype PortableTextLink = { _type: "link"; _key: string; href: string; target: string | null; title: string | null; };
Links, Dateien und Protokoll
RelationStubtype RelationStub = { "@id": string; "@type": string; uid: number; };FileObjecttype FileObject = { uid?: number; name?: string; extension?: string; publicUrl?: string | null; mimeType?: string; fileSize?: number; metadata?: { title?: string | null; alternative?: string | null; description?: string | null; copyright?: string | null; }; width?: number; height?: number; cropVariants?: { [key: string]: { publicUrl?: string; width?: number; height?: number; }; }; };HydraErrortype HydraError = { "@context"?: string; "@type": string; "hydra:title": string; "hydra:description": string; };ValidationErrortype ValidationError = { "@context"?: string; "@type"?: string; "hydra:title"?: string; "hydra:description"?: string; violations?: { propertyPath?: string; message?: string; code?: string; }[]; };HeadlessHtmltype HeadlessHtml = string;
HeadlessLinktype HeadlessLink = { href: string; target: string | null; title: string | null; };
Antwort 200GET /kettenblatt/de/_api/openapi.json
Anfrage GET / Status 200
Beim Build von TYPO3 14.3 aufgezeichnet. Host durch typo3.example ersetzt; die Daten sind unverändert. Vollständige JSON-Antwort
JSON-Antwort
{
"openapi": "3.1.0",
"info": {
"title": "TCA API",
"version": "1.0.0"
},
"paths": {/* 3 paths */},
"components": {
"schemas": {/* 35 schemas */},
"securitySchemes": {
"FrontendSession": {
"type": "apiKey",
"in": "cookie",
"name": "fe_typo_user",
"description": "TYPO3 frontend user session."
},
"BackendSession": {
"type": "apiKey",
"in": "cookie",
"name": "be_typo_user",
"description": "TYPO3 backend user session."
}
}
},
"tags": [
{
"name": "HeadlessContent"
},
{
"name": "HeadlessNavigation"
},
{
"name": "HeadlessPages"
}
]
}Abzugregions.main[2]
Anfrage GET / #/regions/main/2 Status 200
Beim Build von TYPO3 14.3 aufgezeichnet. Host durch typo3.example ersetzt; die Daten sind unverändert. Vollständige JSON-Antwort
JSON-Antwort
{
"uid": 2212,
"CType": "text",
"header": "Ein Dokument pro Site",
"header_layout": 0,
"header_position": "",
"header_link": null,
"subheader": "",
"bodytext": [
{
"_type": "block",
"_key": "k0",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k1",
"marks": [],
"text": "Das Dokument gehört zu seiner Site. Kettenblatt erlaubt den Fallback-Typ "
},
{
"_type": "span",
"_key": "k2",
"marks": [
"code"
],
"text": "menu_subpages"
},
{
"_type": "span",
"_key": "k3",
"marks": [],
"text": ", darum hat nur sein Dokument "
},
{
"_type": "span",
"_key": "k4",
"marks": [
"code"
],
"text": "HeadlessContentFallbackRead"
},
{
"_type": "span",
"_key": "k5",
"marks": [],
"text": ", und sein Frontend braucht eigene Typen:"
}
]
},
{
"_type": "block",
"_key": "k6",
"style": "normal",
"markDefs": [],
"children": [
{
"_type": "span",
"_key": "k7",
"marks": [
"code"
],
"text": "GET https://kettenblatt.example/de/_api/openapi.json"
}
]
}
],
"layout": 0,
"frame_class": "default",
"space_before_class": "",
"space_after_class": ""
}Generierter TypeScript-Typ
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;
};