Computed content

Manage content generated from data and templates.

Generate a document for a page in a computed content.

post

/spaces/{spaceId}/content/computed/document

Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

Query parameters
schemastring · enum

Version of the schema used for the document.

Options: current, next
Body
sourceobjectrequired

Parameters for a computed content

Responses
curl -L \
  --request POST \
  --url 'https://api.gitbook.com/v1/spaces/{spaceId}/content/computed/document' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "source": {
      "integration": "text",
      "source": "text",
      "props": {
        "ANY_ADDITIONAL_PROPERTY": "[Circular Reference]"
      },
      "dependencies": {
        "ANY_ADDITIONAL_PROPERTY": {
          "ref": {
            "space": "text",
            "kind": "space"
          }
        }
      }
    }
  }'
{
  "object": "document",
  "nodes": [
    "[Circular Reference]"
  ],
  "data": {
    "schemaVersion": 1,
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

Get the computed content for a source in a computed content.

post

/spaces/{spaceId}/content/computed/revision

Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

Body
sourceobjectrequired

Parameters for a computed content

Responses
curl -L \
  --request POST \
  --url 'https://api.gitbook.com/v1/spaces/{spaceId}/content/computed/revision' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "source": {
      "integration": "text",
      "source": "text",
      "props": {
        "ANY_ADDITIONAL_PROPERTY": "[Circular Reference]"
      },
      "dependencies": {
        "ANY_ADDITIONAL_PROPERTY": {
          "ref": {
            "space": "text",
            "kind": "space"
          }
        }
      }
    }
  }'
{
  "pages": [
    "[Circular Reference]"
  ],
  "files": [
    {
      "id": "text",
      "name": "text",
      "contentType": "text",
      "downloadURL": "text",
      "size": 1,
      "git": {
        "oid": "text",
        "path": "text"
      },
      "dimensions": {
        "width": 1,
        "height": 1
      }
    }
  ]
}

Was this helpful?