References
Every Document Object includes a references array. Livingdocs automatically extracts these references from the document's metadata and content. They describe which resources (other documents, images, videos, files, lists, language groups) a document depends on.
References power the Incoming Publication References and Incoming Media References endpoints, which answer the question: "What links to this resource?" This is essential for cache invalidation and checking whether a resource is still in use.
Base Fields
All references share these fields:
| Property | Type | Description |
id* | string | Identifier of the referenced resource (e.g. a document id or media library entry id). |
type* | string | One of |
location* | string | Where the reference was extracted from. See Locations. |
Locations
The location field indicates where in the document the reference originates. Each location adds additional context fields.
metadata
A reference extracted from a metadata property (e.g. li-document-reference, li-tree, li-issue-management).
| Property | Type | Description |
propertyName* | string | The metadata property handle that holds the reference. |
{
"id": "lk3j4h5g",
"type": "image",
"location": "metadata",
"propertyName": "teaserImage"
}
editable-directive
A reference extracted from an inline link or file reference within an editable text directive (e.g. <a data-li-document-ref="123"> in an HTML string).
| Property | Type | Description |
componentId* | string | The component instance id containing the directive. |
componentName* | string | The component name. |
directiveName* | string | The directive name within the component. |
{
"id": "123",
"type": "document",
"location": "editable-directive",
"componentId": "doc-abc123",
"componentName": "paragraph",
"directiveName": "text"
}
link-directive
A reference extracted from a link directive that points to a document.
| Property | Type | Description |
componentId* | string | The component instance id containing the directive. |
componentName* | string | The component name. |
directiveName* | string | The directive name within the component. |
{
"id": "456",
"type": "document",
"location": "link-directive",
"componentId": "doc-def456",
"componentName": "teaser",
"directiveName": "link"
}
image-directive
A reference extracted from an image directive that points to a media library entry.
| Property | Type | Description |
componentId* | string | The component instance id containing the directive. |
componentName* | string | The component name. |
directiveName* | string | The directive name within the component. |
{
"id": "img-abc123",
"type": "image",
"location": "image-directive",
"componentId": "doc-ghi789",
"componentName": "image",
"directiveName": "image"
}
include-directive
A reference extracted from an include directive's params. Includes are server-side render functions that can return html or a component.
| Property | Type | Description |
componentId* | string | The component instance id containing the include. |
componentName* | string | The component name. |
directiveName* | string | The directive name within the component. |
serviceName* | string | The include service name. |
propertyName* | string | The param property that holds the reference. |
{
"id": "7",
"type": "document",
"location": "include-directive",
"componentId": "doc-2c95a77x14",
"componentName": "teaser",
"directiveName": "embed-teaser",
"serviceName": "embed-teaser",
"propertyName": "document"
}
include-directive-override
A reference extracted from an include directive's content overrides. Overrides allow editors to customize parts of an include's rendered output.
| Property | Type | Description |
componentId* | string | The component instance id containing the include. |
componentName* | string | The component name. |
directiveName* | string | The directive name within the component. |
serviceName* | string | The include service name. |
overrideId* | string | The component id within the override. |
overrideDirectiveName* | string | The directive name within the override component. |
{
"id": "img-override1",
"type": "image",
"location": "include-directive-override",
"componentId": "doc-2c95a77x14",
"componentName": "teaser",
"directiveName": "embed-teaser",
"serviceName": "embed-teaser",
"overrideId": "ref-override1",
"overrideDirectiveName": "image"
}
Reference Types
| Type | Description | Possible Locations |
|---|---|---|
document | A reference to another Livingdocs document | metadata, editable-directive, link-directive, include-directive, include-directive-override |
image | A reference to a media library image | metadata, image-directive, include-directive, include-directive-override |
video | A reference to a media library video | metadata, include-directive |
file | A reference to a file within an editable directive | editable-directive |
list | A reference to a document list | metadata, include-directive |
language-group | A reference to a language group | metadata |
Type-specific Fields
Some reference types carry additional fields:
| Property | Type | Description |
posterImageId | string | Present on |
externalSystem | string | Present on |