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

Summary

Retrieve table structure and dimensions by locator.
  • Operation ID: tables.get
  • API member path: editor.doc.tables.get(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a TablesGetOutput with the table row count, column count, and structural metadata.

Input fields

Variant 1

No fields.

Variant 2

No fields.

Example request

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

Output fields

FieldTypeRequiredDescription
addressBlockNodeAddressyesBlockNodeAddress
address.kind"block"yesConstant: "block"
address.nodeIdstringyes
address.nodeTypeenumyes"paragraph", "heading", "listItem", "table", "tableRow", "tableCell", "tableOfContents", "image", "sdt"
columnsintegeryes
nodeIdstringyes
rowsintegeryes

Example response

{
  "address": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "paragraph"
  },
  "columns": 1,
  "nodeId": "node-def456",
  "rows": 1
}

Pre-apply throws

  • TARGET_NOT_FOUND

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "oneOf": [
    {
      "required": [
        "target"
      ]
    },
    {
      "required": [
        "nodeId"
      ]
    }
  ],
  "properties": {
    "nodeId": {
      "type": "string"
    },
    "target": {
      "$ref": "#/$defs/BlockNodeAddress"
    }
  },
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "address": {
      "$ref": "#/$defs/BlockNodeAddress"
    },
    "columns": {
      "minimum": 0,
      "type": "integer"
    },
    "nodeId": {
      "type": "string"
    },
    "rows": {
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "nodeId",
    "address",
    "rows",
    "columns"
  ],
  "type": "object"
}