Logo Help Center

Elvis 6 REST API - updatebulk

Elvis 6 REST API - updatebulk


    &metadata=<JSON encoded metadata>
    &<Elvis metadata field name>=<value>

What does it do?

This call updates the metadata of multiple existing assets in Elvis.

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 matching the assets that should be updated, see the query syntax guide for details.


Note: Since you use a query to specify which assets to update, make sure you use the right query, or you might end updating the wrong assets or a huge amounts of them. The process runs on the server, so the amount of assets is no problem, but it may take quite some time. You can see the status of all bulk processes on the server status page.

Updating metadata that is not embedded is usually very fast, we typically see rates of several thousands per minute. If metadata needs to be embedded however, it has to alter the files on disk and speed will depend on factors like file size and disk speed. If your server gets slow because of too many concurrently running embeds, consider configuring a lower processing capacity for the main server.


A JSON encoded object with properties that match Elvis metadata field names. This metadata will be set on the asset in Elvis.

Optional. You can also use parameters matching Elvis field names.


Any parameter matching an Elvis metadata field name will be used as metadata. This metadata will be set on the asset in Elvis.

Optional. You also use the 'metadata' parameter.

Tip: The update bulk service uses the same kind of parameters to specify metadata as the update service.


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.


Update metadata

This call sets the rating to 4 and status to New for all assets with the tag "animal":


    &metadata={rating: -1, status: "Correction"}

Passing metadata as separate parameters is useful when working with HTML forms, but for AJAX calls it can be easier to pass metadata as a JSON encoded string. The following will set the rating to "Rejected" (-1) and will change the status to "Correction" on all assets below the "Demo Zone/Images/Nature" folder:

    ?q=ancestorPaths:"/Demo Zone/Images/Nature"

Add values to existing metadata

Using an updatebulk, you can append or remove existing metadata on multiple assets. For example, you could add a tag to a set of assets while leaving their current tags intact.

Tip: You need to escape the '+' character with %2B if you use it in URLs. A plain '+' would be interpreted as a space character (as defined in the specification on URL encoding).

The following call will remove the "house" tag from all assets that have it, while at the same time adding the tags "beach", "villa", "sunny". If one of the assets has the tags "sea", "bay", those would not be removed. If one of the assets has the tag "villa", it will not get "villa" twice, assets can only have a specific tag once.

    &tags=%2Bbeach, -house, %2Bvilla, %2Bsunny

It is also possible to append text to a single value field using the '+' character or add text around the existing value using {CURRENT}.



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.