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

Summary

  • Operation ID: getNode
  • API member path: editor.doc.getNode(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Input fields

No fields.

Example request

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

Output fields

FieldTypeRequiredDescription
bodyNodesobject[]no
bodyTextstringno
kindenumyes"block", "inline"
nodeTypeenumyes"paragraph", "heading", "listItem", "table", "tableRow", "tableCell", "image", "sdt", "run", "bookmark", "comment", "hyperlink", "footnoteRef", "tab", "lineBreak"
nodesobject[]no
propertiesobjectno
summaryobjectno
textstringno

Example response

{
  "kind": "block",
  "nodeType": "paragraph",
  "summary": {
    "label": "Paragraph 1",
    "text": "Hello, world."
  },
  "text": "Hello, world."
}

Pre-apply throws

  • TARGET_NOT_FOUND

Non-applied failure codes

  • None

Raw schemas

{
  "$ref": "#/$defs/NodeAddress"
}
{
  "additionalProperties": false,
  "properties": {
    "bodyNodes": {
      "items": {
        "type": "object"
      },
      "type": "array"
    },
    "bodyText": {
      "type": "string"
    },
    "kind": {
      "enum": [
        "block",
        "inline"
      ]
    },
    "nodes": {
      "items": {
        "type": "object"
      },
      "type": "array"
    },
    "nodeType": {
      "enum": [
        "paragraph",
        "heading",
        "listItem",
        "table",
        "tableRow",
        "tableCell",
        "image",
        "sdt",
        "run",
        "bookmark",
        "comment",
        "hyperlink",
        "footnoteRef",
        "tab",
        "lineBreak"
      ]
    },
    "properties": {
      "type": "object"
    },
    "summary": {
      "additionalProperties": false,
      "properties": {
        "label": {
          "type": "string"
        },
        "text": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "text": {
      "type": "string"
    }
  },
  "required": [
    "nodeType",
    "kind"
  ],
  "type": "object"
}