GET
/ng-cms/content-types/{projectId}/{idOrKey} https://apis-spb.konso.io/ng-cms/content-types/{projectId}/{idOrKey} Get a content type by ID or key
Параметры запроса
projectId string The unique identifier of the project
idOrKey string The ID or machine-readable key of the content type (e.g. 'ct_a1b2c3' or 'blog-post')
Ответы
200 The requested content type.
тип: CmsContentTypeDto
id string Unique identifier of the content type projectId string Project (bucket) this content type belongs to name string Human-readable display name key string Unique machine-readable identifier description string Optional description of the content type displayField string Schema field key used as the display/title field for entries schema CmsSchemaField[] Array of field definitions schemaVersion number Incremented each time the schema is modified fieldsCount number Number of fields in the schema isActive boolean Whether the content type is active createdBy number ID of the user who created the content type updatedBy number ID of the user who last updated the content type updatedByName string Name of the user who last updated the content type createdAt string ISO 8601 timestamp of creation updatedAt string ISO 8601 timestamp of last update 401 Unauthorized. A valid API key is required.
404 Not Found. No content type exists with the given ID or key.
412 Precondition Failed. The project's current plan does not allow access to this resource, or payment is required to proceed.
500 Unexpected server error.
тип: ApiResponse<T>
success boolean Always false errors ErrorDetail[] List of server-side errors correlationId string Unique ID for tracing the error message string Error message stack string Stack trace (non-production only) Язык:
expand_more
Пример запроса
curl --request GET \\
--url https://apis-spb.konso.io/ng-cms/content-types/{projectId}/{idOrKey} \\
--header 'x-api-key: <api-key>' Response Example 200
{
"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"
} KONSO