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

NameTypeRequiredDescription
operationstringyes"setTitle"
valuestringyesThe new document title.
oldValuestringnoPrevious value for conflict detection.

Example

{
  "operation": "setTitle",
  "value": "Updated document title",
  "oldValue": "Previous document title"
}

Validation

  • The value must 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

NameTypeRequiredDescription
operationstringyes"setMetadataProperty"
propertyNamestringyesName of the metadata property to update.
valueanyyesThe new value. The expected type depends on the metadata plugin. Send null to delete the property.
oldValueanynoPrevious 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 propertyName must exist in the document's content type metadata configuration.
  • The value is validated against the storage schema of the metadata plugin type configured for this property.
  • Metadata conflict errors (when oldValue doesn't match) return a 409 Conflict response.
⌘ K to search