Compute and render a document from a structured content source
post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequiredPattern:
A unique entity identifier
^[a-zA-Z0-9_-]+$Query parameters
schemastring · enumOptionalPossible values:
Version of the schema used for the document.
Body
sourceone ofRequired
or
or
seedstringRequired
Seed to use for the generation of IDs.
Responses
200
Document computed
application/json
objectstring · enumRequiredPossible values:
post/spaces/{spaceId}/content/computed/document
POST /v1/spaces/{spaceId}/content/computed/document HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 141
{
"source": {
"type": "builtin:openapi",
"dependencies": {
"spec": {
"ref": {
"kind": "openapi",
"spec": "text"
}
}
},
"props": {
"doc": "models"
}
},
"seed": "text"
}200
Document computed
{
"object": "document",
"data": {},
"nodes": [
{
"object": "block",
"type": "paragraph",
"data": {},
"nodes": [
{
"object": "text",
"leaves": [
{
"object": "leaf",
"text": "Hello world",
"marks": []
}
]
}
]
}
]
}Last updated
Was this helpful?