Synthetic locations API v2 - GET a location

Gets parameters of the specified location.

The request produces an application/json payload.

Endpoint

/api/cluster/v2/synthetic/locations

Parameters

Parameter Type Description In Required
locationId string

The Dynatrace entity ID of the required location.

path required

Response

Response codes

Code Description
200

Success. The response contains parameters of the synthetic location.

Response body

The SyntheticLocation object

Configuration of a synthetic location.

The actual set of fields depends on the type of the location.

Element Type Description
entityId string

The Dynatrace entity ID of the location.

type string

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

  • PUBLIC -> PublicSyntheticLocation
  • PRIVATE -> PrivateSyntheticLocation
  • CLUSTER -> PrivateSyntheticLocation
The type element can hold these values.
name string

The name of the location.

city string

The city of the location.

latitude number

The latitude of the location in DDD.dddd format.

longitude number

The longitude of the location in DDD.dddd format.

status string

The status of the location:

  • ENABLED: The location is displayed as active in the UI. You can assign monitors to the location.
  • DISABLED: The location is displayed as inactive in the UI. You can't assign monitors to the location. Monitors already assigned to the location will stay there and will be executed from the location.
  • HIDDEN: The location is not displayed in the UI. You can't assign monitors to the location. You can only set location as HIDDEN when no monitor is assigned to it.
The status element can hold these values.

Possible values

Possible values for the status element in the SyntheticLocation object:

  • DISABLED
  • ENABLED
  • HIDDEN

Possible values for the type element in the SyntheticLocation object:

  • CLUSTER
  • PRIVATE
  • PUBLIC

Response format

To find all model variations that depend on the type of the model, see JSON models.

Response codes

Code Description
200

Success. The response contains parameters of the synthetic location.

Response body

The SyntheticLocation object

Configuration of a synthetic location.

The actual set of fields depends on the type of the location.

Element Type Description
entityId string

The Dynatrace entity ID of the location.

type string

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

  • PUBLIC -> PublicSyntheticLocation
  • PRIVATE -> PrivateSyntheticLocation
  • CLUSTER -> PrivateSyntheticLocation
The type element can hold these values.
name string

The name of the location.

city string

The city of the location.

latitude number

The latitude of the location in DDD.dddd format.

longitude number

The longitude of the location in DDD.dddd format.

status string

The status of the location:

  • ENABLED: The location is displayed as active in the UI. You can assign monitors to the location.
  • DISABLED: The location is displayed as inactive in the UI. You can't assign monitors to the location. Monitors already assigned to the location will stay there and will be executed from the location.
  • HIDDEN: The location is not displayed in the UI. You can't assign monitors to the location. You can only set location as HIDDEN when no monitor is assigned to it.
The status element can hold these values.

Possible values

Possible values for the status element in the SyntheticLocation object:

  • DISABLED
  • ENABLED
  • HIDDEN

Possible values for the type element in the SyntheticLocation object:

  • CLUSTER
  • PRIVATE
  • PUBLIC

Example - public location

In this example, the request gets the details of the Amazon US East (N. Virginia) public location, which has the ID of SYNTHETIC_LOCATION-0000000000000064.

Curl

curl -X GET \
  https://mySampleEnv.live.dynatrace.com/api/v2/synthetic/locations/SYNTHETIC_LOCATION-0000000000000064 \
  -H 'Authorization: Api-Token abcdefjhij1234567890'

Request URL

https://mySampleEnv.live.dynatrace.com/api/v2/synthetic/locations/SYNTHETIC_LOCATION-0000000000000064

Response body

{
  "entityId": "SYNTHETIC_LOCATION-0000000000000064",
  "type": "PUBLIC",
  "name": "Gdańsk",
  "countryCode": "PL",
  "regionCode": "EU",
  "city": "Gdańsk",
  "latitude": 54.399078,
  "longitude": 18.576557,
  "status": "ENABLED",
  "cloudPlatform": "OTHER",
  "ips": [
    "120.157.221.247",
    "172.158.6.93",
    "197.136.70.30",
    "227.53.205.237",
    "131.123.197.12"
  ],
  "stage": "GA",
  "browserType": "Chrome",
  "browserVersion": "83.0.4103.61",
  "capabilities": [
    "BROWSER",
    "HTTP"
  ],
  "geoLocationId": "GEOLOCATION-0A41430434C388A9"
}

Response code

200

Example - private location

In this example, the request gets the details of the Linz HTTP private location, which has the ID of SYNTHETIC_LOCATION-BB5EE23C1D48AFF5.

Curl

curl -X GET \
  https://mySampleEnv.live.dynatrace.com/api/v2/synthetic/locations/SYNTHETIC_LOCATION-BB5EE23C1D48AFF5 \
  -H 'Authorization: Api-Token abcdefjhij1234567890'

Request URL

https://mySampleEnv.live.dynatrace.com/api/v2/synthetic/locations/SYNTHETIC_LOCATION-BB5EE23C1D48AFF5

Response body

{
  "entityId": "SYNTHETIC_LOCATION-BB5EE23C1D48AFF5",
  "type": "PRIVATE",
  "name": "Linz HTTP",
  "countryCode": "AT",
  "regionCode": "04",
  "city": "Linz",
  "latitude": 48.306351,
  "longitude": 14.287399,
  "status": "ENABLED",
  "nodes": [
    "137829320"
  ],
  "availabilityLocationOutage": false,
  "availabilityNodeOutage": false,
  "locationNodeOutageDelayInMillis": 3000,
  "geoLocationId": "GEOLOCATION-427705B3488A4C45"
}

Response code

200