Synthetic monitor executions API v2 - GET HTTP monitor

  • Reference

Gets the result of the most recent execution of the specified HTTP monitor.

The request produces an application/json payload.

GETSaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/synthetic/execution/{monitorId}/{resultType}
Environment ActiveGateCluster ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/synthetic/execution/{monitorId}/{resultType}

Authentication

To execute this request, you need an access token with one of the following scopes:

  • DataExport
  • ExternalSyntheticIntegration
  • ReadSyntheticData

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
monitorIdstring

Identifier of the HTTP monitor for which last execution result is returned.

pathrequired
resultTypestring

Defines the result type of the last HTTP monitor's execution.

  • SUCCESS
  • FAILED
pathrequired
locationIdstring

Filters the results to those executed by specified Synthetic location. Specify the ID of the location.

queryoptional

Response

Response codes

CodeTypeDescription
200MonitorExecutionResults

Success. The response contains detailed data.

4XXErrorEnvelope

Client side error.

5XXErrorEnvelope

Server side error.

Response body objects

The MonitorExecutionResults object

Results of the execution of all HTTP monitor's requests.

ElementTypeDescription
locationsExecutionResultsLocationExecutionResults[]

The list with the results of the requests executed on assigned locations.

monitorIdstring

Monitor id.

The LocationExecutionResults object

Results of the execution HTTP monitor's requests at a given location

ElementTypeDescription
executionIdstring

Execution id.

locationIdstring

Location id.

requestResultsMonitorRequestExecutionResult[]

The list of the monitor's request results executed on this location.

The MonitorRequestExecutionResult object

A result of the execution HTTP monitor's request.

The ExecutionStep object

Contains detailed information about the monitor's step execution.

ElementTypeDescription
monitorTypestring

Defines the actual set of fields depending on the value. See one of the following objects:

  • BROWSER -> BMAction
  • HTTP -> MonitorRequestExecutionResult
  • BROWSER
  • HTTP

The CustomLogLine object

A custom script log line

ElementTypeDescription
logLevelstring

Log level of the message

messagestring

The message

timestampinteger

A timestamp of this log message

The MonitorRequestHeader object

A header of the Http request

ElementTypeDescription
namestring

Header's name.

valuestring

Header's value.

Response body JSON model

{
"locationsExecutionResults": [
{
"executionId": "6136172183050046113",
"locationId": "7804738439930364165",
"requestResults": [
{
"engineId": 338502283,
"errorCode": 0,
"failureMessage": "",
"hostNameResolutionTime": 26,
"method": "GET",
"peerCertificateDetails": "[Certificate details]",
"peerCertificateExpiryDate": 1647302399000,
"publicLocation": false,
"redirectionTime": 70,
"redirectsCount": 1,
"requestBody": "",
"requestHeaders": [
{
"name": "User-Agent",
"value": "DynatraceSynthetic/1.215.1"
},
{
"name": "X-Dynatrace-Visit",
"value": "6136172183050046113"
},
{
"name": "X-Dynatrace-Test",
"value": "HTTP_CHECK-12B428F6D37A9197"
}
],
"requestId": "HTTP_CHECK_STEP-53071FC3C4F72E28",
"requestName": "Request name",
"resolvedIps": [
"80.252.0.145"
],
"responseBody": "<html><head>Title</head><body>Main Page</body></html>",
"responseBodySizeLimitExceeded": false,
"responseHeaders": [
{
"name": "Date",
"value": "Mon, 15 Mar 2021 11:09:30 GMT"
},
{
"name": "Content-Language",
"value": "en"
}
],
"responseMessage": "OK",
"responseSize": 1112,
"responseStatusCode": 200,
"sequenceNumber": 1,
"startTimestamp": 1615806570884,
"tcpConnectTime": 15,
"timeToFirstByte": 96,
"tlsHandshakeTime": 8,
"totalTime": 238,
"url": "https://www.examplePage.com",
"waitingTime": 47
}
]
}
],
"monitorId": "HTTP_CHECK-12B428F6D37A9197"
}