Deletes an existing private synthetic location. Deletion cannot be undone.
| DELETE | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/v2/synthetic/locations/{locationId} |
| Environment and Cluster ActiveGate (default port 9999) | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/synthetic/locations/{locationId} |
To execute this request, you need an access token with syntheticLocations.write scope.
To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| locationId | string | The Dynatrace entity ID of the private synthetic location to be deleted. | path | Required |
| Code | Type | Description |
|---|---|---|
| 204 | - | Success. The location has been deleted. Response doesn't have a body. |
| 4XX | Error | Client side error. |
| 5XX | Error | Server side error. |
ErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Error | - |
Error object| Element | Type | Description |
|---|---|---|
| code | integer | The HTTP status code |
| constraintViolations | Constraint | A list of constraint violations |
| message | string | The error message |
ConstraintViolation objectA list of constraint violations
| Element | Type | Description |
|---|---|---|
| location | string | - |
| message | string | - |
| parameterLocation | string | -The element can hold these values
|
| path | string | - |
{"error": {"code": 1,"constraintViolations": [{"location": "string","message": "string","parameterLocation": "HEADER","path": "string"}],"message": "string"}}
In this example, the request deletes the private Synthetic location from the POST request example. The response code of 204 indicates that the deletion was successful.
The API token is passed in the Authorization header.
curl -X DELETE \https://mySampleEnv.live.dynatrace.com/api/v2/synthetic/locations/SYNTHETIC_LOCATION-493122BFA29674DC \-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'
https://mySampleEnv.live.dynatrace.com/api/v2/synthetic/locations/SYNTHETIC_LOCATION-493122BFA29674DC
204