WoodWing Help Center

Elvis 6 REST API - createAuthKey

Elvis 6 REST API - createAuthKey

POST

http://yourserver.com/services/createAuthKey
    ?subject=<subject>
    &validUntil=<Expiry date>
    &assetIds=<List of asset ids>
    &description=<Description>
    &downloadOriginal=<true|false>
    &downloadPreview=<true|false>
    &requestApproval=<true|false>
    &requestUpload=<true|false>
    &containerId=<Container asset id>
    &importFolderPath=<Path where files are uploaded>
    &notifyEmail=<Email address>
    &sort=<comma-delimited sort fields>
    &viewMode=<thumbnail|list|mason?>
    &thumbnailFields=<comma-delimited fields>
    &listviewFields=<comma-delimited fields>
    &filmstripFields=<comma-delimited fields>
    &thumbnailZoomLevel=<Zoom level>
    &listviewZoomLevel=<Zoom level>
    &filmstripZoomLevel=<Zoom level>
    &downloadPresetIds=<List of download preset ids>

What does it do?

Create an authKey in Elvis.

Using this API call it is posible to create authKeys.

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

subject

AuthKey subject

Required.

validUntil

Expiry date, in one of the date formats supported by Elvis, see Searching for files in Elvis by using a query.

Required.

assetIds

Comma-delimited list of asset id's to share, do not specify for a pure upload request (requestUpload must be true is this case)

Optional.

description

AuthKey description that will be shown to receiver of the link.

Optional.

downloadOriginal

Allow downloading original files. Setting this to true will automatically force downloadPreview to true as well.

Optional. Default is false.

downloadPreview

Allow viewing and downloading previews. Setting this to false will only show thumbnails and will also force downloadOriginal to false.

Optional. Default is false.

requestApproval

Request for approval.

Optional. Default is false.

requestUpload

Allow uploading new files, must be true when asset id's is not specified.

Optional. Default is false.

containerId

Container asset id which uploaded files are related to. Only relevant when requestUpload=true.

Optional.

importFolderPath

folderPath where files are uploaded. Required when requestUpload=true.

Optional.

notifyEmail

Email address to send notifications to when upload or approval is finished. Only relevant when requestUpload=true or requestApproval=true.

Optional.

sort

Client setting, specify a comma-delimited list of fields to sort the results on. Follows the same behavior as sort in REST - search call, see also REST - search.

Optional.

viewMode

Client setting.

  • thumbnail show as list of thumbnails.
  • list show as list.
  • mason show as masonry grid.

Optional. Default is thumbnail.

thumbnailFields

Client setting, comma-delimited list of fieldnames for showing metadata in the thumbnail view.

Optional.

listviewFields

Client setting, comma-delimited list of fieldnames for showing metadata in the list view.

Optional.

filmstripFields

Client setting, comma-delimited list of fieldnames for showing metadata in the filmstrip view.

Optional.

thumbnailZoomLevel

Client setting, thumbnail zoom level in the thumbnail view.

Optional.

listviewZoomLevel

Client setting, thumbnail zoom level in the list view.

Optional.

filmstripZoomLevel

Client setting, thumbnail zoom level in the filmstrip view.

Optional.

downloadPresetIds

Comma-delimited list of Download Preset IDs. Allows the downloading of renditions generated according to these Preset settings.

IDs that do not exist or that are not accessible for the user are not accepted by the API. In such cases, an 'IllegalArgumentException' error with an explanation message is returned containing the ID of the incorrectly downloaded preset.

Example:

{

"errorname": "IllegalArgumentException",

"message": "You cannot share these download presets, because they don't exist or you don't have permission: 8cP4nL8Tao09koYG87E1s9",

"errorcode": 500

}

Optional.

Return value

A JSON object with name/value pairs. The following properties are returend.

authKey The authKey of the created shared link.
webClientUrl

Share link url for the web client/share client.

Examples

createAuthKey

http://demo.elvisdam.com/services/createAuthKey
    ?subject=subject
    &assetIds=AOBKw_wRqYV8PQjdIoY1gx,FA9IVYMmaeXBiilboXPki3
    &validUntil=1582306399999

This call creates an authKey with subject "subject" and assets with id's "AOBKw_wRqYV8PQjdIoY1gx" and "FA9IVYMmaeXBiilboXPki3", valid until 21/02/2020.

{
  "authKey" : "qQ-1X1b",
  "webClientUrl" : "http://demo.elvisdam.com?w=qQ-1X1b",
  "desktopClientUrl" : "http://demo.elvisdam.com?e=qQ-1X1b",
  "mobileClientUrl" : "elvis://demo.elvisdam.com?w=qQ-1X1b"
}

Pure upload request

Exampe for creating a link with upload-only rights.

createAuthKey

http://demo.elvisdam.com/services/createAuthKey
    ?subject=subject
    &requestUpload=true
    &importFolderPath=/Users/admin
    &validUntil=1582306399999

This call creates an authKey with subject "subject", with allows uploading of assets to the path "/Users/admin" and is valid until 21/02/2020.

{
  "authKey" : "aayy4ZE",
  "webClientUrl" : "http://demo.elvisdam.com?w=aayy4ZE",
  "desktopClientUrl" : "http://demo.elvisdam.com?e=aayy4ZE",
  "mobileClientUrl" : "elvis://demo.elvisdam.com?w=aayy4ZE"
}

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.