​

Get document data schema

GET
https://example.kaiten.ru/api/latest/document-schemas/{id}

Returns the schema used to validate and describe document data in ProseMirror JSON format. Pass latest to get the current latest document schema, or pass a concrete version in v{number} format. The latest alias is resolved to the actual version in the response. Use format=draft-06 to get JSON Schema draft-06 representation, or format=prosemirror to get sanitized ProseMirror node and mark specs.

Path parameters
NameTypeReference
idrequiredstringDocument schema version. Use latest for the latest available schema, or a version in v{number} format, for example v25. When latest is used, the response version field contains the resolved v{number} version.
Query
NameTypeConstraintsDescription
formatenumResponse format. Default: draft-06.
Responses

200
DescriptionResponse typeExample
SuccessObject
Open
Response Attributes
NameTypeDescription
$schema

string

JSON Schema dialect URI. Always http://json-schema.org/draft-06/schema for this format.
$id

string

Schema identifier in kaiten://document-schemas/{version} format.
title

string

Schema title.
description

string

Schema description.
allOf

array

Root schema references. Points to the top ProseMirror node definition.
version

string

Resolved document schema version. If latest was requested, this field contains the actual v{number} version.
definitions

object

Schema
JSON Schema definitions for document nodes and marks.
200
DescriptionResponse typeExample
SuccessObject
Open
Response Attributes
NameTypeDescription
type

string

Schema response type. Always prosemirror-document-data-schema.
version

string

Resolved document schema version. If latest was requested, this field contains the actual v{number} version.
topNode

string

Name of the top ProseMirror node.
data

object

Top-level document data descriptor.
nodes

object

Map of sanitized ProseMirror node specs. Runtime-only fields such as parseDOM and toDOM are omitted.
marks

object

Map of sanitized ProseMirror mark specs. Runtime-only fields such as parseDOM and toDOM are omitted.
400
DescriptionResponse typeExample
Unsupported schema formatObject
Open
Response Attributes
NameTypeDescription
message

string

Error message
allowedFormats

array

Allowed format values.
404
DescriptionResponse typeExample
Schema version not foundObject
Open
Response Attributes
NameTypeDescription
message

string

Error message
logo
Kaiten
If you have any questions or need help with integration feel free to write us at support@kaiten.ru

Path Parameters

  1  curl --request GET \
  2       --url 'https://example.kaiten.ru/api/latest/document-schemas/{id}' \
  3       --header 'Accept: application/json' \
  4       --header 'Content-Type: application/json'
  5      

Response

ClickTry It!to start a request and see the response here!