DC 5.1.0 6.3 - Metadata
This section describes how to set metadata on assets. Setting any data in Digizuite is done using the BatchUpdate endpoint.
BatchUpdate is an endpoint that always takes the following parameters:
Name | Description |
---|---|
updateXML | A xml object that describes what should be updated |
values | A Json object that has the values of what should be updated |
accessKey | The accessKey that grants access |
UpdateXML
The updateXML is a XML object that refers to what should be updated (i.e. metadata, configuration, security etc.) and which fields. An example looks like this:
<r> <asset fieldId="MetaDataUpdate"> <metafield fieldId="MetaFieldLabelid_50727" labelId="50727"/> </asset> </r>
- The first <r> tag always encapsulated everything and has to be there.
- The <asset> tag refers to what should be updated.
- The <metafield> tag refers to which field should be updated.
- The fieldIds which are used in the values JSON to match fields and values
- The labelId refers to the metafield labelId (language versioned metafield id) - basically which field should be updated.
Values
The values JSON object contains all the values of what should be updated. An example looks like this:
[{ "Id": "MetaDataUpdate", "FieldId": "MetaDataUpdate", "ContainerType": 7, "RowId": 1, "Values": [{ "FieldId": "MetaFieldLabelid_50727", "Type": 1, "Values": ["test"] }], "ItemIds": ["10585"] }]
- The Id refers to what xml container should be used to (i.e. see <asset> tag in updateXML example)
- The FieldId is the same as ID. It is there for backwards compatibility
- ContainerType defines the type of the values
- RowId is only used for iterative metadata, which is a special type of metadata that contains multiple rows (e.g. comments on a video). For any other metadata type this should ALWAYS be 1.
- Values contain the actual values
- FieldId refers to the inner xml tag that also has a fieldid (i.e. see <metafield> tag in updateXML example)
- Type refers to the datatype of the value. See appendix for datatypes
- Values contains the actual values that has to be set. This is different as per datatype.
- ItemIds refers to the itemid of the item on which the data should be set.