Logo Help Center

Elvis 6 REST API - remove

Elvis 6 REST API - remove


    &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.

POST requests only

This REST API only accepts POST requests, not GET requests. Also, the POST request needs to include a cross-site request forgery (csrf) token.

The csrf token is a unique code which, by including it in the request, also makes the POST request unique and therefore much more secure.

The csrf token is obtained by first logging in to Elvis Server through a POST request. The response that is received will include the csrf token which can then be used in subsequent POST requests as a http header:

"X-CSRF-TOKEN: <some_csrf_token>"

For more information including examples, see Elvis 6 REST API - Performing a POST request with a csrf token.



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.


A comma-delimited list of asset ids to be removed.

Either 'q' or 'ids' or 'folderPath' must be specified.


The folderPath of the folder to remove. All assets and subfolders will be removed.

Either 'q' or 'ids' or 'folderPath' must be specified.


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.


Remove by ids



Remove by query

The following removes all assets imported more than one year ago.

    ?q=assetCreated:[* TO NOW-1YEAR] 

Remove a complete folder

The following removes a complete folder, including subfolders and all contained assets.

    ?folderPath=/Demo Zone/Images

Document history

  • 27 July 2017: Added section 'Post requests only'.
Was this article helpful?
0 out of 0 found this helpful / Created: / Updated:
Have more questions? Submit a request


Please sign in to leave a comment.