TSWS Web service authentication
The login API uses the POST method to return an authToken value in the JSON response. The authToken provides the credentials and permissions of the user performing the operations and must be specified to authenticate all subsequent TSWS API requests.
The authToken also contains an expiration date for using it.
APIs that use the POST method
API | Description |
---|---|
Obtains the authToken required to perform all other operations | |
Retrieves configuration data of monitor instances | |
Retrieves performance data of monitor instances |
APIs that use the GET method
API | Description |
---|---|
Retrieves a list of monitored devices | |
Retrieves a list of monitored instances | |
Retrieves a list of monitor types | |
Retrieves a list of tenants |
Request syntax
https://<PresentationServerHostName>/tsws/10.0/api/authenticate/login
Request parameters
Element | Description |
---|---|
username | User name performing the operation |
password | Password to authenticate the user |
tenantName | Tenant name as it appears in the Presentation Server Example: BmcRealm |
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 |
|
expires | Date in which the authToken expires To perform a TrueSight Web Services operation after this date, you must perform this operation again. |
status |
|
Sample JSON response
"responseTimeStamp": "2015-07-21T06:23:51",
"statusCode": "200",
"statusMsg": "OK",
"response":
{
"authToken": "AQIC5wM2LY4Sfczv3QuPxC851ZfQ-.*",
"authPassed": true,
"expires": "2015-07-21T06:23:51",
"status": "OK"
}
}