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.
Log in requirement
Before being able to request information from Assets Server by using a GET request or make changes to the system through a POST request, a log in to Assets Server is required. For information about the available APIs for logging in, see Assets Server REST API - introduction.
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 Assets 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 Assets Server REST API - Performing a POST request with a csrf token.
Parameters
assetId |
The Assets Server 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 Assets Server
checkout http://demo.assets-server.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.assets-server.com/services/checkout/FpERTjYia2X81GoYQi7btF?download=true |
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.