For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get semantic content changes introduced by a revision

Returns a structured diff of the semantic changes introduced by a revision compared to its parent revision, such as added, removed, or updated pages and blocks. Use this to understand what changed in a specific revision.

Available in MCP
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
revisionIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Query parameters
metadatabooleanOptional

If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.

Default: true
computedbooleanOptional

If false is passed, content will not be computed

Default: true
limitnumberOptional

Limit the number of changes returned

Default: 10
Responses
200

OK

application/json
morenumberOptional

How many changes were omitted because above the result limit

get/spaces/{spaceId}/revisions/{revisionId}/changes
GET /v1/spaces/{spaceId}/revisions/{revisionId}/changes HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "mergedFrom": {
    "object": "change-request",
    "id": "text",
    "number": 1,
    "status": "draft",
    "subject": "text",
    "description": {
      "object": "document",
      "data": {},
      "nodes": [
        {
          "object": "block",
          "type": "paragraph",
          "data": {},
          "nodes": [
            {
              "object": "text",
              "leaves": [
                {
                  "object": "leaf",
                  "text": "Hello world",
                  "marks": []
                }
              ]
            }
          ]
        }
      ]
    },
    "createdBy": {
      "object": "user",
      "id": "text",
      "displayName": "text",
      "email": "text",
      "photoURL": "text",
      "urls": {
        "location": "https://example.com"
      }
    },
    "createdAt": "2026-01-01T00:00:00.000Z",
    "updatedAt": "2026-01-01T00:00:00.000Z",
    "mergedBy": {
      "object": "user",
      "id": "text",
      "displayName": "text",
      "email": "text",
      "photoURL": "text",
      "urls": {
        "location": "https://example.com"
      }
    },
    "mergedAt": "2026-01-01T00:00:00.000Z",
    "space": "text",
    "revision": "text",
    "revisionInitial": "text",
    "revisionMergedAncestor": "text",
    "revisionMerged": "text",
    "comments": 1,
    "siteTopic": {
      "site": "text",
      "topic": "text",
      "finding": "text"
    },
    "outdated": true,
    "imports": [
      {
        "object": "import-run",
        "id": "text",
        "startedAt": "2026-01-01T00:00:00.000Z",
        "completedAt": "2026-01-01T00:00:00.000Z",
        "createdAt": "2026-01-01T00:00:00.000Z",
        "updatedAt": "2026-01-01T00:00:00.000Z",
        "status": "pending",
        "reason": "text",
        "source": {
          "type": "website",
          "url": "https://example.com"
        },
        "target": {
          "space": "text",
          "changeRequest": "text",
          "page": "text"
        },
        "site": "text",
        "createdBy": "text",
        "urls": {
          "location": "https://example.com"
        },
        "pages": [
          {
            "id": "text",
            "sourceURL": "text",
            "type": "page",
            "status": "complete"
          }
        ]
      }
    ],
    "links": [
      {
        "id": "text",
        "ref": {
          "kind": "url",
          "url": "text"
        },
        "title": "text",
        "expanded": {
          "kind": "external-ticket",
          "provider": "jira",
          "state": "connected",
          "key": "text",
          "url": "https://example.com",
          "status": {
            "id": "text",
            "name": "text"
          },
          "summary": "text"
        }
      }
    ],
    "urls": {
      "app": "https://example.com",
      "location": "https://example.com"
    }
  },
  "changes": [
    {
      "type": "page_created",
      "page": {
        "id": "text",
        "type": "document",
        "title": "text",
        "path": "text"
      }
    }
  ],
  "more": 1
}

Last updated

Was this helpful?

Powered by GitBook