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

Summary

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

Input fields

FieldTypeRequiredDescription
kindenumno"ordered", "bullet"
levelintegerno
limitintegerno
offsetintegerno
ordinalintegerno
withinBlockNodeAddressnoBlockNodeAddress

Example request

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

Output fields

FieldTypeRequiredDescription
evaluatedRevisionstringyes
itemsobject[]yes
pagePageInfoyesPageInfo
totalintegeryes

Example response

{
  "evaluatedRevision": "rev-001",
  "items": [
    {
      "address": {
        "kind": "block",
        "nodeId": "node-def456",
        "nodeType": "listItem"
      },
      "handle": {
        "ref": "handle:abc123",
        "refStability": "stable",
        "targetKind": "text"
      },
      "id": "id-001",
      "marker": "1.",
      "ordinal": 1
    }
  ],
  "page": {
    "limit": 50,
    "offset": 0,
    "returned": 1
  },
  "total": 1
}

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • INVALID_INPUT

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "properties": {
    "kind": {
      "enum": [
        "ordered",
        "bullet"
      ]
    },
    "level": {
      "type": "integer"
    },
    "limit": {
      "type": "integer"
    },
    "offset": {
      "type": "integer"
    },
    "ordinal": {
      "type": "integer"
    },
    "within": {
      "$ref": "#/$defs/BlockNodeAddress"
    }
  },
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "evaluatedRevision": {
      "type": "string"
    },
    "items": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "address": {
            "$ref": "#/$defs/ListItemAddress"
          },
          "handle": {
            "$ref": "#/$defs/ResolvedHandle"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "ordered",
              "bullet"
            ]
          },
          "level": {
            "type": "integer"
          },
          "marker": {
            "type": "string"
          },
          "ordinal": {
            "type": "integer"
          },
          "path": {
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "handle",
          "address"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "page": {
      "$ref": "#/$defs/PageInfo"
    },
    "total": {
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "evaluatedRevision",
    "total",
    "items",
    "page"
  ],
  "type": "object"
}