---
title: "Get a private location"
method: GET
path: "/api/v1/synthetics/private-locations/{location_id}"
tags: ["Synthetics"]
---

# Get a private location

`GET /api/v1/synthetics/private-locations/{location_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v1/synthetics/private-locations/{location_id}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `synthetics_private_location_read`

Get a Synthetic private location.

## Path parameters

- `location_id` string, required

## Response `200`

OK

- SyntheticsPrivateLocation: Object containing information about the private location to create.
  - `description` string, required: Description of the private location.
  - `id` string: Unique identifier of the private location.
  - `metadata` SyntheticsPrivateLocationMetadata: Object containing metadata about the private location.
    - `restricted_roles` string[]: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. This field is deprecated. Use the restriction policies API to manage permissions.
  - `name` string, required: Name of the private location.
  - `secrets` SyntheticsPrivateLocationSecrets: Secrets for the private location. Only present in the response when creating the private location.
    - `authentication` SyntheticsPrivateLocationSecretsAuthentication: Authentication part of the secrets.
      - `id` string: Access key for the private location.
      - `key` string: Secret access key for the private location.
    - `config_decryption` SyntheticsPrivateLocationSecretsConfigDecryption: Private key for the private location.
      - `key` string: Private key for the private location.
  - `tags` string[], required: Array of tags attached to the private location.

## Other responses

- `404`: - Synthetic private locations are not activated for the user - Private location does not exist
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v1-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v1-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v1-collection/revisions/ca5871004d26?raw)
