TrueSight Orchestration Login and Logout calls


Logs the user in and out of the TrueSight Orchestration server.

Warning

Note

This page documents login and logout calls to the TrueSight Orchestration server.

This topic includes the following sections:

For an overview of logging into the API server, getting an authentication token, and logging out, see Logging-into-the-API-server.

For more information about request and response headers, see HTTP request and response headers.

Login

Request

HTTP method: POST

URL: https://<hostname>:<port>/<baocdp|baoap>/rest/login

This is the URL for the TrueSight Orchestration component you are accessing. It includes the host name, corresponding port, and TrueSight Orchestration component (CDP or AP). 

Warning

Note

Executing the command from an AP is supported in TrueSight Orchestration versions 7.9.01 and later.

Request body properties

Property

Description

username

User name

password

Password

Example request JSON

POST /rest/login
Host: <hostname>:<port>/baocdp
Request Headers
Content-type: application/json
 
{
 "username" : "<yourUsername>",
 "password" : "<yourPassword>"
}

Response

If successful, this method logs you into the API server and returns an authentication token.

Response body properties

Property

Description

login

Login request status

Example response JSON

Response Headers:
    Status Code: 200 OK
    Strict-Transport-Security: max-age=31536000; includeSubDomains
    Cache-Control: no-store
    X-Content-Type-Options: nosniff
    Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*
   Pragma: no-cache
    X-XSS-Protection: 1; mode=block
    Set-Cookie: JSESSIONID=FXV7890B4116; Path=/baocdp; Secure;
HttpOnly
    Set-Cookie: Authentication-Token=/DwG7trv/o0Ep/tyb/wyx678/cftsOxrp/kwx=;
Domain=clm-pun-foo.com; Path=/baocdp; Secure; HttpOnly
    Authentication-Token: <Masked String>
    Content-Type: application/json;charset=UTF-8
    Transfer-Encoding: chunked
   Date: Wed, 30 Jun 2021 05:40:17 GMT
    Keep-Alive: timeout=60
    Connection: keep-alive
    Server: platform-web-server
 
Response Body:
{
   "login":"true"
}

From the response header, save the text string returned in the Authentication-Token line. That text string is your authentication token, which you need to include in future requests.
For example, in the previous response, the following line is the authentication token:

/DwG7trv/o0Ep/tyb/wyx678/cftsOxrp/kwx=;

Login status codes and messages

For more details about HTTP response codes, see HTTP response codes.

HTTP code

Message

Description

200

OK

Request succeeded

400


Bad request

An error occurred while logging in.

401


Unauthorized

405


Method not allowed

Logout

Request

HTTP method: POST

URL: https://<hostname>:<port>/<baocdp|baoap>/rest/logout

This is the URL for the TrueSight Orchestration component you are accessing. It includes the host name, corresponding port, and TSO component (CDP or AP). 

Warning

Note

Executing the command from an AP is supported in TrueSight Orchestration versions 7.9.01 and later.

Request body properties

Property

Description

Host

The API server URL

Authentication-Token

The text string that is your authentication token

Example request JSON

POST /rest/logout
Host: <hostname>:<port>/baocdp
Authentication-Token: /DwG7gAAAAAAAAAASSIUSHVVSysr/3fHRkbS9sJdUeGqHdbliWdOloDrSntnkZKnZZmXveOpKFWtZCLX/oSJv1UgJDp38Cc2fe8FhZe1xl2+LlmoYJEo4ouBnZaCA8M8kNY+04icmspDSYJnsDoa3bCFK/
xvyR3xrux3zZxEPrxnI1/5dxKy0MJqrO4RYq6QIl+Pz+JwTwZuvD9mv1xli0HL3ffqYmLBMpLJv9aegihLUsKWAV4xRCBvZbzlQQh3UFFDtVDMjkx0TFYbQg8aa30zk7ZB8nCQdQfm5pyNJdkVHo5ApObo610AHHz79P0TLsWN0pjQMQwrJNtC

Response

If successful, this method logs you out of the API server.

Response body properties

Property

Description

logout

Logout request status

Example response JSON

Response Headers:
    Status Code: 200 OK
    X-Frame-Options: DENY
    Strict-Transport-Security: max-age=31536000;includeSubDomains
    Cache-Control: no-store
    X-Content-Type-Options: nosniff
    Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*
   Pragma: no-cache
    X-XSS-Protection: 1; mode=block
    Set-Cookie: JSESSIONID=BXTAD20814X; Path=/baocdp; Secure; HttpOnly
    Set-Cookie: Authentication-Token=/DrWrSys/3l7NG3b/xyrl/0xSZh345CX/MTOprx/kwCMK=;Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Domain=foo.bmc.com; Path=/baocdp
    Content-Type: application/json;charset=UTF-8
    Transfer-Encoding: chunked
   Date: Wed, 30 Jun 2021 05:43:34 GMT
    Keep-Alive: timeout=60
    Connection: keep-alive
    Server: platform-web-server

Response Body:

{
   "logout": "true"
}

Logout status codes and messages

For more details about HTTP response codes, see HTTP response codes.

HTTP code

Message

Description

200

OK

Request succeeded

400


Bad request

An error occurred while logging out.

401


Unauthorized

405


Method not allowed


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Platform 24.3