Skip to main content

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 (target.nodeType=“table”)

FieldTypeRequiredDescription
targetTableAddressyesTableAddress
target.kind"block"yesConstant: "block"
target.nodeIdstringyes
target.nodeType"table"yesConstant: "table"

Variant 2 (required: nodeId)

FieldTypeRequiredDescription
nodeIdstringyes

Example request

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

Output fields

FieldTypeRequiredDescription
addressTableAddressyesTableAddress
address.kind"block"yesConstant: "block"
address.nodeIdstringyes
address.nodeType"table"yesConstant: "table"
columnsintegeryes
nodeIdstringyes
rowsintegeryes

Example response

{
  "address": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "table"
  },
  "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/TableAddress"
    }
  },
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "address": {
      "$ref": "#/$defs/TableAddress"
    },
    "columns": {
      "minimum": 0,
      "type": "integer"
    },
    "nodeId": {
      "type": "string"
    },
    "rows": {
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "nodeId",
    "address",
    "rows",
    "columns"
  ],
  "type": "object"
}