For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/synthetics/get-a-global-variable.md. A documentation index is available at /llms.txt.
Language
Datadog site

Get a global variable

GEThttps://api.datadoghq.com/api/v1/synthetics/variables/{variable_id}https://api.us3.datadoghq.com/api/v1/synthetics/variables/{variable_id}https://api.us5.datadoghq.com/api/v1/synthetics/variables/{variable_id}https://api.datadoghq.eu/api/v1/synthetics/variables/{variable_id}https://api.ap1.datadoghq.com/api/v1/synthetics/variables/{variable_id}https://api.ap2.datadoghq.com/api/v1/synthetics/variables/{variable_id}https://api.uk1.datadoghq.com/api/v1/synthetics/variables/{variable_id}https://api.ddog-gov.com/api/v1/synthetics/variables/{variable_id}https://api.us2.ddog-gov.com/api/v1/synthetics/variables/{variable_id}

Overview

Get the detailed configuration of a global variable.

OAuth apps require the synthetics_global_variable_read authorization scope to access this endpoint.

Arguments

Path Parameters

Name
Type
Description
variable_id [required]
string

The ID of the global variable.

Response

OK

Synthetic global variable.

Field
Type
Description
attributes
object

Attributes of the global variable.

description [required]
string

Description of the global variable.

id
string

Unique identifier of the global variable.

is_fido
boolean

Determines if the global variable is a FIDO variable.

is_totp
boolean

Determines if the global variable is a TOTP/MFA variable.

name [required]
string

Name of the global variable. Unique across Synthetic global variables.

parse_test_options
object

Parser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with parse_test_public_id.

parse_test_public_id
string

A Synthetic test ID to use as a test to generate the variable value.

tags [required]
[string]

Tags of the global variable.

value [required]
object

Value of the global variable.

Code Example

# Path parameters
export variable_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/synthetics/variables/${variable_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export variable_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/synthetics/variables/${variable_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export variable_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/synthetics/variables/${variable_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export variable_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/synthetics/variables/${variable_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export variable_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/synthetics/variables/${variable_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export variable_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/synthetics/variables/${variable_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export variable_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/synthetics/variables/${variable_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export variable_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/synthetics/variables/${variable_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export variable_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v1/synthetics/variables/${variable_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"