Obtaining user groups for the authenticated 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 syntax
https://<PresentationServerName>/tsws/api/v10.1/token/groups
Request parameters
Element | Description |
---|---|
groups | User groups for the authenticated user. |
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/groups - Add a new header row and select authToken as the header type.
- Enter the text authToken followed by the authToken generated through the token API (POST).
The request body is blank. - Click Send.
Sample JSON response and Troubleshooting user groups API
The response information follows the standard HTTP response status codes. The following table contains Sample JSON response and the associated troubleshooting tips:
Status code | Description | Sample JSON | Troubleshooting tips |
---|---|---|---|
200 | Success | { "responseTimeStamp": "2017-05-15T14:31:15", "statusCode": "200", "statusMsg": "OK", "usergroups": [ "Administrators" ] } | Not applicable. |
400 | Missing token | { "responseTimeStamp":"2017-05-15T20:19:07", "statusCode": "400", "statusMsg": "Token is missing" } | Specify the authToken in the request header. |
401 | Expired token | { "responseTimeStamp": "2017-05-15T14:41:40", "statusCode": "401", "statusMsg": "Invalid/Expired token" } | Log in again using the token API (Post). |
500 | Internal Server error | { "responseTimeStamp": "2017-05-15T14:41:40", "statusCode": "500", "statusMsg": "Internal server error" } | Try after some time or contact the TrueSight Presentation Server administrator. |
503 | Remedy SSO is not accessible | { "responseTimeStamp": "2017-05-15T14:41:40", "statusCode": "503", "statusMsg": " Remedy SSO server is not accessible" } | Try after some time or contact the TrueSight Presentation Server administrator. |
Related topics