Documentation Center

Get information about a specific asset

Get information about an asset based on its name.

For security reasons, you need to perform a Login action before making any other public calls to the WorldServer API. The sessionId in the response is your session token. Use this token in all the other calls that you make.

Also, make sure that you have the appropriate user type permissions to perform this API call. To view or update your permissions, in WorldServer, go to Management > User Setup > User Types, and then select your user type.

Prerequisites

To get information about a specific asset, you need the internal name and the download token of the asset. These values were displayed as part of the response when you uploaded the file: A screen shot that highlights the internal name and the download token of an asset in the response to the upload call.

API call

<protocol>://<ws-host>:<ws-port>/ws-api/v1/files?token=<sessionId>&filename=<filename>&downloadToken=<downloadToken>

Details

  • GET method
  • Content-Type in the header: application/json
  • Mandatory parameters:
    • the session token (as a query string parameter or as a key-value pair in the header)
    • filename, which is the value of the internalName in the response to the upload call (as a query string parameter)
    • the value of the downloadToken in the response to the upload call (as a query string parameter)

Response

The content of the file (200 OK)

Error messages

MessageStatus code
Download token is not valid 400 Bad Request
No session token provided or invalid token401 Unauthorized
Required List parameter 'filename' is not present500 Internal Server Error
Required String parameter 'downloadToken' is not present500 Internal Server Error