The REST API access is restricted and requires HTTP Basic Authentication. Authentication requires a Base64 encoded string composed of the Account Name and API Password.
NOTE: API access must be enabled for the Account in order to use the REST API. Please contact your Account Manager if you are unable to access the API Setup.
Basic Authorization
Basic Authorization is required for all API Rest calls. To construct a Basic Authorization header:
- Go to CUSTOMER CENTER > API MANAGEMENT > SETUP API.
- If using an API Client*, select the client.
- Copy the current API Password. If there is no password, click GENERATE PASSWORD.
NOTE: Changing the password invalidates any files using the old password. If the authentication code already exists and you regenerate it, make sure to notify everyone using any of the APIs. - Build a string of the form realmName:apiPassword, for example:
- myRealm:xyzpwd123
- Base64 encode the string:
- bXlBY2NvdW50Onh5enB3ZDEyMw==
- Supply an "Authorization" header with content "Basic " followed by the encoded string. Using the example above:
- Authorization: Basic bXlBY2NvdW50Onh5enB3ZDEyMw==
API Client Authorization
API Client* Authorization is only required to use an API Client other than the Default associated with the Realm. To construct an API Client X-API-Key:
- Go to CUSTOMER CENTER > API MANAGEMENT > SETUP API.
- Select an API Client.
- If you do not yet have one, click GENERATE AUTHORIZATION CODE.
NOTE: Changing the code invalidates any files using the old code. If the authentication code already exists and you regenerate it, make sure to notify everyone using the selected API Client. - Build a string of the form apiClientName:apiClientAuthCode, for example:
- myClient:abcdef123
- Base64 encode the string:
- bXlDbGllbnQ6YWJjZGVmMTIz
- Supply an "x-api-key" header followed by the encoded string. Using the example above:
- x-api-key: bXlDbGllbnQ6YWJjZGVmMTIz
*API Client coming in Q1 2020*