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

Summary

Get detailed information about a specific cross-reference field.
  • Operation ID: crossRefs.get
  • API member path: editor.doc.crossRefs.get(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a CrossRefInfo object with the cross-reference’s target, display, and resolved text.

Input fields

FieldTypeRequiredDescription
targetobject(kind=“inline”)yes
target.anchorInlineAnchoryesInlineAnchor
target.anchor.endPositionyesPosition
target.anchor.end.blockIdstringyes
target.anchor.end.offsetintegeryes
target.anchor.startPositionyesPosition
target.anchor.start.blockIdstringyes
target.anchor.start.offsetintegeryes
target.kind"inline"yesConstant: "inline"
target.nodeType"crossRef"yesConstant: "crossRef"

Example request

{
  "target": {
    "anchor": {
      "end": {
        "blockId": "block-abc123",
        "offset": 0
      },
      "start": {
        "blockId": "block-abc123",
        "offset": 0
      }
    },
    "kind": "inline",
    "nodeType": "crossRef"
  }
}

Output fields

No fields.

Example response

{}

Pre-apply throws

  • TARGET_NOT_FOUND
  • CAPABILITY_UNAVAILABLE

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "properties": {
    "target": {
      "additionalProperties": false,
      "properties": {
        "anchor": {
          "$ref": "#/$defs/InlineAnchor"
        },
        "kind": {
          "const": "inline"
        },
        "nodeType": {
          "const": "crossRef"
        }
      },
      "required": [
        "kind",
        "nodeType",
        "anchor"
      ],
      "type": "object"
    }
  },
  "required": [
    "target"
  ],
  "type": "object"
}
{
  "type": "object"
}