Page tree

Skip to end of metadata
Go to start of metadata

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

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.
  • <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:

  1. 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
  2. Add a new header row and select Authorization as the header type.

  3. Enter the text authToken followed by the authToken generated through the login API. 

  4. Click Send.

Request parameters

ElementDescription
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.

locationId

(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) (getHistorical API only) Time value in UTC format indicating that transactions that ended after this end time are included in the data.

If this parameter is not used, all available results until toEndTime are included.

toEndTime

(Optional) (getHistorical API only) Time value in UTC format indicating that transactions that ended up to and including this end time are included in the data.

If this parameter is not used, all available results ending after fromEndTime are included.

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

ParameterDescriptionValue
transactions
Can be multiple 
     executionPlanId
ID of the Execution PlanNumber
     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 ranString
     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 withCustomTimers option is used

 
          timers
Can be multiple

 

               name
Name of the custom timer

String

               value
Time in millisecondsNumber
     transactionName
Name of the transactionString
     transactionId
Id of the transactionNumber
     agentIp
IP address of the TEA AgentIP 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 uid.

String made up of the following:

<agentId>-<executionPlanId>-<executionStartTime>

     transactionStartTime

Start time of the transaction in UTC format

Number
     pageTimers

Page timers for this execution

Included only if the withPageTimers option is used

 
          timers
Can be multiple

 

               name
Name of the page timer

String

               value
Time in millisecondsNumber
     groupName
Name of the location of the TEA AgentString
     executionPlanStartTime
Start time of the execution in UTC formatNumber
     transactionEndTime
End time of the transaction in UTC formatNumber
     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 eventERROR
          errorMessage
Error message returned by the applicationString
          errorCode

Code indicating the type of error

Correlates with type parameter

String representing a numeric value
          type
Type of error
  • accuracy                  
  • availability               
  • script_execution      
  • execution

execution errors and script_execution errors are grouped together as execution errors in the user interface.