POST api/MediaItems/Remove

Batch deletion of media items

Request Information

URI Parameters

None.

Body Parameters

Parameters of the batch operation

DataChangeBatch
NameDescriptionTypeAdditional information
Ids

Identifiers of media objects for which the operations should be performed

Collection of integer

None.

Delete

Flag of items deletion

boolean

None.

Data

Operations that should be performed with specified media objects

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
    }
  ]
}

Response Information

Resource Description

"Result containing errors thrown during deletion. Possible error statuses: (0, -100) - request execution error (ID, -1) - error when deleting media item with the specified ID (ID, 4) - media item is blocked by the versioning subsystem"

ObjResultOfIDictionaryOfInt64AndInt16
NameDescriptionTypeAdditional information
Data

Dictionary of integer [key] and integer [value]

None.

Error

Error description

string

None.

Success

Flag of successful operation

boolean

None.

ErrorCode

Error code

integer

None.

Response Formats

application/json, text/json

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

Parameter Information

data

Property Description
Ids (Int64[])
Identifiers of media objects for which the operations should be performed
Delete (Boolean)
Flag of items deletion
Data (DataChangeItem[])
Operations that should be performed with specified media objects