Skip to main content
Alpha: Document API is currently alpha and subject to breaking changes.

Summary

Retrieve details of a specific table of contents.
  • Operation ID: toc.get
  • API member path: editor.doc.toc.get(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a TocInfo object with the instruction, source/display configuration, and entry count.

Input fields

FieldTypeRequiredDescription
targetobject(kind=“block”)yes

Example request

{
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "tableOfContents"
  }
}

Output fields

FieldTypeRequiredDescription
kind"block"yesConstant: "block"
nodeType"tableOfContents"yesConstant: "tableOfContents"
propertiesobjectyes

Example response

{
  "kind": "block",
  "nodeType": "tableOfContents",
  "properties": {
    "displayConfig": {},
    "entryCount": 1,
    "instruction": "example",
    "sourceConfig": {}
  }
}

Pre-apply throws

  • TARGET_NOT_FOUND

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "properties": {
    "target": {
      "additionalProperties": false,
      "properties": {
        "kind": {
          "const": "block"
        },
        "nodeId": {
          "type": "string"
        },
        "nodeType": {
          "const": "tableOfContents"
        }
      },
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ],
      "type": "object"
    }
  },
  "required": [
    "target"
  ],
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "kind": {
      "const": "block"
    },
    "nodeType": {
      "const": "tableOfContents"
    },
    "properties": {
      "additionalProperties": false,
      "properties": {
        "displayConfig": {
          "type": "object"
        },
        "entryCount": {
          "type": "integer"
        },
        "instruction": {
          "type": "string"
        },
        "preservedSwitches": {
          "type": "object"
        },
        "sourceConfig": {
          "type": "object"
        }
      },
      "required": [
        "instruction",
        "entryCount"
      ],
      "type": "object"
    }
  },
  "required": [
    "nodeType",
    "kind",
    "properties"
  ],
  "type": "object"
}