Retrieving synthetic execution data and metrics
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.
Before you begin
You must obtain an authToken by using the login
API. The token authenticates the user performing the operation. For details, see
TSWS authentication
.
To retrieve synthetic execution data
Use the following request syntax for the getLatest
and getHistorical
APIs:
For retrieving the most recent execution data |
|
For retrieving historic execution data |
|
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.- <LID> indicates the ID of the location.
- <E> indicates whether to include errors.
- <CT> indicates whether to include custom timers.
- <PT> indicates whether to include page timers.
- <FET> indicates from what end time to include data. (Historic data only)
- <TET> indicates until what end time to include data. (Historic data only)
Sample request with REST client
After accessing the REST client, perform the following steps:
- Enter the URL for the API.
An example of a request for a historic transaction data is: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.- Click Send.
Request parameters
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 |
Response
The following JSON is a sample of the code returned by the API for a request for historic data.
{
"data": {
"transactions": [{
"executionPlanId": 101,
"agentId": 2,
"scriptExecutionErrorsCount": 0,
"groupId": 2,
"agentName": "MyAgent",
"availabilityErrorsCount": 0,
"executionErrorsCount": 0,
"customTimers": {
"timers": [{
"name": "Sv_ICMP Ping",
"type": "",
"value": 6
}]
},
"transactionName": "Ping",
"transactionId": 1,
"agentIp": "127.0.0.1",
"uid": "2-101-1455624188859",
"transactionStartTime": 1455624188859,
"pageTimers": null,
"groupName": "Location1",
"executionPlanStartTime": 1455624188859,
"transactionEndTime": 1455624188874,
"accuracyErrorsCount": 0,
"syntheticApplicationId": 1,
"errors": null
},
{
"executionPlanId": 101,
"agentId": 2,
"scriptExecutionErrorsCount": 0,
"groupId": 2,
"agentName": "MyAgent",
"availabilityErrorsCount": 0,
"executionErrorsCount": 0,
"customTimers": {
"timers": [{
"name": "Sv_ICMP Ping",
"type": "",
"value": 6
}]
},
"transactionName": "Ping",
"transactionId": 1,
"agentIp": "127.0.0.1",
"uid": "2-101-1455623888830",
"transactionStartTime": 1455623888830,
"pageTimers": null,
"groupName": "Location1",
"executionPlanStartTime": 1455623888830,
"transactionEndTime": 1455623888846,
"accuracyErrorsCount": 0,
"syntheticApplicationId": 1,
"errors": null
},
{
"executionPlanId": 101,
"agentId": 2,
"scriptExecutionErrorsCount": 0,
"groupId": 2,
"agentName": "MyAgent",
"availabilityErrorsCount": 0,
"executionErrorsCount": 0,
"customTimers": {
"timers": [{
"name": "Sv_ICMP Ping",
"type": "",
"value": 2
}]
},
"transactionName": "Ping",
"transactionId": 1,
"agentIp": "127.0.0.1",
"uid": "2-101-1455623588800",
"transactionStartTime": 1455623588800,
"pageTimers": null,
"groupName": "Location1",
"executionPlanStartTime": 1455623588800,
"transactionEndTime": 1455623588806,
"accuracyErrorsCount": 0,
"syntheticApplicationId": 1,
"errors": null
},
{
"executionPlanId": 101,
"agentId": 2,
"scriptExecutionErrorsCount": 0,
"groupId": 2,
"agentName": "MyAgent",
"availabilityErrorsCount": 0,
"executionErrorsCount": 0,
"customTimers": {
"timers": [{
"name": "Sv_ICMP Ping",
"type": "",
"value": 1
}]
},
"transactionName": "Ping",
"transactionId": 1,
"agentIp": "127.0.0.1",
"uid": "2-101-1455623288774",
"transactionStartTime": 1455623288774,
"pageTimers": null,
"groupName": "Location1",
"executionPlanStartTime": 1455623288774,
"transactionEndTime": 1455623288778,
"accuracyErrorsCount": 0,
"syntheticApplicationId": 1,
"errors": {
"errors": [3]
0:{
"severity": "ERROR"
"errorMessage": "WebPageUrl(WebEngine: 71 - Html verification, "flower" appeared 0 times - verification (>0) failed)"
"errorCode": "3"
"type": "accuracy"
}
1:{
"severity": "ERROR"
"errorMessage": "WebPageUrl(WebEngine: 71 - Html verification, "trx" appeared 6 times - verification (<1) failed)"
"errorCode": "3"
"type": "accuracy"
}
} ]
}
}
Response body parameters
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 Included only if the | |
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 Included only if the | |
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 |
accuracyErrorsCount | Number of accuracy errors that occurred during this transaction | Number |
syntheticApplicationId | ID of the application for synthetic monitoring | number |
errors | Included only if the withErrors option is used | |
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 | String representing a numeric value |
type | Type of error |
|
Comments
Log in or register to comment.