Metadata Commands
Metadata commands modify the document title and metadata properties. These properties are defined by the document's content type configuration.
setTitle
Sets the title property on a document. This is the internal document title used for identification.
Note that the title displayed to end users may differ if a displayTitlePattern is configured on the content type. The displayTitlePattern computes a display title from metadata properties on read, which takes precedence over the value set here.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
operation | string | yes | "setTitle" |
value | string | yes | The new document title. |
oldValue | string | no | Previous value for conflict detection. |
Example
{
"operation": "setTitle",
"value": "Updated document title",
"oldValue": "Previous document title"
}
Validation
- The
valuemust be a string.
setMetadataProperty
Updates a single metadata property by name. The property must exist in the document's content type configuration. Send null as the value to delete a metadata property.
Each metadata property is backed by a metadata plugin (e.g. li-text, li-boolean, li-document-reference). The expected value schema depends on the plugin type. See Metadata Plugins for the storage schema of each plugin type available in document metadata.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
operation | string | yes | "setMetadataProperty" |
propertyName | string | yes | Name of the metadata property to update. |
value | any | yes | The new value. The expected type depends on the metadata plugin. Send null to delete the property. |
oldValue | any | no | Previous value for conflict detection. |
Example
Set a metadata property:
{
"operation": "setMetadataProperty",
"propertyName": "title",
"value": "Updated title",
"oldValue": "Previous title"
}
Delete a metadata property:
{
"operation": "setMetadataProperty",
"propertyName": "description",
"value": null
}
Validation
- The
propertyNamemust exist in the document's content type metadata configuration. - The
valueis validated against the storage schema of the metadata plugin type configured for this property. - Metadata conflict errors (when
oldValuedoesn't match) return a409 Conflictresponse.
Related
- Content Types -- Content type configuration including metadata properties
- Metadata Plugins (document context) -- Storage schemas for each metadata plugin type available in document metadata