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

Summary

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

Expected result

Returns a TocEntryInfo object with the instruction, text, level, and switch configuration.

Input fields

FieldTypeRequiredDescription
targetobject(kind=“inline”)yes

Example request

{
  "target": {
    "kind": "inline",
    "nodeId": "node-def456",
    "nodeType": "tableOfContentsEntry"
  }
}

Output fields

FieldTypeRequiredDescription
kind"inline"yesConstant: "inline"
nodeType"tableOfContentsEntry"yesConstant: "tableOfContentsEntry"
propertiesobjectyes

Example response

{
  "kind": "inline",
  "nodeType": "tableOfContentsEntry",
  "properties": {
    "instruction": "example",
    "level": 1,
    "omitPageNumber": true,
    "tableIdentifier": "example",
    "text": "Hello, world."
  }
}

Pre-apply throws

  • TARGET_NOT_FOUND

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "properties": {
    "target": {
      "additionalProperties": false,
      "properties": {
        "kind": {
          "const": "inline"
        },
        "nodeId": {
          "type": "string"
        },
        "nodeType": {
          "const": "tableOfContentsEntry"
        }
      },
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ],
      "type": "object"
    }
  },
  "required": [
    "target"
  ],
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "kind": {
      "const": "inline"
    },
    "nodeType": {
      "const": "tableOfContentsEntry"
    },
    "properties": {
      "additionalProperties": false,
      "properties": {
        "instruction": {
          "type": "string"
        },
        "level": {
          "type": "integer"
        },
        "omitPageNumber": {
          "type": "boolean"
        },
        "tableIdentifier": {
          "type": "string"
        },
        "text": {
          "type": "string"
        }
      },
      "required": [
        "instruction",
        "text",
        "level",
        "omitPageNumber"
      ],
      "type": "object"
    }
  },
  "required": [
    "nodeType",
    "kind",
    "properties"
  ],
  "type": "object"
}