GET/POST http://yourserver.com/services/remove ?q=<query> &ids=<comma-delimited asset ids> &folderPath=<folder to remove> &async=<true | false> |
What does it do?
Remove one or more assets. This will remove only assets, no folders.
Parameters
q |
A query that matches all assets to be removed. Be careful with this and make sure you test your query using a search call to prevent removing assets that you did not want to be removed. Either 'q' or 'ids' or 'folderPath' must be specified. |
id |
A comma-delimited list of asset ids to be removed. Either 'q' or 'ids' or 'folderPath' must be specified. |
folderPath |
The folderPath of the folder to remove. All assets and subfolders will be removed. Either 'q' or 'ids' or 'folderPath' must be specified. |
async |
When true, the process will run asynchronous in the background. The call will return immediate with the processId. Optional. By default, the call waits for the process to finish and then returns the processedCount. |
Return value
The operation returns a JSON object with the following properties:
processedCount | Number of assets that were processed by the operation. |
errorCount | Number of errors that occurred. |
If called with async=true, the operation returns a JSON object with the following properties:
processId | Unique id of the process that was started. |
If the operation fails, a JSON error object is returned.
Example
Remove by ids
remove http://demo.elvisdam.com/services/remove ?ids=5LMAQTW9qfhANn7f6JJVpl,E8MJ7tLJaUM8cY2eeWYxEu |
Remove by query
The following removes all assets imported more than one year ago.
removehttp://demo.elvisdam.com/services/remove ?q=assetCreated:[* TO NOW-1YEAR] |
Remove a complete folder
The following removes a complete folder, including subfolders and all contained assets.
removehttp://demo.elvisdam.com/services/remove ?folderPath=/Demo Zone/Images |
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.