Third-party synthetic API - POST third-party events to Dynatrace

Pushes information about third-party synthetic events to Dynatrace.

The request consumes an application/json payload.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/v1/synthetic/ext/events
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v1/synthetic/ext/events

Authentication

To execute this request, you need the Create and read synthetic monitors, locations, and nodes (ExternalSyntheticIntegration) permission assigned to your API token. To learn how to obtain and use it, see Authentication.

Parameters

Parameter Type Description In Required
body 3rdPartySyntheticEvents

The JSON body of the request. Contains third-party synthetic events.

body optional

The 3rdPartySyntheticEvents object

The list of third-party synthetic events.

Element Type Description Required
syntheticEngineName string

The type of the third-party synthetic monitor.

optional
open 3rdPartyEventOpenNotification[]

The list of open third-party synthetic events.

optional
resolved 3rdPartyEventResolvedNotification[]

The list of closed third-party synthetic events.

optional

The 3rdPartyEventResolvedNotification object

The closed third-party synthetic event.

Element Type Description Required
testId string

The ID of the Synthetic test.

optional
eventId string

The unique ID of the event.

optional
endTimestamp integer

The end timestamp of the event, in UTC milliseconds.

optional

The 3rdPartyEventOpenNotification object

The open third-party synthetic event.

Element Type Description Required
testId string

The ID of the third-party synthetic monitor.

optional
eventId string

The unique ID of the event.

optional
name string

The name of the event.

optional
eventType string

The type of the event.

The eventType element can hold these values.
optional
reason string

The cause of the event.

required
startTimestamp integer

The start timestamp of the event, in UTC milliseconds.

optional
locationIds string[]

The list of IDs of third-party synthetic locations where the event happens.

optional

Possible values

Possible values for the eventType element in the 3rdPartyEventOpenNotification object:

  • testOutage
  • testSlowdown

Response format

A successful request doesn't return any content.

Update an existing third-party monitor

To update an existing third-party monitor, specify its engine in the syntheticEngineName field of the 3rdPartySyntheticTests object and its ID in the id field of the 3rdPartySyntheticTest object.

You have to submit all the parameters of the monitor. Do not change the values of parameters you don't want to change.

Example

In this example, the request adds the outage event to the example of synthetic monitor - 1 third-party synthetic monitor from the POST third-party monitors to Dynatrace example.

The API token is passed in the Authorization header.

You can download the request body JSON to perform a sample request in your environment. Be sure to replace the time stamps with recent ones or the results will be too old.

Curl

curl -X POST \
  https://mySampleEnv.live.dynatrace.com/api/v1/synthetic/ext/events \
  -H 'Authorization: Api-Token abcdefjhij1234567890' \  
  -H 'Content-Type: application/json' \  
  -d '{<truncated - see the Request body section below>}
'

Request URL

https://mySampleEnv.live.dynatrace.com/api/v1/synthetic/ext/events

Request body

Download
{
  "syntheticEngineName": "My third-party synthetic",
  "open": [
    {
      "testId": "3rdPartySyntheticMonitor1",
      "eventId": "extOpenEvent1-1",
      "name": "example of  event",
      "reason": "sample outage",
      "eventType": "testOutage",
      "locationIds": [
        "Linz1"
      ],
      "startTimestamp": 1543582285957
    }
  ],
  "resolved": [ ]
}

Response code

204

Result

The highlights show parameters submitted in the request.

External synthetic event