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

Summary

Retrieve details of a specific hyperlink by its inline address.
  • Operation ID: hyperlinks.get
  • API member path: editor.doc.hyperlinks.get(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a HyperlinkInfo object with the address, destination properties, and display 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"hyperlink"yesConstant: "hyperlink"

Example request

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

Output fields

FieldTypeRequiredDescription
addressobject(kind=“inline”)yes
address.anchorInlineAnchoryesInlineAnchor
address.anchor.endPositionyesPosition
address.anchor.end.blockIdstringyes
address.anchor.end.offsetintegeryes
address.anchor.startPositionyesPosition
address.anchor.start.blockIdstringyes
address.anchor.start.offsetintegeryes
address.kind"inline"yesConstant: "inline"
address.nodeType"hyperlink"yesConstant: "hyperlink"
propertiesobjectyes
properties.anchorstringno
properties.docLocationstringno
properties.hrefstringno
properties.relstringno
properties.targetstringno
properties.tooltipstringno
textstringno

Example response

{
  "address": {
    "anchor": {
      "end": {
        "blockId": "block-abc123",
        "offset": 0
      },
      "start": {
        "blockId": "block-abc123",
        "offset": 0
      }
    },
    "kind": "inline",
    "nodeType": "hyperlink"
  },
  "properties": {
    "anchor": "example",
    "href": "example"
  },
  "text": "Hello, world."
}

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "properties": {
    "target": {
      "additionalProperties": false,
      "properties": {
        "anchor": {
          "$ref": "#/$defs/InlineAnchor"
        },
        "kind": {
          "const": "inline"
        },
        "nodeType": {
          "const": "hyperlink"
        }
      },
      "required": [
        "kind",
        "nodeType",
        "anchor"
      ],
      "type": "object"
    }
  },
  "required": [
    "target"
  ],
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "address": {
      "additionalProperties": false,
      "properties": {
        "anchor": {
          "$ref": "#/$defs/InlineAnchor"
        },
        "kind": {
          "const": "inline"
        },
        "nodeType": {
          "const": "hyperlink"
        }
      },
      "required": [
        "kind",
        "nodeType",
        "anchor"
      ],
      "type": "object"
    },
    "properties": {
      "additionalProperties": false,
      "properties": {
        "anchor": {
          "type": "string"
        },
        "docLocation": {
          "type": "string"
        },
        "href": {
          "type": "string"
        },
        "rel": {
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "tooltip": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "text": {
      "type": "string"
    }
  },
  "required": [
    "address",
    "properties"
  ],
  "type": "object"
}