Manager |
See Also:
Administrate Tokens in WATS Control Panel
General
All Api calls to WATS REST Api are secured with basic authentication and must be autheticated using basic authentication. The easiest way to create a machine access token is to login to your WATS web application and browse to the Token menu in Control panel.
Your tokens are like passwords. Keep them secret!
Authorization header
Once you have a valid token it can be used to query data. Just add the Authorization header to the request.
Authorization = Basic token
Example request with a valid Authorization header (using Postman)
Get machine access token using the API
A GetToken api call can be used to request a machine account token.
NOTE: It is recommended to administrate tokens using the Token menu in WATS Control panel.
- Login to your WATS web application: https://yoursubdomain.wats.com
- Enter the following web address to request a new token: https://yoursubdomain.wats.com/api/Auth/GetToken/
- You may also specify a token identifier. The identifier should describe the purpose of your token: https://yoursubdomain.wats.com/api/Auth/GetToken/MyIdentifier
- You may reset a token with the reset flag: https://yoursubdomain.wats.com/api/Auth/GetToken/MyIdentifier?reset=true
- Please note: In case you need to reset a token, every application configured with the “old token” will no longer be able to authenticate with the API.
Swagger
The WATS Rest API is documented and available in swagger as well. Login to you WATS web application and navigate to https://{your_server}/swagger
In swagger you can run API request like /api/Auth/GetToken/{identifier}, and lookup documentation.
Comments
0 comments
Please sign in to leave a comment.