Skip to main content

Summary

Retrieve layout and style properties of a table.
  • Operation ID: tables.getProperties
  • API member path: editor.doc.tables.getProperties(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a TablesGetPropertiesOutput with direct table layout and style state, including style options, borders, default cell margins, and cell spacing when explicitly set.

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"
alignmentenumno"left", "center", "right"
autoFitModeenumno"fixedWidth", "fitContents", "fitWindow"
bordersobjectno
borders.bottomobject \nullnoOne of: object, null
borders.insideHobject \nullnoOne of: object, null
borders.insideVobject \nullnoOne of: object, null
borders.leftobject \nullnoOne of: object, null
borders.rightobject \nullnoOne of: object, null
borders.topobject \nullnoOne of: object, null
cellSpacingPtnumberno
defaultCellMarginsobjectno
defaultCellMargins.bottomPtnumberno
defaultCellMargins.leftPtnumberno
defaultCellMargins.rightPtnumberno
defaultCellMargins.topPtnumberno
directionenumno"ltr", "rtl"
nodeIdstringyes
preferredWidthnumberno
styleIdstringno
styleOptionsobjectno
styleOptions.bandedColumnsbooleanno
styleOptions.bandedRowsbooleanno
styleOptions.firstColumnbooleanno
styleOptions.headerRowbooleanno
styleOptions.lastColumnbooleanno
styleOptions.lastRowbooleanno

Example response

{
  "address": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "table"
  },
  "alignment": "left",
  "nodeId": "node-def456",
  "styleId": "style-001"
}

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"
    },
    "alignment": {
      "enum": [
        "left",
        "center",
        "right"
      ]
    },
    "autoFitMode": {
      "enum": [
        "fixedWidth",
        "fitContents",
        "fitWindow"
      ]
    },
    "borders": {
      "additionalProperties": false,
      "properties": {
        "bottom": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "color": {
                  "pattern": "^([0-9A-Fa-f]{6}|auto)$",
                  "type": "string"
                },
                "lineStyle": {
                  "type": "string"
                },
                "lineWeightPt": {
                  "exclusiveMinimum": 0,
                  "type": "number"
                }
              },
              "required": [
                "lineStyle",
                "lineWeightPt",
                "color"
              ],
              "type": "object"
            },
            {
              "type": "null"
            }
          ]
        },
        "insideH": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "color": {
                  "pattern": "^([0-9A-Fa-f]{6}|auto)$",
                  "type": "string"
                },
                "lineStyle": {
                  "type": "string"
                },
                "lineWeightPt": {
                  "exclusiveMinimum": 0,
                  "type": "number"
                }
              },
              "required": [
                "lineStyle",
                "lineWeightPt",
                "color"
              ],
              "type": "object"
            },
            {
              "type": "null"
            }
          ]
        },
        "insideV": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "color": {
                  "pattern": "^([0-9A-Fa-f]{6}|auto)$",
                  "type": "string"
                },
                "lineStyle": {
                  "type": "string"
                },
                "lineWeightPt": {
                  "exclusiveMinimum": 0,
                  "type": "number"
                }
              },
              "required": [
                "lineStyle",
                "lineWeightPt",
                "color"
              ],
              "type": "object"
            },
            {
              "type": "null"
            }
          ]
        },
        "left": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "color": {
                  "pattern": "^([0-9A-Fa-f]{6}|auto)$",
                  "type": "string"
                },
                "lineStyle": {
                  "type": "string"
                },
                "lineWeightPt": {
                  "exclusiveMinimum": 0,
                  "type": "number"
                }
              },
              "required": [
                "lineStyle",
                "lineWeightPt",
                "color"
              ],
              "type": "object"
            },
            {
              "type": "null"
            }
          ]
        },
        "right": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "color": {
                  "pattern": "^([0-9A-Fa-f]{6}|auto)$",
                  "type": "string"
                },
                "lineStyle": {
                  "type": "string"
                },
                "lineWeightPt": {
                  "exclusiveMinimum": 0,
                  "type": "number"
                }
              },
              "required": [
                "lineStyle",
                "lineWeightPt",
                "color"
              ],
              "type": "object"
            },
            {
              "type": "null"
            }
          ]
        },
        "top": {
          "oneOf": [
            {
              "additionalProperties": false,
              "properties": {
                "color": {
                  "pattern": "^([0-9A-Fa-f]{6}|auto)$",
                  "type": "string"
                },
                "lineStyle": {
                  "type": "string"
                },
                "lineWeightPt": {
                  "exclusiveMinimum": 0,
                  "type": "number"
                }
              },
              "required": [
                "lineStyle",
                "lineWeightPt",
                "color"
              ],
              "type": "object"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object"
    },
    "cellSpacingPt": {
      "type": "number"
    },
    "defaultCellMargins": {
      "additionalProperties": false,
      "properties": {
        "bottomPt": {
          "type": "number"
        },
        "leftPt": {
          "type": "number"
        },
        "rightPt": {
          "type": "number"
        },
        "topPt": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "direction": {
      "enum": [
        "ltr",
        "rtl"
      ]
    },
    "nodeId": {
      "type": "string"
    },
    "preferredWidth": {
      "type": "number"
    },
    "styleId": {
      "type": "string"
    },
    "styleOptions": {
      "additionalProperties": false,
      "properties": {
        "bandedColumns": {
          "type": "boolean"
        },
        "bandedRows": {
          "type": "boolean"
        },
        "firstColumn": {
          "type": "boolean"
        },
        "headerRow": {
          "type": "boolean"
        },
        "lastColumn": {
          "type": "boolean"
        },
        "lastRow": {
          "type": "boolean"
        }
      },
      "type": "object"
    }
  },
  "required": [
    "nodeId",
    "address"
  ],
  "type": "object"
}