The REST API is versioned separately from the TrueSight Presentation Server. The API version provided with this version of the TrueSight Presentation Server is version 10.0. As necessary, newer versions of the API will be released with future product releases.
JSON is used for both request and response bodies. Each API request must include the following content-type parameter in the request header:
content-type application/json
All timestamps in response bodies are returned in ISO 8601 format:
YYYY-MM-DDTHH:MM:SS+HH:MM
The following table contains the endpoints in the TSWS REST API.
Endpoint | Verb | Endpoint purpose |
---|---|---|
| POST | Obtains the authToken required to perform all other operations. For more information, see TSWS authentication. |
| POST | Retrieves configuration data of monitor instances. For more information, see Retrieving the configuration data of monitor instances. |
| POST | Retrieves performance data of monitor instances. For more information, see Retrieving the performance data of monitor instances. |
| GET | Retrieves a list of monitored devices. For more information, see Retrieving the list of devices. |
| GET | Retrieves a list of monitored instances. For more information, see Retrieving the list of monitor instances. |
| GET | Retrieves a list of monitor types. For more information, see Retrieving the list of monitor types. |
| GET | Retrieves a list of tenants. For more information, see Retrieving the list of tenants. |
The response body contains the results of all requests. In addition to the requested content, the response body also contains status content that describes the success or failure of the request.
4xx (client error)
or 5xx (server error)
HTTP status codes. The response body also contains an object that contains details of the error, with the following fields:
Field | Meaning |
---|---|
statusCode | The HTTP request status code |
statusMsg | A description of the request statusCode |
responseMsg | Status of the response |
responseContent | Portion of the response that contains the specified content For unsuccessful requests, this field can also provide some detail or |
Here is an example request, resulting in the response 400 Bad Request:
curl -i -X GET -H 'Authorization: bearer <your_token>' 'https://appliance/api/v1.0/data/search?query=SEARCH%20Host&offset=-1' HTTP/1.1 400 Bad Request { "code": 400, "message": "'offset' cannot be negative", "transient": false }