Examples (Delete several resources)

See https://crossmedia.atlassian.net/wiki/spaces/WD/pages/2208301069/Delete+data#Delete-a-resource

 

The end point is the same as for deleting a single instance. Instead of the identifier of the resource to be deleted, we indicate the list of identifiers of the resources to be deleted, separated by commas.

It is also possible to specify a query.

The maximum number of resources that can be deleted in one call is managed by the max parameter, which works in exactly the same way as for a GET :

  • the default value is 50

  • if you specify a value as a parameter, it defines the limit (e.g. max=100 limits the maximum number of resources that can be deleted to 100)

  • a value greater than 200 cannot be specified: if the parameter value is greater than 200, a maximum of 200 resources will be deleted

Examples

With identifiers

DELETE https://club-wed.wedia-group.com/api/rest/dam/data/asset/4,5,6

Deletes ID assets 4, 5 and 6.

With uniqidentifiers

You can specify unique identifiers.

DELETE https://club-wed.wedia-group.com/api/rest/dam/data/asset/78j1ko1ds3my1,8ges4hm9qkm3w,3gr11uwby8mo6

Delete ID assets 78j1ko1ds3my1, 8ges4hm9qkm3w and 3gr11uwby8mo6.

With query

You can specify a query

DELETE https://club-wed.wedia-group.com/api/rest/dam/data/asset?query=%7Bstatus%3A%20archived%7D

This request will delete all assets with archived status (query is {status: archived}).

Code examples (with identifiers)

HTTP

DELETE /api/rest/dam/data/asset/78j1ko1ds3my1,8ges4hm9qkm3w,3gr11uwby8mo6 HTTP/1.1 Authorization: Basic ZGVtbzpkZW1vcHdk Host: club-wed.wedia-group.com

cURL

curl --request DELETE --url 'https://club-wed.wedia-group.com/api/rest/dam/data/asset/78j1ko1ds3my1,8ges4hm9qkm3w,3gr11uwby8mo6' --header 'Authorization: Basic ZGVtbzpkZW1vcHdk'

JavaScript/fetch

fetch("https://club-wed.wedia-group.com/api/rest/dam/data/asset/78j1ko1ds3my1,8ges4hm9qkm3w,3gr11uwby8mo6", { "method": "DELETE", "headers": { "Authorization": "Basic ZGVtbzpkZW1vcHdk" } }) .then(response => { console.log(response); }) .catch(err => { console.error(err); });

JavaScript/XMLHttpRequest

Java/Unirest (Basic)

Python/Request