• Home
  • Dynatrace API
  • Environment
  • Synthetic v1
  • Locations
  • GET a location

Synthetic locations API - GET a location

We have a new version of this API—Synthetic API v2. Check it out!

Gets parameters of the specified location.

The request produces an application/json payload.

GETManaged https://{your-domain}/e/{your-environment-id}/api/v1/synthetic/locations/{locationId}
SaaS https://{your-environment-id}.live.dynatrace.com/api/v1/synthetic/locations/{locationId}
Environment ActiveGate https://{your-activegate-domain}/e/{your-environment-id}/api/v1/synthetic/locations/{locationId}

Authentication

To execute this request, you need an access token with Access problem and event feed, metrics, and topology (DataExport) scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
locationIdstring

The Dynatrace entity ID of the required location.

pathrequired

Response

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

Response codes

CodeTypeDescription
200SyntheticLocation

Success. The response contains parameters of the synthetic location.

Response body objects

The SyntheticLocation object

Configuration of a synthetic location.

countryCode, regionCode, city parameters are optional as they can be retrieved based on latitude and longitude of location.

The actual set of fields depends on the type of the location. Find the list of actual objects in the description of the type field or see Synthetic locations API v2 - JSON models.

ElementTypeDescription
entityIdstring

The Dynatrace entity ID of the location.

typestring

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

  • PUBLIC -> PublicSyntheticLocation
  • PRIVATE -> PrivateSyntheticLocation
  • CLUSTER -> PrivateSyntheticLocation
The element can hold these values
  • CLUSTER
  • PRIVATE
  • PUBLIC
namestring

The name of the location.

countryCodestring

The country code of the location.

Use the alpha-2 code of the ISO 3166-2 standard, (for example, AT for Austria or PL for Poland).

Can be null.

regionCodestring

The region code of the location.

For the USA or Canada use ISO 3166-2 state codes (without US- or CA- prefix), for example, VA for Virginia or OR for Oregon.

For the rest of the world use FIPS 10-4 codes.

Can be null.

citystring

The city of the location.

Can be null.

latitudenumber

The latitude of the location in DDD.dddd format.

longitudenumber

The longitude of the location in DDD.dddd format.

statusstring

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 element can hold these values
  • DISABLED
  • ENABLED
  • HIDDEN

Can be null.

Response body JSON model

json
{ "entityId": "string", "type": "CLUSTER", "name": "string", "countryCode": "string", "regionCode": "string", "city": "string", "latitude": 1, "longitude": 1, "status": "DISABLED" }

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 GEOLOCATION-95196F3C9A4F4215.

Curl

shell
curl -X GET \ https://mySampleEnv.live.dynatrace.com/api/v1/synthetic/locations/GEOLOCATION-95196F3C9A4F4215 \ -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'

Request URL

plaintext
https://mySampleEnv.live.dynatrace.com/api/v1/synthetic/locations/GEOLOCATION-95196F3C9A4F4215

Response body

json
{ "entityId": "GEOLOCATION-95196F3C9A4F4215", "type": "PUBLIC", "name": "Amazon US East (N. Virginia)", "countryCode": "US", "regionCode": "VA", "city": "Amazon US East (N. Virginia)", "latitude": 39.0436, "longitude": -77.4875, "cloudPlatform": "AMAZON_EC2", "ips": [ "134.189.153.97", "134.189.153.98", "134.189.153.99" ] }

Response code

200

Example - private location

In this example, the request gets the details of the Gdansk HTTP private location, which has the ID of SYNTHETIC_LOCATION-95196F3C9A4F4215.

Curl

shell
curl -X GET \ https://mySampleEnv.live.dynatrace.com/api/v1/synthetic/locations/SYNTHETIC_LOCATION-95196F3C9A4F4215 \ -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'

Request URL

plaintext
https://mySampleEnv.live.dynatrace.com/api/v1/synthetic/locations/SYNTHETIC_LOCATION-95196F3C9A4F4215

Response body

json
{ "entityId": "SYNTHETIC_LOCATION-9C75B59442498323", "type": "PRIVATE", "name": "Gdansk HTTP", "countryCode": "PL", "regionCode": "82", "city": "Gdańsk", "latitude": 54.3449, "longitude": 18.6283, "nodes": [ "2015649819", "3086117876" ] }

Response code

200

Related topics
  • Synthetic Monitoring

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