This explains how BatchUpdate is used for setting metadata on an asset.
Notice
Please consider the DC 5.6 (New) Update metadata on asset instead. This specific documentation is here because of backwards compatibility and works perfectly fine.
URL : /BatchUpdateService.js
Method : POST
Auth required : Yes
Required parameters
Name | Example | Description |
---|---|---|
accessKey | eb774621-1c2f-467b-b006-a8efa67094a7 | accessKey that grants access to the API |
The updateXML and values is send as forms data and it looks like this:
updateXML
<r> <asset fieldId="MetaDataUpdate"> <metafield fieldId="MetaFieldLabelid_50723" labelId="50723"/> <metafield fieldId="MetaFieldLabelid_51867" labelId="51867"/> <metafield fieldId="MetaFieldLabelid_51876" labelId="51876"/> </asset> </r>
values
[{ "Id": "MetaDataUpdate", "FieldId": "MetaDataUpdate", "ContainerType": 7, "RowId": 1, "Values": [{ "FieldId": "MetaFieldLabelid_50723", "Type": 1, "Values": ["Desert title 2"] }, { "FieldId": "MetaFieldLabelid_51867", "Type": 6, "Values": [51603] }, { "FieldId": "MetaFieldLabelid_51876", "Type": 17, "Values": ["test 1"] }], "ItemIds": ["10313"] }]
cUrl data example
Success Response
Code : 200 OK
Content example
{ "success": true, "total": 0, "error": "", "items": [{ "Id": "MetaDataUpdate", "FieldId": "MetaDataUpdate", "ItemId": 10313, "BaseId": 113, "TestFase": false, "VersionId": null, "ChangesetId": 0, "Warnings": [] }], "warnings": [] }
Error Response
Code : 200 OK
Content example
{ "success": false, "total": 0, "error": "A critical exception occurred while we were executing the search(Access denied, login first).\r\n", "items": null, "warnings": [{ "Severity": 150, "Code": 420, "Description": "A critical exception occurred while we were executing the search(Access denied, login first)." }] }