Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Insert a new index block at a target location.- Operation ID:
index.insert - API member path:
editor.doc.index.insert(...) - Mutates document:
yes - Idempotency:
non-idempotent - Supports tracked mode:
no - Supports dry run:
no - Deterministic target resolution:
yes
Expected result
Returns an IndexMutationResult indicating success with the index address or a failure.Input fields
| Field | Type | Required | Description | |||
|---|---|---|---|---|---|---|
at | object(kind=“documentStart”) \ | object(kind=“documentEnd”) \ | object(kind=“before”) \ | object(kind=“after”) | yes | One of: object(kind=“documentStart”), object(kind=“documentEnd”), object(kind=“before”), object(kind=“after”) |
config | object | no | ||||
config.accentedSorting | boolean | no | ||||
config.columns | integer | no | ||||
config.entryPageSeparator | string | no | ||||
config.entryTypeFilter | string | no | ||||
config.headingSeparator | string | no | ||||
config.letterRange | object | no | ||||
config.letterRange.from | string | no | ||||
config.letterRange.to | string | no | ||||
config.pageRangeBookmark | string | no | ||||
config.pageRangeSeparator | string | no | ||||
config.runIn | boolean | no | ||||
config.sequenceId | string | no |
Example request
Output fields
Variant 1 (index.kind=“block”)
| Field | Type | Required | Description |
|---|---|---|---|
index | object(kind=“block”) | yes | |
index.kind | "block" | yes | Constant: "block" |
index.nodeId | string | yes | |
index.nodeType | "index" | yes | Constant: "index" |
success | true | yes | Constant: true |
Variant 2 (success=false)
| Field | Type | Required | Description |
|---|---|---|---|
failure | object | yes | |
failure.code | string | yes | |
failure.details | any | no | |
failure.message | string | yes | |
success | false | yes | Constant: false |
Example response
Pre-apply throws
TARGET_NOT_FOUNDINVALID_TARGETINVALID_INPUTCAPABILITY_UNAVAILABLE
Non-applied failure codes
- None
Raw schemas
Raw input schema
Raw input schema
Raw output schema
Raw output schema
Raw success schema
Raw success schema
Raw failure schema
Raw failure schema

