Computed content

Manage content generated from data and templates.

Generate a document for a page in a computed content.

post
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

Query parameters
schemastring · enumoptional

Version of the schema used for the document.

Options: current, next
Body
sourceone ofrequired

Parameters for a computed content managed by an integration

seedstringrequired

Seed to use for the generation of IDs.

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": {
      "type": "builtin:openapi",
      "dependencies": {
        "spec": {
          "ref": {
            "kind": "openapi",
            "spec": "text"
          }
        }
      },
      "props": {
        "doc": "models"
      }
    },
    "seed": "text"
  }'
{
  "object": "document",
  "data": {
    "schemaVersion": 1,
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "nodes": [
    "[Circular Reference]"
  ]
}

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

post
Authorizations
Path parameters
spaceIdstringrequired

The unique id of the space

Body
sourceone ofrequired

Parameters for a computed content managed by an integration

seedstringrequired

Seed to use for the generation of IDs.

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": {
      "type": "builtin:openapi",
      "dependencies": {
        "spec": {
          "ref": {
            "kind": "openapi",
            "spec": "text"
          }
        }
      },
      "props": {
        "models": true
      }
    },
    "seed": "text"
  }'
{
  "pages": [
    "[Circular Reference]"
  ],
  "files": [
    {
      "id": "text",
      "name": "text",
      "contentType": "text",
      "downloadURL": "text",
      "size": 1,
      "dimensions": {
        "width": 1,
        "height": 1
      },
      "git": {
        "oid": "text",
        "path": "text"
      }
    }
  ]
}

Was this helpful?