• Home
  • Dynatrace API
  • Environment
  • Synthetic v2
  • Monitor executions
  • POST batch execution

Synthetic monitor executions API v2 - POST batch execution

Triggers a batch execution of synthetic monitors.

The request consumes and produces an application/json payload.

POSTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/v2/synthetic/executions/batch
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/synthetic/executions/batch
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v2/synthetic/executions/batch

Authentication

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

  • syntheticExecutions.write
  • ExternalSyntheticIntegration

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

Parameters

ParameterTypeDescriptionInRequired
bodySyntheticOnDemandExecutionRequest

The JSON body of the request. Contains the parameters of the triggered on-demand execution.

bodyoptional

Request body objects

The SyntheticOnDemandExecutionRequest object

Contains parameters for the on-demand execution of monitors identified by tags, applications, or services.

ElementTypeDescriptionRequired
processingModestring

The execution's processing mode

The element can hold these values
  • STANDARD
  • DISABLE_PROBLEM_DETECTION
  • EXECUTIONS_DETAILS_ONLY
optional
failOnPerformanceIssueboolean

If true, the execution will fail in case of performance issue.

optional
failOnSslWarningboolean

Applies to HTTP monitors only. If true, the execution will fail in case of an SSL certificate expiration warning or if the certificate is missing.

optional
stopOnProblemboolean

If true, no executions will be scheduled if a problem occurs.

optional
takeScreenshotsOnSuccessboolean

If true, the screenshots will be taken during the execution of a browser monitor.

optional
monitorsSyntheticOnDemandExecutionRequestMonitor[]

List of monitors to be triggered.

optional
groupSyntheticOnDemandExecutionRequestGroup

Contains parameters for the on-demand execution of monitors identified by tags, applications, or services.

optional
metadataobject

String to string map of metadata properties for execution

optional

The SyntheticOnDemandExecutionRequestMonitor object

Contains monitors to be executed on demand from the locations specified.

ElementTypeDescriptionRequired
monitorIdstring

The monitor identifier.

required
customizedScriptobject

Customized script properties for this on-demand batch execution.

optional
locationsstring[]

The locations from where the monitor is to be executed.

optional
executionCountinteger

The number of times the monitor is to be executed per location; if not set, the monitor will be executed once.

optional
repeatModestring

Execution repeat mode. If not set, the mode is SEQUENTIAL.

The element can hold these values
  • SEQUENTIAL
  • PARALLEL
optional

The SyntheticOnDemandExecutionRequestGroup object

Contains parameters for the on-demand execution of monitors identified by tags, applications, or services.

ElementTypeDescriptionRequired
tagsstring[]

List of tags. Only monitors with all tags assigned will be executed.

optional
applicationsstring[]

List of application identifiers. Only monitors with all applications assigned will be executed.

optional
servicesstring[]

List of service identifiers. Only monitors with all services assigned will be executed.

optional
locationsstring[]

The locations from where monitors are to be executed.

optional

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

json
{ "processingMode": "EXECUTIONS_DETAILS_ONLY", "failOnPerformanceIssue": false, "failOnSslWarning": true, "stopOnProblem": true, "takeScreenshotsOnSuccess": true, "monitors": [ { "monitorId": "HTTP_CHECK-6349B98E1CD87352", "executionCount": 3, "repeatMode": "SEQUENTIAL", "locations": [ "SYNTHETIC_LOCATION-9BB04DAEBA71B8CA", "SYNTHETIC_LOCATION-ACCA399FAA1194DD" ], "customizedScript": { "requests": [ { "url": "https://www.somepage.org", "preProcessingScript": "if (response.getResponseBody().includes(\"error\")) {api.fail(\"HTTP failing monitor.\");}" }, { "sequenceId": "3", "validation": { "rules": [ { "value": "=201", "passIfFound": "true" } ] } } ] } } ], "group": { "applications": [ "APPLICATION-CD4BEF05FA9DD044" ], "services": [ "SERVICE-01C6C1282960638B", "SERVICE-B18840B4E3115C1A" ], "tags": [ "tag-production", "another-tag" ] }, "metadata": { "key": "value", "version": "1.255.20221022" } }

Response

Response codes

CodeTypeDescription
201SyntheticOnDemandExecutionResult

Success. The monitor's execution response details

Response body objects

The SyntheticOnDemandExecutionResult object

The result of on-demand synthetic monitor execution.

ElementTypeDescription
batchIdstring

The batch identifier of the triggered executions.

triggeringProblemsCountinteger

The total number of problems within the batch.

triggeringProblemsDetailsSyntheticOnDemandTriggeringProblemDetails[]

List with the entities for which triggering problems occurred.

triggeredCountinteger

The total number of the triggered executions within the batch.

triggeredSyntheticOnDemandTriggeredMonitor[]

Monitors for which on-demand executions were triggered.

The SyntheticOnDemandTriggeringProblemDetails object

Contains the details of problems encountered while triggering on-demand executions.

ElementTypeDescription
entityIdstring

The entity identifier.

locationIdstring

The location identifier.

causestring

The cause of not triggering entity.

The SyntheticOnDemandTriggeredMonitor object

Contains the list of on-demand executions of the monitor.

ElementTypeDescription
monitorIdstring

The monitor identifier.

executionsSyntheticOnDemandTriggeredExecutionDetails[]

The list of triggered executions.

The SyntheticOnDemandTriggeredExecutionDetails object

Contains details of the triggered on-demand execution.

ElementTypeDescription
executionIdstring

The execution's identifier.

locationIdstring

The identifier of the location from which the monitor is to be executed.

Response body JSON model

json
{ "batchId": "22396514015719218", "triggeringProblemsCount": 4, "triggeringProblemsDetails": [ { "entityId": "HTTP_CHECK-6349B98E1CD87352", "locationId": "SYNTHETIC_LOCAT-9BB04DAEBA71B8CA", "cause": "Location not found" }, { "entityId": "HTTP_CHECK-6349B98E1CD85432", "cause": "Monitor not found" }, { "entityId": "HTTP_HACK-AAAAAAA", "cause": "Incorrect monitor identifier format" }, { "entityId": "APPLICATION-WRONG", "cause": "Incorrect application identifier format" } ], "triggeredCount": 1, "triggered": [ { "monitorId": "HTTP_CHECK-69A9B98E1CD87352", "executions": [ { "executionId": "1069999568093682590", "locationId": "SYNTHETIC_LOCATION-9BB04DAE11123122" } ] } ] }
Related topics
  • Synthetic Monitoring

    Learn about Synthetic Monitoring and how to create a single-URL browser monitor, a browser clickpath, or an HTTP monitor.