Maintenance outage for upgrade on Sunday, September 22

This site, docs.bmc.com, will be inaccessible for two hours starting at 8 AM CDT, Sunday, September 22, for a platform upgrade.

Page tree

Maintenance outage for upgrade on Sunday, September 22

This site, docs.bmc.com, will be inaccessible for two hours starting at 8 AM CDT, Sunday, September 22, for a platform upgrade.

Skip to end of metadata
Go to start of metadata

The TrueSight Web Service (TSWS) 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.

TSWS APIs that use the POST method
APIDescription
loginObtains the authToken required to perform all other operations
configdataRetrieves configuration data of monitor instances
perfdataRetrieves performance data of monitor instances

TSWS APIs that use the GET method
APIDescription
devicesRetrieves a list of monitored devices
instances Retrieves a list of monitored instances 
monitortypesRetrieves a list of monitor types 
tenantsRetrieves a list of tenants 

Request syntax

https://<PresentationServerHostName>/tsws/10.0/api/authenticate/login

Request parameters

ElementDescription
usernameUser name performing the operation
passwordPassword 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.

ObjectDescription
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"
        }
} 

Related topics

Developing

9 Comments

  1. Hi, 

    I am getting the same value for responseTimeStamp & expires as shown in the example. Does it mean that authToken can never be used?

    I am trying to get the devices using below and the authentication Token 

    https://<PresentationServerHostName>/tsws/10.0/api/omprovider/devices

    but getting the error response as:

    {"responseTimeStamp":"2017-10-04T11:33:44","statusCode":"401","statusMsg":"401"}

    Thanks

    Gaurav

    1.  

      1.  

  2. Hi


    Great for login, works fine ...

    What about logout ?


    Regards


    Stéphane


    1. Thanks for your comment, Stephane Guedon. For Webservices API, the log out should be based on the timeout mechanism. I am checking internally with some SMEs. I will update you on that.

      1.  

  3. Thanks

    A logout should be great to avoid useless sessions in SSO (smile)

    1. Hi Stephane Guedon,

      We have a logout option added in the 11.0 release. For your reference.

      TSWS logout

      Thanks,

      Hari


      1.