Validating the token
The TrueSight Web Service (TSWS)
token API (GET) is meant for validating whether the user session identified by the authToken provided through the request is still active or not. The user session is created using the token API (POST). It uses the GET method to validate the token for the logged in user.
Before you begin
You must have used the
token API (POST) to obtain the authToken, which authenticates the user performing the operation. For details, see TSWS authentication.
Request Header parameters
Value of the authToken
Set it to true or false. Setting it to true returns a response header when the request succeeds. Any value other than true is considered as false, and no details are returned in response.
Note: If the authToken value passed is Admin and the getTokenDetails is set to true, then the behavior is same as setting it to false.
Sample request with REST client
After accessing the REST client, perform the following steps:
- Enter the URL for the configuration data of monitor instances API. The generic format is:
https://<Presentation Server host name>/tsws/api/v10.1/token
- Add a new header row and select authToken as the header type.
- Enter the text authToken followed by the authToken generated through the
The request body is blank.
- (Optional) Add a new header row, name it as getTokenDetails.
- Enter the text getTokenDetails followed by the value True.
- Click Send.
Sample JSON response
The response information follows the standard HTTP response status codes.
Sample JSON response for the validate token API:
|Status code||Description||Sample JSON||Troubleshooting tips|
Header when getTokenDetails is false or no details are returned in response:
Header response when getTokenDetails is true:
|Specify the |
|Log in again using the |