Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Note

Using BatchUpdateService is deprecated and will be removed in 6.0. Use DC 5.8 [core api] Update metadata instead.

This explains how BatchUpdate is used for setting metadata on an asset. 

...

titleNotice

...

asset

...

.

...

 


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:

...

Code Block
<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

Code Block
[{
	"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"]
}]

...

Code Block
public enum ValueType
    {
        String = 1,
        Bool = 2,
        Int = 3,
        DateTime = 4,
        Float = 5,
        IntList = 6,
        Folder = 7,
        AssetType = 8,
        StringRow = 9,
        BoolRow = 10,
        IntRow = 11,
        DateTimeRow = 12,
        FloatRow = 13,
        IntListRow = 14,
        Delete = 15,
        ValueExtraValue = 16,
        StringList = 17,
        StringListRow = 18
    }


cUrl data example

false
Info
icon

curl -X POST \
'/dmm3bwsv3/BatchUpdateService.js?accesskey=eb774621-1c2f-467b-b006-a8efa67094a7' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: 2fc4dd60-8895-0341-5fed-46b57912981d' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F '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>' \
-F '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"]}]'

Success Response

Code : 200 OK

Content example

Code Block
languagejs
{
	"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

...