Developing

The TrueSight IT Data Analytics product provides you with the capability of running REST APIs or endpoints.

You can use various REST clients such as cURL, wget, and REST client browser plugins for running the supported endpoints. The client can consume the API endpoints using the standard HTTP and HTTPS protocols, same as those used for connecting to the product UI.

Note

The endpoints support the JSON encoding scheme only.

This topic contains the following information:



Authentication and authorization

You need to authenticate with a user name and password for running the REST operations. Additionally, role-based authorization Open link is required for authenticating into the product and running various operations.

To be able to authenticate, you need to generate the authorization token by running a POST call with the following request URL. You also need to provide the user name and password in the request body (in JSON format).

Request URL

<protocol>://<host>:<port>/olaengine/itdaws/authservices/login

In the preceding URL, the following definitions apply:

  • <protocol> refers to the protocol that you want to use for communication with the Console Server.

    The value can be one of the following:

    • http
    • https
  • <host> refers to the host name of the Console Server.
  • <Port> refers to the port number of the Console Server. Default port is 9797.

Output

The response is an authorization token. By default, this token is valid for a period of 60 minutes. After the default period expires, the token cannot be used, you need to generate a new token.

Required headers while running the supported endpoints

  • Authorization
    Pass the authorization token as the value.

  • Content-Type:  application/json

Example

Method
POST
Request URL

https://hou-clt-01:9797/olaengine/itdaws/authservices/login

Example request body (JSON format)
{
    "username": "admin",
    "password": "admin12345"
}
Example response
{
    "username": "admin",
    "authToken": "6AkjnOzw9hH8/t5hUAIn7b0rbNI="
}

Logging out of a user session

You can log out and terminate a user session by sending a POST request. You also need to provide the authorization token in the request body (in JSON format).

After you log out from a given session, the authorization token generated earlier does not remain valid. Attempts to reuse the earlier generated token generates an error.

Request URL

<protocol>://<host>:<port>/olaengine/itdaws/authservices/logout

In the preceding URL, the following definitions apply:

  • <protocol> refers to the protocol that you want to use for communication with the Console Server.

    The value can be one of the following:

    • http
    • https
  • <host> refers to the host name of the Console Server.
  • <Port> refers to the port number of the Console Server. Default port is 9797.

Required headers

Example

Method
POST
Request URL

https://hou-clt-01:9797/olaengine/itdaws/authservices/logout

Example request body (JSON format)
{
    "Authorization": "7dNJZSao3zZKjuZ5/o1Z8Ji570Q="
}
Example response
{
    "status": "SUCCESS"
}

HTTP status codes

The supported endpoints follow the HTTP standard for reporting status. The endpoint responses can include one of the following HTTP status codes.

For a complete list of status codes and their meaning, see Hypertext Transfer Protocol -- HTTP/1.1 status code definitions. To understand the status codes relevant to each endpoint, see the individual API topics.

Status codeDescription
200Request completed successfully.
202Request accepted (valid inputs) but processing was no completed.
207

Multiple status for a request.

400Request contains invalid inputs.
401Authorization error (invalid authorization token or authorization token not present).
404Requested resource does not exist.
500

Error occurred while processing the request. Occurrence of this error is rare.

For more information, see the error message. Alternatively, see the itda.log located at %BMC_ITDA_HOME%\logs.

Was this page helpful? Yes No Submitting... Thank you

Comments