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 | SaaS | https://{your-environment-id}.live.dynatrace.com/api/v1/synthetic/ext/events |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v1/synthetic/ext/events |
Authentication
To execute this request, you need an access token with ExternalSyntheticIntegration
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
The JSON body of the request. Contains third-party synthetic events.
Request body objects
The 3rdPartySyntheticEvents
object
The list of third-party synthetic events.
The type of the third-party synthetic monitor.
The 3rdPartyEventOpenNotification
object
The open third-party synthetic event.
The unique ID of the event.
The type of the event.
testOutage
testSlowdown
The list of IDs of third-party synthetic locations where the event happens.
The name of the event.
The cause of the event.
The start timestamp of the event, in UTC milliseconds.
The ID of the third-party synthetic monitor.
The 3rdPartyEventResolvedNotification
object
The closed third-party synthetic event.
The end timestamp of the event, in UTC milliseconds.
The unique ID of the event.
The ID of the third-party synthetic monitor.
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.
{"open": [{"eventId": "string","eventType": "testOutage","locationIds": ["string"],"name": "string","reason": "string","startTimestamp": 1,"testId": "string"}],"resolved": [{"endTimestamp": 1,"eventId": "string","testId": "string"}],"syntheticEngineName": "string"}
Response
Response codes
Success. The information is accepted and stored.
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 timestamps 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 dt0c01.abc123.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
{"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.