GET
/ng-cms/content-type-templates/{projectId}https://apis-spb.konso.io/ng-cms/content-type-templates/{projectId}smart_toyAgentic specList content type templates
Получает каталог предопределенных шаблонов типов контента, доступных для массового применения к проекту.
Параметры запроса
projectIdstringThe unique identifier of the project
Ответы
200List of available content type templates, ordered by displayOrder.
тип: CmsProjectTemplateDto[]
idstringUnique identifier of the templatecodestringMachine-readable template code used to apply it (e.g. 'website', 'blog')namestringHuman-readable template namedescriptionstringShort description of the templateuseCasestringTypical use case this template is designed forversionnumberTemplate versioncontentTypesCmsProjectTemplateContentTypeDefinition[]Content type definitions bundled in this templatetemplateKeystringIdentifier unique within this template, used to resolve reference fields between the template's own content typesnamestringDisplay name the content type will be created withkeystringMachine-readable key the content type will be created withdescriptionstringOptional description of the content typedisplayFieldstringSchema field key to use as the display/title fieldschemaCmsSchemaField[]Field definitions for the content type. Reference fields carry a referenceTemplateKey instead of a real content type ID, resolved when the template is applieddisplayOrdernumberSort order used to display templatesisActivebooleanWhether the template is currently available401Unauthorized. A valid API key is required.
412Precondition Failed. The project's current plan does not allow access to this resource, or payment is required.
500Unexpected server error.
тип: ApiResponse<T>
successbooleanAlways falseerrorsErrorDetail[]List of server-side errorscorrelationIdstringUnique ID for tracing the errormessagestringError messagestackstringStack trace (non-production only)Язык:
expand_more
Пример запроса
curl --request GET \
--url https://apis-spb.konso.io/ng-cms/content-type-templates/{projectId} \
--header 'x-api-key: <api-key>'Response Example200
[
{
"id": "tpl_website",
"code": "website",
"name": "Website",
"description": "Best for corporate websites, marketing websites, and landing pages.",
"useCase": "Corporate websites, marketing websites, and landing pages",
"version": 1,
"contentTypes": [
{
"templateKey": "page",
"name": "Page",
"key": "page",
"description": null,
"displayField": "title",
"schema": [
{ "key": "slug", "label": "Slug", "type": "slug", "required": true, "unique": true },
{ "key": "title", "label": "Title", "type": "shorttext", "required": true }
]
},
{
"templateKey": "navigation",
"name": "Navigation",
"key": "navigation",
"description": null,
"displayField": "name",
"schema": [
{ "key": "name", "label": "Name", "type": "shorttext", "required": true },
{ "key": "items", "label": "Items", "type": "reference", "referenceTemplateKey": "navigationItem", "multiple": true }
]
}
],
"displayOrder": 1,
"isActive": true
},
{
"id": "tpl_blog",
"code": "blog",
"name": "Blog",
"description": "Best for blogs, editorial content, and news sections.",
"useCase": "Blogs, editorial content, and news sections",
"version": 1,
"contentTypes": [
{
"templateKey": "author",
"name": "Author",
"key": "author",
"description": null,
"displayField": "name",
"schema": [
{ "key": "name", "label": "Name", "type": "shorttext", "required": true },
{ "key": "bio", "label": "Bio", "type": "longtext" }
]
},
{
"templateKey": "blogPost",
"name": "Blog Post",
"key": "blog_post",
"description": null,
"displayField": "title",
"schema": [
{ "key": "title", "label": "Title", "type": "shorttext", "required": true },
{ "key": "author", "label": "Author", "type": "reference", "referenceTemplateKey": "author" }
]
}
],
"displayOrder": 2,
"isActive": true
}
]KONSO