TSWS authentication
Request syntax
https://<PresentationServerHostName>/tsws/api/v10.1/token
Request parameters
Element | Description |
---|---|
username | User name performing the operation |
password | Password to authenticate the user |
tenantName | Tenant name as it appears in the TrueSight Presentation Server Example: * |
The request parameters in JSON format:
"username": "<user name>",
"password": "<password>",
"tenantName": "<tenant name>"
}
Sample request with REST client
JSON response content
The JSON response includes an authToken if the authentication is successful. You must use this authToken value for subsequent requests.
Object | Description |
---|---|
authToken | Value that you specify in subsequent TrueSight Web Services operations |
authPassed | Value returned by the API. This can be either true or false. |
status | Status returned by the API. For example, if the status code is 200, the status returned is OK. |
Sample JSON response and troubleshooting authentication 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-08T19:29:18", "statusCode": "200", "statusMsg": "OK", "response": { "authToken": "_daa8939f-41a6-4f8e-bcc0-b3b230e72244", "authPassed": true, "status": "OK" } } | Not applicable. |
401 | Invalid credentials | { "responseTimeStamp": "2017-05-09T01:24:43", "statusCode": "401", "statusMsg": "Invalid username/password", "response": { "authPassed": false, "status": "FAILED" } } | Specify valid credentials and try again. |
500 | Internal Server error | { "responseTimeStamp": "2017-05-09T01:25:35", "statusCode": "500", "statusMsg": "Internal Server error", "response": { "authPassed": false, "status": "FAILED" } } | 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. |
400 | Missing username | { "responseTimeStamp": "2017-05-09T01:27:39", "statusCode": "400", "statusMsg": "Username cannot be blank" } | Specify a value for the username parameter. |
400 | Missing password | { "responseTimeStamp": "2017-05-09T01:28:19", "statusCode": "400", "statusMsg": "Password cannot be blank" } | Specify a value for the password parameter. |
400 | Missing tenant | { "responseTimeStamp": "2017-05-09T01:28:19", "statusCode": "400", "statusMsg": "Tenant name cannot be blank" } | Specify a value for the tenant parameter. |