Authentication

General

All Api calls to WATS REST Api are secured with basic authentication. The easiest way to create a machine access token is to use the Postman app from Chrome web browser.

 

Authentication

All Api calls must be autheticated using basic authentication. A special GetToken api call can be used to request a special machine account token that can be used in other api calls.

 

Get machine access token

Install Postman - REST Client in Google Chrome

https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm

click Add to Chrome.

navigate to chrome://apps and click Postman - REST Client

In Request URL enter https://your-server-url/wats/api/auth/GetToken go to Basic Auth and enter a valid username/password. Click Refresh headers, and click Send to get you machine account 

GetToken1.PNG

 

 

Authorization header

Once you have a valid token it can be used to query data. Just add the Authorization header to the request.

Ex.

Authorization = Basic token

Note: Remove leading and trailing " from the result in getToken

 

 

1. Get token

Capture.PNG

 

2. Query data

Capture1.PNG

 

Please note that user restrictions doesn't work with the rest API.

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.