Use the GET
method to retrieve execution data and metrics, for the most recent execution or historic executions, of a single Execution Plan or all of your Execution Plans.
Note
If you are retrieving historical data for your Execution Plans, this is limited to a maximum of 15000 records retrieved from each App Visibility collector. If there are more than 15000 relevant records, the most recent records are retrieved.
You must obtain an authToken by using the login
API. The token authenticates the user performing the operation. For details, see
TSWS authentication
.
Use the following request syntax for the
getLatest
and getHistorical
APIs:
For retrieving the most recent execution data | https://<PresentationServerHostName>/tsws/10.0/api/appvis/synthetic/api/data/getLatest?applicationId=<AID>&executionPlanId=<EPID>&locationId=<LID>&withErrors=<E>&withCustomTimers=<CT>&withPageTimers=<PT> |
For retrieving historic execution data | https://<PresentationServerHostName>/tsws/10.0/api/appvis/synthetic/api/data/getHistorical?applicationId=<AID>&executionPlanId=<EPID>&locationId=<LID>&withErrors=<E>&withCustomTimers=<CT>&withPageTimers=<PT>&fromEndTime=<FET>&toEndTime=<TET> |
In the above examples:
<PresentationServerHostName>
indicates the host name of the TrueSight Presentation Server.<AID>
indicates the ID of the application on the Presentation Server (not the synthetic application ID).<EPID>
indicates the ID of the Execution Plan.After accessing the REST client, perform the following steps:
https://localhost/tsws/10.0/api/appvis/synthetic/api/data/getHistorical?applicationId=1&executionPlanId=101&locationId=2&withErrors=false&withCustomTimers=false&withPageTimers=false&fromEndTime=1455019883851&toEndTime=1455623288778
Add a new header row and select Authorization as the header type.
Enter the text authToken followed by the authToken generated through the login
API.
Element | Description |
---|---|
authToken | Value of
authToken
|
Query parameters | |
applicationId | (Optional) ID of the application on the Presentation Server (not the synthetic application ID) If this parameter is not used, data is generated for all applications. |
executionPlanId | ( Optional ) ID of the Execution Plan If this parameter is not used, data is generated for all Execution Plans. |
| ( Optional ) ID of the location If this parameter is not used, data is generated for all locations. |
withErrors | ( Optional ) Boolean value indicating if errors are included in the generated data. If this parameter is not used, errors are not included. |
withCustomTimers | ( Optional ) Boolean value indicating if custom timers are included in the generated data. If this parameter is not used, custom timers are not included. |
withPageTimers | ( Optional ) Boolean value indicating if page timers are included in the generated data. If this parameter is not used, page timers are not included. |
fromEndTime | ( Optional ) ( If this parameter is not used, all available results until |
toEndTime | (Optional) ( If this parameter is not used, all available results ending after |
The following JSON is a sample of the code returned by the API for a request for historic data.
Parameter | Description | Value |
---|---|---|
transactions | Can be multiple | |
executionPlanId | ID of the Execution Plan | Number |
agentId | ID of the TEA Agent where the execution ran | Number |
scriptExecutionErrorsCount | Total number of errors that occurred during this transaction | Number |
groupId | ID of the location of the TEA Agent | Number |
agentName | Name of the TEA Agent where the execution ran | String |
availabilityErrorsCount | Number of availability errors that occurred during this transaction | Number |
executionErrorsCount | Number of execution errors that occurred during this transaction | Number |
customTimers | Custom timers for this execution | |
timers | Can be multiple |
|
name | Name of the custom timer | String
|
value | Time in milliseconds | Number |
transactionName | Name of the transaction | String |
transactionId | Id of the transaction | Number |
agentIp | IP address of the TEA Agent | IP address |
uid | Unique ID of the execution If the execution includes more than one transaction, all transactions in that execution have the same value for | String made up of the following: < |
transactionStartTime
| Start time of the transaction in UTC format | Number |
pageTimers | Page timers for this execution | |
timers | Can be multiple |
|
name | Name of the page timer | String
|
value | Time in milliseconds | Number |
groupName | Name of the location of the TEA Agent | String |
executionPlanStartTime | Start time of the execution in UTC format | Number |
transactionEndTime | End time of the transaction in UTC format | Number |
scriptName | Name of the script | String |
accuracyErrorsCount | Number of accuracy errors that occurred during this transaction | Number |
agentMacAddress | MAC address of the computer where the TEA Agent is installed | MAC address |
syntheticApplicationId | ID of the application for synthetic monitoring | number |
errors | ||
severity | Indication of the severity of the event | ERROR |
errorMessage | Error message returned by the application | String |
errorCode | Code indicating the type of error Correlates with | Number |
type | Type of error |
|