Logo Help Center

Elvis 6 REST API - checkout

Elvis 6 REST API - checkout

POST

http://yourserver.com/services/checkout/<assetId>
    ?download=<true>

What does it do?

Checks out an asset from the system locking the file for other users.

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.

Parameters

assetId

The Elvis id of the asset to be checked out.

Required

download

When set to true, the asset will be checked out and downloaded from the system. If download is false it will only be checked out.

Optional. Default is false.

Examples

Checkout

The following checks out an asset in Elvis

checkout

http://demo.elvisdam.com/services/checkout/FpERTjYia2X81GoYQi7btF

This will return the checkout metadata in the response:

{
  "checkedOut" : 1393923342735,
  "checkedOutBy" : "admin"
  "checkedOutOnClient" : "webclient"
}

Checkout with download

The following checks out an asset and downloads or shows it in the browser.

checkout

http://demo.elvisdam.com/services/checkout/FpERTjYia2X81GoYQi7btF?download=true

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

0 Comments

Please sign in to leave a comment.