API Authentication
To call the API first user need to get a token from .../Tms/services/api/logon/token
.
Refer to these scripts for examples:
- Authentication with invoke REST method
- Authentication with invoke web request
- Get Token with invoke REST method
- Get Token with invoke web request
POST
You will need to post a request message with the following details:
POST /api/logon/token
{
"Password": "string",
"UserName": "string"
}
Parameter | Value |
---|---|
Password | clientsecret |
UserName | clientid |
The auth token will be returned to you.
- Copy the token.
- Click Authorize.
- In the Available authorizations modal, paste that token into the Value field.
- On the modal click Authorize.
You may also add the returned token to your Authorization header as a bearer token.
Refer to How to Manually Add API Client Users and Add Roles to a User to setup your API Client User and to add that user to the Privilege Manager Administrators role.
DELETE
For an API Client User to logout, a DELETE request for the api/logon/token needs to be issued with the bearer token in the Authorization header.
curl -X DELETE --header "Authorization: Bearer {token}" "https://yourinstancename/tms/services/api/logon/token"
with a request URL of:
https://yourinstancename/TMS/services/api/logon/token