POST api/ItemData/BatchChange

Change tags of multiply files in batch.

Request Information

URI Parameters

None.

Body Parameters

This arguments must contain a list of items (by item IDs) that should be changed, a list of tags and tag values that must be changed.

DataChangeBatch
NameDescriptionTypeAdditional information
Ids

List of items ID to be changed.

Collection of integer

None.

Delete

Flag indicating that the files, associated with an item, are to be deleted.

boolean

None.

Data

Collection of DataChangeItem

None.

Request Formats

application/json, text/json

Sample:
{
  "ids": [
    1,
    2
  ],
  "delete": true,
  "data": [
    {
      "guid": "sample string 1",
      "value": "sample string 2",
      "id": 3,
      "remove": true
    },
    {
      "guid": "sample string 1",
      "value": "sample string 2",
      "id": 3,
      "remove": true
    }
  ]
}

application/xml, text/xml

Sample:
<DataChangeBatch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DAMClient.Models">
  <Data>
    <DataChangeItem>
      <Guid>sample string 1</Guid>
      <Id>3</Id>
      <Remove>true</Remove>
      <Value>sample string 2</Value>
    </DataChangeItem>
    <DataChangeItem>
      <Guid>sample string 1</Guid>
      <Id>3</Id>
      <Remove>true</Remove>
      <Value>sample string 2</Value>
    </DataChangeItem>
  </Data>
  <Delete>true</Delete>
  <Ids xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:long>1</d2p1:long>
    <d2p1:long>2</d2p1:long>
  </Ids>
</DataChangeBatch>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'DataChangeBatch'.

Response Information

Resource Description

Returns true (check Data) if successfully saved and false if failed. Check for error logs in the Error property

ObjResultOfBoolean
NameDescriptionTypeAdditional information
Data

boolean

None.

Error

Error description if the operation failed

string

None.

Success

Operation result

boolean

None.

ErrorCode

Error code

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "data": true,
  "error": "sample string 2",
  "success": true,
  "errorCode": 4
}

application/xml, text/xml

Sample:
<ObjResultOfboolean xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DAMClient.Models">
  <_x003C_ErrorCode_x003E_k__BackingField>4</_x003C_ErrorCode_x003E_k__BackingField>
  <_x003C_Error_x003E_k__BackingField>sample string 2</_x003C_Error_x003E_k__BackingField>
  <_x003C_Success_x003E_k__BackingField>true</_x003C_Success_x003E_k__BackingField>
  <Data>true</Data>
</ObjResultOfboolean>
bool hasModels = Model.ParameterModels.Count > 0; if (hasModels) {

Parameter Information

data

Property Description
Ids (Int64[])
            List of items ID to be changed.
            
Delete (Boolean)
             Flag indicating that the files, associated with an item, are to be deleted.
            
Data (DataChangeItem[])

				
}