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

Summary

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

Input fields

No fields.

Example request

{}

Output fields

FieldTypeRequiredDescription
capabilitiesobjectyes
countsobjectyes
outlineobject[]yes

Example response

{
  "capabilities": {
    "canComment": true,
    "canFind": true,
    "canGetNode": true,
    "canReplace": true
  },
  "counts": {
    "comments": 0,
    "headings": 3,
    "images": 2,
    "paragraphs": 12,
    "tables": 1,
    "words": 250
  },
  "outline": [
    {
      "level": 1,
      "nodeId": "node-def456",
      "text": "Hello, world."
    }
  ]
}

Pre-apply throws

  • None

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "properties": {},
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "capabilities": {
      "additionalProperties": false,
      "properties": {
        "canComment": {
          "type": "boolean"
        },
        "canFind": {
          "type": "boolean"
        },
        "canGetNode": {
          "type": "boolean"
        },
        "canReplace": {
          "type": "boolean"
        }
      },
      "required": [
        "canFind",
        "canGetNode",
        "canComment",
        "canReplace"
      ],
      "type": "object"
    },
    "counts": {
      "additionalProperties": false,
      "properties": {
        "comments": {
          "type": "integer"
        },
        "headings": {
          "type": "integer"
        },
        "images": {
          "type": "integer"
        },
        "paragraphs": {
          "type": "integer"
        },
        "tables": {
          "type": "integer"
        },
        "words": {
          "type": "integer"
        }
      },
      "required": [
        "words",
        "paragraphs",
        "headings",
        "tables",
        "images",
        "comments"
      ],
      "type": "object"
    },
    "outline": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "level": {
            "type": "integer"
          },
          "nodeId": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "level",
          "text",
          "nodeId"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "counts",
    "outline",
    "capabilities"
  ],
  "type": "object"
}