/ng-cms/content-types/{projectId}/{idOrKey}https://apis-spb.konso.io/ng-cms/content-types/{projectId}/{idOrKey}smart_toyAgentic specGet a content type by ID or key
Получает один контент-тип по его уникальному идентификатору или машинно-читаемому ключу.
Параметры запроса
projectIdstringThe unique identifier of the project
idOrKeystringThe ID or machine-readable key of the content type (e.g. 'ct_a1b2c3' or 'blog-post')
Ответы
тип: CmsContentTypeDto
idstringUnique identifier of the content typeprojectIdstringProject (bucket) this content type belongs tonamestringHuman-readable display namekeystringUnique machine-readable identifierdescriptionstringOptional description of the content typedisplayFieldstringSchema field key used as the display/title field for entriesschemaCmsSchemaField[]Array of field definitionsschemaVersionnumberIncremented each time the schema is modifiedfieldsCountnumberNumber of fields in the schemaisActivebooleanWhether the content type is activecreatedBynumberID of the user who created the content typeupdatedBynumberID of the user who last updated the content typeupdatedByNamestringName of the user who last updated the content typecreatedAtstringISO 8601 timestamp of creationupdatedAtstringISO 8601 timestamp of last updateтип: ApiResponse<T>
successbooleanAlways falseerrorsErrorDetail[]List of server-side errorscorrelationIdstringUnique ID for tracing the errormessagestringError messagestackstringStack trace (non-production only)curl --request GET \\
--url https://apis-spb.konso.io/ng-cms/content-types/{projectId}/{idOrKey} \\
--header 'x-api-key: <api-key>'{
"id": "ct_a1b2c3d4e5f6",
"projectId": "my-project-id",
"name": "Blog Post",
"key": "blog-post",
"description": "Standard blog post content type",
"displayField": "title",
"schema": [
{ "key": "title", "label": "Title", "type": "text", "required": true, "maxLength": 300 },
{ "key": "body", "label": "Body", "type": "richtext", "required": true },
{ "key": "publishedAt", "label": "Published At", "type": "date", "required": false }
],
"schemaVersion": 2,
"fieldsCount": 3,
"isActive": true,
"createdBy": 42,
"updatedBy": 42,
"updatedByName": "Jane Smith",
"createdAt": "2025-01-10T12:00:00Z",
"updatedAt": "2025-03-05T09:30:00Z"
}Исходный код
Референсные реализации этого эндпоинта — если поведение неочевидно, проще свериться с кодом, чем гадать.
Клиентские библиотеки
Официальные SDK для вызова этого метода из вашего кода — без ручной сборки запроса.
TS