Page tree

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

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

Note

The REST APIs support the JSON encoding scheme only.

This topic contains the following information:


Supported APIs

The following topics describe the various APIs supported with the product:

Note

Before you running these APIs you need to generate an authorization token by running the login API. This token is used for authenticating a user into the product. For more information, see Authentication and authorization.


Authentication and authorization

You need to authenticate with a user name and password for running the REST operations. Additionally, role-based authorization 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 APIs

  • 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 APIs follow the HTTP standard for reporting status. The API 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 API, 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.

  • No labels