---
title: Synthetics
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Synthetics
---

# Synthetics

Synthetic tests use simulated requests and actions so you can monitor the availability and performance of systems and applications. Datadog supports the following types of synthetic tests:

- [API tests](https://docs.datadoghq.com/synthetics/api_tests.md)
- [Browser tests](https://docs.datadoghq.com/synthetics/browser_tests.md)
- [Network Path tests](https://docs.datadoghq.com/synthetics/network_path_tests.md)
- [Mobile Application tests](https://docs.datadoghq.com/synthetics/mobile_app_testing.md)

You can use the Datadog API to create, manage, and organize tests and test suites programmatically.

For more information, see the [Synthetic Monitoring documentation](https://docs.datadoghq.com/synthetics.md).

## Create an API test{% #create-an-api-test %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                   |
| ----------------- | -------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v1/synthetics/tests/api |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v1/synthetics/tests/api |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v1/synthetics/tests/api      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v1/synthetics/tests/api      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v1/synthetics/tests/api     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v1/synthetics/tests/api |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v1/synthetics/tests/api |

### Overview

Create a Synthetic API test. This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)

Details of the test to create.

{% tab title="Model" %}

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]                 | object          | Configuration object for a Synthetic API test.                                                                                                                                                                                                                                                  |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | steps                                    | [ <oneOf>] | When the test subtype is `multi`, the steps of the test.                                                                                                                                                                                                                                        |
| steps                | Option 1                                 | object          | The Test step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 1             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 1             | assertions [*required*]             | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                                                          |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| Option 1             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 1             | extractedValues                          | [object]        | Array of values to parse and save as variables from the response.                                                                                                                                                                                                                               |
| extractedValues      | field                                    | string          | When type is `http_header` or `grpc_metadata`, name of the header or metadatum to extract.                                                                                                                                                                                                      |
| extractedValues      | name                                     | string          | Name of the variable to extract.                                                                                                                                                                                                                                                                |
| extractedValues      | parser                                   | object          | Details of the parser to use for the global variable.                                                                                                                                                                                                                                           |
| parser               | type [*required*]                   | enum            | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                                                                                                        |
| parser               | value                                    | string          | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                                                                                                               |
| extractedValues      | secure                                   | boolean         | Determines whether or not the extracted value will be obfuscated.                                                                                                                                                                                                                               |
| extractedValues      | type                                     | enum            | Property of the Synthetic Test Response to extract into a local variable. Allowed enum values: `grpc_message,grpc_metadata,http_body,http_header,http_status_code`                                                                                                                              |
| Option 1             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 1             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 1             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 1             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 1             | request [*required*]                | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| Option 1             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 1             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API test step. Allowed enum values: `http,grpc,ssl,dns,tcp,udp,icmp,websocket`                                                                                                                                                                          |
| steps                | Option 2                                 | object          | The Wait step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 2             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 2             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 2             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API wait step. Allowed enum values: `wait`                                                                                                                                                                                                              |
| Option 2             | value [*required*]                  | int32           | The time to wait in seconds. Minimum value: 0. Maximum value: 180.                                                                                                                                                                                                                              |
| steps                | Option 3                                 | object          | The subtest step used in a Synthetics multi-step API test.                                                                                                                                                                                                                                      |
| Option 3             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 3             | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| Option 3             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 3             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 3             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 3             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 3             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 3             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 3             | subtestPublicId [*required*]        | string          | Public ID of the test to be played as part of a `playSubTest` step type.                                                                                                                                                                                                                        |
| Option 3             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API subtest step. Allowed enum values: `playSubTest`                                                                                                                                                                                                    |
| config               | variablesFromScript                      | string          | Variables defined from JavaScript code.                                                                                                                                                                                                                                                         |
|                      | locations [*required*]              | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message [*required*]                | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name [*required*]                   | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options [*required*]                | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The public ID for the test.                                                                                                                                                                                                                                                                     |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type [*required*]                   | enum            | Type of the Synthetic test, `api`. Allowed enum values: `api`                                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}
##### 

```json
{
  "config": {
    "steps": [
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "password": "password",
            "username": "username"
          }
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "password": "password",
            "username": "username",
            "type": "web"
          }
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "accessKey": "accessKey",
            "secretKey": "secretKey",
            "type": "sigv4"
          }
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "type": "ntlm"
          }
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "password": "password",
            "username": "username",
            "type": "digest"
          }
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "accessTokenUrl": "accessTokenUrl",
            "tokenApiAuthentication": "header",
            "clientId": "clientId",
            "clientSecret": "clientSecret",
            "type": "oauth-client"
          }
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "accessTokenUrl": "accessTokenUrl",
            "password": "password",
            "tokenApiAuthentication": "header",
            "username": "username",
            "type": "oauth-rop"
          }
        },
        "subtype": "http"
      }
    ]
  },
  "locations": [
    "aws:us-east-2"
  ],
  "message": "BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json",
  "name": "Example-Synthetic",
  "options": {
    "tick_every": 60
  },
  "subtype": "multi",
  "type": "api"
}
```

##### 

```json
{
  "config": {
    "steps": [
      {
        "assertions": [
          {
            "operator": "is",
            "type": "statusCode",
            "target": 200
          }
        ],
        "name": "request is sent",
        "request": {
          "url": "https://httpbin.org/status/200",
          "method": "GET",
          "basicAuth": {
            "password": "password",
            "username": "username"
          }
        },
        "subtype": "http"
      },
      {
        "subtype": "playSubTest",
        "subtestPublicId": "123-abc-456",
        "name": "subtest step"
      }
    ]
  },
  "locations": [
    "aws:us-east-2"
  ],
  "message": "BDD test payload: synthetics_api_test_multi_step_with_subtest.json",
  "name": "Example-Synthetic",
  "options": {
    "tick_every": 60
  },
  "subtype": "multi",
  "type": "api"
}
```

##### 

```json
{
  "config": {
    "assertions": [
      {
        "operator": "is",
        "target": 1,
        "type": "grpcHealthcheckStatus"
      },
      {
        "operator": "is",
        "target": "proto target",
        "type": "grpcProto"
      },
      {
        "operator": "is",
        "target": "123",
        "property": "property",
        "type": "grpcMetadata"
      }
    ],
    "request": {
      "host": "localhost",
      "port": 50051,
      "service": "Hello",
      "method": "GET",
      "message": "",
      "metadata": {}
    }
  },
  "locations": [
    "aws:us-east-2"
  ],
  "message": "BDD test payload: synthetics_api_grpc_test_payload.json",
  "name": "Example-Synthetic",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "monitor_options": {
      "renotify_interval": 0
    },
    "monitor_name": "Example-Synthetic",
    "tick_every": 60
  },
  "subtype": "grpc",
  "tags": [
    "testing:api"
  ],
  "type": "api"
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK - Returns the created test details.
{% tab title="Model" %}
Object containing details about a Synthetic API test.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]                 | object          | Configuration object for a Synthetic API test.                                                                                                                                                                                                                                                  |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | steps                                    | [ <oneOf>] | When the test subtype is `multi`, the steps of the test.                                                                                                                                                                                                                                        |
| steps                | Option 1                                 | object          | The Test step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 1             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 1             | assertions [*required*]             | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                                                          |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| Option 1             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 1             | extractedValues                          | [object]        | Array of values to parse and save as variables from the response.                                                                                                                                                                                                                               |
| extractedValues      | field                                    | string          | When type is `http_header` or `grpc_metadata`, name of the header or metadatum to extract.                                                                                                                                                                                                      |
| extractedValues      | name                                     | string          | Name of the variable to extract.                                                                                                                                                                                                                                                                |
| extractedValues      | parser                                   | object          | Details of the parser to use for the global variable.                                                                                                                                                                                                                                           |
| parser               | type [*required*]                   | enum            | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                                                                                                        |
| parser               | value                                    | string          | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                                                                                                               |
| extractedValues      | secure                                   | boolean         | Determines whether or not the extracted value will be obfuscated.                                                                                                                                                                                                                               |
| extractedValues      | type                                     | enum            | Property of the Synthetic Test Response to extract into a local variable. Allowed enum values: `grpc_message,grpc_metadata,http_body,http_header,http_status_code`                                                                                                                              |
| Option 1             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 1             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 1             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 1             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 1             | request [*required*]                | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| Option 1             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 1             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API test step. Allowed enum values: `http,grpc,ssl,dns,tcp,udp,icmp,websocket`                                                                                                                                                                          |
| steps                | Option 2                                 | object          | The Wait step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 2             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 2             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 2             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API wait step. Allowed enum values: `wait`                                                                                                                                                                                                              |
| Option 2             | value [*required*]                  | int32           | The time to wait in seconds. Minimum value: 0. Maximum value: 180.                                                                                                                                                                                                                              |
| steps                | Option 3                                 | object          | The subtest step used in a Synthetics multi-step API test.                                                                                                                                                                                                                                      |
| Option 3             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 3             | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| Option 3             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 3             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 3             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 3             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 3             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 3             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 3             | subtestPublicId [*required*]        | string          | Public ID of the test to be played as part of a `playSubTest` step type.                                                                                                                                                                                                                        |
| Option 3             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API subtest step. Allowed enum values: `playSubTest`                                                                                                                                                                                                    |
| config               | variablesFromScript                      | string          | Variables defined from JavaScript code.                                                                                                                                                                                                                                                         |
|                      | locations [*required*]              | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message [*required*]                | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name [*required*]                   | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options [*required*]                | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The public ID for the test.                                                                                                                                                                                                                                                                     |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type [*required*]                   | enum            | Type of the Synthetic test, `api`. Allowed enum values: `api`                                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      []
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "steps": [],
    "variablesFromScript": "dd.variable.set(\"FOO\", \"foo\")"
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "monitor_id": 12345678,
  "name": "Example test name",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "public_id": "123-abc-456",
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
- JSON format is wrong - Creation failed
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="402" %}
Test quota is reached
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## Create an API test.
# Example of an API test.
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/api" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [
      {
        "operator": "lessThan",
        "target": 1000,
        "type": "responseTime"
      },
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      },
      {
        "operator": "is",
        "property": "content-type",
        "target": "text/html; charset=UTF-8",
        "type": "header"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "azure:eastus",
    "aws:eu-west-3"
  ],
  "message": "MY_NOTIFICATION_MESSAGE",
  "name": "MY_TEST_NAME",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "monitor_options": {
      "include_tags": true,
      "locked": false,
      "new_host_delay": 300,
      "notify_audit": false,
      "notify_no_data": false,
      "renotify_interval": 0
    },
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
EOF\## Create a Multistep API test
# Example of a multistep API test running on a fake furniture store.
# It creates a card, select a product and then add the product to the card.
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/api" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "steps": [
      {
        "assertions": [
          {
            "operator": "lessThan",
            "target": 30000,
            "type": "responseTime"
          }
        ],
        "extractedValues": [
          {
            "field": "location",
            "name": "CART_ID",
            "parser": {
              "type": "regex",
              "value": "(?:[^\\\\/](?!(\\\\|/)))+$"
            },
            "type": "http_header"
          }
        ],
        "name": "Get a cart",
        "request": {
          "method": "POST",
          "timeout": 30,
          "url": "https://api.shopist.io/carts"
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "target": 200,
            "type": "statusCode"
          }
        ],
        "extractedValues": [
          {
            "name": "PRODUCT_ID",
            "parser": {
              "type": "json_path",
              "value": "$[0].id['$oid']"
            },
            "type": "http_body"
          }
        ],
        "name": "Get a product",
        "request": {
          "method": "GET",
          "timeout": 30,
          "url": "https://api.shopist.io/products.json"
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "target": 201,
            "type": "statusCode"
          }
        ],
        "name": "Add product to cart",
        "request": {
          "body": "{\n  \"cart_item\": {\n    \"product_id\": \"{{ PRODUCT_ID }}\",\n    \"amount_paid\": 500,\n    \"quantity\": 1\n  },\n  \"cart_id\": \"{{ CART_ID }}\"\n}",
          "headers": {
            "content-type": "application/json"
          },
          "method": "POST",
          "timeout": 30,
          "url": "https://api.shopist.io/add_item.json"
        },
        "subtype": "http"
      }
    ]
  },
  "locations": [
    "aws:us-west-2"
  ],
  "message": "MY_NOTIFICATION_MESSAGE",
  "name": "MY_TEST_NAME",
  "options": {
    "ci": {
      "executionRule": "blocking"
    },
    "min_failure_duration": 5400,
    "min_location_failed": 1,
    "monitor_options": {
      "renotify_interval": 0
    },
    "retry": {
      "count": 3,
      "interval": 300
    },
    "tick_every": 900
  },
  "status": "live",
  "subtype": "multi",
  "tags": [
    "env:prod"
  ],
  "type": "api"
}
EOF\## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/api" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "name": "Example API test",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
EOF
                        
##### 
                          \## Create an API test.
# Example of an API test.
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/api" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [
      {
        "operator": "lessThan",
        "target": 1000,
        "type": "responseTime"
      },
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      },
      {
        "operator": "is",
        "property": "content-type",
        "target": "text/html; charset=UTF-8",
        "type": "header"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "azure:eastus",
    "aws:eu-west-3"
  ],
  "message": "MY_NOTIFICATION_MESSAGE",
  "name": "MY_TEST_NAME",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "monitor_options": {
      "include_tags": true,
      "locked": false,
      "new_host_delay": 300,
      "notify_audit": false,
      "notify_no_data": false,
      "renotify_interval": 0
    },
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
EOF\## Create a Multistep API test
# Example of a multistep API test running on a fake furniture store.
# It creates a card, select a product and then add the product to the card.
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/api" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "steps": [
      {
        "assertions": [
          {
            "operator": "lessThan",
            "target": 30000,
            "type": "responseTime"
          }
        ],
        "extractedValues": [
          {
            "field": "location",
            "name": "CART_ID",
            "parser": {
              "type": "regex",
              "value": "(?:[^\\\\/](?!(\\\\|/)))+$"
            },
            "type": "http_header"
          }
        ],
        "name": "Get a cart",
        "request": {
          "method": "POST",
          "timeout": 30,
          "url": "https://api.shopist.io/carts"
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "target": 200,
            "type": "statusCode"
          }
        ],
        "extractedValues": [
          {
            "name": "PRODUCT_ID",
            "parser": {
              "type": "json_path",
              "value": "$[0].id['$oid']"
            },
            "type": "http_body"
          }
        ],
        "name": "Get a product",
        "request": {
          "method": "GET",
          "timeout": 30,
          "url": "https://api.shopist.io/products.json"
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "target": 201,
            "type": "statusCode"
          }
        ],
        "name": "Add product to cart",
        "request": {
          "body": "{\n  \"cart_item\": {\n    \"product_id\": \"{{ PRODUCT_ID }}\",\n    \"amount_paid\": 500,\n    \"quantity\": 1\n  },\n  \"cart_id\": \"{{ CART_ID }}\"\n}",
          "headers": {
            "content-type": "application/json"
          },
          "method": "POST",
          "timeout": 30,
          "url": "https://api.shopist.io/add_item.json"
        },
        "subtype": "http"
      }
    ]
  },
  "locations": [
    "aws:us-west-2"
  ],
  "message": "MY_NOTIFICATION_MESSAGE",
  "name": "MY_TEST_NAME",
  "options": {
    "ci": {
      "executionRule": "blocking"
    },
    "min_failure_duration": 5400,
    "min_location_failed": 1,
    "monitor_options": {
      "renotify_interval": 0
    },
    "retry": {
      "count": 3,
      "interval": 300
    },
    "tick_every": 900
  },
  "status": "live",
  "subtype": "multi",
  "tags": [
    "env:prod"
  ],
  "type": "api"
}
EOF\## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/api" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "name": "Example API test",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
EOF
                        
##### 
                          \## Create an API test.
# Example of an API test.
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/api" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [
      {
        "operator": "lessThan",
        "target": 1000,
        "type": "responseTime"
      },
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      },
      {
        "operator": "is",
        "property": "content-type",
        "target": "text/html; charset=UTF-8",
        "type": "header"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "azure:eastus",
    "aws:eu-west-3"
  ],
  "message": "MY_NOTIFICATION_MESSAGE",
  "name": "MY_TEST_NAME",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "monitor_options": {
      "include_tags": true,
      "locked": false,
      "new_host_delay": 300,
      "notify_audit": false,
      "notify_no_data": false,
      "renotify_interval": 0
    },
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
EOF\## Create a Multistep API test
# Example of a multistep API test running on a fake furniture store.
# It creates a card, select a product and then add the product to the card.
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/api" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "steps": [
      {
        "assertions": [
          {
            "operator": "lessThan",
            "target": 30000,
            "type": "responseTime"
          }
        ],
        "extractedValues": [
          {
            "field": "location",
            "name": "CART_ID",
            "parser": {
              "type": "regex",
              "value": "(?:[^\\\\/](?!(\\\\|/)))+$"
            },
            "type": "http_header"
          }
        ],
        "name": "Get a cart",
        "request": {
          "method": "POST",
          "timeout": 30,
          "url": "https://api.shopist.io/carts"
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "target": 200,
            "type": "statusCode"
          }
        ],
        "extractedValues": [
          {
            "name": "PRODUCT_ID",
            "parser": {
              "type": "json_path",
              "value": "$[0].id['$oid']"
            },
            "type": "http_body"
          }
        ],
        "name": "Get a product",
        "request": {
          "method": "GET",
          "timeout": 30,
          "url": "https://api.shopist.io/products.json"
        },
        "subtype": "http"
      },
      {
        "assertions": [
          {
            "operator": "is",
            "target": 201,
            "type": "statusCode"
          }
        ],
        "name": "Add product to cart",
        "request": {
          "body": "{\n  \"cart_item\": {\n    \"product_id\": \"{{ PRODUCT_ID }}\",\n    \"amount_paid\": 500,\n    \"quantity\": 1\n  },\n  \"cart_id\": \"{{ CART_ID }}\"\n}",
          "headers": {
            "content-type": "application/json"
          },
          "method": "POST",
          "timeout": 30,
          "url": "https://api.shopist.io/add_item.json"
        },
        "subtype": "http"
      }
    ]
  },
  "locations": [
    "aws:us-west-2"
  ],
  "message": "MY_NOTIFICATION_MESSAGE",
  "name": "MY_TEST_NAME",
  "options": {
    "ci": {
      "executionRule": "blocking"
    },
    "min_failure_duration": 5400,
    "min_location_failed": 1,
    "monitor_options": {
      "renotify_interval": 0
    },
    "retry": {
      "count": 3,
      "interval": 300
    },
    "tick_every": 900
  },
  "status": "live",
  "subtype": "multi",
  "tags": [
    "env:prod"
  ],
  "type": "api"
}
EOF\## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/api" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "name": "Example API test",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
EOF
                        
##### 

```go
// Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test details." response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsAPITest{
		Config: datadogV1.SyntheticsAPITestConfig{
			Steps: []datadogV1.SyntheticsAPIStep{
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthWeb: &datadogV1.SyntheticsBasicAuthWeb{
									Password: datadog.PtrString("password"),
									Username: datadog.PtrString("username"),
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthWeb: &datadogV1.SyntheticsBasicAuthWeb{
									Password: datadog.PtrString("password"),
									Username: datadog.PtrString("username"),
									Type:     datadogV1.SYNTHETICSBASICAUTHWEBTYPE_WEB.Ptr(),
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthSigv4: &datadogV1.SyntheticsBasicAuthSigv4{
									AccessKey: "accessKey",
									SecretKey: "secretKey",
									Type:      datadogV1.SYNTHETICSBASICAUTHSIGV4TYPE_SIGV4,
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthNTLM: &datadogV1.SyntheticsBasicAuthNTLM{
									Type: datadogV1.SYNTHETICSBASICAUTHNTLMTYPE_NTLM,
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthDigest: &datadogV1.SyntheticsBasicAuthDigest{
									Password: "password",
									Username: "username",
									Type:     datadogV1.SYNTHETICSBASICAUTHDIGESTTYPE_DIGEST,
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthOauthClient: &datadogV1.SyntheticsBasicAuthOauthClient{
									AccessTokenUrl:         "accessTokenUrl",
									TokenApiAuthentication: datadogV1.SYNTHETICSBASICAUTHOAUTHTOKENAPIAUTHENTICATION_HEADER,
									ClientId:               "clientId",
									ClientSecret:           "clientSecret",
									Type:                   datadogV1.SYNTHETICSBASICAUTHOAUTHCLIENTTYPE_OAUTH_CLIENT,
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthOauthROP: &datadogV1.SyntheticsBasicAuthOauthROP{
									AccessTokenUrl:         "accessTokenUrl",
									Password:               "password",
									TokenApiAuthentication: datadogV1.SYNTHETICSBASICAUTHOAUTHTOKENAPIAUTHENTICATION_HEADER,
									Username:               "username",
									Type:                   datadogV1.SYNTHETICSBASICAUTHOAUTHROPTYPE_OAUTH_ROP,
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
			},
		},
		Locations: []string{
			"aws:us-east-2",
		},
		Message: "BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json",
		Name:    "Example-Synthetic",
		Options: datadogV1.SyntheticsTestOptions{
			TickEvery: datadog.PtrInt64(60),
		},
		Subtype: datadogV1.SYNTHETICSTESTDETAILSSUBTYPE_MULTI.Ptr(),
		Type:    datadogV1.SYNTHETICSAPITESTTYPE_API,
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateSyntheticsAPITest(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateSyntheticsAPITest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateSyntheticsAPITest`:\n%s\n", responseContent)
}
```

##### 

```go
// Create a multistep test with subtest returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	// there is a valid "synthetics_api_test" in the system
	SyntheticsAPITestPublicID := os.Getenv("SYNTHETICS_API_TEST_PUBLIC_ID")

	body := datadogV1.SyntheticsAPITest{
		Config: datadogV1.SyntheticsAPITestConfig{
			Steps: []datadogV1.SyntheticsAPIStep{
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPITestStep: &datadogV1.SyntheticsAPITestStep{
						Assertions: []datadogV1.SyntheticsAssertion{
							datadogV1.SyntheticsAssertion{
								SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
									Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
									Type:     datadogV1.SYNTHETICSASSERTIONTYPE_STATUS_CODE,
									Target: datadogV1.SyntheticsAssertionTargetValue{
										SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(200)},
								}},
						},
						Name: "request is sent",
						Request: datadogV1.SyntheticsTestRequest{
							Url:    datadog.PtrString("https://httpbin.org/status/200"),
							Method: datadog.PtrString("GET"),
							BasicAuth: &datadogV1.SyntheticsBasicAuth{
								SyntheticsBasicAuthWeb: &datadogV1.SyntheticsBasicAuthWeb{
									Password: datadog.PtrString("password"),
									Username: datadog.PtrString("username"),
								}},
						},
						Subtype: datadogV1.SYNTHETICSAPITESTSTEPSUBTYPE_HTTP,
					}},
				datadogV1.SyntheticsAPIStep{
					SyntheticsAPISubtestStep: &datadogV1.SyntheticsAPISubtestStep{
						Subtype:         datadogV1.SYNTHETICSAPISUBTESTSTEPSUBTYPE_PLAY_SUB_TEST,
						SubtestPublicId: SyntheticsAPITestPublicID,
						Name:            "subtest step",
					}},
			},
		},
		Locations: []string{
			"aws:us-east-2",
		},
		Message: "BDD test payload: synthetics_api_test_multi_step_with_subtest.json",
		Name:    "Example-Synthetic",
		Options: datadogV1.SyntheticsTestOptions{
			TickEvery: datadog.PtrInt64(60),
		},
		Subtype: datadogV1.SYNTHETICSTESTDETAILSSUBTYPE_MULTI.Ptr(),
		Type:    datadogV1.SYNTHETICSAPITESTTYPE_API,
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateSyntheticsAPITest(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateSyntheticsAPITest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateSyntheticsAPITest`:\n%s\n", responseContent)
}
```

##### 

```go
// Create an API GRPC test returns "OK - Returns the created test details." response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsAPITest{
		Config: datadogV1.SyntheticsAPITestConfig{
			Assertions: []datadogV1.SyntheticsAssertion{
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
						Target: datadogV1.SyntheticsAssertionTargetValue{
							SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(1)},
						Type: datadogV1.SYNTHETICSASSERTIONTYPE_GRPC_HEALTHCHECK_STATUS,
					}},
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
						Target: datadogV1.SyntheticsAssertionTargetValue{
							SyntheticsAssertionTargetValueString: datadog.PtrString("proto target")},
						Type: datadogV1.SYNTHETICSASSERTIONTYPE_GRPC_PROTO,
					}},
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
						Target: datadogV1.SyntheticsAssertionTargetValue{
							SyntheticsAssertionTargetValueString: datadog.PtrString("123")},
						Property: datadog.PtrString("property"),
						Type:     datadogV1.SYNTHETICSASSERTIONTYPE_GRPC_METADATA,
					}},
			},
			Request: &datadogV1.SyntheticsTestRequest{
				Host: datadog.PtrString("localhost"),
				Port: &datadogV1.SyntheticsTestRequestPort{
					SyntheticsTestRequestNumericalPort: datadog.PtrInt64(50051)},
				Service:  datadog.PtrString("Hello"),
				Method:   datadog.PtrString("GET"),
				Message:  datadog.PtrString(""),
				Metadata: map[string]string{},
			},
		},
		Locations: []string{
			"aws:us-east-2",
		},
		Message: "BDD test payload: synthetics_api_grpc_test_payload.json",
		Name:    "Example-Synthetic",
		Options: datadogV1.SyntheticsTestOptions{
			MinFailureDuration: datadog.PtrInt64(0),
			MinLocationFailed:  datadog.PtrInt64(1),
			MonitorOptions: &datadogV1.SyntheticsTestOptionsMonitorOptions{
				RenotifyInterval: datadog.PtrInt64(0),
			},
			MonitorName: datadog.PtrString("Example-Synthetic"),
			TickEvery:   datadog.PtrInt64(60),
		},
		Subtype: datadogV1.SYNTHETICSTESTDETAILSSUBTYPE_GRPC.Ptr(),
		Tags: []string{
			"testing:api",
		},
		Type: datadogV1.SYNTHETICSAPITESTTYPE_API,
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateSyntheticsAPITest(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateSyntheticsAPITest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateSyntheticsAPITest`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test
// details." response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsAPIStep;
import com.datadog.api.client.v1.model.SyntheticsAPITest;
import com.datadog.api.client.v1.model.SyntheticsAPITestConfig;
import com.datadog.api.client.v1.model.SyntheticsAPITestStep;
import com.datadog.api.client.v1.model.SyntheticsAPITestStepSubtype;
import com.datadog.api.client.v1.model.SyntheticsAPITestType;
import com.datadog.api.client.v1.model.SyntheticsAssertion;
import com.datadog.api.client.v1.model.SyntheticsAssertionOperator;
import com.datadog.api.client.v1.model.SyntheticsAssertionTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionTargetValue;
import com.datadog.api.client.v1.model.SyntheticsAssertionType;
import com.datadog.api.client.v1.model.SyntheticsBasicAuth;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthDigest;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthDigestType;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthNTLM;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthNTLMType;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthOauthClient;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthOauthClientType;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthOauthROP;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthOauthROPType;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthOauthTokenApiAuthentication;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthSigv4;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthSigv4Type;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthWeb;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthWebType;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsSubType;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestRequest;
import java.util.Arrays;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsAPITest body =
        new SyntheticsAPITest()
            .config(
                new SyntheticsAPITestConfig()
                    .steps(
                        Arrays.asList(
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthWeb()
                                                        .password("password")
                                                        .username("username"))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthWeb()
                                                        .password("password")
                                                        .username("username")
                                                        .type(SyntheticsBasicAuthWebType.WEB))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthSigv4()
                                                        .accessKey("accessKey")
                                                        .secretKey("secretKey")
                                                        .type(SyntheticsBasicAuthSigv4Type.SIGV4))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthNTLM()
                                                        .type(SyntheticsBasicAuthNTLMType.NTLM))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthDigest()
                                                        .password("password")
                                                        .username("username")
                                                        .type(
                                                            SyntheticsBasicAuthDigestType.DIGEST))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthOauthClient()
                                                        .accessTokenUrl("accessTokenUrl")
                                                        .tokenApiAuthentication(
                                                            SyntheticsBasicAuthOauthTokenApiAuthentication
                                                                .HEADER)
                                                        .clientId("clientId")
                                                        .clientSecret("clientSecret")
                                                        .type(
                                                            SyntheticsBasicAuthOauthClientType
                                                                .OAUTH_CLIENT))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthOauthROP()
                                                        .accessTokenUrl("accessTokenUrl")
                                                        .password("password")
                                                        .tokenApiAuthentication(
                                                            SyntheticsBasicAuthOauthTokenApiAuthentication
                                                                .HEADER)
                                                        .username("username")
                                                        .type(
                                                            SyntheticsBasicAuthOauthROPType
                                                                .OAUTH_ROP))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)))))
            .locations(Collections.singletonList("aws:us-east-2"))
            .message(
                "BDD test payload:"
                    + " synthetics_api_test_multi_step_with_every_type_of_basic_auth.json")
            .name("Example-Synthetic")
            .options(new SyntheticsTestOptions().tickEvery(60L))
            .subtype(SyntheticsTestDetailsSubType.MULTI)
            .type(SyntheticsAPITestType.API);

    try {
      SyntheticsAPITest result = apiInstance.createSyntheticsAPITest(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createSyntheticsAPITest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

##### 

```java
// Create a multistep test with subtest returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsAPIStep;
import com.datadog.api.client.v1.model.SyntheticsAPISubtestStep;
import com.datadog.api.client.v1.model.SyntheticsAPISubtestStepSubtype;
import com.datadog.api.client.v1.model.SyntheticsAPITest;
import com.datadog.api.client.v1.model.SyntheticsAPITestConfig;
import com.datadog.api.client.v1.model.SyntheticsAPITestStep;
import com.datadog.api.client.v1.model.SyntheticsAPITestStepSubtype;
import com.datadog.api.client.v1.model.SyntheticsAPITestType;
import com.datadog.api.client.v1.model.SyntheticsAssertion;
import com.datadog.api.client.v1.model.SyntheticsAssertionOperator;
import com.datadog.api.client.v1.model.SyntheticsAssertionTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionTargetValue;
import com.datadog.api.client.v1.model.SyntheticsAssertionType;
import com.datadog.api.client.v1.model.SyntheticsBasicAuth;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthWeb;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsSubType;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestRequest;
import java.util.Arrays;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    // there is a valid "synthetics_api_test" in the system
    String SYNTHETICS_API_TEST_PUBLIC_ID = System.getenv("SYNTHETICS_API_TEST_PUBLIC_ID");

    SyntheticsAPITest body =
        new SyntheticsAPITest()
            .config(
                new SyntheticsAPITestConfig()
                    .steps(
                        Arrays.asList(
                            new SyntheticsAPIStep(
                                new SyntheticsAPITestStep()
                                    .assertions(
                                        Collections.singletonList(
                                            new SyntheticsAssertion(
                                                new SyntheticsAssertionTarget()
                                                    .operator(SyntheticsAssertionOperator.IS)
                                                    .type(SyntheticsAssertionType.STATUS_CODE)
                                                    .target(
                                                        new SyntheticsAssertionTargetValue(
                                                            200.0)))))
                                    .name("request is sent")
                                    .request(
                                        new SyntheticsTestRequest()
                                            .url("https://httpbin.org/status/200")
                                            .method("GET")
                                            .basicAuth(
                                                new SyntheticsBasicAuth(
                                                    new SyntheticsBasicAuthWeb()
                                                        .password("password")
                                                        .username("username"))))
                                    .subtype(SyntheticsAPITestStepSubtype.HTTP)),
                            new SyntheticsAPIStep(
                                new SyntheticsAPISubtestStep()
                                    .subtype(SyntheticsAPISubtestStepSubtype.PLAY_SUB_TEST)
                                    .subtestPublicId(SYNTHETICS_API_TEST_PUBLIC_ID)
                                    .name("subtest step")))))
            .locations(Collections.singletonList("aws:us-east-2"))
            .message("BDD test payload: synthetics_api_test_multi_step_with_subtest.json")
            .name("Example-Synthetic")
            .options(new SyntheticsTestOptions().tickEvery(60L))
            .subtype(SyntheticsTestDetailsSubType.MULTI)
            .type(SyntheticsAPITestType.API);

    try {
      SyntheticsAPITest result = apiInstance.createSyntheticsAPITest(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createSyntheticsAPITest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

##### 

```java
// Create an API GRPC test returns "OK - Returns the created test details." response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsAPITest;
import com.datadog.api.client.v1.model.SyntheticsAPITestConfig;
import com.datadog.api.client.v1.model.SyntheticsAPITestType;
import com.datadog.api.client.v1.model.SyntheticsAssertion;
import com.datadog.api.client.v1.model.SyntheticsAssertionOperator;
import com.datadog.api.client.v1.model.SyntheticsAssertionTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionTargetValue;
import com.datadog.api.client.v1.model.SyntheticsAssertionType;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsSubType;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsMonitorOptions;
import com.datadog.api.client.v1.model.SyntheticsTestRequest;
import com.datadog.api.client.v1.model.SyntheticsTestRequestPort;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsAPITest body =
        new SyntheticsAPITest()
            .config(
                new SyntheticsAPITestConfig()
                    .assertions(
                        Arrays.asList(
                            new SyntheticsAssertion(
                                new SyntheticsAssertionTarget()
                                    .operator(SyntheticsAssertionOperator.IS)
                                    .target(new SyntheticsAssertionTargetValue(1.0))
                                    .type(SyntheticsAssertionType.GRPC_HEALTHCHECK_STATUS)),
                            new SyntheticsAssertion(
                                new SyntheticsAssertionTarget()
                                    .operator(SyntheticsAssertionOperator.IS)
                                    .target(new SyntheticsAssertionTargetValue("proto target"))
                                    .type(SyntheticsAssertionType.GRPC_PROTO)),
                            new SyntheticsAssertion(
                                new SyntheticsAssertionTarget()
                                    .operator(SyntheticsAssertionOperator.IS)
                                    .target(new SyntheticsAssertionTargetValue("123"))
                                    .property("property")
                                    .type(SyntheticsAssertionType.GRPC_METADATA))))
                    .request(
                        new SyntheticsTestRequest()
                            .host("localhost")
                            .port(new SyntheticsTestRequestPort(50051L))
                            .service("Hello")
                            .method("GET")
                            .message("")
                            .metadata(Map.ofEntries())))
            .locations(Collections.singletonList("aws:us-east-2"))
            .message("BDD test payload: synthetics_api_grpc_test_payload.json")
            .name("Example-Synthetic")
            .options(
                new SyntheticsTestOptions()
                    .minFailureDuration(0L)
                    .minLocationFailed(1L)
                    .monitorOptions(new SyntheticsTestOptionsMonitorOptions().renotifyInterval(0L))
                    .monitorName("Example-Synthetic")
                    .tickEvery(60L))
            .subtype(SyntheticsTestDetailsSubType.GRPC)
            .tags(Collections.singletonList("testing:api"))
            .type(SyntheticsAPITestType.API);

    try {
      SyntheticsAPITest result = apiInstance.createSyntheticsAPITest(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createSyntheticsAPITest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test details." response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_api_test import SyntheticsAPITest
from datadog_api_client.v1.model.synthetics_api_test_config import SyntheticsAPITestConfig
from datadog_api_client.v1.model.synthetics_api_test_step import SyntheticsAPITestStep
from datadog_api_client.v1.model.synthetics_api_test_step_subtype import SyntheticsAPITestStepSubtype
from datadog_api_client.v1.model.synthetics_api_test_type import SyntheticsAPITestType
from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator
from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget
from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType
from datadog_api_client.v1.model.synthetics_basic_auth_digest import SyntheticsBasicAuthDigest
from datadog_api_client.v1.model.synthetics_basic_auth_digest_type import SyntheticsBasicAuthDigestType
from datadog_api_client.v1.model.synthetics_basic_auth_ntlm import SyntheticsBasicAuthNTLM
from datadog_api_client.v1.model.synthetics_basic_auth_ntlm_type import SyntheticsBasicAuthNTLMType
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_client import SyntheticsBasicAuthOauthClient
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_client_type import SyntheticsBasicAuthOauthClientType
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_rop import SyntheticsBasicAuthOauthROP
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_rop_type import SyntheticsBasicAuthOauthROPType
from datadog_api_client.v1.model.synthetics_basic_auth_oauth_token_api_authentication import (
    SyntheticsBasicAuthOauthTokenApiAuthentication,
)
from datadog_api_client.v1.model.synthetics_basic_auth_sigv4 import SyntheticsBasicAuthSigv4
from datadog_api_client.v1.model.synthetics_basic_auth_sigv4_type import SyntheticsBasicAuthSigv4Type
from datadog_api_client.v1.model.synthetics_basic_auth_web import SyntheticsBasicAuthWeb
from datadog_api_client.v1.model.synthetics_basic_auth_web_type import SyntheticsBasicAuthWebType
from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest

body = SyntheticsAPITest(
    config=SyntheticsAPITestConfig(
        steps=[
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthWeb(
                        password="password",
                        username="username",
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthWeb(
                        password="password",
                        username="username",
                        type=SyntheticsBasicAuthWebType.WEB,
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthSigv4(
                        access_key="accessKey",
                        secret_key="secretKey",
                        type=SyntheticsBasicAuthSigv4Type.SIGV4,
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthNTLM(
                        type=SyntheticsBasicAuthNTLMType.NTLM,
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthDigest(
                        password="password",
                        username="username",
                        type=SyntheticsBasicAuthDigestType.DIGEST,
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthOauthClient(
                        access_token_url="accessTokenUrl",
                        token_api_authentication=SyntheticsBasicAuthOauthTokenApiAuthentication.HEADER,
                        client_id="clientId",
                        client_secret="clientSecret",
                        type=SyntheticsBasicAuthOauthClientType.OAUTH_CLIENT,
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthOauthROP(
                        access_token_url="accessTokenUrl",
                        password="password",
                        token_api_authentication=SyntheticsBasicAuthOauthTokenApiAuthentication.HEADER,
                        username="username",
                        type=SyntheticsBasicAuthOauthROPType.OAUTH_ROP,
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
        ],
    ),
    locations=[
        "aws:us-east-2",
    ],
    message="BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json",
    name="Example-Synthetic",
    options=SyntheticsTestOptions(
        tick_every=60,
    ),
    subtype=SyntheticsTestDetailsSubType.MULTI,
    type=SyntheticsAPITestType.API,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_synthetics_api_test(body=body)

    print(response)
```

##### 

```python
"""
Create a multistep test with subtest returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_api_subtest_step import SyntheticsAPISubtestStep
from datadog_api_client.v1.model.synthetics_api_subtest_step_subtype import SyntheticsAPISubtestStepSubtype
from datadog_api_client.v1.model.synthetics_api_test import SyntheticsAPITest
from datadog_api_client.v1.model.synthetics_api_test_config import SyntheticsAPITestConfig
from datadog_api_client.v1.model.synthetics_api_test_step import SyntheticsAPITestStep
from datadog_api_client.v1.model.synthetics_api_test_step_subtype import SyntheticsAPITestStepSubtype
from datadog_api_client.v1.model.synthetics_api_test_type import SyntheticsAPITestType
from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator
from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget
from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType
from datadog_api_client.v1.model.synthetics_basic_auth_web import SyntheticsBasicAuthWeb
from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = environ["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = SyntheticsAPITest(
    config=SyntheticsAPITestConfig(
        steps=[
            SyntheticsAPITestStep(
                assertions=[
                    SyntheticsAssertionTarget(
                        operator=SyntheticsAssertionOperator.IS,
                        type=SyntheticsAssertionType.STATUS_CODE,
                        target=200,
                    ),
                ],
                name="request is sent",
                request=SyntheticsTestRequest(
                    url="https://httpbin.org/status/200",
                    method="GET",
                    basic_auth=SyntheticsBasicAuthWeb(
                        password="password",
                        username="username",
                    ),
                ),
                subtype=SyntheticsAPITestStepSubtype.HTTP,
            ),
            SyntheticsAPISubtestStep(
                subtype=SyntheticsAPISubtestStepSubtype.PLAY_SUB_TEST,
                subtest_public_id=SYNTHETICS_API_TEST_PUBLIC_ID,
                name="subtest step",
            ),
        ],
    ),
    locations=[
        "aws:us-east-2",
    ],
    message="BDD test payload: synthetics_api_test_multi_step_with_subtest.json",
    name="Example-Synthetic",
    options=SyntheticsTestOptions(
        tick_every=60,
    ),
    subtype=SyntheticsTestDetailsSubType.MULTI,
    type=SyntheticsAPITestType.API,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_synthetics_api_test(body=body)

    print(response)
```

##### 

```python
"""
Create an API GRPC test returns "OK - Returns the created test details." response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_api_test import SyntheticsAPITest
from datadog_api_client.v1.model.synthetics_api_test_config import SyntheticsAPITestConfig
from datadog_api_client.v1.model.synthetics_api_test_type import SyntheticsAPITestType
from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator
from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget
from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType
from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType
from datadog_api_client.v1.model.synthetics_test_metadata import SyntheticsTestMetadata
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_options_monitor_options import SyntheticsTestOptionsMonitorOptions
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest

body = SyntheticsAPITest(
    config=SyntheticsAPITestConfig(
        assertions=[
            SyntheticsAssertionTarget(
                operator=SyntheticsAssertionOperator.IS,
                target=1,
                type=SyntheticsAssertionType.GRPC_HEALTHCHECK_STATUS,
            ),
            SyntheticsAssertionTarget(
                operator=SyntheticsAssertionOperator.IS,
                target="proto target",
                type=SyntheticsAssertionType.GRPC_PROTO,
            ),
            SyntheticsAssertionTarget(
                operator=SyntheticsAssertionOperator.IS,
                target="123",
                _property="property",
                type=SyntheticsAssertionType.GRPC_METADATA,
            ),
        ],
        request=SyntheticsTestRequest(
            host="localhost",
            port=50051,
            service="Hello",
            method="GET",
            message="",
            metadata=SyntheticsTestMetadata(),
        ),
    ),
    locations=[
        "aws:us-east-2",
    ],
    message="BDD test payload: synthetics_api_grpc_test_payload.json",
    name="Example-Synthetic",
    options=SyntheticsTestOptions(
        min_failure_duration=0,
        min_location_failed=1,
        monitor_options=SyntheticsTestOptionsMonitorOptions(
            renotify_interval=0,
        ),
        monitor_name="Example-Synthetic",
        tick_every=60,
    ),
    subtype=SyntheticsTestDetailsSubType.GRPC,
    tags=[
        "testing:api",
    ],
    type=SyntheticsAPITestType.API,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_synthetics_api_test(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test details." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsAPITest.new({
  config: DatadogAPIClient::V1::SyntheticsAPITestConfig.new({
    steps: [
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthWeb.new({
            password: "password",
            username: "username",
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthWeb.new({
            password: "password",
            username: "username",
            type: DatadogAPIClient::V1::SyntheticsBasicAuthWebType::WEB,
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthSigv4.new({
            access_key: "accessKey",
            secret_key: "secretKey",
            type: DatadogAPIClient::V1::SyntheticsBasicAuthSigv4Type::SIGV4,
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthNTLM.new({
            type: DatadogAPIClient::V1::SyntheticsBasicAuthNTLMType::NTLM,
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthDigest.new({
            password: "password",
            username: "username",
            type: DatadogAPIClient::V1::SyntheticsBasicAuthDigestType::DIGEST,
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthOauthClient.new({
            access_token_url: "accessTokenUrl",
            token_api_authentication: DatadogAPIClient::V1::SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER,
            client_id: "clientId",
            client_secret: "clientSecret",
            type: DatadogAPIClient::V1::SyntheticsBasicAuthOauthClientType::OAUTH_CLIENT,
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthOauthROP.new({
            access_token_url: "accessTokenUrl",
            password: "password",
            token_api_authentication: DatadogAPIClient::V1::SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER,
            username: "username",
            type: DatadogAPIClient::V1::SyntheticsBasicAuthOauthROPType::OAUTH_ROP,
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
    ],
  }),
  locations: [
    "aws:us-east-2",
  ],
  message: "BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json",
  name: "Example-Synthetic",
  options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
    tick_every: 60,
  }),
  subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::MULTI,
  type: DatadogAPIClient::V1::SyntheticsAPITestType::API,
})
p api_instance.create_synthetics_api_test(body)
```

##### 

```ruby
# Create a multistep test with subtest returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = ENV["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = DatadogAPIClient::V1::SyntheticsAPITest.new({
  config: DatadogAPIClient::V1::SyntheticsAPITestConfig.new({
    steps: [
      DatadogAPIClient::V1::SyntheticsAPITestStep.new({
        assertions: [
          DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
            operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
            type: DatadogAPIClient::V1::SyntheticsAssertionType::STATUS_CODE,
            target: 200,
          }),
        ],
        name: "request is sent",
        request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
          url: "https://httpbin.org/status/200",
          method: "GET",
          basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthWeb.new({
            password: "password",
            username: "username",
          }),
        }),
        subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::HTTP,
      }),
      DatadogAPIClient::V1::SyntheticsAPISubtestStep.new({
        subtype: DatadogAPIClient::V1::SyntheticsAPISubtestStepSubtype::PLAY_SUB_TEST,
        subtest_public_id: SYNTHETICS_API_TEST_PUBLIC_ID,
        name: "subtest step",
      }),
    ],
  }),
  locations: [
    "aws:us-east-2",
  ],
  message: "BDD test payload: synthetics_api_test_multi_step_with_subtest.json",
  name: "Example-Synthetic",
  options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
    tick_every: 60,
  }),
  subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::MULTI,
  type: DatadogAPIClient::V1::SyntheticsAPITestType::API,
})
p api_instance.create_synthetics_api_test(body)
```

##### 

```ruby
# Create an API GRPC test returns "OK - Returns the created test details." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsAPITest.new({
  config: DatadogAPIClient::V1::SyntheticsAPITestConfig.new({
    assertions: [
      DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
        target: 1,
        type: DatadogAPIClient::V1::SyntheticsAssertionType::GRPC_HEALTHCHECK_STATUS,
      }),
      DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
        target: "proto target",
        type: DatadogAPIClient::V1::SyntheticsAssertionType::GRPC_PROTO,
      }),
      DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
        target: "123",
        property: "property",
        type: DatadogAPIClient::V1::SyntheticsAssertionType::GRPC_METADATA,
      }),
    ],
    request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
      host: "localhost",
      port: 50051,
      service: "Hello",
      method: "GET",
      message: "",
      metadata: {},
    }),
  }),
  locations: [
    "aws:us-east-2",
  ],
  message: "BDD test payload: synthetics_api_grpc_test_payload.json",
  name: "Example-Synthetic",
  options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
    min_failure_duration: 0,
    min_location_failed: 1,
    monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({
      renotify_interval: 0,
    }),
    monitor_name: "Example-Synthetic",
    tick_every: 60,
  }),
  subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::GRPC,
  tags: [
    "testing:api",
  ],
  type: DatadogAPIClient::V1::SyntheticsAPITestType::API,
})
p api_instance.create_synthetics_api_test(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Create a multi-step api test with every type of basicAuth returns "OK - Returns
// the created test details." response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsAPIStep;
use datadog_api_client::datadogV1::model::SyntheticsAPITest;
use datadog_api_client::datadogV1::model::SyntheticsAPITestConfig;
use datadog_api_client::datadogV1::model::SyntheticsAPITestStep;
use datadog_api_client::datadogV1::model::SyntheticsAPITestStepSubtype;
use datadog_api_client::datadogV1::model::SyntheticsAPITestType;
use datadog_api_client::datadogV1::model::SyntheticsAssertion;
use datadog_api_client::datadogV1::model::SyntheticsAssertionOperator;
use datadog_api_client::datadogV1::model::SyntheticsAssertionTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionTargetValue;
use datadog_api_client::datadogV1::model::SyntheticsAssertionType;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuth;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthDigest;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthDigestType;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthNTLM;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthNTLMType;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthOauthClient;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthOauthClientType;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthOauthROP;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthOauthROPType;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthOauthTokenApiAuthentication;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthSigv4;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthSigv4Type;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthWeb;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthWebType;
use datadog_api_client::datadogV1::model::SyntheticsTestDetailsSubType;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestRequest;

#[tokio::main]
async fn main() {
    let body = SyntheticsAPITest::new(
        SyntheticsAPITestConfig::new().steps(vec![
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthWeb(Box::new(
                        SyntheticsBasicAuthWeb::new()
                            .password("password".to_string())
                            .username("username".to_string()),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthWeb(Box::new(
                        SyntheticsBasicAuthWeb::new()
                            .password("password".to_string())
                            .type_(SyntheticsBasicAuthWebType::WEB)
                            .username("username".to_string()),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthSigv4(Box::new(
                        SyntheticsBasicAuthSigv4::new(
                            "accessKey".to_string(),
                            "secretKey".to_string(),
                            SyntheticsBasicAuthSigv4Type::SIGV4,
                        ),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthNTLM(Box::new(
                        SyntheticsBasicAuthNTLM::new(SyntheticsBasicAuthNTLMType::NTLM),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthDigest(Box::new(
                        SyntheticsBasicAuthDigest::new(
                            "password".to_string(),
                            SyntheticsBasicAuthDigestType::DIGEST,
                            "username".to_string(),
                        ),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthOauthClient(
                        Box::new(SyntheticsBasicAuthOauthClient::new(
                            "accessTokenUrl".to_string(),
                            "clientId".to_string(),
                            "clientSecret".to_string(),
                            SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER,
                            SyntheticsBasicAuthOauthClientType::OAUTH_CLIENT,
                        )),
                    ))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthOauthROP(Box::new(
                        SyntheticsBasicAuthOauthROP::new(
                            "accessTokenUrl".to_string(),
                            "password".to_string(),
                            SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER,
                            SyntheticsBasicAuthOauthROPType::OAUTH_ROP,
                            "username".to_string(),
                        ),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
        ]),
        vec!["aws:us-east-2".to_string()],
        "BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json"
            .to_string(),
        "Example-Synthetic".to_string(),
        SyntheticsTestOptions::new().tick_every(60),
        SyntheticsAPITestType::API,
    )
    .subtype(SyntheticsTestDetailsSubType::MULTI);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_synthetics_api_test(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

##### 

```rust
// Create a multistep test with subtest returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsAPIStep;
use datadog_api_client::datadogV1::model::SyntheticsAPISubtestStep;
use datadog_api_client::datadogV1::model::SyntheticsAPISubtestStepSubtype;
use datadog_api_client::datadogV1::model::SyntheticsAPITest;
use datadog_api_client::datadogV1::model::SyntheticsAPITestConfig;
use datadog_api_client::datadogV1::model::SyntheticsAPITestStep;
use datadog_api_client::datadogV1::model::SyntheticsAPITestStepSubtype;
use datadog_api_client::datadogV1::model::SyntheticsAPITestType;
use datadog_api_client::datadogV1::model::SyntheticsAssertion;
use datadog_api_client::datadogV1::model::SyntheticsAssertionOperator;
use datadog_api_client::datadogV1::model::SyntheticsAssertionTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionTargetValue;
use datadog_api_client::datadogV1::model::SyntheticsAssertionType;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuth;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthWeb;
use datadog_api_client::datadogV1::model::SyntheticsTestDetailsSubType;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestRequest;

#[tokio::main]
async fn main() {
    // there is a valid "synthetics_api_test" in the system
    let synthetics_api_test_public_id = std::env::var("SYNTHETICS_API_TEST_PUBLIC_ID").unwrap();
    let body = SyntheticsAPITest::new(
        SyntheticsAPITestConfig::new().steps(vec![
            SyntheticsAPIStep::SyntheticsAPITestStep(Box::new(SyntheticsAPITestStep::new(
                vec![SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            200.0 as f64,
                        ),
                        SyntheticsAssertionType::STATUS_CODE,
                    ),
                ))],
                "request is sent".to_string(),
                SyntheticsTestRequest::new()
                    .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthWeb(Box::new(
                        SyntheticsBasicAuthWeb::new()
                            .password("password".to_string())
                            .username("username".to_string()),
                    )))
                    .method("GET".to_string())
                    .url("https://httpbin.org/status/200".to_string()),
                SyntheticsAPITestStepSubtype::HTTP,
            ))),
            SyntheticsAPIStep::SyntheticsAPISubtestStep(Box::new(SyntheticsAPISubtestStep::new(
                "subtest step".to_string(),
                synthetics_api_test_public_id.clone(),
                SyntheticsAPISubtestStepSubtype::PLAY_SUB_TEST,
            ))),
        ]),
        vec!["aws:us-east-2".to_string()],
        "BDD test payload: synthetics_api_test_multi_step_with_subtest.json".to_string(),
        "Example-Synthetic".to_string(),
        SyntheticsTestOptions::new().tick_every(60),
        SyntheticsAPITestType::API,
    )
    .subtype(SyntheticsTestDetailsSubType::MULTI);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_synthetics_api_test(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

##### 

```rust
// Create an API GRPC test returns "OK - Returns the created test details."
// response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsAPITest;
use datadog_api_client::datadogV1::model::SyntheticsAPITestConfig;
use datadog_api_client::datadogV1::model::SyntheticsAPITestType;
use datadog_api_client::datadogV1::model::SyntheticsAssertion;
use datadog_api_client::datadogV1::model::SyntheticsAssertionOperator;
use datadog_api_client::datadogV1::model::SyntheticsAssertionTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionTargetValue;
use datadog_api_client::datadogV1::model::SyntheticsAssertionType;
use datadog_api_client::datadogV1::model::SyntheticsTestDetailsSubType;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsMonitorOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestRequest;
use datadog_api_client::datadogV1::model::SyntheticsTestRequestPort;
use std::collections::BTreeMap;

#[tokio::main]
async fn main() {
    let body = SyntheticsAPITest::new(
        SyntheticsAPITestConfig::new()
            .assertions(vec![
                SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                            1.0 as f64,
                        ),
                        SyntheticsAssertionType::GRPC_HEALTHCHECK_STATUS,
                    ),
                )),
                SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueString(
                            "proto target".to_string(),
                        ),
                        SyntheticsAssertionType::GRPC_PROTO,
                    ),
                )),
                SyntheticsAssertion::SyntheticsAssertionTarget(Box::new(
                    SyntheticsAssertionTarget::new(
                        SyntheticsAssertionOperator::IS,
                        SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueString(
                            "123".to_string(),
                        ),
                        SyntheticsAssertionType::GRPC_METADATA,
                    )
                    .property("property".to_string()),
                )),
            ])
            .request(
                SyntheticsTestRequest::new()
                    .host("localhost".to_string())
                    .message("".to_string())
                    .metadata(BTreeMap::from([]))
                    .method("GET".to_string())
                    .port(SyntheticsTestRequestPort::SyntheticsTestRequestNumericalPort(50051))
                    .service("Hello".to_string()),
            ),
        vec!["aws:us-east-2".to_string()],
        "BDD test payload: synthetics_api_grpc_test_payload.json".to_string(),
        "Example-Synthetic".to_string(),
        SyntheticsTestOptions::new()
            .min_failure_duration(0)
            .min_location_failed(1)
            .monitor_name("Example-Synthetic".to_string())
            .monitor_options(SyntheticsTestOptionsMonitorOptions::new().renotify_interval(0))
            .tick_every(60),
        SyntheticsAPITestType::API,
    )
    .subtype(SyntheticsTestDetailsSubType::GRPC)
    .tags(vec!["testing:api".to_string()]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_synthetics_api_test(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Create a multi-step api test with every type of basicAuth returns "OK - Returns the created test details." response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
  body: {
    config: {
      steps: [
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              password: "password",
              username: "username",
            },
          },
          subtype: "http",
        },
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              password: "password",
              username: "username",
              type: "web",
            },
          },
          subtype: "http",
        },
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              accessKey: "accessKey",
              secretKey: "secretKey",
              type: "sigv4",
            },
          },
          subtype: "http",
        },
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              type: "ntlm",
            },
          },
          subtype: "http",
        },
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              password: "password",
              username: "username",
              type: "digest",
            },
          },
          subtype: "http",
        },
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              accessTokenUrl: "accessTokenUrl",
              tokenApiAuthentication: "header",
              clientId: "clientId",
              clientSecret: "clientSecret",
              type: "oauth-client",
            },
          },
          subtype: "http",
        },
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              accessTokenUrl: "accessTokenUrl",
              password: "password",
              tokenApiAuthentication: "header",
              username: "username",
              type: "oauth-rop",
            },
          },
          subtype: "http",
        },
      ],
    },
    locations: ["aws:us-east-2"],
    message:
      "BDD test payload: synthetics_api_test_multi_step_with_every_type_of_basic_auth.json",
    name: "Example-Synthetic",
    options: {
      tickEvery: 60,
    },
    subtype: "multi",
    type: "api",
  },
};

apiInstance
  .createSyntheticsAPITest(params)
  .then((data: v1.SyntheticsAPITest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

##### 

```typescript
/**
 * Create a multistep test with subtest returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

// there is a valid "synthetics_api_test" in the system
const SYNTHETICS_API_TEST_PUBLIC_ID = process.env
  .SYNTHETICS_API_TEST_PUBLIC_ID as string;

const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
  body: {
    config: {
      steps: [
        {
          assertions: [
            {
              operator: "is",
              type: "statusCode",
              target: 200,
            },
          ],
          name: "request is sent",
          request: {
            url: "https://httpbin.org/status/200",
            method: "GET",
            basicAuth: {
              password: "password",
              username: "username",
            },
          },
          subtype: "http",
        },
        {
          subtype: "playSubTest",
          subtestPublicId: SYNTHETICS_API_TEST_PUBLIC_ID,
          name: "subtest step",
        },
      ],
    },
    locations: ["aws:us-east-2"],
    message:
      "BDD test payload: synthetics_api_test_multi_step_with_subtest.json",
    name: "Example-Synthetic",
    options: {
      tickEvery: 60,
    },
    subtype: "multi",
    type: "api",
  },
};

apiInstance
  .createSyntheticsAPITest(params)
  .then((data: v1.SyntheticsAPITest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

##### 

```typescript
/**
 * Create an API GRPC test returns "OK - Returns the created test details." response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiCreateSyntheticsAPITestRequest = {
  body: {
    config: {
      assertions: [
        {
          operator: "is",
          target: 1,
          type: "grpcHealthcheckStatus",
        },
        {
          operator: "is",
          target: "proto target",
          type: "grpcProto",
        },
        {
          operator: "is",
          target: "123",
          property: "property",
          type: "grpcMetadata",
        },
      ],
      request: {
        host: "localhost",
        port: 50051,
        service: "Hello",
        method: "GET",
        message: "",
        metadata: {},
      },
    },
    locations: ["aws:us-east-2"],
    message: "BDD test payload: synthetics_api_grpc_test_payload.json",
    name: "Example-Synthetic",
    options: {
      minFailureDuration: 0,
      minLocationFailed: 1,
      monitorOptions: {
        renotifyInterval: 0,
      },
      monitorName: "Example-Synthetic",
      tickEvery: 60,
    },
    subtype: "grpc",
    tags: ["testing:api"],
    type: "api",
  },
};

apiInstance
  .createSyntheticsAPITest(params)
  .then((data: v1.SyntheticsAPITest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Create a browser test{% #create-a-browser-test %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                       |
| ----------------- | ------------------------------------------------------------------ |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v1/synthetics/tests/browser |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v1/synthetics/tests/browser |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v1/synthetics/tests/browser      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v1/synthetics/tests/browser      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v1/synthetics/tests/browser     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v1/synthetics/tests/browser |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v1/synthetics/tests/browser |

### Overview

Create a Synthetic browser test. This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)

Details of the test to create.

{% tab title="Model" %}

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]                 | object          | Configuration object for a Synthetic browser test.                                                                                                                                                                                                                                              |
| config               | assertions [*required*]             | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                                                          |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request [*required*]                | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | setCookie                                | string          | Cookies to be used for the request, using the [Set-Cookie](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) syntax.                                                                                                                                                        |
| config               | variables                                | [object]        | Array of variables used for the test steps.                                                                                                                                                                                                                                                     |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | locations [*required*]              | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message [*required*]                | string          | Notification message associated with the test. Message can either be text or an empty string.                                                                                                                                                                                                   |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name [*required*]                   | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options [*required*]                | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The public ID of the test.                                                                                                                                                                                                                                                                      |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | steps                                    | [object]        | Array of steps for the test.                                                                                                                                                                                                                                                                    |
| steps                | allowFailure                             | boolean         | A boolean set to allow this step to fail.                                                                                                                                                                                                                                                       |
| steps                | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| steps                | exitIfSucceed                            | boolean         | A boolean set to exit the test if the step succeeds.                                                                                                                                                                                                                                            |
| steps                | isCritical                               | boolean         | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                                                                                         |
| steps                | name                                     | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| steps                | noScreenshot                             | boolean         | A boolean set to skip taking a screenshot for the step.                                                                                                                                                                                                                                         |
| steps                | params                                   | object          | The parameters of the step.                                                                                                                                                                                                                                                                     |
| steps                | public_id                                | string          | The public ID of the step.                                                                                                                                                                                                                                                                      |
| steps                | timeout                                  | int64           | The time before declaring a step failed.                                                                                                                                                                                                                                                        |
| steps                | type                                     | enum            | Step type used in your Synthetic test. Allowed enum values: `assertCurrentUrl,assertElementAttribute,assertElementContent,assertElementPresent,assertEmail,assertFileDownload,assertFromJavascript,assertPageContains,assertPageLacks,assertRequests`                                           |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type [*required*]                   | enum            | Type of the Synthetic test, `browser`. Allowed enum values: `browser`                                                                                                                                                                                                                           |

{% /tab %}

{% tab title="Example" %}
##### 

```json
{
  "config": {
    "assertions": [],
    "configVariables": [
      {
        "example": "content-type",
        "name": "PROPERTY",
        "pattern": "content-type",
        "type": "text"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://datadoghq.com",
      "certificateDomains": [
        "https://datadoghq.com"
      ]
    },
    "setCookie": "name:test"
  },
  "locations": [
    "aws:us-east-2"
  ],
  "message": "Test message",
  "name": "Example-Synthetic",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": true,
    "device_ids": [
      "tablet"
    ],
    "disableCors": true,
    "follow_redirects": true,
    "min_failure_duration": 10,
    "min_location_failed": 1,
    "noScreenshot": true,
    "retry": {
      "count": 2,
      "interval": 10
    },
    "rumSettings": {
      "isEnabled": true,
      "applicationId": "mockApplicationId",
      "clientTokenId": 12345
    },
    "tick_every": 300,
    "ci": {
      "executionRule": "skipped"
    },
    "ignoreServerCertificateError": true,
    "disableCsp": true,
    "initialNavigationTimeout": 200
  },
  "tags": [
    "testing:browser"
  ],
  "type": "browser",
  "steps": [
    {
      "allowFailure": false,
      "isCritical": true,
      "name": "Refresh page",
      "params": {},
      "type": "refresh"
    }
  ]
}
```

##### 

```json
{
  "config": {
    "assertions": [],
    "variables": [
      {
        "type": "text",
        "name": "TEST_VARIABLE",
        "pattern": "secret",
        "secure": true,
        "example": "secret"
      }
    ],
    "configVariables": [
      {
        "example": "content-type",
        "name": "PROPERTY",
        "pattern": "content-type",
        "type": "text",
        "secure": true
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://datadoghq.com"
    },
    "setCookie": "name:test"
  },
  "locations": [
    "aws:us-east-2"
  ],
  "message": "Test message",
  "name": "Example-Synthetic",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": true,
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableCors": true,
    "follow_redirects": true,
    "min_failure_duration": 10,
    "min_location_failed": 1,
    "noScreenshot": true,
    "retry": {
      "count": 2,
      "interval": 10
    },
    "tick_every": 300,
    "enableProfiling": true,
    "enableSecurityTesting": true
  },
  "tags": [
    "testing:browser"
  ],
  "type": "browser",
  "steps": [
    {
      "allowFailure": false,
      "alwaysExecute": true,
      "exitIfSucceed": true,
      "isCritical": true,
      "name": "Refresh page",
      "params": {},
      "type": "refresh"
    }
  ]
}
```

##### 

```json
{
  "config": {
    "assertions": [],
    "configVariables": [
      {
        "example": "content-type",
        "name": "PROPERTY",
        "pattern": "content-type",
        "type": "text"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://datadoghq.com"
    },
    "setCookie": "name:test"
  },
  "locations": [
    "aws:us-east-2"
  ],
  "message": "Test message",
  "name": "Example-Synthetic",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": true,
    "device_ids": [
      "tablet"
    ],
    "disableCors": true,
    "follow_redirects": true,
    "min_failure_duration": 10,
    "min_location_failed": 1,
    "noScreenshot": true,
    "retry": {
      "count": 2,
      "interval": 10
    },
    "tick_every": 300,
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        },
        {
          "day": 3,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    }
  },
  "tags": [
    "testing:browser"
  ],
  "type": "browser",
  "steps": [
    {
      "allowFailure": false,
      "isCritical": true,
      "name": "Refresh page",
      "params": {},
      "type": "refresh"
    }
  ]
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK - Returns the created test details.
{% tab title="Model" %}
Object containing details about a Synthetic browser test.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]                 | object          | Configuration object for a Synthetic browser test.                                                                                                                                                                                                                                              |
| config               | assertions [*required*]             | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                                                          |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request [*required*]                | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | setCookie                                | string          | Cookies to be used for the request, using the [Set-Cookie](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) syntax.                                                                                                                                                        |
| config               | variables                                | [object]        | Array of variables used for the test steps.                                                                                                                                                                                                                                                     |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | locations [*required*]              | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message [*required*]                | string          | Notification message associated with the test. Message can either be text or an empty string.                                                                                                                                                                                                   |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name [*required*]                   | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options [*required*]                | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The public ID of the test.                                                                                                                                                                                                                                                                      |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | steps                                    | [object]        | Array of steps for the test.                                                                                                                                                                                                                                                                    |
| steps                | allowFailure                             | boolean         | A boolean set to allow this step to fail.                                                                                                                                                                                                                                                       |
| steps                | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| steps                | exitIfSucceed                            | boolean         | A boolean set to exit the test if the step succeeds.                                                                                                                                                                                                                                            |
| steps                | isCritical                               | boolean         | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                                                                                         |
| steps                | name                                     | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| steps                | noScreenshot                             | boolean         | A boolean set to skip taking a screenshot for the step.                                                                                                                                                                                                                                         |
| steps                | params                                   | object          | The parameters of the step.                                                                                                                                                                                                                                                                     |
| steps                | public_id                                | string          | The public ID of the step.                                                                                                                                                                                                                                                                      |
| steps                | timeout                                  | int64           | The time before declaring a step failed.                                                                                                                                                                                                                                                        |
| steps                | type                                     | enum            | Step type used in your Synthetic test. Allowed enum values: `assertCurrentUrl,assertElementAttribute,assertElementContent,assertElementPresent,assertEmail,assertFileDownload,assertFromJavascript,assertPageContains,assertPageLacks,assertRequests`                                           |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type [*required*]                   | enum            | Type of the Synthetic test, `browser`. Allowed enum values: `browser`                                                                                                                                                                                                                           |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      {
        "operator": "contains",
        "property": "string",
        "target": 0,
        "timingsScope": "string",
        "type": "statusCode"
      }
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "setCookie": "string",
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "",
  "monitor_id": "integer",
  "name": "Example test name",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "public_id": "string",
  "status": "live",
  "steps": [
    {
      "allowFailure": false,
      "alwaysExecute": false,
      "exitIfSucceed": false,
      "isCritical": false,
      "name": "string",
      "noScreenshot": false,
      "params": {},
      "public_id": "string",
      "timeout": "integer",
      "type": "assertElementContent"
    }
  ],
  "tags": [
    "env:prod"
  ],
  "type": "browser"
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
- JSON format is wrong - Creation failed
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="402" %}
Test quota is reached
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/browser" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "",
  "name": "Example browser test",
  "options": {
    "device_ids": [
      "chrome.laptop_large"
    ],
    "tick_every": 3600
  },
  "status": "live",
  "steps": [
    {
      "name": "Check current URL",
      "params": {
        "check": "contains",
        "value": "example"
      },
      "type": "assertCurrentUrl"
    }
  ],
  "tags": [
    "env:production"
  ],
  "type": "browser"
}
EOF
                        
##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/browser" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "",
  "name": "Example browser test",
  "options": {
    "device_ids": [
      "chrome.laptop_large"
    ],
    "tick_every": 3600
  },
  "status": "live",
  "steps": [
    {
      "name": "Check current URL",
      "params": {
        "check": "contains",
        "value": "example"
      },
      "type": "assertCurrentUrl"
    }
  ],
  "tags": [
    "env:production"
  ],
  "type": "browser"
}
EOF
                        
##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/browser" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "",
  "name": "Example browser test",
  "options": {
    "device_ids": [
      "chrome.laptop_large"
    ],
    "tick_every": 3600
  },
  "status": "live",
  "steps": [
    {
      "name": "Check current URL",
      "params": {
        "check": "contains",
        "value": "example"
      },
      "type": "assertCurrentUrl"
    }
  ],
  "tags": [
    "env:production"
  ],
  "type": "browser"
}
EOF
                        
##### 

```go
// Create a browser test returns "OK - Returns saved rumSettings." response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsBrowserTest{
		Config: datadogV1.SyntheticsBrowserTestConfig{
			Assertions: []datadogV1.SyntheticsAssertion{},
			ConfigVariables: []datadogV1.SyntheticsConfigVariable{
				{
					Example: datadog.PtrString("content-type"),
					Name:    "PROPERTY",
					Pattern: datadog.PtrString("content-type"),
					Type:    datadogV1.SYNTHETICSCONFIGVARIABLETYPE_TEXT,
				},
			},
			Request: datadogV1.SyntheticsTestRequest{
				Method: datadog.PtrString("GET"),
				Url:    datadog.PtrString("https://datadoghq.com"),
				CertificateDomains: []string{
					"https://datadoghq.com",
				},
			},
			SetCookie: datadog.PtrString("name:test"),
		},
		Locations: []string{
			"aws:us-east-2",
		},
		Message: "Test message",
		Name:    "Example-Synthetic",
		Options: datadogV1.SyntheticsTestOptions{
			AcceptSelfSigned: datadog.PtrBool(false),
			AllowInsecure:    datadog.PtrBool(true),
			DeviceIds: []string{
				"tablet",
			},
			DisableCors:        datadog.PtrBool(true),
			FollowRedirects:    datadog.PtrBool(true),
			MinFailureDuration: datadog.PtrInt64(10),
			MinLocationFailed:  datadog.PtrInt64(1),
			NoScreenshot:       datadog.PtrBool(true),
			Retry: &datadogV1.SyntheticsTestOptionsRetry{
				Count:    datadog.PtrInt64(2),
				Interval: datadog.PtrFloat64(10),
			},
			RumSettings: &datadogV1.SyntheticsBrowserTestRumSettings{
				IsEnabled:     true,
				ApplicationId: datadog.PtrString("mockApplicationId"),
				ClientTokenId: datadog.PtrInt64(12345),
			},
			TickEvery: datadog.PtrInt64(300),
			Ci: &datadogV1.SyntheticsTestCiOptions{
				ExecutionRule: datadogV1.SYNTHETICSTESTEXECUTIONRULE_SKIPPED,
			},
			IgnoreServerCertificateError: datadog.PtrBool(true),
			DisableCsp:                   datadog.PtrBool(true),
			InitialNavigationTimeout:     datadog.PtrInt64(200),
		},
		Tags: []string{
			"testing:browser",
		},
		Type: datadogV1.SYNTHETICSBROWSERTESTTYPE_BROWSER,
		Steps: []datadogV1.SyntheticsStep{
			{
				AllowFailure: datadog.PtrBool(false),
				IsCritical:   datadog.PtrBool(true),
				Name:         datadog.PtrString("Refresh page"),
				Params:       new(interface{}),
				Type:         datadogV1.SYNTHETICSSTEPTYPE_REFRESH.Ptr(),
			},
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateSyntheticsBrowserTest(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateSyntheticsBrowserTest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateSyntheticsBrowserTest`:\n%s\n", responseContent)
}
```

##### 

```go
// Create a browser test returns "OK - Returns the created test details." response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsBrowserTest{
		Config: datadogV1.SyntheticsBrowserTestConfig{
			Assertions: []datadogV1.SyntheticsAssertion{},
			Variables: []datadogV1.SyntheticsBrowserVariable{
				{
					Type:    datadogV1.SYNTHETICSBROWSERVARIABLETYPE_TEXT,
					Name:    "TEST_VARIABLE",
					Pattern: datadog.PtrString("secret"),
					Secure:  datadog.PtrBool(true),
					Example: datadog.PtrString("secret"),
				},
			},
			ConfigVariables: []datadogV1.SyntheticsConfigVariable{
				{
					Example: datadog.PtrString("content-type"),
					Name:    "PROPERTY",
					Pattern: datadog.PtrString("content-type"),
					Type:    datadogV1.SYNTHETICSCONFIGVARIABLETYPE_TEXT,
					Secure:  datadog.PtrBool(true),
				},
			},
			Request: datadogV1.SyntheticsTestRequest{
				Method: datadog.PtrString("GET"),
				Url:    datadog.PtrString("https://datadoghq.com"),
			},
			SetCookie: datadog.PtrString("name:test"),
		},
		Locations: []string{
			"aws:us-east-2",
		},
		Message: "Test message",
		Name:    "Example-Synthetic",
		Options: datadogV1.SyntheticsTestOptions{
			AcceptSelfSigned: datadog.PtrBool(false),
			AllowInsecure:    datadog.PtrBool(true),
			DeviceIds: []string{
				"chrome.laptop_large",
			},
			DisableCors:        datadog.PtrBool(true),
			FollowRedirects:    datadog.PtrBool(true),
			MinFailureDuration: datadog.PtrInt64(10),
			MinLocationFailed:  datadog.PtrInt64(1),
			NoScreenshot:       datadog.PtrBool(true),
			Retry: &datadogV1.SyntheticsTestOptionsRetry{
				Count:    datadog.PtrInt64(2),
				Interval: datadog.PtrFloat64(10),
			},
			TickEvery:             datadog.PtrInt64(300),
			EnableProfiling:       datadog.PtrBool(true),
			EnableSecurityTesting: datadog.PtrBool(true),
		},
		Tags: []string{
			"testing:browser",
		},
		Type: datadogV1.SYNTHETICSBROWSERTESTTYPE_BROWSER,
		Steps: []datadogV1.SyntheticsStep{
			{
				AllowFailure:  datadog.PtrBool(false),
				AlwaysExecute: datadog.PtrBool(true),
				ExitIfSucceed: datadog.PtrBool(true),
				IsCritical:    datadog.PtrBool(true),
				Name:          datadog.PtrString("Refresh page"),
				Params:        new(interface{}),
				Type:          datadogV1.SYNTHETICSSTEPTYPE_REFRESH.Ptr(),
			},
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateSyntheticsBrowserTest(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateSyntheticsBrowserTest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateSyntheticsBrowserTest`:\n%s\n", responseContent)
}
```

##### 

```go
// Create a browser test with advanced scheduling options returns "OK - Returns the created test details." response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsBrowserTest{
		Config: datadogV1.SyntheticsBrowserTestConfig{
			Assertions: []datadogV1.SyntheticsAssertion{},
			ConfigVariables: []datadogV1.SyntheticsConfigVariable{
				{
					Example: datadog.PtrString("content-type"),
					Name:    "PROPERTY",
					Pattern: datadog.PtrString("content-type"),
					Type:    datadogV1.SYNTHETICSCONFIGVARIABLETYPE_TEXT,
				},
			},
			Request: datadogV1.SyntheticsTestRequest{
				Method: datadog.PtrString("GET"),
				Url:    datadog.PtrString("https://datadoghq.com"),
			},
			SetCookie: datadog.PtrString("name:test"),
		},
		Locations: []string{
			"aws:us-east-2",
		},
		Message: "Test message",
		Name:    "Example-Synthetic",
		Options: datadogV1.SyntheticsTestOptions{
			AcceptSelfSigned: datadog.PtrBool(false),
			AllowInsecure:    datadog.PtrBool(true),
			DeviceIds: []string{
				"tablet",
			},
			DisableCors:        datadog.PtrBool(true),
			FollowRedirects:    datadog.PtrBool(true),
			MinFailureDuration: datadog.PtrInt64(10),
			MinLocationFailed:  datadog.PtrInt64(1),
			NoScreenshot:       datadog.PtrBool(true),
			Retry: &datadogV1.SyntheticsTestOptionsRetry{
				Count:    datadog.PtrInt64(2),
				Interval: datadog.PtrFloat64(10),
			},
			TickEvery: datadog.PtrInt64(300),
			Scheduling: &datadogV1.SyntheticsTestOptionsScheduling{
				Timeframes: []datadogV1.SyntheticsTestOptionsSchedulingTimeframe{
					{
						Day:  1,
						From: "07:00",
						To:   "16:00",
					},
					{
						Day:  3,
						From: "07:00",
						To:   "16:00",
					},
				},
				Timezone: "America/New_York",
			},
		},
		Tags: []string{
			"testing:browser",
		},
		Type: datadogV1.SYNTHETICSBROWSERTESTTYPE_BROWSER,
		Steps: []datadogV1.SyntheticsStep{
			{
				AllowFailure: datadog.PtrBool(false),
				IsCritical:   datadog.PtrBool(true),
				Name:         datadog.PtrString("Refresh page"),
				Params:       new(interface{}),
				Type:         datadogV1.SYNTHETICSSTEPTYPE_REFRESH.Ptr(),
			},
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateSyntheticsBrowserTest(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateSyntheticsBrowserTest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateSyntheticsBrowserTest`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Create a browser test returns "OK - Returns saved rumSettings." response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsBrowserTest;
import com.datadog.api.client.v1.model.SyntheticsBrowserTestConfig;
import com.datadog.api.client.v1.model.SyntheticsBrowserTestRumSettings;
import com.datadog.api.client.v1.model.SyntheticsBrowserTestType;
import com.datadog.api.client.v1.model.SyntheticsConfigVariable;
import com.datadog.api.client.v1.model.SyntheticsConfigVariableType;
import com.datadog.api.client.v1.model.SyntheticsStep;
import com.datadog.api.client.v1.model.SyntheticsStepType;
import com.datadog.api.client.v1.model.SyntheticsTestCiOptions;
import com.datadog.api.client.v1.model.SyntheticsTestExecutionRule;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry;
import com.datadog.api.client.v1.model.SyntheticsTestRequest;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsBrowserTest body =
        new SyntheticsBrowserTest()
            .config(
                new SyntheticsBrowserTestConfig()
                    .configVariables(
                        Collections.singletonList(
                            new SyntheticsConfigVariable()
                                .example("content-type")
                                .name("PROPERTY")
                                .pattern("content-type")
                                .type(SyntheticsConfigVariableType.TEXT)))
                    .request(
                        new SyntheticsTestRequest()
                            .method("GET")
                            .url("https://datadoghq.com")
                            .certificateDomains(Collections.singletonList("https://datadoghq.com")))
                    .setCookie("name:test"))
            .locations(Collections.singletonList("aws:us-east-2"))
            .message("Test message")
            .name("Example-Synthetic")
            .options(
                new SyntheticsTestOptions()
                    .acceptSelfSigned(false)
                    .allowInsecure(true)
                    .deviceIds(Collections.singletonList("tablet"))
                    .disableCors(true)
                    .followRedirects(true)
                    .minFailureDuration(10L)
                    .minLocationFailed(1L)
                    .noScreenshot(true)
                    .retry(new SyntheticsTestOptionsRetry().count(2L).interval(10.0))
                    .rumSettings(
                        new SyntheticsBrowserTestRumSettings()
                            .isEnabled(true)
                            .applicationId("mockApplicationId")
                            .clientTokenId(12345L))
                    .tickEvery(300L)
                    .ci(
                        new SyntheticsTestCiOptions()
                            .executionRule(SyntheticsTestExecutionRule.SKIPPED))
                    .ignoreServerCertificateError(true)
                    .disableCsp(true)
                    .initialNavigationTimeout(200L))
            .tags(Collections.singletonList("testing:browser"))
            .type(SyntheticsBrowserTestType.BROWSER)
            .steps(
                Collections.singletonList(
                    new SyntheticsStep()
                        .allowFailure(false)
                        .isCritical(true)
                        .name("Refresh page")
                        .params(new Object())
                        .type(SyntheticsStepType.REFRESH)));

    try {
      SyntheticsBrowserTest result = apiInstance.createSyntheticsBrowserTest(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createSyntheticsBrowserTest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

##### 

```java
// Create a browser test returns "OK - Returns the created test details." response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsBrowserTest;
import com.datadog.api.client.v1.model.SyntheticsBrowserTestConfig;
import com.datadog.api.client.v1.model.SyntheticsBrowserTestType;
import com.datadog.api.client.v1.model.SyntheticsBrowserVariable;
import com.datadog.api.client.v1.model.SyntheticsBrowserVariableType;
import com.datadog.api.client.v1.model.SyntheticsConfigVariable;
import com.datadog.api.client.v1.model.SyntheticsConfigVariableType;
import com.datadog.api.client.v1.model.SyntheticsStep;
import com.datadog.api.client.v1.model.SyntheticsStepType;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry;
import com.datadog.api.client.v1.model.SyntheticsTestRequest;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsBrowserTest body =
        new SyntheticsBrowserTest()
            .config(
                new SyntheticsBrowserTestConfig()
                    .variables(
                        Collections.singletonList(
                            new SyntheticsBrowserVariable()
                                .type(SyntheticsBrowserVariableType.TEXT)
                                .name("TEST_VARIABLE")
                                .pattern("secret")
                                .secure(true)
                                .example("secret")))
                    .configVariables(
                        Collections.singletonList(
                            new SyntheticsConfigVariable()
                                .example("content-type")
                                .name("PROPERTY")
                                .pattern("content-type")
                                .type(SyntheticsConfigVariableType.TEXT)
                                .secure(true)))
                    .request(new SyntheticsTestRequest().method("GET").url("https://datadoghq.com"))
                    .setCookie("name:test"))
            .locations(Collections.singletonList("aws:us-east-2"))
            .message("Test message")
            .name("Example-Synthetic")
            .options(
                new SyntheticsTestOptions()
                    .acceptSelfSigned(false)
                    .allowInsecure(true)
                    .deviceIds(Collections.singletonList("chrome.laptop_large"))
                    .disableCors(true)
                    .followRedirects(true)
                    .minFailureDuration(10L)
                    .minLocationFailed(1L)
                    .noScreenshot(true)
                    .retry(new SyntheticsTestOptionsRetry().count(2L).interval(10.0))
                    .tickEvery(300L)
                    .enableProfiling(true)
                    .enableSecurityTesting(true))
            .tags(Collections.singletonList("testing:browser"))
            .type(SyntheticsBrowserTestType.BROWSER)
            .steps(
                Collections.singletonList(
                    new SyntheticsStep()
                        .allowFailure(false)
                        .alwaysExecute(true)
                        .exitIfSucceed(true)
                        .isCritical(true)
                        .name("Refresh page")
                        .params(new Object())
                        .type(SyntheticsStepType.REFRESH)));

    try {
      SyntheticsBrowserTest result = apiInstance.createSyntheticsBrowserTest(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createSyntheticsBrowserTest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

##### 

```java
// Create a browser test with advanced scheduling options returns "OK - Returns the created test
// details." response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsBrowserTest;
import com.datadog.api.client.v1.model.SyntheticsBrowserTestConfig;
import com.datadog.api.client.v1.model.SyntheticsBrowserTestType;
import com.datadog.api.client.v1.model.SyntheticsConfigVariable;
import com.datadog.api.client.v1.model.SyntheticsConfigVariableType;
import com.datadog.api.client.v1.model.SyntheticsStep;
import com.datadog.api.client.v1.model.SyntheticsStepType;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsScheduling;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsSchedulingTimeframe;
import com.datadog.api.client.v1.model.SyntheticsTestRequest;
import java.util.Arrays;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsBrowserTest body =
        new SyntheticsBrowserTest()
            .config(
                new SyntheticsBrowserTestConfig()
                    .configVariables(
                        Collections.singletonList(
                            new SyntheticsConfigVariable()
                                .example("content-type")
                                .name("PROPERTY")
                                .pattern("content-type")
                                .type(SyntheticsConfigVariableType.TEXT)))
                    .request(new SyntheticsTestRequest().method("GET").url("https://datadoghq.com"))
                    .setCookie("name:test"))
            .locations(Collections.singletonList("aws:us-east-2"))
            .message("Test message")
            .name("Example-Synthetic")
            .options(
                new SyntheticsTestOptions()
                    .acceptSelfSigned(false)
                    .allowInsecure(true)
                    .deviceIds(Collections.singletonList("tablet"))
                    .disableCors(true)
                    .followRedirects(true)
                    .minFailureDuration(10L)
                    .minLocationFailed(1L)
                    .noScreenshot(true)
                    .retry(new SyntheticsTestOptionsRetry().count(2L).interval(10.0))
                    .tickEvery(300L)
                    .scheduling(
                        new SyntheticsTestOptionsScheduling()
                            .timeframes(
                                Arrays.asList(
                                    new SyntheticsTestOptionsSchedulingTimeframe()
                                        .day(1)
                                        .from("07:00")
                                        .to("16:00"),
                                    new SyntheticsTestOptionsSchedulingTimeframe()
                                        .day(3)
                                        .from("07:00")
                                        .to("16:00")))
                            .timezone("America/New_York")))
            .tags(Collections.singletonList("testing:browser"))
            .type(SyntheticsBrowserTestType.BROWSER)
            .steps(
                Collections.singletonList(
                    new SyntheticsStep()
                        .allowFailure(false)
                        .isCritical(true)
                        .name("Refresh page")
                        .params(new Object())
                        .type(SyntheticsStepType.REFRESH)));

    try {
      SyntheticsBrowserTest result = apiInstance.createSyntheticsBrowserTest(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createSyntheticsBrowserTest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Create a browser test returns "OK - Returns saved rumSettings." response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_browser_test import SyntheticsBrowserTest
from datadog_api_client.v1.model.synthetics_browser_test_config import SyntheticsBrowserTestConfig
from datadog_api_client.v1.model.synthetics_browser_test_rum_settings import SyntheticsBrowserTestRumSettings
from datadog_api_client.v1.model.synthetics_browser_test_type import SyntheticsBrowserTestType
from datadog_api_client.v1.model.synthetics_config_variable import SyntheticsConfigVariable
from datadog_api_client.v1.model.synthetics_config_variable_type import SyntheticsConfigVariableType
from datadog_api_client.v1.model.synthetics_step import SyntheticsStep
from datadog_api_client.v1.model.synthetics_step_type import SyntheticsStepType
from datadog_api_client.v1.model.synthetics_test_ci_options import SyntheticsTestCiOptions
from datadog_api_client.v1.model.synthetics_test_execution_rule import SyntheticsTestExecutionRule
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest

body = SyntheticsBrowserTest(
    config=SyntheticsBrowserTestConfig(
        assertions=[],
        config_variables=[
            SyntheticsConfigVariable(
                example="content-type",
                name="PROPERTY",
                pattern="content-type",
                type=SyntheticsConfigVariableType.TEXT,
            ),
        ],
        request=SyntheticsTestRequest(
            method="GET",
            url="https://datadoghq.com",
            certificate_domains=[
                "https://datadoghq.com",
            ],
        ),
        set_cookie="name:test",
    ),
    locations=[
        "aws:us-east-2",
    ],
    message="Test message",
    name="Example-Synthetic",
    options=SyntheticsTestOptions(
        accept_self_signed=False,
        allow_insecure=True,
        device_ids=[
            "tablet",
        ],
        disable_cors=True,
        follow_redirects=True,
        min_failure_duration=10,
        min_location_failed=1,
        no_screenshot=True,
        retry=SyntheticsTestOptionsRetry(
            count=2,
            interval=10.0,
        ),
        rum_settings=SyntheticsBrowserTestRumSettings(
            is_enabled=True,
            application_id="mockApplicationId",
            client_token_id=12345,
        ),
        tick_every=300,
        ci=SyntheticsTestCiOptions(
            execution_rule=SyntheticsTestExecutionRule.SKIPPED,
        ),
        ignore_server_certificate_error=True,
        disable_csp=True,
        initial_navigation_timeout=200,
    ),
    tags=[
        "testing:browser",
    ],
    type=SyntheticsBrowserTestType.BROWSER,
    steps=[
        SyntheticsStep(
            allow_failure=False,
            is_critical=True,
            name="Refresh page",
            params=dict(),
            type=SyntheticsStepType.REFRESH,
        ),
    ],
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_synthetics_browser_test(body=body)

    print(response)
```

##### 

```python
"""
Create a browser test returns "OK - Returns the created test details." response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_browser_test import SyntheticsBrowserTest
from datadog_api_client.v1.model.synthetics_browser_test_config import SyntheticsBrowserTestConfig
from datadog_api_client.v1.model.synthetics_browser_test_type import SyntheticsBrowserTestType
from datadog_api_client.v1.model.synthetics_browser_variable import SyntheticsBrowserVariable
from datadog_api_client.v1.model.synthetics_browser_variable_type import SyntheticsBrowserVariableType
from datadog_api_client.v1.model.synthetics_config_variable import SyntheticsConfigVariable
from datadog_api_client.v1.model.synthetics_config_variable_type import SyntheticsConfigVariableType
from datadog_api_client.v1.model.synthetics_step import SyntheticsStep
from datadog_api_client.v1.model.synthetics_step_type import SyntheticsStepType
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest

body = SyntheticsBrowserTest(
    config=SyntheticsBrowserTestConfig(
        assertions=[],
        variables=[
            SyntheticsBrowserVariable(
                type=SyntheticsBrowserVariableType.TEXT,
                name="TEST_VARIABLE",
                pattern="secret",
                secure=True,
                example="secret",
            ),
        ],
        config_variables=[
            SyntheticsConfigVariable(
                example="content-type",
                name="PROPERTY",
                pattern="content-type",
                type=SyntheticsConfigVariableType.TEXT,
                secure=True,
            ),
        ],
        request=SyntheticsTestRequest(
            method="GET",
            url="https://datadoghq.com",
        ),
        set_cookie="name:test",
    ),
    locations=[
        "aws:us-east-2",
    ],
    message="Test message",
    name="Example-Synthetic",
    options=SyntheticsTestOptions(
        accept_self_signed=False,
        allow_insecure=True,
        device_ids=[
            "chrome.laptop_large",
        ],
        disable_cors=True,
        follow_redirects=True,
        min_failure_duration=10,
        min_location_failed=1,
        no_screenshot=True,
        retry=SyntheticsTestOptionsRetry(
            count=2,
            interval=10.0,
        ),
        tick_every=300,
        enable_profiling=True,
        enable_security_testing=True,
    ),
    tags=[
        "testing:browser",
    ],
    type=SyntheticsBrowserTestType.BROWSER,
    steps=[
        SyntheticsStep(
            allow_failure=False,
            always_execute=True,
            exit_if_succeed=True,
            is_critical=True,
            name="Refresh page",
            params=dict(),
            type=SyntheticsStepType.REFRESH,
        ),
    ],
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_synthetics_browser_test(body=body)

    print(response)
```

##### 

```python
"""
Create a browser test with advanced scheduling options returns "OK - Returns the created test details." response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_browser_test import SyntheticsBrowserTest
from datadog_api_client.v1.model.synthetics_browser_test_config import SyntheticsBrowserTestConfig
from datadog_api_client.v1.model.synthetics_browser_test_type import SyntheticsBrowserTestType
from datadog_api_client.v1.model.synthetics_config_variable import SyntheticsConfigVariable
from datadog_api_client.v1.model.synthetics_config_variable_type import SyntheticsConfigVariableType
from datadog_api_client.v1.model.synthetics_step import SyntheticsStep
from datadog_api_client.v1.model.synthetics_step_type import SyntheticsStepType
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry
from datadog_api_client.v1.model.synthetics_test_options_scheduling import SyntheticsTestOptionsScheduling
from datadog_api_client.v1.model.synthetics_test_options_scheduling_timeframe import (
    SyntheticsTestOptionsSchedulingTimeframe,
)
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest

body = SyntheticsBrowserTest(
    config=SyntheticsBrowserTestConfig(
        assertions=[],
        config_variables=[
            SyntheticsConfigVariable(
                example="content-type",
                name="PROPERTY",
                pattern="content-type",
                type=SyntheticsConfigVariableType.TEXT,
            ),
        ],
        request=SyntheticsTestRequest(
            method="GET",
            url="https://datadoghq.com",
        ),
        set_cookie="name:test",
    ),
    locations=[
        "aws:us-east-2",
    ],
    message="Test message",
    name="Example-Synthetic",
    options=SyntheticsTestOptions(
        accept_self_signed=False,
        allow_insecure=True,
        device_ids=[
            "tablet",
        ],
        disable_cors=True,
        follow_redirects=True,
        min_failure_duration=10,
        min_location_failed=1,
        no_screenshot=True,
        retry=SyntheticsTestOptionsRetry(
            count=2,
            interval=10.0,
        ),
        tick_every=300,
        scheduling=SyntheticsTestOptionsScheduling(
            timeframes=[
                SyntheticsTestOptionsSchedulingTimeframe(
                    day=1,
                    _from="07:00",
                    to="16:00",
                ),
                SyntheticsTestOptionsSchedulingTimeframe(
                    day=3,
                    _from="07:00",
                    to="16:00",
                ),
            ],
            timezone="America/New_York",
        ),
    ),
    tags=[
        "testing:browser",
    ],
    type=SyntheticsBrowserTestType.BROWSER,
    steps=[
        SyntheticsStep(
            allow_failure=False,
            is_critical=True,
            name="Refresh page",
            params=dict(),
            type=SyntheticsStepType.REFRESH,
        ),
    ],
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_synthetics_browser_test(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Create a browser test returns "OK - Returns saved rumSettings." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
  config: DatadogAPIClient::V1::SyntheticsBrowserTestConfig.new({
    assertions: [],
    config_variables: [
      DatadogAPIClient::V1::SyntheticsConfigVariable.new({
        example: "content-type",
        name: "PROPERTY",
        pattern: "content-type",
        type: DatadogAPIClient::V1::SyntheticsConfigVariableType::TEXT,
      }),
    ],
    request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
      method: "GET",
      url: "https://datadoghq.com",
      certificate_domains: [
        "https://datadoghq.com",
      ],
    }),
    set_cookie: "name:test",
  }),
  locations: [
    "aws:us-east-2",
  ],
  message: "Test message",
  name: "Example-Synthetic",
  options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
    accept_self_signed: false,
    allow_insecure: true,
    device_ids: [
      "tablet",
    ],
    disable_cors: true,
    follow_redirects: true,
    min_failure_duration: 10,
    min_location_failed: 1,
    no_screenshot: true,
    _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
      count: 2,
      interval: 10,
    }),
    rum_settings: DatadogAPIClient::V1::SyntheticsBrowserTestRumSettings.new({
      is_enabled: true,
      application_id: "mockApplicationId",
      client_token_id: 12345,
    }),
    tick_every: 300,
    ci: DatadogAPIClient::V1::SyntheticsTestCiOptions.new({
      execution_rule: DatadogAPIClient::V1::SyntheticsTestExecutionRule::SKIPPED,
    }),
    ignore_server_certificate_error: true,
    disable_csp: true,
    initial_navigation_timeout: 200,
  }),
  tags: [
    "testing:browser",
  ],
  type: DatadogAPIClient::V1::SyntheticsBrowserTestType::BROWSER,
  steps: [
    DatadogAPIClient::V1::SyntheticsStep.new({
      allow_failure: false,
      is_critical: true,
      name: "Refresh page",
      params: {},
      type: DatadogAPIClient::V1::SyntheticsStepType::REFRESH,
    }),
  ],
})
p api_instance.create_synthetics_browser_test(body)
```

##### 

```ruby
# Create a browser test returns "OK - Returns the created test details." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
  config: DatadogAPIClient::V1::SyntheticsBrowserTestConfig.new({
    assertions: [],
    variables: [
      DatadogAPIClient::V1::SyntheticsBrowserVariable.new({
        type: DatadogAPIClient::V1::SyntheticsBrowserVariableType::TEXT,
        name: "TEST_VARIABLE",
        pattern: "secret",
        secure: true,
        example: "secret",
      }),
    ],
    config_variables: [
      DatadogAPIClient::V1::SyntheticsConfigVariable.new({
        example: "content-type",
        name: "PROPERTY",
        pattern: "content-type",
        type: DatadogAPIClient::V1::SyntheticsConfigVariableType::TEXT,
        secure: true,
      }),
    ],
    request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
      method: "GET",
      url: "https://datadoghq.com",
    }),
    set_cookie: "name:test",
  }),
  locations: [
    "aws:us-east-2",
  ],
  message: "Test message",
  name: "Example-Synthetic",
  options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
    accept_self_signed: false,
    allow_insecure: true,
    device_ids: [
      "chrome.laptop_large",
    ],
    disable_cors: true,
    follow_redirects: true,
    min_failure_duration: 10,
    min_location_failed: 1,
    no_screenshot: true,
    _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
      count: 2,
      interval: 10,
    }),
    tick_every: 300,
    enable_profiling: true,
    enable_security_testing: true,
  }),
  tags: [
    "testing:browser",
  ],
  type: DatadogAPIClient::V1::SyntheticsBrowserTestType::BROWSER,
  steps: [
    DatadogAPIClient::V1::SyntheticsStep.new({
      allow_failure: false,
      always_execute: true,
      exit_if_succeed: true,
      is_critical: true,
      name: "Refresh page",
      params: {},
      type: DatadogAPIClient::V1::SyntheticsStepType::REFRESH,
    }),
  ],
})
p api_instance.create_synthetics_browser_test(body)
```

##### 

```ruby
# Create a browser test with advanced scheduling options returns "OK - Returns the created test details." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
  config: DatadogAPIClient::V1::SyntheticsBrowserTestConfig.new({
    assertions: [],
    config_variables: [
      DatadogAPIClient::V1::SyntheticsConfigVariable.new({
        example: "content-type",
        name: "PROPERTY",
        pattern: "content-type",
        type: DatadogAPIClient::V1::SyntheticsConfigVariableType::TEXT,
      }),
    ],
    request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
      method: "GET",
      url: "https://datadoghq.com",
    }),
    set_cookie: "name:test",
  }),
  locations: [
    "aws:us-east-2",
  ],
  message: "Test message",
  name: "Example-Synthetic",
  options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
    accept_self_signed: false,
    allow_insecure: true,
    device_ids: [
      "tablet",
    ],
    disable_cors: true,
    follow_redirects: true,
    min_failure_duration: 10,
    min_location_failed: 1,
    no_screenshot: true,
    _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
      count: 2,
      interval: 10,
    }),
    tick_every: 300,
    scheduling: DatadogAPIClient::V1::SyntheticsTestOptionsScheduling.new({
      timeframes: [
        DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe.new({
          day: 1,
          from: "07:00",
          to: "16:00",
        }),
        DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe.new({
          day: 3,
          from: "07:00",
          to: "16:00",
        }),
      ],
      timezone: "America/New_York",
    }),
  }),
  tags: [
    "testing:browser",
  ],
  type: DatadogAPIClient::V1::SyntheticsBrowserTestType::BROWSER,
  steps: [
    DatadogAPIClient::V1::SyntheticsStep.new({
      allow_failure: false,
      is_critical: true,
      name: "Refresh page",
      params: {},
      type: DatadogAPIClient::V1::SyntheticsStepType::REFRESH,
    }),
  ],
})
p api_instance.create_synthetics_browser_test(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Create a browser test returns "OK - Returns saved rumSettings." response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTest;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestConfig;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestRumSettings;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestType;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariable;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariableType;
use datadog_api_client::datadogV1::model::SyntheticsStep;
use datadog_api_client::datadogV1::model::SyntheticsStepType;
use datadog_api_client::datadogV1::model::SyntheticsTestCiOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestExecutionRule;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsRetry;
use datadog_api_client::datadogV1::model::SyntheticsTestRequest;
use std::collections::BTreeMap;

#[tokio::main]
async fn main() {
    let body = SyntheticsBrowserTest::new(
        SyntheticsBrowserTestConfig::new(
            vec![],
            SyntheticsTestRequest::new()
                .certificate_domains(vec!["https://datadoghq.com".to_string()])
                .method("GET".to_string())
                .url("https://datadoghq.com".to_string()),
        )
        .config_variables(vec![SyntheticsConfigVariable::new(
            "PROPERTY".to_string(),
            SyntheticsConfigVariableType::TEXT,
        )
        .example("content-type".to_string())
        .pattern("content-type".to_string())])
        .set_cookie("name:test".to_string()),
        vec!["aws:us-east-2".to_string()],
        "Test message".to_string(),
        "Example-Synthetic".to_string(),
        SyntheticsTestOptions::new()
            .accept_self_signed(false)
            .allow_insecure(true)
            .ci(SyntheticsTestCiOptions::new(
                SyntheticsTestExecutionRule::SKIPPED,
            ))
            .device_ids(vec!["tablet".to_string()])
            .disable_cors(true)
            .disable_csp(true)
            .follow_redirects(true)
            .ignore_server_certificate_error(true)
            .initial_navigation_timeout(200)
            .min_failure_duration(10)
            .min_location_failed(1)
            .no_screenshot(true)
            .retry(
                SyntheticsTestOptionsRetry::new()
                    .count(2)
                    .interval(10.0 as f64),
            )
            .rum_settings(
                SyntheticsBrowserTestRumSettings::new(true)
                    .application_id("mockApplicationId".to_string())
                    .client_token_id(12345),
            )
            .tick_every(300),
        SyntheticsBrowserTestType::BROWSER,
    )
    .steps(vec![SyntheticsStep::new()
        .allow_failure(false)
        .is_critical(true)
        .name("Refresh page".to_string())
        .params(BTreeMap::new())
        .type_(SyntheticsStepType::REFRESH)])
    .tags(vec!["testing:browser".to_string()]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_synthetics_browser_test(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

##### 

```rust
// Create a browser test returns "OK - Returns the created test details." response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTest;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestConfig;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestType;
use datadog_api_client::datadogV1::model::SyntheticsBrowserVariable;
use datadog_api_client::datadogV1::model::SyntheticsBrowserVariableType;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariable;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariableType;
use datadog_api_client::datadogV1::model::SyntheticsStep;
use datadog_api_client::datadogV1::model::SyntheticsStepType;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsRetry;
use datadog_api_client::datadogV1::model::SyntheticsTestRequest;
use std::collections::BTreeMap;

#[tokio::main]
async fn main() {
    let body = SyntheticsBrowserTest::new(
        SyntheticsBrowserTestConfig::new(
            vec![],
            SyntheticsTestRequest::new()
                .method("GET".to_string())
                .url("https://datadoghq.com".to_string()),
        )
        .config_variables(vec![SyntheticsConfigVariable::new(
            "PROPERTY".to_string(),
            SyntheticsConfigVariableType::TEXT,
        )
        .example("content-type".to_string())
        .pattern("content-type".to_string())
        .secure(true)])
        .set_cookie("name:test".to_string())
        .variables(vec![SyntheticsBrowserVariable::new(
            "TEST_VARIABLE".to_string(),
            SyntheticsBrowserVariableType::TEXT,
        )
        .example("secret".to_string())
        .pattern("secret".to_string())
        .secure(true)]),
        vec!["aws:us-east-2".to_string()],
        "Test message".to_string(),
        "Example-Synthetic".to_string(),
        SyntheticsTestOptions::new()
            .accept_self_signed(false)
            .allow_insecure(true)
            .device_ids(vec!["chrome.laptop_large".to_string()])
            .disable_cors(true)
            .enable_profiling(true)
            .enable_security_testing(true)
            .follow_redirects(true)
            .min_failure_duration(10)
            .min_location_failed(1)
            .no_screenshot(true)
            .retry(
                SyntheticsTestOptionsRetry::new()
                    .count(2)
                    .interval(10.0 as f64),
            )
            .tick_every(300),
        SyntheticsBrowserTestType::BROWSER,
    )
    .steps(vec![SyntheticsStep::new()
        .allow_failure(false)
        .always_execute(true)
        .exit_if_succeed(true)
        .is_critical(true)
        .name("Refresh page".to_string())
        .params(BTreeMap::new())
        .type_(SyntheticsStepType::REFRESH)])
    .tags(vec!["testing:browser".to_string()]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_synthetics_browser_test(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

##### 

```rust
// Create a browser test with advanced scheduling options returns "OK - Returns
// the created test details." response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTest;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestConfig;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestType;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariable;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariableType;
use datadog_api_client::datadogV1::model::SyntheticsStep;
use datadog_api_client::datadogV1::model::SyntheticsStepType;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsRetry;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsScheduling;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsSchedulingTimeframe;
use datadog_api_client::datadogV1::model::SyntheticsTestRequest;
use std::collections::BTreeMap;

#[tokio::main]
async fn main() {
    let body = SyntheticsBrowserTest::new(
        SyntheticsBrowserTestConfig::new(
            vec![],
            SyntheticsTestRequest::new()
                .method("GET".to_string())
                .url("https://datadoghq.com".to_string()),
        )
        .config_variables(vec![SyntheticsConfigVariable::new(
            "PROPERTY".to_string(),
            SyntheticsConfigVariableType::TEXT,
        )
        .example("content-type".to_string())
        .pattern("content-type".to_string())])
        .set_cookie("name:test".to_string()),
        vec!["aws:us-east-2".to_string()],
        "Test message".to_string(),
        "Example-Synthetic".to_string(),
        SyntheticsTestOptions::new()
            .accept_self_signed(false)
            .allow_insecure(true)
            .device_ids(vec!["tablet".to_string()])
            .disable_cors(true)
            .follow_redirects(true)
            .min_failure_duration(10)
            .min_location_failed(1)
            .no_screenshot(true)
            .retry(
                SyntheticsTestOptionsRetry::new()
                    .count(2)
                    .interval(10.0 as f64),
            )
            .scheduling(SyntheticsTestOptionsScheduling::new(
                vec![
                    SyntheticsTestOptionsSchedulingTimeframe::new(
                        1,
                        "07:00".to_string(),
                        "16:00".to_string(),
                    ),
                    SyntheticsTestOptionsSchedulingTimeframe::new(
                        3,
                        "07:00".to_string(),
                        "16:00".to_string(),
                    ),
                ],
                "America/New_York".to_string(),
            ))
            .tick_every(300),
        SyntheticsBrowserTestType::BROWSER,
    )
    .steps(vec![SyntheticsStep::new()
        .allow_failure(false)
        .is_critical(true)
        .name("Refresh page".to_string())
        .params(BTreeMap::new())
        .type_(SyntheticsStepType::REFRESH)])
    .tags(vec!["testing:browser".to_string()]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_synthetics_browser_test(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Create a browser test returns "OK - Returns saved rumSettings." response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiCreateSyntheticsBrowserTestRequest = {
  body: {
    config: {
      assertions: [],
      configVariables: [
        {
          example: "content-type",
          name: "PROPERTY",
          pattern: "content-type",
          type: "text",
        },
      ],
      request: {
        method: "GET",
        url: "https://datadoghq.com",
        certificateDomains: ["https://datadoghq.com"],
      },
      setCookie: "name:test",
    },
    locations: ["aws:us-east-2"],
    message: "Test message",
    name: "Example-Synthetic",
    options: {
      acceptSelfSigned: false,
      allowInsecure: true,
      deviceIds: ["tablet"],
      disableCors: true,
      followRedirects: true,
      minFailureDuration: 10,
      minLocationFailed: 1,
      noScreenshot: true,
      retry: {
        count: 2,
        interval: 10,
      },
      rumSettings: {
        isEnabled: true,
        applicationId: "mockApplicationId",
        clientTokenId: 12345,
      },
      tickEvery: 300,
      ci: {
        executionRule: "skipped",
      },
      ignoreServerCertificateError: true,
      disableCsp: true,
      initialNavigationTimeout: 200,
    },
    tags: ["testing:browser"],
    type: "browser",
    steps: [
      {
        allowFailure: false,
        isCritical: true,
        name: "Refresh page",
        params: {},
        type: "refresh",
      },
    ],
  },
};

apiInstance
  .createSyntheticsBrowserTest(params)
  .then((data: v1.SyntheticsBrowserTest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

##### 

```typescript
/**
 * Create a browser test returns "OK - Returns the created test details." response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiCreateSyntheticsBrowserTestRequest = {
  body: {
    config: {
      assertions: [],
      variables: [
        {
          type: "text",
          name: "TEST_VARIABLE",
          pattern: "secret",
          secure: true,
          example: "secret",
        },
      ],
      configVariables: [
        {
          example: "content-type",
          name: "PROPERTY",
          pattern: "content-type",
          type: "text",
          secure: true,
        },
      ],
      request: {
        method: "GET",
        url: "https://datadoghq.com",
      },
      setCookie: "name:test",
    },
    locations: ["aws:us-east-2"],
    message: "Test message",
    name: "Example-Synthetic",
    options: {
      acceptSelfSigned: false,
      allowInsecure: true,
      deviceIds: ["chrome.laptop_large"],
      disableCors: true,
      followRedirects: true,
      minFailureDuration: 10,
      minLocationFailed: 1,
      noScreenshot: true,
      retry: {
        count: 2,
        interval: 10,
      },
      tickEvery: 300,
      enableProfiling: true,
      enableSecurityTesting: true,
    },
    tags: ["testing:browser"],
    type: "browser",
    steps: [
      {
        allowFailure: false,
        alwaysExecute: true,
        exitIfSucceed: true,
        isCritical: true,
        name: "Refresh page",
        params: {},
        type: "refresh",
      },
    ],
  },
};

apiInstance
  .createSyntheticsBrowserTest(params)
  .then((data: v1.SyntheticsBrowserTest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

##### 

```typescript
/**
 * Create a browser test with advanced scheduling options returns "OK - Returns the created test details." response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiCreateSyntheticsBrowserTestRequest = {
  body: {
    config: {
      assertions: [],
      configVariables: [
        {
          example: "content-type",
          name: "PROPERTY",
          pattern: "content-type",
          type: "text",
        },
      ],
      request: {
        method: "GET",
        url: "https://datadoghq.com",
      },
      setCookie: "name:test",
    },
    locations: ["aws:us-east-2"],
    message: "Test message",
    name: "Example-Synthetic",
    options: {
      acceptSelfSigned: false,
      allowInsecure: true,
      deviceIds: ["tablet"],
      disableCors: true,
      followRedirects: true,
      minFailureDuration: 10,
      minLocationFailed: 1,
      noScreenshot: true,
      retry: {
        count: 2,
        interval: 10,
      },
      tickEvery: 300,
      scheduling: {
        timeframes: [
          {
            day: 1,
            from: "07:00",
            to: "16:00",
          },
          {
            day: 3,
            from: "07:00",
            to: "16:00",
          },
        ],
        timezone: "America/New_York",
      },
    },
    tags: ["testing:browser"],
    type: "browser",
    steps: [
      {
        allowFailure: false,
        isCritical: true,
        name: "Refresh page",
        params: {},
        type: "refresh",
      },
    ],
  },
};

apiInstance
  .createSyntheticsBrowserTest(params)
  .then((data: v1.SyntheticsBrowserTest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Create a mobile test{% #create-a-mobile-test %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                      |
| ----------------- | ----------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v1/synthetics/tests/mobile |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v1/synthetics/tests/mobile |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v1/synthetics/tests/mobile      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v1/synthetics/tests/mobile      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v1/synthetics/tests/mobile     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v1/synthetics/tests/mobile |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v1/synthetics/tests/mobile |

### Overview

Create a Synthetic mobile test. This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)

Details of the test to create.

{% tab title="Model" %}

| Parent field         | Field                               | Type          | Description                                                                                                                                                                                                            |
| -------------------- | ----------------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]            | object        | Configuration object for a Synthetic mobile test.                                                                                                                                                                      |
| config               | initialApplicationArguments         | object        | Initial application arguments for a mobile test.                                                                                                                                                                       |
| additionalProperties | <any-key>                           | string        | A single application argument.                                                                                                                                                                                         |
| config               | variables                           | [object]      | Array of variables used for the test steps.                                                                                                                                                                            |
| variables            | example                             | string        | Example for the variable.                                                                                                                                                                                              |
| variables            | id                                  | string        | ID of the variable for global variables.                                                                                                                                                                               |
| variables            | name [*required*]              | string        | Name of the variable.                                                                                                                                                                                                  |
| variables            | pattern                             | string        | Pattern of the variable.                                                                                                                                                                                               |
| variables            | secure                              | boolean       | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                       |
| variables            | type [*required*]              | enum          | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                           |
|                      | device_ids                          | [string]      | Array with the different device IDs used to run the test.                                                                                                                                                              |
|                      | message [*required*]           | string        | Notification message associated with the test.                                                                                                                                                                         |
|                      | monitor_id                          | int64         | The associated monitor ID.                                                                                                                                                                                             |
|                      | name [*required*]              | string        | Name of the test.                                                                                                                                                                                                      |
|                      | options [*required*]           | object        | Object describing the extra options for a Synthetic test.                                                                                                                                                              |
| options              | allowApplicationCrash               | boolean       | A boolean to set if an application crash would mark the test as failed.                                                                                                                                                |
| options              | bindings                            | [object]      | Array of bindings used for the mobile test.                                                                                                                                                                            |
| bindings             | principals                          | [string]      | List of principals for a mobile test binding.                                                                                                                                                                          |
| bindings             | relation                            | enum          | The type of relation for the binding. Allowed enum values: `editor,viewer`                                                                                                                                             |
| options              | ci                                  | object        | CI/CD options for a Synthetic test.                                                                                                                                                                                    |
| ci                   | executionRule [*required*]     | enum          | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                              |
| options              | defaultStepTimeout                  | int32         | The default timeout for steps in the test (in seconds).                                                                                                                                                                |
| options              | device_ids [*required*]        | [string]      | For mobile test, array with the different device IDs used to run the test.                                                                                                                                             |
| options              | disableAutoAcceptAlert              | boolean       | A boolean to disable auto accepting alerts.                                                                                                                                                                            |
| options              | min_failure_duration                | int64         | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                        |
| options              | mobileApplication [*required*] | object        | Mobile application for mobile synthetics test.                                                                                                                                                                         |
| mobileApplication    | applicationId [*required*]     | string        | Application ID of the mobile application.                                                                                                                                                                              |
| mobileApplication    | referenceId [*required*]       | string        | Reference ID of the mobile application.                                                                                                                                                                                |
| mobileApplication    | referenceType [*required*]     | enum          | Reference type for the mobile application for a mobile synthetics test. Allowed enum values: `latest,version`                                                                                                          |
| options              | monitor_name                        | string        | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                    |
| options              | monitor_options                     | object        | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                         |
| monitor_options      | escalation_message                  | string        | Message to include in the escalation notification.                                                                                                                                                                     |
| monitor_options      | notification_preset_name            | enum          | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                        |
| monitor_options      | renotify_interval                   | int64         | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                            |
| monitor_options      | renotify_occurrences                | int64         | The number of times to renotify if the test is still failing.                                                                                                                                                          |
| options              | monitor_priority                    | int32         | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                            |
| options              | noScreenshot                        | boolean       | A boolean set to not take a screenshot for the step.                                                                                                                                                                   |
| options              | restricted_roles                    | [string]      | **DEPRECATED**: 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.             |
| options              | retry                               | object        | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                     |
| retry                | count                               | int64         | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                         |
| retry                | interval                            | double        | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                    |
| options              | scheduling                          | object        | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                |
| scheduling           | timeframes [*required*]        | [object]      | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                       |
| timeframes           | day [*required*]               | int32         | Number representing the day of the week.                                                                                                                                                                               |
| timeframes           | from [*required*]              | string        | The hour of the day on which scheduling starts.                                                                                                                                                                        |
| timeframes           | to [*required*]                | string        | The hour of the day on which scheduling ends.                                                                                                                                                                          |
| scheduling           | timezone [*required*]          | string        | Timezone in which the timeframe is based.                                                                                                                                                                              |
| options              | tick_every [*required*]        | int64         | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                         |
| options              | verbosity                           | int32         | The level of verbosity for the mobile test. This field can not be set by a user.                                                                                                                                       |
|                      | public_id                           | string        | The public ID of the test.                                                                                                                                                                                             |
|                      | status                              | enum          | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                     |
|                      | steps                               | [object]      | Array of steps for the test.                                                                                                                                                                                           |
| steps                | allowFailure                        | boolean       | A boolean set to allow this step to fail.                                                                                                                                                                              |
| steps                | hasNewStepElement                   | boolean       | A boolean set to determine if the step has a new step element.                                                                                                                                                         |
| steps                | isCritical                          | boolean       | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                |
| steps                | name [*required*]              | string        | The name of the step.                                                                                                                                                                                                  |
| steps                | noScreenshot                        | boolean       | A boolean set to not take a screenshot for the step.                                                                                                                                                                   |
| steps                | params [*required*]            | object        | The parameters of a mobile step.                                                                                                                                                                                       |
| params               | check                               | enum          | Type of assertion to apply in an API test. Allowed enum values: `equals,notEquals,contains,notContains,startsWith,notStartsWith,greater,lower,greaterEquals,lowerEquals`                                               |
| params               | delay                               | int64         | Number of milliseconds to wait between inputs in a `typeText` step type.                                                                                                                                               |
| params               | direction                           | enum          | The direction of the scroll for a `scrollToElement` step type. Allowed enum values: `up,down,left,right`                                                                                                               |
| params               | element                             | object        | Information about the element used for a step.                                                                                                                                                                         |
| element              | context                             | string        | Context of the element.                                                                                                                                                                                                |
| element              | contextType                         | enum          | Type of the context that the element is in. Allowed enum values: `native,web`                                                                                                                                          |
| element              | elementDescription                  | string        | Description of the element.                                                                                                                                                                                            |
| element              | multiLocator                        | object        | Multi-locator to find the element.                                                                                                                                                                                     |
| element              | relativePosition                    | object        | Position of the action relative to the element.                                                                                                                                                                        |
| relativePosition     | x                                   | double        | The `relativePosition` on the `x` axis for the element.                                                                                                                                                                |
| relativePosition     | y                                   | double        | The `relativePosition` on the `y` axis for the element.                                                                                                                                                                |
| element              | textContent                         | string        | Text content of the element.                                                                                                                                                                                           |
| element              | userLocator                         | object        | User locator to find the element.                                                                                                                                                                                      |
| userLocator          | failTestOnCannotLocate              | boolean       | Whether if the test should fail if the element cannot be found.                                                                                                                                                        |
| userLocator          | values                              | [object]      | Values of the user locator.                                                                                                                                                                                            |
| values               | type                                | enum          | Type of a user locator. Allowed enum values: `accessibility-id,id,ios-predicate-string,ios-class-chain,xpath`                                                                                                          |
| values               | value                               | string        | Value of a user locator.                                                                                                                                                                                               |
| element              | viewName                            | string        | Name of the view of the element.                                                                                                                                                                                       |
| params               | enabled                             | boolean       | Boolean to change the state of the wifi for a `toggleWiFi` step type.                                                                                                                                                  |
| params               | maxScrolls                          | int64         | Maximum number of scrolls to do for a `scrollToElement` step type.                                                                                                                                                     |
| params               | positions                           | [object]      | List of positions for the `flick` step type. The maximum is 10 flicks per step                                                                                                                                         |
| positions            | x                                   | double        | The `x` position for the flick.                                                                                                                                                                                        |
| positions            | y                                   | double        | The `y` position for the flick.                                                                                                                                                                                        |
| params               | subtestPublicId                     | string        | Public ID of the test to be played as part of a `playSubTest` step type.                                                                                                                                               |
| params               | value                               |  <oneOf> | Values used in the step for in multiple step types.                                                                                                                                                                    |
| value                | Option 1                            | string        | Value used in the step for in multiple step types.                                                                                                                                                                     |
| value                | Option 2                            | int64         | Value used in the step for in multiple step types.                                                                                                                                                                     |
| params               | variable                            | object        | Variable object for `extractVariable` step type.                                                                                                                                                                       |
| variable             | example [*required*]           | string        | An example for the variable.                                                                                                                                                                                           |
| variable             | name [*required*]              | string        | The variable name.                                                                                                                                                                                                     |
| params               | withEnter                           | boolean       | Boolean to indicate if `Enter` should be pressed at the end of the `typeText` step type.                                                                                                                               |
| params               | x                                   | double        | Amount to scroll by on the `x` axis for a `scroll` step type.                                                                                                                                                          |
| params               | y                                   | double        | Amount to scroll by on the `y` axis for a `scroll` step type.                                                                                                                                                          |
| steps                | publicId                            | string        | The public ID of the step.                                                                                                                                                                                             |
| steps                | timeout                             | int64         | The time before declaring a step failed.                                                                                                                                                                               |
| steps                | type [*required*]              | enum          | Step type used in your mobile Synthetic test. Allowed enum values: `assertElementContent,assertScreenContains,assertScreenLacks,doubleTap,extractVariable,flick,openDeeplink,playSubTest,pressBack,restartApplication` |
|                      | tags                                | [string]      | Array of tags attached to the test.                                                                                                                                                                                    |
|                      | type [*required*]              | enum          | Type of the Synthetic test, `mobile`. Allowed enum values: `mobile`                                                                                                                                                    |

{% /tab %}

{% tab title="Example" %}

```json
{
  "name": "Example-Synthetic",
  "status": "paused",
  "type": "mobile",
  "config": {
    "variables": []
  },
  "message": "",
  "options": {
    "device_ids": [
      "synthetics:mobile:device:iphone_15_ios_17"
    ],
    "mobileApplication": {
      "applicationId": "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
      "referenceId": "6115922a-5f5d-455e-bc7e-7955a57f3815",
      "referenceType": "version"
    },
    "tick_every": 3600
  },
  "steps": []
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK - Returns the created test details.
{% tab title="Model" %}
Object containing details about a Synthetic mobile test.

| Parent field         | Field                               | Type          | Description                                                                                                                                                                                                            |
| -------------------- | ----------------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]            | object        | Configuration object for a Synthetic mobile test.                                                                                                                                                                      |
| config               | initialApplicationArguments         | object        | Initial application arguments for a mobile test.                                                                                                                                                                       |
| additionalProperties | <any-key>                           | string        | A single application argument.                                                                                                                                                                                         |
| config               | variables                           | [object]      | Array of variables used for the test steps.                                                                                                                                                                            |
| variables            | example                             | string        | Example for the variable.                                                                                                                                                                                              |
| variables            | id                                  | string        | ID of the variable for global variables.                                                                                                                                                                               |
| variables            | name [*required*]              | string        | Name of the variable.                                                                                                                                                                                                  |
| variables            | pattern                             | string        | Pattern of the variable.                                                                                                                                                                                               |
| variables            | secure                              | boolean       | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                       |
| variables            | type [*required*]              | enum          | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                           |
|                      | device_ids                          | [string]      | Array with the different device IDs used to run the test.                                                                                                                                                              |
|                      | message [*required*]           | string        | Notification message associated with the test.                                                                                                                                                                         |
|                      | monitor_id                          | int64         | The associated monitor ID.                                                                                                                                                                                             |
|                      | name [*required*]              | string        | Name of the test.                                                                                                                                                                                                      |
|                      | options [*required*]           | object        | Object describing the extra options for a Synthetic test.                                                                                                                                                              |
| options              | allowApplicationCrash               | boolean       | A boolean to set if an application crash would mark the test as failed.                                                                                                                                                |
| options              | bindings                            | [object]      | Array of bindings used for the mobile test.                                                                                                                                                                            |
| bindings             | principals                          | [string]      | List of principals for a mobile test binding.                                                                                                                                                                          |
| bindings             | relation                            | enum          | The type of relation for the binding. Allowed enum values: `editor,viewer`                                                                                                                                             |
| options              | ci                                  | object        | CI/CD options for a Synthetic test.                                                                                                                                                                                    |
| ci                   | executionRule [*required*]     | enum          | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                              |
| options              | defaultStepTimeout                  | int32         | The default timeout for steps in the test (in seconds).                                                                                                                                                                |
| options              | device_ids [*required*]        | [string]      | For mobile test, array with the different device IDs used to run the test.                                                                                                                                             |
| options              | disableAutoAcceptAlert              | boolean       | A boolean to disable auto accepting alerts.                                                                                                                                                                            |
| options              | min_failure_duration                | int64         | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                        |
| options              | mobileApplication [*required*] | object        | Mobile application for mobile synthetics test.                                                                                                                                                                         |
| mobileApplication    | applicationId [*required*]     | string        | Application ID of the mobile application.                                                                                                                                                                              |
| mobileApplication    | referenceId [*required*]       | string        | Reference ID of the mobile application.                                                                                                                                                                                |
| mobileApplication    | referenceType [*required*]     | enum          | Reference type for the mobile application for a mobile synthetics test. Allowed enum values: `latest,version`                                                                                                          |
| options              | monitor_name                        | string        | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                    |
| options              | monitor_options                     | object        | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                         |
| monitor_options      | escalation_message                  | string        | Message to include in the escalation notification.                                                                                                                                                                     |
| monitor_options      | notification_preset_name            | enum          | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                        |
| monitor_options      | renotify_interval                   | int64         | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                            |
| monitor_options      | renotify_occurrences                | int64         | The number of times to renotify if the test is still failing.                                                                                                                                                          |
| options              | monitor_priority                    | int32         | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                            |
| options              | noScreenshot                        | boolean       | A boolean set to not take a screenshot for the step.                                                                                                                                                                   |
| options              | restricted_roles                    | [string]      | **DEPRECATED**: 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.             |
| options              | retry                               | object        | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                     |
| retry                | count                               | int64         | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                         |
| retry                | interval                            | double        | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                    |
| options              | scheduling                          | object        | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                |
| scheduling           | timeframes [*required*]        | [object]      | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                       |
| timeframes           | day [*required*]               | int32         | Number representing the day of the week.                                                                                                                                                                               |
| timeframes           | from [*required*]              | string        | The hour of the day on which scheduling starts.                                                                                                                                                                        |
| timeframes           | to [*required*]                | string        | The hour of the day on which scheduling ends.                                                                                                                                                                          |
| scheduling           | timezone [*required*]          | string        | Timezone in which the timeframe is based.                                                                                                                                                                              |
| options              | tick_every [*required*]        | int64         | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                         |
| options              | verbosity                           | int32         | The level of verbosity for the mobile test. This field can not be set by a user.                                                                                                                                       |
|                      | public_id                           | string        | The public ID of the test.                                                                                                                                                                                             |
|                      | status                              | enum          | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                     |
|                      | steps                               | [object]      | Array of steps for the test.                                                                                                                                                                                           |
| steps                | allowFailure                        | boolean       | A boolean set to allow this step to fail.                                                                                                                                                                              |
| steps                | hasNewStepElement                   | boolean       | A boolean set to determine if the step has a new step element.                                                                                                                                                         |
| steps                | isCritical                          | boolean       | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                |
| steps                | name [*required*]              | string        | The name of the step.                                                                                                                                                                                                  |
| steps                | noScreenshot                        | boolean       | A boolean set to not take a screenshot for the step.                                                                                                                                                                   |
| steps                | params [*required*]            | object        | The parameters of a mobile step.                                                                                                                                                                                       |
| params               | check                               | enum          | Type of assertion to apply in an API test. Allowed enum values: `equals,notEquals,contains,notContains,startsWith,notStartsWith,greater,lower,greaterEquals,lowerEquals`                                               |
| params               | delay                               | int64         | Number of milliseconds to wait between inputs in a `typeText` step type.                                                                                                                                               |
| params               | direction                           | enum          | The direction of the scroll for a `scrollToElement` step type. Allowed enum values: `up,down,left,right`                                                                                                               |
| params               | element                             | object        | Information about the element used for a step.                                                                                                                                                                         |
| element              | context                             | string        | Context of the element.                                                                                                                                                                                                |
| element              | contextType                         | enum          | Type of the context that the element is in. Allowed enum values: `native,web`                                                                                                                                          |
| element              | elementDescription                  | string        | Description of the element.                                                                                                                                                                                            |
| element              | multiLocator                        | object        | Multi-locator to find the element.                                                                                                                                                                                     |
| element              | relativePosition                    | object        | Position of the action relative to the element.                                                                                                                                                                        |
| relativePosition     | x                                   | double        | The `relativePosition` on the `x` axis for the element.                                                                                                                                                                |
| relativePosition     | y                                   | double        | The `relativePosition` on the `y` axis for the element.                                                                                                                                                                |
| element              | textContent                         | string        | Text content of the element.                                                                                                                                                                                           |
| element              | userLocator                         | object        | User locator to find the element.                                                                                                                                                                                      |
| userLocator          | failTestOnCannotLocate              | boolean       | Whether if the test should fail if the element cannot be found.                                                                                                                                                        |
| userLocator          | values                              | [object]      | Values of the user locator.                                                                                                                                                                                            |
| values               | type                                | enum          | Type of a user locator. Allowed enum values: `accessibility-id,id,ios-predicate-string,ios-class-chain,xpath`                                                                                                          |
| values               | value                               | string        | Value of a user locator.                                                                                                                                                                                               |
| element              | viewName                            | string        | Name of the view of the element.                                                                                                                                                                                       |
| params               | enabled                             | boolean       | Boolean to change the state of the wifi for a `toggleWiFi` step type.                                                                                                                                                  |
| params               | maxScrolls                          | int64         | Maximum number of scrolls to do for a `scrollToElement` step type.                                                                                                                                                     |
| params               | positions                           | [object]      | List of positions for the `flick` step type. The maximum is 10 flicks per step                                                                                                                                         |
| positions            | x                                   | double        | The `x` position for the flick.                                                                                                                                                                                        |
| positions            | y                                   | double        | The `y` position for the flick.                                                                                                                                                                                        |
| params               | subtestPublicId                     | string        | Public ID of the test to be played as part of a `playSubTest` step type.                                                                                                                                               |
| params               | value                               |  <oneOf> | Values used in the step for in multiple step types.                                                                                                                                                                    |
| value                | Option 1                            | string        | Value used in the step for in multiple step types.                                                                                                                                                                     |
| value                | Option 2                            | int64         | Value used in the step for in multiple step types.                                                                                                                                                                     |
| params               | variable                            | object        | Variable object for `extractVariable` step type.                                                                                                                                                                       |
| variable             | example [*required*]           | string        | An example for the variable.                                                                                                                                                                                           |
| variable             | name [*required*]              | string        | The variable name.                                                                                                                                                                                                     |
| params               | withEnter                           | boolean       | Boolean to indicate if `Enter` should be pressed at the end of the `typeText` step type.                                                                                                                               |
| params               | x                                   | double        | Amount to scroll by on the `x` axis for a `scroll` step type.                                                                                                                                                          |
| params               | y                                   | double        | Amount to scroll by on the `y` axis for a `scroll` step type.                                                                                                                                                          |
| steps                | publicId                            | string        | The public ID of the step.                                                                                                                                                                                             |
| steps                | timeout                             | int64         | The time before declaring a step failed.                                                                                                                                                                               |
| steps                | type [*required*]              | enum          | Step type used in your mobile Synthetic test. Allowed enum values: `assertElementContent,assertScreenContains,assertScreenLacks,doubleTap,extractVariable,flick,openDeeplink,playSubTest,pressBack,restartApplication` |
|                      | tags                                | [string]      | Array of tags attached to the test.                                                                                                                                                                                    |
|                      | type [*required*]              | enum          | Type of the Synthetic test, `mobile`. Allowed enum values: `mobile`                                                                                                                                                    |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "initialApplicationArguments": {
      "<any-key>": "string"
    },
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "device_ids": [
    "chrome.laptop_large"
  ],
  "message": "Notification message",
  "monitor_id": 12345678,
  "name": "Example test name",
  "options": {
    "allowApplicationCrash": false,
    "bindings": [
      {
        "principals": [],
        "relation": "string"
      }
    ],
    "ci": {
      "executionRule": "blocking"
    },
    "defaultStepTimeout": "integer",
    "device_ids": [
      "synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"
    ],
    "disableAutoAcceptAlert": false,
    "min_failure_duration": "integer",
    "mobileApplication": {
      "applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa",
      "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab",
      "referenceType": "latest"
    },
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": 300,
    "verbosity": "integer"
  },
  "public_id": "123-abc-456",
  "status": "live",
  "steps": [
    {
      "allowFailure": false,
      "hasNewStepElement": false,
      "isCritical": false,
      "name": "",
      "noScreenshot": false,
      "params": {
        "check": "string",
        "delay": "integer",
        "direction": "string",
        "element": {
          "context": "string",
          "contextType": "string",
          "elementDescription": "string",
          "multiLocator": {},
          "relativePosition": {
            "x": "number",
            "y": "number"
          },
          "textContent": "string",
          "userLocator": {
            "failTestOnCannotLocate": false,
            "values": [
              {
                "type": "string",
                "value": "string"
              }
            ]
          },
          "viewName": "string"
        },
        "enabled": false,
        "maxScrolls": "integer",
        "positions": [
          {
            "x": "number",
            "y": "number"
          }
        ],
        "subtestPublicId": "string",
        "value": {
          "description": "undefined",
          "type": "undefined"
        },
        "variable": {
          "example": "",
          "name": "VAR_NAME"
        },
        "withEnter": false,
        "x": "number",
        "y": "number"
      },
      "publicId": "pub-lic-id0",
      "timeout": "integer",
      "type": "assertElementContent"
    }
  ],
  "tags": [
    "env:production"
  ],
  "type": "mobile"
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
- JSON format is wrong - Creation failed
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="402" %}
Test quota is reached
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/mobile" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "variables": []
  },
  "device_ids": [
    "synthetics:mobile:device:apple_iphone_14_ios_16"
  ],
  "message": "Notification message",
  "name": "Example mobile test",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "tick_every": 3600
  },
  "tags": [
    "env:production"
  ],
  "type": "mobile"
}
EOF
                        
##### 

```go
// Create a mobile test returns "OK - Returns the created test details." response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsMobileTest{
		Name:   "Example-Synthetic",
		Status: datadogV1.SYNTHETICSTESTPAUSESTATUS_PAUSED.Ptr(),
		Type:   datadogV1.SYNTHETICSMOBILETESTTYPE_MOBILE,
		Config: datadogV1.SyntheticsMobileTestConfig{
			Variables: []datadogV1.SyntheticsConfigVariable{},
		},
		Message: "",
		Options: datadogV1.SyntheticsMobileTestOptions{
			DeviceIds: []string{
				"synthetics:mobile:device:iphone_15_ios_17",
			},
			MobileApplication: datadogV1.SyntheticsMobileTestsMobileApplication{
				ApplicationId: "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
				ReferenceId:   "6115922a-5f5d-455e-bc7e-7955a57f3815",
				ReferenceType: datadogV1.SYNTHETICSMOBILETESTSMOBILEAPPLICATIONREFERENCETYPE_VERSION,
			},
			TickEvery: 3600,
		},
		Steps: []datadogV1.SyntheticsMobileStep{},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateSyntheticsMobileTest(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateSyntheticsMobileTest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateSyntheticsMobileTest`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Create a mobile test returns "OK - Returns the created test details." response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsMobileTest;
import com.datadog.api.client.v1.model.SyntheticsMobileTestConfig;
import com.datadog.api.client.v1.model.SyntheticsMobileTestOptions;
import com.datadog.api.client.v1.model.SyntheticsMobileTestType;
import com.datadog.api.client.v1.model.SyntheticsMobileTestsMobileApplication;
import com.datadog.api.client.v1.model.SyntheticsMobileTestsMobileApplicationReferenceType;
import com.datadog.api.client.v1.model.SyntheticsTestPauseStatus;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsMobileTest body =
        new SyntheticsMobileTest()
            .name("Example-Synthetic")
            .status(SyntheticsTestPauseStatus.PAUSED)
            .type(SyntheticsMobileTestType.MOBILE)
            .config(new SyntheticsMobileTestConfig())
            .message("")
            .options(
                new SyntheticsMobileTestOptions()
                    .deviceIds(
                        Collections.singletonList("synthetics:mobile:device:iphone_15_ios_17"))
                    .mobileApplication(
                        new SyntheticsMobileTestsMobileApplication()
                            .applicationId("ab0e0aed-536d-411a-9a99-5428c27d8f8e")
                            .referenceId("6115922a-5f5d-455e-bc7e-7955a57f3815")
                            .referenceType(
                                SyntheticsMobileTestsMobileApplicationReferenceType.VERSION))
                    .tickEvery(3600L));

    try {
      SyntheticsMobileTest result = apiInstance.createSyntheticsMobileTest(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createSyntheticsMobileTest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Create a mobile test returns "OK - Returns the created test details." response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_mobile_test import SyntheticsMobileTest
from datadog_api_client.v1.model.synthetics_mobile_test_config import SyntheticsMobileTestConfig
from datadog_api_client.v1.model.synthetics_mobile_test_options import SyntheticsMobileTestOptions
from datadog_api_client.v1.model.synthetics_mobile_test_type import SyntheticsMobileTestType
from datadog_api_client.v1.model.synthetics_mobile_tests_mobile_application import (
    SyntheticsMobileTestsMobileApplication,
)
from datadog_api_client.v1.model.synthetics_mobile_tests_mobile_application_reference_type import (
    SyntheticsMobileTestsMobileApplicationReferenceType,
)
from datadog_api_client.v1.model.synthetics_test_pause_status import SyntheticsTestPauseStatus

body = SyntheticsMobileTest(
    name="Example-Synthetic",
    status=SyntheticsTestPauseStatus.PAUSED,
    type=SyntheticsMobileTestType.MOBILE,
    config=SyntheticsMobileTestConfig(
        variables=[],
    ),
    message="",
    options=SyntheticsMobileTestOptions(
        device_ids=[
            "synthetics:mobile:device:iphone_15_ios_17",
        ],
        mobile_application=SyntheticsMobileTestsMobileApplication(
            application_id="ab0e0aed-536d-411a-9a99-5428c27d8f8e",
            reference_id="6115922a-5f5d-455e-bc7e-7955a57f3815",
            reference_type=SyntheticsMobileTestsMobileApplicationReferenceType.VERSION,
        ),
        tick_every=3600,
    ),
    steps=[],
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_synthetics_mobile_test(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Create a mobile test returns "OK - Returns the created test details." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsMobileTest.new({
  name: "Example-Synthetic",
  status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::PAUSED,
  type: DatadogAPIClient::V1::SyntheticsMobileTestType::MOBILE,
  config: DatadogAPIClient::V1::SyntheticsMobileTestConfig.new({
    variables: [],
  }),
  message: "",
  options: DatadogAPIClient::V1::SyntheticsMobileTestOptions.new({
    device_ids: [
      "synthetics:mobile:device:iphone_15_ios_17",
    ],
    mobile_application: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplication.new({
      application_id: "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
      reference_id: "6115922a-5f5d-455e-bc7e-7955a57f3815",
      reference_type: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
    }),
    tick_every: 3600,
  }),
  steps: [],
})
p api_instance.create_synthetics_mobile_test(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Create a mobile test returns "OK - Returns the created test details." response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsMobileTest;
use datadog_api_client::datadogV1::model::SyntheticsMobileTestConfig;
use datadog_api_client::datadogV1::model::SyntheticsMobileTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsMobileTestType;
use datadog_api_client::datadogV1::model::SyntheticsMobileTestsMobileApplication;
use datadog_api_client::datadogV1::model::SyntheticsMobileTestsMobileApplicationReferenceType;
use datadog_api_client::datadogV1::model::SyntheticsTestPauseStatus;

#[tokio::main]
async fn main() {
    let body = SyntheticsMobileTest::new(
        SyntheticsMobileTestConfig::new().variables(vec![]),
        "".to_string(),
        "Example-Synthetic".to_string(),
        SyntheticsMobileTestOptions::new(
            vec!["synthetics:mobile:device:iphone_15_ios_17".to_string()],
            SyntheticsMobileTestsMobileApplication::new(
                "ab0e0aed-536d-411a-9a99-5428c27d8f8e".to_string(),
                "6115922a-5f5d-455e-bc7e-7955a57f3815".to_string(),
                SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
            ),
            3600,
        ),
        SyntheticsMobileTestType::MOBILE,
    )
    .status(SyntheticsTestPauseStatus::PAUSED)
    .steps(vec![]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_synthetics_mobile_test(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Create a mobile test returns "OK - Returns the created test details." response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiCreateSyntheticsMobileTestRequest = {
  body: {
    name: "Example-Synthetic",
    status: "paused",
    type: "mobile",
    config: {
      variables: [],
    },
    message: "",
    options: {
      deviceIds: ["synthetics:mobile:device:iphone_15_ios_17"],
      mobileApplication: {
        applicationId: "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
        referenceId: "6115922a-5f5d-455e-bc7e-7955a57f3815",
        referenceType: "version",
      },
      tickEvery: 3600,
    },
    steps: [],
  },
};

apiInstance
  .createSyntheticsMobileTest(params)
  .then((data: v1.SyntheticsMobileTest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get the list of all Synthetic tests{% #get-the-list-of-all-synthetic-tests %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                              |
| ----------------- | --------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/tests |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/tests |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/tests      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/tests      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/tests     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/tests |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/tests |

### Overview

Get the list of all Synthetic tests. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Query Strings

| Name        | Type    | Description                                                           |
| ----------- | ------- | --------------------------------------------------------------------- |
| page_size   | integer | Used for pagination. The number of tests returned in the page.        |
| page_number | integer | Used for pagination. Which page you want to retrieve. Starts at zero. |

### Response

{% tab title="200" %}
OK - Returns the list of all Synthetic tests.
{% tab title="Model" %}
Object containing an array of Synthetic tests configuration.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | tests                                    | [object]        | Array of Synthetic tests configuration.                                                                                                                                                                                                                                                         |
| tests                | config                                   | object          | Configuration object for a Synthetic test.                                                                                                                                                                                                                                                      |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | variables                                | [object]        | Browser tests only - array of variables used for the test steps.                                                                                                                                                                                                                                |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
| tests                | creator                                  | object          | Object describing the creator of the shared element.                                                                                                                                                                                                                                            |
| creator              | email                                    | string          | Email of the creator.                                                                                                                                                                                                                                                                           |
| creator              | handle                                   | string          | Handle of the creator.                                                                                                                                                                                                                                                                          |
| creator              | name                                     | string          | Name of the creator.                                                                                                                                                                                                                                                                            |
| tests                | locations                                | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
| tests                | message                                  | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
| tests                | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
| tests                | name                                     | string          | Name of the test.                                                                                                                                                                                                                                                                               |
| tests                | options                                  | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
| tests                | public_id                                | string          | The test public ID.                                                                                                                                                                                                                                                                             |
| tests                | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
| tests                | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
| tests                | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
| tests                | type                                     | enum            | Type of the Synthetic test. Allowed enum values: `api,browser,mobile,network`                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "tests": [
    {
      "config": {
        "assertions": [
          {
            "operator": "contains",
            "property": "string",
            "target": 0,
            "timingsScope": "string",
            "type": "statusCode"
          }
        ],
        "configVariables": [
          {
            "example": "string",
            "id": "string",
            "name": "VARIABLE_NAME",
            "pattern": "string",
            "secure": false,
            "type": "text"
          }
        ],
        "request": {
          "allow_insecure": false,
          "basicAuth": {
            "password": "PaSSw0RD!",
            "type": "web",
            "username": "my_username"
          },
          "body": "string",
          "bodyType": "text/plain",
          "callType": "unary",
          "certificate": {
            "cert": {
              "content": "string",
              "filename": "string",
              "updatedAt": "string"
            },
            "key": {
              "content": "string",
              "filename": "string",
              "updatedAt": "string"
            }
          },
          "certificateDomains": [],
          "checkCertificateRevocation": false,
          "compressedJsonDescriptor": "string",
          "compressedProtoFile": "string",
          "disableAiaIntermediateFetching": false,
          "dnsServer": "string",
          "dnsServerPort": {
            "description": "undefined",
            "format": "undefined",
            "type": "undefined"
          },
          "files": [
            {
              "bucketKey": "string",
              "content": "string",
              "encoding": "string",
              "name": "string",
              "originalFileName": "string",
              "size": "integer",
              "type": "string"
            }
          ],
          "follow_redirects": false,
          "form": {
            "<any-key>": "string"
          },
          "headers": {
            "<any-key>": "string"
          },
          "host": "string",
          "httpVersion": "string",
          "isMessageBase64Encoded": false,
          "message": "string",
          "metadata": {
            "<any-key>": "string"
          },
          "method": "string",
          "noSavingResponseBody": false,
          "numberOfPackets": "integer",
          "persistCookies": false,
          "port": {
            "description": "undefined",
            "format": "undefined",
            "type": "undefined"
          },
          "proxy": {
            "headers": {
              "<any-key>": "string"
            },
            "url": "https://example.com"
          },
          "query": {},
          "servername": "string",
          "service": "Greeter",
          "shouldTrackHops": false,
          "timeout": "number",
          "url": "https://example.com"
        },
        "variables": [
          {
            "example": "string",
            "id": "string",
            "name": "VARIABLE_NAME",
            "pattern": "string",
            "secure": false,
            "type": "text"
          }
        ]
      },
      "creator": {
        "email": "string",
        "handle": "string",
        "name": "string"
      },
      "locations": [
        "aws:eu-west-3"
      ],
      "message": "string",
      "monitor_id": "integer",
      "name": "string",
      "options": {
        "accept_self_signed": false,
        "allow_insecure": false,
        "blockedRequestPatterns": [],
        "checkCertificateRevocation": false,
        "ci": {
          "executionRule": "blocking"
        },
        "device_ids": [
          "chrome.laptop_large"
        ],
        "disableAiaIntermediateFetching": false,
        "disableCors": false,
        "disableCsp": false,
        "enableProfiling": false,
        "enableSecurityTesting": false,
        "follow_redirects": false,
        "httpVersion": "string",
        "ignoreServerCertificateError": false,
        "initialNavigationTimeout": "integer",
        "min_failure_duration": "integer",
        "min_location_failed": "integer",
        "monitor_name": "string",
        "monitor_options": {
          "escalation_message": "string",
          "notification_preset_name": "string",
          "renotify_interval": "integer",
          "renotify_occurrences": "integer"
        },
        "monitor_priority": "integer",
        "noScreenshot": false,
        "restricted_roles": [
          "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        ],
        "retry": {
          "count": "integer",
          "interval": "number"
        },
        "rumSettings": {
          "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
          "clientTokenId": 12345,
          "isEnabled": true
        },
        "scheduling": {
          "timeframes": [
            {
              "day": 1,
              "from": "07:00",
              "to": "16:00"
            }
          ],
          "timezone": "America/New_York"
        },
        "tick_every": "integer"
      },
      "public_id": "string",
      "status": "live",
      "subtype": "http",
      "tags": [],
      "type": "string"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Synthetic Monitoring is not activated for the user.
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests." response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.list_tests()

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.list_tests()
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```ruby
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

dog.get_all_synthetics_tests()
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby-legacy) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests." response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.ListTests(ctx, *datadogV1.NewListTestsOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.ListTests`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.ListTests`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests."
// response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsListTestsResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsListTestsResponse result = apiInstance.listTests();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#listTests");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

initialize(**options)

api.Synthetics.get_all_tests()
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python-legacy) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"
##### 

```rust
// Get the list of all Synthetic tests returns "OK - Returns the list of all
// Synthetic tests." response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::ListTestsOptionalParams;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.list_tests(ListTestsOptionalParams::default()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests." response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

apiInstance
  .listTests()
  .then((data: v1.SyntheticsListTestsResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get a test configuration{% #get-a-test-configuration %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                          |
| ----------------- | --------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/tests/{public_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/tests/{public_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/tests/{public_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/tests/{public_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/tests/{public_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/tests/{public_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/tests/{public_id} |

### Overview

Get the detailed configuration associated with a Synthetic test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                    |
| --------------------------- | ------ | ---------------------------------------------- |
| public_id [*required*] | string | The public ID of the test to get details from. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing details about your Synthetic test, without test steps.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config                                   | object          | Configuration object for a Synthetic test.                                                                                                                                                                                                                                                      |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | variables                                | [object]        | Browser tests only - array of variables used for the test steps.                                                                                                                                                                                                                                |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | creator                                  | object          | Object describing the creator of the shared element.                                                                                                                                                                                                                                            |
| creator              | email                                    | string          | Email of the creator.                                                                                                                                                                                                                                                                           |
| creator              | handle                                   | string          | Handle of the creator.                                                                                                                                                                                                                                                                          |
| creator              | name                                     | string          | Name of the creator.                                                                                                                                                                                                                                                                            |
|                      | locations                                | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message                                  | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name                                     | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options                                  | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The test public ID.                                                                                                                                                                                                                                                                             |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type                                     | enum            | Type of the Synthetic test. Allowed enum values: `api,browser,mobile,network`                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      {
        "operator": "contains",
        "property": "string",
        "target": 0,
        "timingsScope": "string",
        "type": "statusCode"
      }
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "creator": {
    "email": "string",
    "handle": "string",
    "name": "string"
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "string",
  "monitor_id": "integer",
  "name": "string",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "public_id": "string",
  "status": "live",
  "subtype": "http",
  "tags": [],
  "type": "string"
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic is not activated for the user - Test is not owned by the user
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/${public_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get a test configuration returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_test(
        public_id="public_id",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get a test configuration returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.get_test("public_id")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```ruby
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

test_id = '<SYNTHETICS_TEST_PUBLIC_ID>'

dog = Dogapi::Client.new(api_key, app_key)

dog.get_synthetics_test('test_id'  => test_id)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby-legacy) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get a test configuration returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetTest(ctx, "public_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetTest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetTest`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get a test configuration returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsWithoutSteps;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsTestDetailsWithoutSteps result = apiInstance.getTest("public_id");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getTest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

test_id = '<SYNTHETICS_TEST_PUBLIC_ID>'

initialize(**options)

api.Synthetics.get_test(id=test_id)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python-legacy) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"
##### 

```rust
// Get a test configuration returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.get_test("public_id".to_string()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get a test configuration returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiGetTestRequest = {
  publicId: "public_id",
};

apiInstance
  .getTest(params)
  .then((data: v1.SyntheticsTestDetailsWithoutSteps) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Search Synthetic tests{% #search-synthetic-tests %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                     |
| ----------------- | ---------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/tests/search |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/tests/search |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/tests/search      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/tests/search      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/tests/search     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/tests/search |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/tests/search |

### Overview

Search for Synthetic tests. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Query Strings

| Name                | Type    | Description                                                            |
| ------------------- | ------- | ---------------------------------------------------------------------- |
| text                | string  | The search query.                                                      |
| include_full_config | boolean | If true, include the full configuration for each test in the response. |
| facets_only         | boolean | If true, return only facets instead of full test details.              |
| start               | integer | The offset from which to start returning results.                      |
| count               | integer | The maximum number of results to return.                               |
| sort                | string  | The sort order for the results (e.g., `name,asc` or `name,desc`).      |

### Response

{% tab title="200" %}
OK - Returns the list of Synthetic tests matching the search.
{% tab title="Model" %}
Object containing an array of Synthetic tests configuration.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | tests                                    | [object]        | Array of Synthetic tests configuration.                                                                                                                                                                                                                                                         |
| tests                | config                                   | object          | Configuration object for a Synthetic test.                                                                                                                                                                                                                                                      |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | variables                                | [object]        | Browser tests only - array of variables used for the test steps.                                                                                                                                                                                                                                |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
| tests                | creator                                  | object          | Object describing the creator of the shared element.                                                                                                                                                                                                                                            |
| creator              | email                                    | string          | Email of the creator.                                                                                                                                                                                                                                                                           |
| creator              | handle                                   | string          | Handle of the creator.                                                                                                                                                                                                                                                                          |
| creator              | name                                     | string          | Name of the creator.                                                                                                                                                                                                                                                                            |
| tests                | locations                                | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
| tests                | message                                  | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
| tests                | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
| tests                | name                                     | string          | Name of the test.                                                                                                                                                                                                                                                                               |
| tests                | options                                  | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
| tests                | public_id                                | string          | The test public ID.                                                                                                                                                                                                                                                                             |
| tests                | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
| tests                | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
| tests                | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
| tests                | type                                     | enum            | Type of the Synthetic test. Allowed enum values: `api,browser,mobile,network`                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "tests": [
    {
      "config": {
        "assertions": [
          {
            "operator": "contains",
            "property": "string",
            "target": 0,
            "timingsScope": "string",
            "type": "statusCode"
          }
        ],
        "configVariables": [
          {
            "example": "string",
            "id": "string",
            "name": "VARIABLE_NAME",
            "pattern": "string",
            "secure": false,
            "type": "text"
          }
        ],
        "request": {
          "allow_insecure": false,
          "basicAuth": {
            "password": "PaSSw0RD!",
            "type": "web",
            "username": "my_username"
          },
          "body": "string",
          "bodyType": "text/plain",
          "callType": "unary",
          "certificate": {
            "cert": {
              "content": "string",
              "filename": "string",
              "updatedAt": "string"
            },
            "key": {
              "content": "string",
              "filename": "string",
              "updatedAt": "string"
            }
          },
          "certificateDomains": [],
          "checkCertificateRevocation": false,
          "compressedJsonDescriptor": "string",
          "compressedProtoFile": "string",
          "disableAiaIntermediateFetching": false,
          "dnsServer": "string",
          "dnsServerPort": {
            "description": "undefined",
            "format": "undefined",
            "type": "undefined"
          },
          "files": [
            {
              "bucketKey": "string",
              "content": "string",
              "encoding": "string",
              "name": "string",
              "originalFileName": "string",
              "size": "integer",
              "type": "string"
            }
          ],
          "follow_redirects": false,
          "form": {
            "<any-key>": "string"
          },
          "headers": {
            "<any-key>": "string"
          },
          "host": "string",
          "httpVersion": "string",
          "isMessageBase64Encoded": false,
          "message": "string",
          "metadata": {
            "<any-key>": "string"
          },
          "method": "string",
          "noSavingResponseBody": false,
          "numberOfPackets": "integer",
          "persistCookies": false,
          "port": {
            "description": "undefined",
            "format": "undefined",
            "type": "undefined"
          },
          "proxy": {
            "headers": {
              "<any-key>": "string"
            },
            "url": "https://example.com"
          },
          "query": {},
          "servername": "string",
          "service": "Greeter",
          "shouldTrackHops": false,
          "timeout": "number",
          "url": "https://example.com"
        },
        "variables": [
          {
            "example": "string",
            "id": "string",
            "name": "VARIABLE_NAME",
            "pattern": "string",
            "secure": false,
            "type": "text"
          }
        ]
      },
      "creator": {
        "email": "string",
        "handle": "string",
        "name": "string"
      },
      "locations": [
        "aws:eu-west-3"
      ],
      "message": "string",
      "monitor_id": "integer",
      "name": "string",
      "options": {
        "accept_self_signed": false,
        "allow_insecure": false,
        "blockedRequestPatterns": [],
        "checkCertificateRevocation": false,
        "ci": {
          "executionRule": "blocking"
        },
        "device_ids": [
          "chrome.laptop_large"
        ],
        "disableAiaIntermediateFetching": false,
        "disableCors": false,
        "disableCsp": false,
        "enableProfiling": false,
        "enableSecurityTesting": false,
        "follow_redirects": false,
        "httpVersion": "string",
        "ignoreServerCertificateError": false,
        "initialNavigationTimeout": "integer",
        "min_failure_duration": "integer",
        "min_location_failed": "integer",
        "monitor_name": "string",
        "monitor_options": {
          "escalation_message": "string",
          "notification_preset_name": "string",
          "renotify_interval": "integer",
          "renotify_occurrences": "integer"
        },
        "monitor_priority": "integer",
        "noScreenshot": false,
        "restricted_roles": [
          "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        ],
        "retry": {
          "count": "integer",
          "interval": "number"
        },
        "rumSettings": {
          "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
          "clientTokenId": 12345,
          "isEnabled": true
        },
        "scheduling": {
          "timeframes": [
            {
              "day": 1,
              "from": "07:00",
              "to": "16:00"
            }
          ],
          "timezone": "America/New_York"
        },
        "tick_every": "integer"
      },
      "public_id": "string",
      "status": "live",
      "subtype": "http",
      "tags": [],
      "type": "string"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not found
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/search" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Search Synthetic tests returns "OK - Returns the list of Synthetic tests matching the search." response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.search_tests()

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Search Synthetic tests returns "OK - Returns the list of Synthetic tests matching the search." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.search_tests()
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Search Synthetic tests returns "OK - Returns the list of Synthetic tests matching the search." response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.SearchTests(ctx, *datadogV1.NewSearchTestsOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.SearchTests`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.SearchTests`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Search Synthetic tests returns "OK - Returns the list of Synthetic tests matching the search."
// response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsListTestsResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsListTestsResponse result = apiInstance.searchTests();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#searchTests");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Search Synthetic tests returns "OK - Returns the list of Synthetic tests
// matching the search." response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SearchTestsOptionalParams;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.search_tests(SearchTestsOptionalParams::default()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Search Synthetic tests returns "OK - Returns the list of Synthetic tests matching the search." response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

apiInstance
  .searchTests()
  .then((data: v1.SyntheticsListTestsResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get a browser test{% #get-a-browser-test %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                  |
| ----------------- | ----------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/tests/browser/{public_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/tests/browser/{public_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/tests/browser/{public_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/tests/browser/{public_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/tests/browser/{public_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/tests/browser/{public_id} |

### Overview

Get the detailed configuration (including steps) associated with a Synthetic browser test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                    |
| --------------------------- | ------ | ---------------------------------------------- |
| public_id [*required*] | string | The public ID of the test to get details from. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing details about a Synthetic browser test.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]                 | object          | Configuration object for a Synthetic browser test.                                                                                                                                                                                                                                              |
| config               | assertions [*required*]             | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                                                          |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request [*required*]                | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | setCookie                                | string          | Cookies to be used for the request, using the [Set-Cookie](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) syntax.                                                                                                                                                        |
| config               | variables                                | [object]        | Array of variables used for the test steps.                                                                                                                                                                                                                                                     |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | locations [*required*]              | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message [*required*]                | string          | Notification message associated with the test. Message can either be text or an empty string.                                                                                                                                                                                                   |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name [*required*]                   | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options [*required*]                | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The public ID of the test.                                                                                                                                                                                                                                                                      |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | steps                                    | [object]        | Array of steps for the test.                                                                                                                                                                                                                                                                    |
| steps                | allowFailure                             | boolean         | A boolean set to allow this step to fail.                                                                                                                                                                                                                                                       |
| steps                | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| steps                | exitIfSucceed                            | boolean         | A boolean set to exit the test if the step succeeds.                                                                                                                                                                                                                                            |
| steps                | isCritical                               | boolean         | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                                                                                         |
| steps                | name                                     | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| steps                | noScreenshot                             | boolean         | A boolean set to skip taking a screenshot for the step.                                                                                                                                                                                                                                         |
| steps                | params                                   | object          | The parameters of the step.                                                                                                                                                                                                                                                                     |
| steps                | public_id                                | string          | The public ID of the step.                                                                                                                                                                                                                                                                      |
| steps                | timeout                                  | int64           | The time before declaring a step failed.                                                                                                                                                                                                                                                        |
| steps                | type                                     | enum            | Step type used in your Synthetic test. Allowed enum values: `assertCurrentUrl,assertElementAttribute,assertElementContent,assertElementPresent,assertEmail,assertFileDownload,assertFromJavascript,assertPageContains,assertPageLacks,assertRequests`                                           |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type [*required*]                   | enum            | Type of the Synthetic test, `browser`. Allowed enum values: `browser`                                                                                                                                                                                                                           |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      {
        "operator": "contains",
        "property": "string",
        "target": 0,
        "timingsScope": "string",
        "type": "statusCode"
      }
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "setCookie": "string",
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "",
  "monitor_id": "integer",
  "name": "Example test name",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "public_id": "string",
  "status": "live",
  "steps": [
    {
      "allowFailure": false,
      "alwaysExecute": false,
      "exitIfSucceed": false,
      "isCritical": false,
      "name": "string",
      "noScreenshot": false,
      "params": {},
      "public_id": "string",
      "timeout": "integer",
      "type": "assertElementContent"
    }
  ],
  "tags": [
    "env:prod"
  ],
  "type": "browser"
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic Monitoring is not activated for the user - Test is not owned by the user
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/browser/${public_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get a browser test returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_browser_test(
        public_id="public_id",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get a browser test returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.get_browser_test("public_id")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get a browser test returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetBrowserTest(ctx, "public_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetBrowserTest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetBrowserTest`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get a browser test returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsBrowserTest;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsBrowserTest result = apiInstance.getBrowserTest("public_id");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getBrowserTest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Get a browser test returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.get_browser_test("public_id".to_string()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get a browser test returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiGetBrowserTestRequest = {
  publicId: "public_id",
};

apiInstance
  .getBrowserTest(params)
  .then((data: v1.SyntheticsBrowserTest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get an API test{% #get-an-api-test %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                              |
| ----------------- | ------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/tests/api/{public_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/tests/api/{public_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/tests/api/{public_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/tests/api/{public_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/tests/api/{public_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/tests/api/{public_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/tests/api/{public_id} |

### Overview

Get the detailed configuration associated with a Synthetic API test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                    |
| --------------------------- | ------ | ---------------------------------------------- |
| public_id [*required*] | string | The public ID of the test to get details from. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing details about a Synthetic API test.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]                 | object          | Configuration object for a Synthetic API test.                                                                                                                                                                                                                                                  |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | steps                                    | [ <oneOf>] | When the test subtype is `multi`, the steps of the test.                                                                                                                                                                                                                                        |
| steps                | Option 1                                 | object          | The Test step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 1             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 1             | assertions [*required*]             | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                                                          |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| Option 1             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 1             | extractedValues                          | [object]        | Array of values to parse and save as variables from the response.                                                                                                                                                                                                                               |
| extractedValues      | field                                    | string          | When type is `http_header` or `grpc_metadata`, name of the header or metadatum to extract.                                                                                                                                                                                                      |
| extractedValues      | name                                     | string          | Name of the variable to extract.                                                                                                                                                                                                                                                                |
| extractedValues      | parser                                   | object          | Details of the parser to use for the global variable.                                                                                                                                                                                                                                           |
| parser               | type [*required*]                   | enum            | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                                                                                                        |
| parser               | value                                    | string          | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                                                                                                               |
| extractedValues      | secure                                   | boolean         | Determines whether or not the extracted value will be obfuscated.                                                                                                                                                                                                                               |
| extractedValues      | type                                     | enum            | Property of the Synthetic Test Response to extract into a local variable. Allowed enum values: `grpc_message,grpc_metadata,http_body,http_header,http_status_code`                                                                                                                              |
| Option 1             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 1             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 1             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 1             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 1             | request [*required*]                | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| Option 1             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 1             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API test step. Allowed enum values: `http,grpc,ssl,dns,tcp,udp,icmp,websocket`                                                                                                                                                                          |
| steps                | Option 2                                 | object          | The Wait step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 2             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 2             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 2             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API wait step. Allowed enum values: `wait`                                                                                                                                                                                                              |
| Option 2             | value [*required*]                  | int32           | The time to wait in seconds. Minimum value: 0. Maximum value: 180.                                                                                                                                                                                                                              |
| steps                | Option 3                                 | object          | The subtest step used in a Synthetics multi-step API test.                                                                                                                                                                                                                                      |
| Option 3             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 3             | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| Option 3             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 3             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 3             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 3             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 3             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 3             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 3             | subtestPublicId [*required*]        | string          | Public ID of the test to be played as part of a `playSubTest` step type.                                                                                                                                                                                                                        |
| Option 3             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API subtest step. Allowed enum values: `playSubTest`                                                                                                                                                                                                    |
| config               | variablesFromScript                      | string          | Variables defined from JavaScript code.                                                                                                                                                                                                                                                         |
|                      | locations [*required*]              | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message [*required*]                | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name [*required*]                   | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options [*required*]                | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The public ID for the test.                                                                                                                                                                                                                                                                     |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type [*required*]                   | enum            | Type of the Synthetic test, `api`. Allowed enum values: `api`                                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      []
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "steps": [],
    "variablesFromScript": "dd.variable.set(\"FOO\", \"foo\")"
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "monitor_id": 12345678,
  "name": "Example test name",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "public_id": "123-abc-456",
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic Monitoring is not activated for the user - Test is not owned by the user
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/api/${public_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get an API test returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_api_test(
        public_id="public_id",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get an API test returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.get_api_test("public_id")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```java
// Get an API test returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsAPITest;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsAPITest result = apiInstance.getAPITest("public_id");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getAPITest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Get an API test returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.get_api_test("public_id".to_string()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get an API test returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiGetAPITestRequest = {
  publicId: "public_id",
};

apiInstance
  .getAPITest(params)
  .then((data: v1.SyntheticsAPITest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
##### 

```go
// Get an API test returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetAPITest(ctx, "public_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetAPITest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetAPITest`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
{% /tab %}

## Get a mobile test{% #get-a-mobile-test %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                 |
| ----------------- | ---------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/tests/mobile/{public_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/tests/mobile/{public_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/tests/mobile/{public_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/tests/mobile/{public_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/tests/mobile/{public_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/tests/mobile/{public_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/tests/mobile/{public_id} |

### Overview

Get the detailed configuration associated with a Synthetic mobile test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                    |
| --------------------------- | ------ | ---------------------------------------------- |
| public_id [*required*] | string | The public ID of the test to get details from. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing details about a Synthetic mobile test.

| Parent field         | Field                               | Type          | Description                                                                                                                                                                                                            |
| -------------------- | ----------------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]            | object        | Configuration object for a Synthetic mobile test.                                                                                                                                                                      |
| config               | initialApplicationArguments         | object        | Initial application arguments for a mobile test.                                                                                                                                                                       |
| additionalProperties | <any-key>                           | string        | A single application argument.                                                                                                                                                                                         |
| config               | variables                           | [object]      | Array of variables used for the test steps.                                                                                                                                                                            |
| variables            | example                             | string        | Example for the variable.                                                                                                                                                                                              |
| variables            | id                                  | string        | ID of the variable for global variables.                                                                                                                                                                               |
| variables            | name [*required*]              | string        | Name of the variable.                                                                                                                                                                                                  |
| variables            | pattern                             | string        | Pattern of the variable.                                                                                                                                                                                               |
| variables            | secure                              | boolean       | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                       |
| variables            | type [*required*]              | enum          | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                           |
|                      | device_ids                          | [string]      | Array with the different device IDs used to run the test.                                                                                                                                                              |
|                      | message [*required*]           | string        | Notification message associated with the test.                                                                                                                                                                         |
|                      | monitor_id                          | int64         | The associated monitor ID.                                                                                                                                                                                             |
|                      | name [*required*]              | string        | Name of the test.                                                                                                                                                                                                      |
|                      | options [*required*]           | object        | Object describing the extra options for a Synthetic test.                                                                                                                                                              |
| options              | allowApplicationCrash               | boolean       | A boolean to set if an application crash would mark the test as failed.                                                                                                                                                |
| options              | bindings                            | [object]      | Array of bindings used for the mobile test.                                                                                                                                                                            |
| bindings             | principals                          | [string]      | List of principals for a mobile test binding.                                                                                                                                                                          |
| bindings             | relation                            | enum          | The type of relation for the binding. Allowed enum values: `editor,viewer`                                                                                                                                             |
| options              | ci                                  | object        | CI/CD options for a Synthetic test.                                                                                                                                                                                    |
| ci                   | executionRule [*required*]     | enum          | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                              |
| options              | defaultStepTimeout                  | int32         | The default timeout for steps in the test (in seconds).                                                                                                                                                                |
| options              | device_ids [*required*]        | [string]      | For mobile test, array with the different device IDs used to run the test.                                                                                                                                             |
| options              | disableAutoAcceptAlert              | boolean       | A boolean to disable auto accepting alerts.                                                                                                                                                                            |
| options              | min_failure_duration                | int64         | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                        |
| options              | mobileApplication [*required*] | object        | Mobile application for mobile synthetics test.                                                                                                                                                                         |
| mobileApplication    | applicationId [*required*]     | string        | Application ID of the mobile application.                                                                                                                                                                              |
| mobileApplication    | referenceId [*required*]       | string        | Reference ID of the mobile application.                                                                                                                                                                                |
| mobileApplication    | referenceType [*required*]     | enum          | Reference type for the mobile application for a mobile synthetics test. Allowed enum values: `latest,version`                                                                                                          |
| options              | monitor_name                        | string        | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                    |
| options              | monitor_options                     | object        | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                         |
| monitor_options      | escalation_message                  | string        | Message to include in the escalation notification.                                                                                                                                                                     |
| monitor_options      | notification_preset_name            | enum          | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                        |
| monitor_options      | renotify_interval                   | int64         | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                            |
| monitor_options      | renotify_occurrences                | int64         | The number of times to renotify if the test is still failing.                                                                                                                                                          |
| options              | monitor_priority                    | int32         | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                            |
| options              | noScreenshot                        | boolean       | A boolean set to not take a screenshot for the step.                                                                                                                                                                   |
| options              | restricted_roles                    | [string]      | **DEPRECATED**: 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.             |
| options              | retry                               | object        | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                     |
| retry                | count                               | int64         | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                         |
| retry                | interval                            | double        | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                    |
| options              | scheduling                          | object        | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                |
| scheduling           | timeframes [*required*]        | [object]      | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                       |
| timeframes           | day [*required*]               | int32         | Number representing the day of the week.                                                                                                                                                                               |
| timeframes           | from [*required*]              | string        | The hour of the day on which scheduling starts.                                                                                                                                                                        |
| timeframes           | to [*required*]                | string        | The hour of the day on which scheduling ends.                                                                                                                                                                          |
| scheduling           | timezone [*required*]          | string        | Timezone in which the timeframe is based.                                                                                                                                                                              |
| options              | tick_every [*required*]        | int64         | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                         |
| options              | verbosity                           | int32         | The level of verbosity for the mobile test. This field can not be set by a user.                                                                                                                                       |
|                      | public_id                           | string        | The public ID of the test.                                                                                                                                                                                             |
|                      | status                              | enum          | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                     |
|                      | steps                               | [object]      | Array of steps for the test.                                                                                                                                                                                           |
| steps                | allowFailure                        | boolean       | A boolean set to allow this step to fail.                                                                                                                                                                              |
| steps                | hasNewStepElement                   | boolean       | A boolean set to determine if the step has a new step element.                                                                                                                                                         |
| steps                | isCritical                          | boolean       | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                |
| steps                | name [*required*]              | string        | The name of the step.                                                                                                                                                                                                  |
| steps                | noScreenshot                        | boolean       | A boolean set to not take a screenshot for the step.                                                                                                                                                                   |
| steps                | params [*required*]            | object        | The parameters of a mobile step.                                                                                                                                                                                       |
| params               | check                               | enum          | Type of assertion to apply in an API test. Allowed enum values: `equals,notEquals,contains,notContains,startsWith,notStartsWith,greater,lower,greaterEquals,lowerEquals`                                               |
| params               | delay                               | int64         | Number of milliseconds to wait between inputs in a `typeText` step type.                                                                                                                                               |
| params               | direction                           | enum          | The direction of the scroll for a `scrollToElement` step type. Allowed enum values: `up,down,left,right`                                                                                                               |
| params               | element                             | object        | Information about the element used for a step.                                                                                                                                                                         |
| element              | context                             | string        | Context of the element.                                                                                                                                                                                                |
| element              | contextType                         | enum          | Type of the context that the element is in. Allowed enum values: `native,web`                                                                                                                                          |
| element              | elementDescription                  | string        | Description of the element.                                                                                                                                                                                            |
| element              | multiLocator                        | object        | Multi-locator to find the element.                                                                                                                                                                                     |
| element              | relativePosition                    | object        | Position of the action relative to the element.                                                                                                                                                                        |
| relativePosition     | x                                   | double        | The `relativePosition` on the `x` axis for the element.                                                                                                                                                                |
| relativePosition     | y                                   | double        | The `relativePosition` on the `y` axis for the element.                                                                                                                                                                |
| element              | textContent                         | string        | Text content of the element.                                                                                                                                                                                           |
| element              | userLocator                         | object        | User locator to find the element.                                                                                                                                                                                      |
| userLocator          | failTestOnCannotLocate              | boolean       | Whether if the test should fail if the element cannot be found.                                                                                                                                                        |
| userLocator          | values                              | [object]      | Values of the user locator.                                                                                                                                                                                            |
| values               | type                                | enum          | Type of a user locator. Allowed enum values: `accessibility-id,id,ios-predicate-string,ios-class-chain,xpath`                                                                                                          |
| values               | value                               | string        | Value of a user locator.                                                                                                                                                                                               |
| element              | viewName                            | string        | Name of the view of the element.                                                                                                                                                                                       |
| params               | enabled                             | boolean       | Boolean to change the state of the wifi for a `toggleWiFi` step type.                                                                                                                                                  |
| params               | maxScrolls                          | int64         | Maximum number of scrolls to do for a `scrollToElement` step type.                                                                                                                                                     |
| params               | positions                           | [object]      | List of positions for the `flick` step type. The maximum is 10 flicks per step                                                                                                                                         |
| positions            | x                                   | double        | The `x` position for the flick.                                                                                                                                                                                        |
| positions            | y                                   | double        | The `y` position for the flick.                                                                                                                                                                                        |
| params               | subtestPublicId                     | string        | Public ID of the test to be played as part of a `playSubTest` step type.                                                                                                                                               |
| params               | value                               |  <oneOf> | Values used in the step for in multiple step types.                                                                                                                                                                    |
| value                | Option 1                            | string        | Value used in the step for in multiple step types.                                                                                                                                                                     |
| value                | Option 2                            | int64         | Value used in the step for in multiple step types.                                                                                                                                                                     |
| params               | variable                            | object        | Variable object for `extractVariable` step type.                                                                                                                                                                       |
| variable             | example [*required*]           | string        | An example for the variable.                                                                                                                                                                                           |
| variable             | name [*required*]              | string        | The variable name.                                                                                                                                                                                                     |
| params               | withEnter                           | boolean       | Boolean to indicate if `Enter` should be pressed at the end of the `typeText` step type.                                                                                                                               |
| params               | x                                   | double        | Amount to scroll by on the `x` axis for a `scroll` step type.                                                                                                                                                          |
| params               | y                                   | double        | Amount to scroll by on the `y` axis for a `scroll` step type.                                                                                                                                                          |
| steps                | publicId                            | string        | The public ID of the step.                                                                                                                                                                                             |
| steps                | timeout                             | int64         | The time before declaring a step failed.                                                                                                                                                                               |
| steps                | type [*required*]              | enum          | Step type used in your mobile Synthetic test. Allowed enum values: `assertElementContent,assertScreenContains,assertScreenLacks,doubleTap,extractVariable,flick,openDeeplink,playSubTest,pressBack,restartApplication` |
|                      | tags                                | [string]      | Array of tags attached to the test.                                                                                                                                                                                    |
|                      | type [*required*]              | enum          | Type of the Synthetic test, `mobile`. Allowed enum values: `mobile`                                                                                                                                                    |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "initialApplicationArguments": {
      "<any-key>": "string"
    },
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "device_ids": [
    "chrome.laptop_large"
  ],
  "message": "Notification message",
  "monitor_id": 12345678,
  "name": "Example test name",
  "options": {
    "allowApplicationCrash": false,
    "bindings": [
      {
        "principals": [],
        "relation": "string"
      }
    ],
    "ci": {
      "executionRule": "blocking"
    },
    "defaultStepTimeout": "integer",
    "device_ids": [
      "synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"
    ],
    "disableAutoAcceptAlert": false,
    "min_failure_duration": "integer",
    "mobileApplication": {
      "applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa",
      "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab",
      "referenceType": "latest"
    },
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": 300,
    "verbosity": "integer"
  },
  "public_id": "123-abc-456",
  "status": "live",
  "steps": [
    {
      "allowFailure": false,
      "hasNewStepElement": false,
      "isCritical": false,
      "name": "",
      "noScreenshot": false,
      "params": {
        "check": "string",
        "delay": "integer",
        "direction": "string",
        "element": {
          "context": "string",
          "contextType": "string",
          "elementDescription": "string",
          "multiLocator": {},
          "relativePosition": {
            "x": "number",
            "y": "number"
          },
          "textContent": "string",
          "userLocator": {
            "failTestOnCannotLocate": false,
            "values": [
              {
                "type": "string",
                "value": "string"
              }
            ]
          },
          "viewName": "string"
        },
        "enabled": false,
        "maxScrolls": "integer",
        "positions": [
          {
            "x": "number",
            "y": "number"
          }
        ],
        "subtestPublicId": "string",
        "value": {
          "description": "undefined",
          "type": "undefined"
        },
        "variable": {
          "example": "",
          "name": "VAR_NAME"
        },
        "withEnter": false,
        "x": "number",
        "y": "number"
      },
      "publicId": "pub-lic-id0",
      "timeout": "integer",
      "type": "assertElementContent"
    }
  ],
  "tags": [
    "env:production"
  ],
  "type": "mobile"
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic Monitoring is not activated for the user - Test is not owned by the user
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/mobile/${public_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get a Mobile test returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

# there is a valid "synthetics_mobile_test" in the system
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = environ["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_mobile_test(
        public_id=SYNTHETICS_MOBILE_TEST_PUBLIC_ID,
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get a Mobile test returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

# there is a valid "synthetics_mobile_test" in the system
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = ENV["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
p api_instance.get_mobile_test(SYNTHETICS_MOBILE_TEST_PUBLIC_ID)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get a Mobile test returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	// there is a valid "synthetics_mobile_test" in the system
	SyntheticsMobileTestPublicID := os.Getenv("SYNTHETICS_MOBILE_TEST_PUBLIC_ID")

	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetMobileTest(ctx, SyntheticsMobileTestPublicID)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetMobileTest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetMobileTest`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get a Mobile test returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsMobileTest;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    // there is a valid "synthetics_mobile_test" in the system
    String SYNTHETICS_MOBILE_TEST_PUBLIC_ID = System.getenv("SYNTHETICS_MOBILE_TEST_PUBLIC_ID");

    try {
      SyntheticsMobileTest result = apiInstance.getMobileTest(SYNTHETICS_MOBILE_TEST_PUBLIC_ID);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getMobileTest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Get a Mobile test returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    // there is a valid "synthetics_mobile_test" in the system
    let synthetics_mobile_test_public_id =
        std::env::var("SYNTHETICS_MOBILE_TEST_PUBLIC_ID").unwrap();
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .get_mobile_test(synthetics_mobile_test_public_id.clone())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get a Mobile test returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

// there is a valid "synthetics_mobile_test" in the system
const SYNTHETICS_MOBILE_TEST_PUBLIC_ID = process.env
  .SYNTHETICS_MOBILE_TEST_PUBLIC_ID as string;

const params: v1.SyntheticsApiGetMobileTestRequest = {
  publicId: SYNTHETICS_MOBILE_TEST_PUBLIC_ID,
};

apiInstance
  .getMobileTest(params)
  .then((data: v1.SyntheticsMobileTest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get an API test's latest results summaries{% #get-an-api-tests-latest-results-summaries %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                  |
| ----------------- | ----------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/tests/{public_id}/results |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/tests/{public_id}/results |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/tests/{public_id}/results      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/tests/{public_id}/results      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/tests/{public_id}/results     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/tests/{public_id}/results |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/tests/{public_id}/results |

### Overview

Get the last 150 test results summaries for a given Synthetic API test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                                |
| --------------------------- | ------ | ---------------------------------------------------------- |
| public_id [*required*] | string | The public ID of the test for which to search results for. |

#### Query Strings

| Name     | Type    | Description                                                     |
| -------- | ------- | --------------------------------------------------------------- |
| from_ts  | integer | Timestamp in milliseconds from which to start querying results. |
| to_ts    | integer | Timestamp in milliseconds up to which to query results.         |
| probe_dc | array   | Locations for which to query results.                           |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object with the latest Synthetic API test run.

| Parent field | Field                  | Type     | Description                                                                                                                                                                                |
| ------------ | ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|              | last_timestamp_fetched | int64    | Timestamp of the latest API test run.                                                                                                                                                      |
|              | results                | [object] | Result of the latest API test run.                                                                                                                                                         |
| results      | check_time             | double   | Last time the API test was performed.                                                                                                                                                      |
| results      | probe_dc               | string   | Location from which the API test was performed.                                                                                                                                            |
| results      | result                 | object   | Result of the last API test run.                                                                                                                                                           |
| result       | passed                 | boolean  | Describes if the test run has passed or failed.                                                                                                                                            |
| result       | timings                | object   | Object containing all metrics and their values collected for a Synthetic API test. See the [Synthetic Monitoring Metrics documentation](https://docs.datadoghq.com/synthetics/metrics.md). |
| timings      | dns                    | double   | The duration in millisecond of the DNS lookup.                                                                                                                                             |
| timings      | download               | double   | The time in millisecond to download the response.                                                                                                                                          |
| timings      | firstByte              | double   | The time in millisecond to first byte.                                                                                                                                                     |
| timings      | handshake              | double   | The duration in millisecond of the TLS handshake.                                                                                                                                          |
| timings      | redirect               | double   | The time in millisecond spent during redirections.                                                                                                                                         |
| timings      | ssl                    | double   | The duration in millisecond of the TLS handshake.                                                                                                                                          |
| timings      | tcp                    | double   | Time in millisecond to establish the TCP connection.                                                                                                                                       |
| timings      | total                  | double   | The overall time in millisecond the request took to be processed.                                                                                                                          |
| timings      | wait                   | double   | Time spent in millisecond waiting for a response.                                                                                                                                          |
| results      | result_id              | string   | ID of the API test result.                                                                                                                                                                 |
| results      | status                 | enum     | The status of your Synthetic monitor.                                                                                                                                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "last_timestamp_fetched": "integer",
  "results": [
    {
      "check_time": "number",
      "probe_dc": "string",
      "result": {
        "passed": false,
        "timings": {
          "dns": "number",
          "download": "number",
          "firstByte": "number",
          "handshake": "number",
          "redirect": "number",
          "ssl": "number",
          "tcp": "number",
          "total": "number",
          "wait": "number"
        }
      },
      "result_id": "string",
      "status": "integer"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic is not activated for the user - Test is not owned by the user
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/${public_id}/results" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get an API test's latest results summaries returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_api_test_latest_results(
        public_id="hwb-332-3xe",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get an API test's latest results summaries returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.get_api_test_latest_results("hwb-332-3xe")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```ruby
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

test_id = '<SYNTHETICS_TEST_PUBLIC_ID>'

dog = Dogapi::Client.new(api_key, app_key)

dog.get_synthetics_results('test_id'  => test_id)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby-legacy) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get an API test's latest results summaries returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetAPITestLatestResults(ctx, "hwb-332-3xe", *datadogV1.NewGetAPITestLatestResultsOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetAPITestLatestResults`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetAPITestLatestResults`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get an API test's latest results summaries returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsGetAPITestLatestResultsResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsGetAPITestLatestResultsResponse result =
          apiInstance.getAPITestLatestResults("hwb-332-3xe");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getAPITestLatestResults");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

test_id = '<SYNTHETICS_TEST_PUBLIC_ID>'

initialize(**options)

api.Synthetics.get_results(id=test_id)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python-legacy) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"
##### 

```rust
// Get an API test's latest results summaries returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::GetAPITestLatestResultsOptionalParams;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .get_api_test_latest_results(
            "hwb-332-3xe".to_string(),
            GetAPITestLatestResultsOptionalParams::default(),
        )
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get an API test's latest results summaries returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiGetAPITestLatestResultsRequest = {
  publicId: "hwb-332-3xe",
};

apiInstance
  .getAPITestLatestResults(params)
  .then((data: v1.SyntheticsGetAPITestLatestResultsResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get an API test result{% #get-an-api-test-result %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                              |
| ----------------- | ----------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/tests/{public_id}/results/{result_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/tests/{public_id}/results/{result_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/tests/{public_id}/results/{result_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/tests/{public_id}/results/{result_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/tests/{public_id}/results/{result_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/tests/{public_id}/results/{result_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/tests/{public_id}/results/{result_id} |

### Overview

Get a specific full result from a given Synthetic API test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                                       |
| --------------------------- | ------ | ----------------------------------------------------------------- |
| public_id [*required*] | string | The public ID of the API test to which the target result belongs. |
| result_id [*required*] | string | The ID of the result to get.                                      |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object returned describing a API test result.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | check                                    | object          | Object describing the API test configuration.                                                                                                                                                                                                                                                   |
| check                | config [*required*]                 | object          | Configuration object for a Synthetic test.                                                                                                                                                                                                                                                      |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | variables                                | [object]        | Browser tests only - array of variables used for the test steps.                                                                                                                                                                                                                                |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | check_time                               | double          | When the API test was conducted.                                                                                                                                                                                                                                                                |
|                      | check_version                            | int64           | Version of the API test used.                                                                                                                                                                                                                                                                   |
|                      | probe_dc                                 | string          | Locations for which to query the API test results.                                                                                                                                                                                                                                              |
|                      | result                                   | object          | Object containing results for your Synthetic API test.                                                                                                                                                                                                                                          |
| result               | cert                                     | object          | Object describing the SSL certificate used for a Synthetic test.                                                                                                                                                                                                                                |
| cert                 | cipher                                   | string          | Cipher used for the connection.                                                                                                                                                                                                                                                                 |
| cert                 | exponent                                 | double          | Exponent associated to the certificate.                                                                                                                                                                                                                                                         |
| cert                 | extKeyUsage                              | [string]        | Array of extensions and details used for the certificate.                                                                                                                                                                                                                                       |
| cert                 | fingerprint                              | string          | MD5 digest of the DER-encoded Certificate information.                                                                                                                                                                                                                                          |
| cert                 | fingerprint256                           | string          | SHA-1 digest of the DER-encoded Certificate information.                                                                                                                                                                                                                                        |
| cert                 | issuer                                   | object          | Object describing the issuer of a SSL certificate.                                                                                                                                                                                                                                              |
| issuer               | C                                        | string          | Country Name that issued the certificate.                                                                                                                                                                                                                                                       |
| issuer               | CN                                       | string          | Common Name that issued certificate.                                                                                                                                                                                                                                                            |
| issuer               | L                                        | string          | Locality that issued the certificate.                                                                                                                                                                                                                                                           |
| issuer               | O                                        | string          | Organization that issued the certificate.                                                                                                                                                                                                                                                       |
| issuer               | OU                                       | string          | Organizational Unit that issued the certificate.                                                                                                                                                                                                                                                |
| issuer               | ST                                       | string          | State Or Province Name that issued the certificate.                                                                                                                                                                                                                                             |
| cert                 | modulus                                  | string          | Modulus associated to the SSL certificate private key.                                                                                                                                                                                                                                          |
| cert                 | protocol                                 | string          | TLS protocol used for the test.                                                                                                                                                                                                                                                                 |
| cert                 | serialNumber                             | string          | Serial Number assigned by Symantec to the SSL certificate.                                                                                                                                                                                                                                      |
| cert                 | subject                                  | object          | Object describing the SSL certificate used for the test.                                                                                                                                                                                                                                        |
| subject              | C                                        | string          | Country Name associated with the certificate.                                                                                                                                                                                                                                                   |
| subject              | CN                                       | string          | Common Name that associated with the certificate.                                                                                                                                                                                                                                               |
| subject              | L                                        | string          | Locality associated with the certificate.                                                                                                                                                                                                                                                       |
| subject              | O                                        | string          | Organization associated with the certificate.                                                                                                                                                                                                                                                   |
| subject              | OU                                       | string          | Organizational Unit associated with the certificate.                                                                                                                                                                                                                                            |
| subject              | ST                                       | string          | State Or Province Name associated with the certificate.                                                                                                                                                                                                                                         |
| subject              | altName                                  | string          | Subject Alternative Name associated with the certificate.                                                                                                                                                                                                                                       |
| cert                 | validFrom                                | date-time       | Date from which the SSL certificate is valid.                                                                                                                                                                                                                                                   |
| cert                 | validTo                                  | date-time       | Date until which the SSL certificate is valid.                                                                                                                                                                                                                                                  |
| result               | eventType                                | enum            | Status of a Synthetic test. Allowed enum values: `not_scheduled,scheduled,finished,finished_with_error`                                                                                                                                                                                         |
| result               | failure                                  | object          | The API test failure details.                                                                                                                                                                                                                                                                   |
| failure              | code                                     | enum            | Error code that can be returned by a Synthetic test. Allowed enum values: `BODY_TOO_LARGE,DENIED,TOO_MANY_REDIRECTS,AUTHENTICATION_ERROR,DECRYPTION,INVALID_CHAR_IN_HEADER,HEADER_TOO_LARGE,HEADERS_INCOMPATIBLE_CONTENT_LENGTH,INVALID_REQUEST,REQUIRES_UPDATE`                                |
| failure              | message                                  | string          | The API test error message.                                                                                                                                                                                                                                                                     |
| result               | httpStatusCode                           | int64           | The API test HTTP status code.                                                                                                                                                                                                                                                                  |
| result               | requestHeaders                           | object          | Request header object used for the API test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | object          | Requested request header.                                                                                                                                                                                                                                                                       |
| result               | responseBody                             | string          | Response body returned for the API test.                                                                                                                                                                                                                                                        |
| result               | responseHeaders                          | object          | Response headers returned for the API test.                                                                                                                                                                                                                                                     |
| additionalProperties | <any-key>                                |                 | Returned request header.                                                                                                                                                                                                                                                                        |
| result               | responseSize                             | int64           | Global size in byte of the API test response.                                                                                                                                                                                                                                                   |
| result               | timings                                  | object          | Object containing all metrics and their values collected for a Synthetic API test. See the [Synthetic Monitoring Metrics documentation](https://docs.datadoghq.com/synthetics/metrics.md).                                                                                                      |
| timings              | dns                                      | double          | The duration in millisecond of the DNS lookup.                                                                                                                                                                                                                                                  |
| timings              | download                                 | double          | The time in millisecond to download the response.                                                                                                                                                                                                                                               |
| timings              | firstByte                                | double          | The time in millisecond to first byte.                                                                                                                                                                                                                                                          |
| timings              | handshake                                | double          | The duration in millisecond of the TLS handshake.                                                                                                                                                                                                                                               |
| timings              | redirect                                 | double          | The time in millisecond spent during redirections.                                                                                                                                                                                                                                              |
| timings              | ssl                                      | double          | The duration in millisecond of the TLS handshake.                                                                                                                                                                                                                                               |
| timings              | tcp                                      | double          | Time in millisecond to establish the TCP connection.                                                                                                                                                                                                                                            |
| timings              | total                                    | double          | The overall time in millisecond the request took to be processed.                                                                                                                                                                                                                               |
| timings              | wait                                     | double          | Time spent in millisecond waiting for a response.                                                                                                                                                                                                                                               |
|                      | result_id                                | string          | ID of the API test result.                                                                                                                                                                                                                                                                      |
|                      | status                                   | enum            | The status of your Synthetic monitor.                                                                                                                                                                                                                                                           |

{% /tab %}

{% tab title="Example" %}

```json
{
  "check": {
    "config": {
      "assertions": [
        {
          "operator": "contains",
          "property": "string",
          "target": 0,
          "timingsScope": "string",
          "type": "statusCode"
        }
      ],
      "configVariables": [
        {
          "example": "string",
          "id": "string",
          "name": "VARIABLE_NAME",
          "pattern": "string",
          "secure": false,
          "type": "text"
        }
      ],
      "request": {
        "allow_insecure": false,
        "basicAuth": {
          "password": "PaSSw0RD!",
          "type": "web",
          "username": "my_username"
        },
        "body": "string",
        "bodyType": "text/plain",
        "callType": "unary",
        "certificate": {
          "cert": {
            "content": "string",
            "filename": "string",
            "updatedAt": "string"
          },
          "key": {
            "content": "string",
            "filename": "string",
            "updatedAt": "string"
          }
        },
        "certificateDomains": [],
        "checkCertificateRevocation": false,
        "compressedJsonDescriptor": "string",
        "compressedProtoFile": "string",
        "disableAiaIntermediateFetching": false,
        "dnsServer": "string",
        "dnsServerPort": {
          "description": "undefined",
          "format": "undefined",
          "type": "undefined"
        },
        "files": [
          {
            "bucketKey": "string",
            "content": "string",
            "encoding": "string",
            "name": "string",
            "originalFileName": "string",
            "size": "integer",
            "type": "string"
          }
        ],
        "follow_redirects": false,
        "form": {
          "<any-key>": "string"
        },
        "headers": {
          "<any-key>": "string"
        },
        "host": "string",
        "httpVersion": "string",
        "isMessageBase64Encoded": false,
        "message": "string",
        "metadata": {
          "<any-key>": "string"
        },
        "method": "string",
        "noSavingResponseBody": false,
        "numberOfPackets": "integer",
        "persistCookies": false,
        "port": {
          "description": "undefined",
          "format": "undefined",
          "type": "undefined"
        },
        "proxy": {
          "headers": {
            "<any-key>": "string"
          },
          "url": "https://example.com"
        },
        "query": {},
        "servername": "string",
        "service": "Greeter",
        "shouldTrackHops": false,
        "timeout": "number",
        "url": "https://example.com"
      },
      "variables": [
        {
          "example": "string",
          "id": "string",
          "name": "VARIABLE_NAME",
          "pattern": "string",
          "secure": false,
          "type": "text"
        }
      ]
    }
  },
  "check_time": "number",
  "check_version": "integer",
  "probe_dc": "string",
  "result": {
    "cert": {
      "cipher": "string",
      "exponent": "number",
      "extKeyUsage": [],
      "fingerprint": "string",
      "fingerprint256": "string",
      "issuer": {
        "C": "string",
        "CN": "string",
        "L": "string",
        "O": "string",
        "OU": "string",
        "ST": "string"
      },
      "modulus": "string",
      "protocol": "string",
      "serialNumber": "string",
      "subject": {
        "C": "string",
        "CN": "string",
        "L": "string",
        "O": "string",
        "OU": "string",
        "ST": "string",
        "altName": "string"
      },
      "validFrom": "2019-09-19T10:00:00.000Z",
      "validTo": "2019-09-19T10:00:00.000Z"
    },
    "eventType": "string",
    "failure": {
      "code": "string",
      "message": "Error during DNS resolution (ENOTFOUND)."
    },
    "httpStatusCode": "integer",
    "requestHeaders": {
      "<any-key>": {}
    },
    "responseBody": "string",
    "responseHeaders": {
      "<any-key>": "undefined"
    },
    "responseSize": "integer",
    "timings": {
      "dns": "number",
      "download": "number",
      "firstByte": "number",
      "handshake": "number",
      "redirect": "number",
      "ssl": "number",
      "tcp": "number",
      "total": "number",
      "wait": "number"
    }
  },
  "result_id": "string",
  "status": "integer"
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic Monitoring is not activated for the user - Test or result is not owned by the user
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"export result_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/${public_id}/results/${result_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get an API test result returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_api_test_result(
        public_id="hwb-332-3xe",
        result_id="3420446318379485707",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get an API test result returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.get_api_test_result("hwb-332-3xe", "3420446318379485707")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```ruby
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

test_id = '<SYNTHETICS_TEST_PUBLIC_ID>'
result_id = '<TEST_RESULT_ID>'


dog = Dogapi::Client.new(api_key, app_key)

dog.get_synthetics_result('test_id'  => test_id , 'result_id'  => result_id)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby-legacy) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get an API test result returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetAPITestResult(ctx, "hwb-332-3xe", "3420446318379485707")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetAPITestResult`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetAPITestResult`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get an API test result returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsAPITestResultFull;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsAPITestResultFull result =
          apiInstance.getAPITestResult("hwb-332-3xe", "3420446318379485707");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getAPITestResult");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

test_id = '<SYNTHETICS_TEST_PUBLIC_ID>'
result_id = '<TEST_RESULT_ID>'

initialize(**options)

api.Synthetics.get_result(id=test_id, result_id=result_id)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python-legacy) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"
##### 

```rust
// Get an API test result returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .get_api_test_result("hwb-332-3xe".to_string(), "3420446318379485707".to_string())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get an API test result returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiGetAPITestResultRequest = {
  publicId: "hwb-332-3xe",
  resultId: "3420446318379485707",
};

apiInstance
  .getAPITestResult(params)
  .then((data: v1.SyntheticsAPITestResultFull) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get a browser test's latest results summaries{% #get-a-browser-tests-latest-results-summaries %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                          |
| ----------------- | ------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}/results |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}/results |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/tests/browser/{public_id}/results      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/tests/browser/{public_id}/results      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}/results     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}/results |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}/results |

### Overview

Get the last 150 test results summaries for a given Synthetic browser test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                                        |
| --------------------------- | ------ | ------------------------------------------------------------------ |
| public_id [*required*] | string | The public ID of the browser test for which to search results for. |

#### Query Strings

| Name     | Type    | Description                                                     |
| -------- | ------- | --------------------------------------------------------------- |
| from_ts  | integer | Timestamp in milliseconds from which to start querying results. |
| to_ts    | integer | Timestamp in milliseconds up to which to query results.         |
| probe_dc | array   | Locations for which to query results.                           |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object with the latest Synthetic browser test run.

| Parent field | Field                    | Type     | Description                                                      |
| ------------ | ------------------------ | -------- | ---------------------------------------------------------------- |
|              | last_timestamp_fetched   | int64    | Timestamp of the latest browser test run.                        |
|              | results                  | [object] | Result of the latest browser test run.                           |
| results      | check_time               | double   | Last time the browser test was performed.                        |
| results      | probe_dc                 | string   | Location from which the Browser test was performed.              |
| results      | result                   | object   | Object with the result of the last browser test run.             |
| result       | device                   | object   | Object describing the device used to perform the Synthetic test. |
| device       | height [*required*] | int64    | Screen height of the device.                                     |
| device       | id [*required*]     | string   | The device ID.                                                   |
| device       | isMobile                 | boolean  | Whether or not the device is a mobile.                           |
| device       | name [*required*]   | string   | The device name.                                                 |
| device       | width [*required*]  | int64    | Screen width of the device.                                      |
| result       | duration                 | double   | Length in milliseconds of the browser test run.                  |
| result       | errorCount               | int64    | Amount of errors collected for a single browser test run.        |
| result       | stepCountCompleted       | int64    | Amount of browser test steps completed before failing.           |
| result       | stepCountTotal           | int64    | Total amount of browser test steps.                              |
| results      | result_id                | string   | ID of the browser test result.                                   |
| results      | status                   | enum     | The status of your Synthetic monitor.                            |

{% /tab %}

{% tab title="Example" %}

```json
{
  "last_timestamp_fetched": "integer",
  "results": [
    {
      "check_time": "number",
      "probe_dc": "string",
      "result": {
        "device": {
          "height": 0,
          "id": "chrome.laptop_large",
          "isMobile": false,
          "name": "",
          "width": 0
        },
        "duration": "number",
        "errorCount": "integer",
        "stepCountCompleted": "integer",
        "stepCountTotal": "integer"
      },
      "result_id": "string",
      "status": "integer"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic Monitoring is not activated for the user - Test is not owned by the user
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/browser/${public_id}/results" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get a browser test's latest results summaries returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_browser_test_latest_results(
        public_id="2yy-sem-mjh",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get a browser test's latest results summaries returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.get_browser_test_latest_results("2yy-sem-mjh")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get a browser test's latest results summaries returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetBrowserTestLatestResults(ctx, "2yy-sem-mjh", *datadogV1.NewGetBrowserTestLatestResultsOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetBrowserTestLatestResults`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetBrowserTestLatestResults`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get a browser test's latest results summaries returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsGetBrowserTestLatestResultsResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsGetBrowserTestLatestResultsResponse result =
          apiInstance.getBrowserTestLatestResults("2yy-sem-mjh");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getBrowserTestLatestResults");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Get a browser test's latest results summaries returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::GetBrowserTestLatestResultsOptionalParams;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .get_browser_test_latest_results(
            "2yy-sem-mjh".to_string(),
            GetBrowserTestLatestResultsOptionalParams::default(),
        )
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get a browser test's latest results summaries returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiGetBrowserTestLatestResultsRequest = {
  publicId: "2yy-sem-mjh",
};

apiInstance
  .getBrowserTestLatestResults(params)
  .then((data: v1.SyntheticsGetBrowserTestLatestResultsResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get a browser test result{% #get-a-browser-test-result %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}/results/{result_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}/results/{result_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/tests/browser/{public_id}/results/{result_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/tests/browser/{public_id}/results/{result_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}/results/{result_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}/results/{result_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}/results/{result_id} |

### Overview

Get a specific full result from a given Synthetic browser test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                                           |
| --------------------------- | ------ | --------------------------------------------------------------------- |
| public_id [*required*] | string | The public ID of the browser test to which the target result belongs. |
| result_id [*required*] | string | The ID of the result to get.                                          |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object returned describing a browser test result.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | check                                    | object          | Object describing the browser test configuration.                                                                                                                                                                                                                                               |
| check                | config [*required*]                 | object          | Configuration object for a Synthetic test.                                                                                                                                                                                                                                                      |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | variables                                | [object]        | Browser tests only - array of variables used for the test steps.                                                                                                                                                                                                                                |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | check_time                               | double          | When the browser test was conducted.                                                                                                                                                                                                                                                            |
|                      | check_version                            | int64           | Version of the browser test used.                                                                                                                                                                                                                                                               |
|                      | probe_dc                                 | string          | Location from which the browser test was performed.                                                                                                                                                                                                                                             |
|                      | result                                   | object          | Object containing results for your Synthetic browser test.                                                                                                                                                                                                                                      |
| result               | browserType                              | string          | Type of browser device used for the browser test.                                                                                                                                                                                                                                               |
| result               | browserVersion                           | string          | Browser version used for the browser test.                                                                                                                                                                                                                                                      |
| result               | device                                   | object          | Object describing the device used to perform the Synthetic test.                                                                                                                                                                                                                                |
| device               | height [*required*]                 | int64           | Screen height of the device.                                                                                                                                                                                                                                                                    |
| device               | id [*required*]                     | string          | The device ID.                                                                                                                                                                                                                                                                                  |
| device               | isMobile                                 | boolean         | Whether or not the device is a mobile.                                                                                                                                                                                                                                                          |
| device               | name [*required*]                   | string          | The device name.                                                                                                                                                                                                                                                                                |
| device               | width [*required*]                  | int64           | Screen width of the device.                                                                                                                                                                                                                                                                     |
| result               | duration                                 | double          | Global duration in second of the browser test.                                                                                                                                                                                                                                                  |
| result               | error                                    | string          | Error returned for the browser test.                                                                                                                                                                                                                                                            |
| result               | failure                                  | object          | The browser test failure details.                                                                                                                                                                                                                                                               |
| failure              | code                                     | enum            | Error code that can be returned by a Synthetic test. Allowed enum values: `API_REQUEST_FAILURE,ASSERTION_FAILURE,DOWNLOAD_FILE_TOO_LARGE,ELEMENT_NOT_INTERACTABLE,EMAIL_VARIABLE_NOT_DEFINED,EVALUATE_JAVASCRIPT,EVALUATE_JAVASCRIPT_CONTEXT,EXTRACT_VARIABLE,FORBIDDEN_URL,FRAME_DETACHED`     |
| failure              | message                                  | string          | The browser test error message.                                                                                                                                                                                                                                                                 |
| result               | passed                                   | boolean         | Whether or not the browser test was conducted.                                                                                                                                                                                                                                                  |
| result               | receivedEmailCount                       | int64           | The amount of email received during the browser test.                                                                                                                                                                                                                                           |
| result               | startUrl                                 | string          | Starting URL for the browser test.                                                                                                                                                                                                                                                              |
| result               | stepDetails                              | [object]        | Array containing the different browser test steps.                                                                                                                                                                                                                                              |
| stepDetails          | allowFailure                             | boolean         | Whether or not the step was allowed to fail.                                                                                                                                                                                                                                                    |
| stepDetails          | browserErrors                            | [object]        | Array of errors collected for a browser test.                                                                                                                                                                                                                                                   |
| browserErrors        | description [*required*]            | string          | Description of the error.                                                                                                                                                                                                                                                                       |
| browserErrors        | name [*required*]                   | string          | Name of the error.                                                                                                                                                                                                                                                                              |
| browserErrors        | status                                   | int64           | Status Code of the error.                                                                                                                                                                                                                                                                       |
| browserErrors        | type [*required*]                   | enum            | Error type returned by a browser test. Allowed enum values: `network,js`                                                                                                                                                                                                                        |
| stepDetails          | checkType                                | enum            | Type of assertion to apply in an API test. Allowed enum values: `equals,notEquals,contains,notContains,startsWith,notStartsWith,greater,lower,greaterEquals,lowerEquals`                                                                                                                        |
| stepDetails          | description                              | string          | Description of the test.                                                                                                                                                                                                                                                                        |
| stepDetails          | duration                                 | double          | Total duration in millisecond of the test.                                                                                                                                                                                                                                                      |
| stepDetails          | error                                    | string          | Error returned by the test.                                                                                                                                                                                                                                                                     |
| stepDetails          | failure                                  | object          | The browser test failure details.                                                                                                                                                                                                                                                               |
| failure              | code                                     | enum            | Error code that can be returned by a Synthetic test. Allowed enum values: `API_REQUEST_FAILURE,ASSERTION_FAILURE,DOWNLOAD_FILE_TOO_LARGE,ELEMENT_NOT_INTERACTABLE,EMAIL_VARIABLE_NOT_DEFINED,EVALUATE_JAVASCRIPT,EVALUATE_JAVASCRIPT_CONTEXT,EXTRACT_VARIABLE,FORBIDDEN_URL,FRAME_DETACHED`     |
| failure              | message                                  | string          | The browser test error message.                                                                                                                                                                                                                                                                 |
| stepDetails          | playingTab                               | enum            | Navigate between different tabs for your browser test. Allowed enum values: `-1,0,1,2,3`                                                                                                                                                                                                        |
| stepDetails          | screenshotBucketKey                      | boolean         | Whether or not screenshots where collected by the test.                                                                                                                                                                                                                                         |
| stepDetails          | skipped                                  | boolean         | Whether or not to skip this step.                                                                                                                                                                                                                                                               |
| stepDetails          | snapshotBucketKey                        | boolean         | Whether or not snapshots where collected by the test.                                                                                                                                                                                                                                           |
| stepDetails          | stepId                                   | int64           | The step ID.                                                                                                                                                                                                                                                                                    |
| stepDetails          | subTestStepDetails                       | [object]        | If this step includes a sub-test. [Subtests documentation](https://docs.datadoghq.com/synthetics/browser_tests/advanced_options.md#subtests).                                                                                                                                                   |
| stepDetails          | timeToInteractive                        | double          | Time before starting the step.                                                                                                                                                                                                                                                                  |
| stepDetails          | type                                     | enum            | Step type used in your Synthetic test. Allowed enum values: `assertCurrentUrl,assertElementAttribute,assertElementContent,assertElementPresent,assertEmail,assertFileDownload,assertFromJavascript,assertPageContains,assertPageLacks,assertRequests`                                           |
| stepDetails          | url                                      | string          | URL to perform the step against.                                                                                                                                                                                                                                                                |
| stepDetails          | value                                    |                 | Value for the step.                                                                                                                                                                                                                                                                             |
| stepDetails          | vitalsMetrics                            | [object]        | Array of Core Web Vitals metrics for the step.                                                                                                                                                                                                                                                  |
| vitalsMetrics        | cls                                      | double          | Cumulative Layout Shift.                                                                                                                                                                                                                                                                        |
| vitalsMetrics        | lcp                                      | double          | Largest Contentful Paint in milliseconds.                                                                                                                                                                                                                                                       |
| vitalsMetrics        | url                                      | string          | URL attached to the metrics.                                                                                                                                                                                                                                                                    |
| stepDetails          | warnings                                 | [object]        | Warning collected that didn't failed the step.                                                                                                                                                                                                                                                  |
| warnings             | message [*required*]                | string          | Message for the warning.                                                                                                                                                                                                                                                                        |
| warnings             | type [*required*]                   | enum            | User locator used. Allowed enum values: `user_locator`                                                                                                                                                                                                                                          |
| result               | thumbnailsBucketKey                      | boolean         | Whether or not a thumbnail is associated with the browser test.                                                                                                                                                                                                                                 |
| result               | timeToInteractive                        | double          | Time in second to wait before the browser test starts after reaching the start URL.                                                                                                                                                                                                             |
|                      | result_id                                | string          | ID of the browser test result.                                                                                                                                                                                                                                                                  |
|                      | status                                   | enum            | The status of your Synthetic monitor.                                                                                                                                                                                                                                                           |

{% /tab %}

{% tab title="Example" %}

```json
{
  "check": {
    "config": {
      "assertions": [
        {
          "operator": "contains",
          "property": "string",
          "target": 0,
          "timingsScope": "string",
          "type": "statusCode"
        }
      ],
      "configVariables": [
        {
          "example": "string",
          "id": "string",
          "name": "VARIABLE_NAME",
          "pattern": "string",
          "secure": false,
          "type": "text"
        }
      ],
      "request": {
        "allow_insecure": false,
        "basicAuth": {
          "password": "PaSSw0RD!",
          "type": "web",
          "username": "my_username"
        },
        "body": "string",
        "bodyType": "text/plain",
        "callType": "unary",
        "certificate": {
          "cert": {
            "content": "string",
            "filename": "string",
            "updatedAt": "string"
          },
          "key": {
            "content": "string",
            "filename": "string",
            "updatedAt": "string"
          }
        },
        "certificateDomains": [],
        "checkCertificateRevocation": false,
        "compressedJsonDescriptor": "string",
        "compressedProtoFile": "string",
        "disableAiaIntermediateFetching": false,
        "dnsServer": "string",
        "dnsServerPort": {
          "description": "undefined",
          "format": "undefined",
          "type": "undefined"
        },
        "files": [
          {
            "bucketKey": "string",
            "content": "string",
            "encoding": "string",
            "name": "string",
            "originalFileName": "string",
            "size": "integer",
            "type": "string"
          }
        ],
        "follow_redirects": false,
        "form": {
          "<any-key>": "string"
        },
        "headers": {
          "<any-key>": "string"
        },
        "host": "string",
        "httpVersion": "string",
        "isMessageBase64Encoded": false,
        "message": "string",
        "metadata": {
          "<any-key>": "string"
        },
        "method": "string",
        "noSavingResponseBody": false,
        "numberOfPackets": "integer",
        "persistCookies": false,
        "port": {
          "description": "undefined",
          "format": "undefined",
          "type": "undefined"
        },
        "proxy": {
          "headers": {
            "<any-key>": "string"
          },
          "url": "https://example.com"
        },
        "query": {},
        "servername": "string",
        "service": "Greeter",
        "shouldTrackHops": false,
        "timeout": "number",
        "url": "https://example.com"
      },
      "variables": [
        {
          "example": "string",
          "id": "string",
          "name": "VARIABLE_NAME",
          "pattern": "string",
          "secure": false,
          "type": "text"
        }
      ]
    }
  },
  "check_time": "number",
  "check_version": "integer",
  "probe_dc": "string",
  "result": {
    "browserType": "string",
    "browserVersion": "string",
    "device": {
      "height": 0,
      "id": "chrome.laptop_large",
      "isMobile": false,
      "name": "",
      "width": 0
    },
    "duration": "number",
    "error": "string",
    "failure": {
      "code": "string",
      "message": "Error during DNS resolution (ENOTFOUND)."
    },
    "passed": false,
    "receivedEmailCount": "integer",
    "startUrl": "string",
    "stepDetails": [
      {
        "allowFailure": false,
        "browserErrors": [
          {
            "description": "Example error message",
            "name": "Failed test",
            "status": 500,
            "type": "network"
          }
        ],
        "checkType": "string",
        "description": "string",
        "duration": "number",
        "error": "string",
        "failure": {
          "code": "string",
          "message": "Error during DNS resolution (ENOTFOUND)."
        },
        "playingTab": "integer",
        "screenshotBucketKey": false,
        "skipped": false,
        "snapshotBucketKey": false,
        "stepId": "integer",
        "subTestStepDetails": [],
        "timeToInteractive": "number",
        "type": "assertElementContent",
        "url": "string",
        "value": "undefined",
        "vitalsMetrics": [
          {
            "cls": "number",
            "lcp": "number",
            "url": "string"
          }
        ],
        "warnings": [
          {
            "message": "",
            "type": "user_locator"
          }
        ]
      }
    ],
    "thumbnailsBucketKey": false,
    "timeToInteractive": "number"
  },
  "result_id": "string",
  "status": "integer"
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic Monitoring is not activated for the user - Test or result is not owned by the user
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"export result_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/browser/${public_id}/results/${result_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get a browser test result returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_browser_test_result(
        public_id="2yy-sem-mjh",
        result_id="5671719892074090418",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get a browser test result returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.get_browser_test_result("2yy-sem-mjh", "5671719892074090418")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get a browser test result returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetBrowserTestResult(ctx, "2yy-sem-mjh", "5671719892074090418")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetBrowserTestResult`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetBrowserTestResult`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get a browser test result returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsBrowserTestResultFull;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsBrowserTestResultFull result =
          apiInstance.getBrowserTestResult("2yy-sem-mjh", "5671719892074090418");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getBrowserTestResult");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Get a browser test result returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .get_browser_test_result("2yy-sem-mjh".to_string(), "5671719892074090418".to_string())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get a browser test result returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiGetBrowserTestResultRequest = {
  publicId: "2yy-sem-mjh",
  resultId: "5671719892074090418",
};

apiInstance
  .getBrowserTestResult(params)
  .then((data: v1.SyntheticsBrowserTestResultFull) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/tests/browser/{public_id}/results/{result_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/tests/browser/{public_id}/results/{result_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/tests/browser/{public_id}/results/{result_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/tests/browser/{public_id}/results/{result_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/tests/browser/{public_id}/results/{result_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/tests/browser/{public_id}/results/{result_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/tests/browser/{public_id}/results/{result_id} |

### Overview

Get a specific full result from a given Synthetic browser test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                                                     |
| --------------------------- | ------ | ------------------------------------------------------------------------------- |
| public_id [*required*] | string | The public ID of the Synthetic browser test to which the target result belongs. |
| result_id [*required*] | string | The ID of the result to get.                                                    |

#### Query Strings

| Name      | Type    | Description                                                 |
| --------- | ------- | ----------------------------------------------------------- |
| event_id  | string  | The event ID used to look up the result in the event store. |
| timestamp | integer | Timestamp in seconds to look up the result.                 |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response object for a Synthetic test result.

| Parent field         | Field                            | Type     | Description                                                                                                                        |
| -------------------- | -------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|                      | data                             | object   | Wrapper object for a Synthetic test result.                                                                                        |
| data                 | attributes                       | object   | Attributes of a Synthetic test result.                                                                                             |
| attributes           | batch                            | object   | Batch information for the test result.                                                                                             |
| batch                | id                               | string   | Batch identifier.                                                                                                                  |
| attributes           | ci                               | object   | CI information associated with the test result.                                                                                    |
| ci                   | pipeline                         | object   | Details of the CI pipeline.                                                                                                        |
| pipeline             | id                               | string   | Pipeline identifier.                                                                                                               |
| pipeline             | name                             | string   | Pipeline name.                                                                                                                     |
| pipeline             | number                           | int64    | Pipeline number.                                                                                                                   |
| pipeline             | url                              | string   | Pipeline URL.                                                                                                                      |
| ci                   | provider                         | object   | Details of the CI provider.                                                                                                        |
| provider             | name                             | string   | Provider name.                                                                                                                     |
| ci                   | stage                            | object   | Details of the CI stage.                                                                                                           |
| stage                | name                             | string   | Stage name.                                                                                                                        |
| ci                   | workspace_path                   | string   | Path of the workspace that ran the CI job.                                                                                         |
| attributes           | device                           | object   | Device information for the test result (browser and mobile tests).                                                                 |
| device               | browser                          | object   | Browser information for the device used to run the test.                                                                           |
| browser              | type                             | string   | Browser type (for example, `chrome`, `firefox`).                                                                                   |
| browser              | user_agent                       | string   | User agent string reported by the browser.                                                                                         |
| browser              | version                          | string   | Browser version.                                                                                                                   |
| device               | id                               | string   | Device identifier.                                                                                                                 |
| device               | name                             | string   | Device name.                                                                                                                       |
| device               | platform                         | object   | Platform information for the device used to run the test.                                                                          |
| platform             | name                             | string   | Platform name (for example, `linux`, `macos`).                                                                                     |
| platform             | version                          | string   | Platform version.                                                                                                                  |
| device               | resolution                       | object   | Screen resolution of the device used to run the test.                                                                              |
| resolution           | height                           | int64    | Viewport height in pixels.                                                                                                         |
| resolution           | pixel_ratio                      | double   | Device pixel ratio.                                                                                                                |
| resolution           | width                            | int64    | Viewport width in pixels.                                                                                                          |
| device               | type                             | string   | Device type.                                                                                                                       |
| attributes           | git                              | object   | Git information associated with the test result.                                                                                   |
| git                  | branch                           | string   | Git branch name.                                                                                                                   |
| git                  | commit                           | object   | Details of the Git commit associated with the test result.                                                                         |
| commit               | author                           | object   | A Git user (author or committer).                                                                                                  |
| author               | date                             | string   | Timestamp of the commit action for this user.                                                                                      |
| author               | email                            | string   | Email address of the Git user.                                                                                                     |
| author               | name                             | string   | Name of the Git user.                                                                                                              |
| commit               | committer                        | object   | A Git user (author or committer).                                                                                                  |
| committer            | date                             | string   | Timestamp of the commit action for this user.                                                                                      |
| committer            | email                            | string   | Email address of the Git user.                                                                                                     |
| committer            | name                             | string   | Name of the Git user.                                                                                                              |
| commit               | message                          | string   | Commit message.                                                                                                                    |
| commit               | sha                              | string   | Commit SHA.                                                                                                                        |
| commit               | url                              | string   | URL of the commit.                                                                                                                 |
| git                  | repository_url                   | string   | Git repository URL.                                                                                                                |
| attributes           | location                         | object   | Location information for a Synthetic test result.                                                                                  |
| location             | id                               | string   | Identifier of the location.                                                                                                        |
| location             | name                             | string   | Human-readable name of the location.                                                                                               |
| location             | version                          | string   | Version of the worker that ran the test.                                                                                           |
| location             | worker_id                        | string   | Identifier of the specific worker that ran the test.                                                                               |
| attributes           | result                           | object   | Full result details for a Synthetic test execution.                                                                                |
| result               | assertions                       | [object] | Assertion results produced by the test.                                                                                            |
| assertions           | actual                           |          | Actual value observed during the test. Its type depends on the assertion type.                                                     |
| assertions           | error_message                    | string   | Error message if the assertion failed.                                                                                             |
| assertions           | expected                         |          | Expected value for the assertion. Its type depends on the assertion type.                                                          |
| assertions           | operator                         | string   | Operator used for the assertion (for example, `is`, `contains`).                                                                   |
| assertions           | property                         | string   | Property targeted by the assertion, when applicable.                                                                               |
| assertions           | target                           |          | Target value for the assertion. Its type depends on the assertion type.                                                            |
| assertions           | target_path                      | string   | JSON path or XPath evaluated for the assertion.                                                                                    |
| assertions           | target_path_operator             | string   | Operator used for the target path assertion.                                                                                       |
| assertions           | type                             | string   | Type of the assertion (for example, `responseTime`, `statusCode`, `body`).                                                         |
| assertions           | valid                            | boolean  | Whether the assertion passed.                                                                                                      |
| result               | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                  |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                 |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                 |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                   |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                   |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                      |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                              |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                   |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                 |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                         |
| result               | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                             |
| result               | cert                             | object   | SSL/TLS certificate information returned from an SSL test.                                                                         |
| cert                 | cipher                           | string   | Cipher used for the TLS connection.                                                                                                |
| cert                 | exponent                         | int64    | RSA exponent of the certificate.                                                                                                   |
| cert                 | ext_key_usage                    | [string] | Extended key usage extensions for the certificate.                                                                                 |
| cert                 | fingerprint                      | string   | SHA-1 fingerprint of the certificate.                                                                                              |
| cert                 | fingerprint256                   | string   | SHA-256 fingerprint of the certificate.                                                                                            |
| cert                 | issuer                           | object   | Certificate issuer details.                                                                                                        |
| additionalProperties | <any-key>                        | string   |
| cert                 | modulus                          | string   | RSA modulus of the certificate.                                                                                                    |
| cert                 | protocol                         | string   | TLS protocol used (for example, `TLSv1.2`).                                                                                        |
| cert                 | serial_number                    | string   | Serial number of the certificate.                                                                                                  |
| cert                 | subject                          | object   | Certificate subject details.                                                                                                       |
| additionalProperties | <any-key>                        | string   |
| cert                 | tls_version                      | double   | TLS protocol version.                                                                                                              |
| cert                 | valid                            | object   | Validity window of a certificate.                                                                                                  |
| valid                | from                             | int64    | Unix timestamp (ms) of when the certificate became valid.                                                                          |
| valid                | to                               | int64    | Unix timestamp (ms) of when the certificate expires.                                                                               |
| result               | compressed_json_descriptor       | string   | Compressed JSON descriptor for the test (internal format).                                                                         |
| result               | compressed_steps                 | string   | Compressed representation of the test steps (internal format).                                                                     |
| result               | connection_outcome               | string   | Outcome of the connection attempt (for example, `established`, `refused`).                                                         |
| result               | dns_resolution                   | object   | DNS resolution details recorded during the test execution.                                                                         |
| dns_resolution       | attempts                         | [object] | DNS resolution attempts made during the test.                                                                                      |
| dns_resolution       | resolved_ip                      | string   | Resolved IP address for the target host.                                                                                           |
| dns_resolution       | resolved_port                    | string   | Resolved port for the target service.                                                                                              |
| dns_resolution       | server                           | string   | DNS server used for the resolution.                                                                                                |
| result               | duration                         | double   | Duration of the test execution (in milliseconds).                                                                                  |
| result               | exited_on_step_success           | boolean  | Whether the test exited early because a step marked with `exitIfSucceed` passed.                                                   |
| result               | failure                          | object   | Details about the failure of a Synthetic test.                                                                                     |
| failure              | code                             | string   | Error code for the failure.                                                                                                        |
| failure              | internal_code                    | string   | Internal error code used for debugging.                                                                                            |
| failure              | internal_message                 | string   | Internal error message used for debugging.                                                                                         |
| failure              | message                          | string   | Error message for the failure.                                                                                                     |
| result               | finished_at                      | int64    | Timestamp of when the test finished (in milliseconds).                                                                             |
| result               | handshake                        | object   | Handshake request and response for protocol-level tests.                                                                           |
| handshake            | request                          | object   | Details of the outgoing request made during the test execution.                                                                    |
| request              | allow_insecure                   | boolean  | Whether insecure certificates are allowed for this request.                                                                        |
| request              | body                             | string   | Body sent with the request.                                                                                                        |
| request              | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                             |
| request              | destination_service              | string   | Destination service for a Network Path test.                                                                                       |
| request              | dns_server                       | string   | DNS server used to resolve the target host.                                                                                        |
| request              | dns_server_port                  | int64    | Port of the DNS server used for resolution.                                                                                        |
| request              | e2e_queries                      | int64    | Number of end-to-end probe queries issued.                                                                                         |
| request              | files                            | [object] | Files attached to the request.                                                                                                     |
| files                | bucket_key                       | string   | Storage bucket key where the file is stored.                                                                                       |
| files                | encoding                         | string   | Encoding of the file contents.                                                                                                     |
| files                | name                             | string   | File name.                                                                                                                         |
| files                | size                             | int64    | File size in bytes.                                                                                                                |
| files                | type                             | string   | File MIME type.                                                                                                                    |
| request              | headers                          | object   | Headers sent with the request.                                                                                                     |
| request              | host                             | string   | Host targeted by the request.                                                                                                      |
| request              | max_ttl                          | int64    | Maximum TTL for network probe packets.                                                                                             |
| request              | message                          | string   | Message sent with the request (for WebSocket/TCP/UDP tests).                                                                       |
| request              | method                           | string   | HTTP method used for the request.                                                                                                  |
| request              | no_saving_response_body          | boolean  | Whether the response body was not saved.                                                                                           |
| request              | port                             |          | Port targeted by the request. Can be a number or a string variable reference.                                                      |
| request              | service                          | string   | Service name targeted by the request (for gRPC tests).                                                                             |
| request              | source_service                   | string   | Source service for a Network Path test.                                                                                            |
| request              | timeout                          | int64    | Request timeout in milliseconds.                                                                                                   |
| request              | tool_name                        | string   | Name of the MCP tool called (MCP tests only).                                                                                      |
| request              | traceroute_queries               | int64    | Number of traceroute probe queries issued.                                                                                         |
| request              | url                              | string   | URL targeted by the request.                                                                                                       |
| handshake            | response                         | object   | Details of the response received during the test execution.                                                                        |
| response             | body                             | string   | Body of the response.                                                                                                              |
| response             | body_compressed                  | string   | Compressed representation of the response body.                                                                                    |
| response             | body_hashes                      | string   | Hashes computed over the response body.                                                                                            |
| response             | body_size                        | int64    | Size of the response body in bytes.                                                                                                |
| response             | cache_headers                    | object   | Cache-related response headers.                                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | cdn                              | object   | CDN provider details inferred from response headers.                                                                               |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                 |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                       |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                          |
| response             | close                            | object   | WebSocket close frame information for WebSocket test responses.                                                                    |
| close                | reason                           | string   | Reason string received in the close frame.                                                                                         |
| close                | status_code                      | int64    | Status code received in the close frame.                                                                                           |
| response             | compressed_message               | string   | Compressed representation of the response message.                                                                                 |
| response             | headers                          | object   | Response headers.                                                                                                                  |
| response             | healthcheck                      | object   | Health check information returned from a gRPC health check call.                                                                   |
| healthcheck          | message                          | object   | Raw health check message payload.                                                                                                  |
| additionalProperties | <any-key>                        | string   |
| healthcheck          | status                           | int64    | Health check status code.                                                                                                          |
| response             | http_version                     | string   | HTTP version of the response.                                                                                                      |
| response             | is_body_truncated                | boolean  | Whether the response body was truncated.                                                                                           |
| response             | is_message_truncated             | boolean  | Whether the response message was truncated.                                                                                        |
| response             | message                          | string   | Message received in the response (for WebSocket/TCP/UDP tests).                                                                    |
| response             | metadata                         | object   | Additional metadata returned with the response.                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | records                          | [object] | DNS records returned in the response (DNS tests only).                                                                             |
| records              | type                             | string   | DNS record type (for example, `A`, `AAAA`, `CNAME`).                                                                               |
| records              | values                           | [string] | Values associated with the DNS record.                                                                                             |
| response             | redirects                        | [object] | Redirect hops encountered while performing the request.                                                                            |
| redirects            | location                         | string   | Target location of the redirect.                                                                                                   |
| redirects            | status_code                      | int64    | HTTP status code of the redirect response.                                                                                         |
| response             | status_code                      | int64    | HTTP status code of the response.                                                                                                  |
| result               | id                               | string   | The unique identifier for this result.                                                                                             |
| result               | initial_id                       | string   | The initial result ID before any retries.                                                                                          |
| result               | is_fast_retry                    | boolean  | Whether this result is from a fast retry.                                                                                          |
| result               | is_last_retry                    | boolean  | Whether this result is from the last retry.                                                                                        |
| result               | netpath                          | object   | Network Path test result capturing the path between source and destination.                                                        |
| netpath              | destination                      | object   | Destination endpoint of a network path measurement.                                                                                |
| destination          | hostname                         | string   | Hostname of the destination.                                                                                                       |
| destination          | ip_address                       | string   | IP address of the destination.                                                                                                     |
| destination          | port                             | int64    | Port of the destination service.                                                                                                   |
| netpath              | hops                             | [object] | Hops along the network path.                                                                                                       |
| hops                 | hostname                         | string   | Resolved hostname of the hop.                                                                                                      |
| hops                 | ip_address                       | string   | IP address of the hop.                                                                                                             |
| hops                 | reachable                        | boolean  | Whether this hop was reachable.                                                                                                    |
| hops                 | rtt                              | double   | Round-trip time to this hop in milliseconds.                                                                                       |
| hops                 | ttl                              | int64    | Time-to-live value of the probe packet at this hop.                                                                                |
| netpath              | origin                           | string   | Origin of the network path (for example, probe source).                                                                            |
| netpath              | pathtrace_id                     | string   | Identifier of the path trace.                                                                                                      |
| netpath              | protocol                         | string   | Protocol used for the path trace (for example, `tcp`, `udp`, `icmp`).                                                              |
| netpath              | source                           | object   | Source endpoint of a network path measurement.                                                                                     |
| source               | hostname                         | string   | Hostname of the endpoint.                                                                                                          |
| netpath              | tags                             | [string] | Tags associated with the network path measurement.                                                                                 |
| netpath              | timestamp                        | int64    | Unix timestamp (ms) of the network path measurement.                                                                               |
| result               | netstats                         | object   | Aggregated network statistics from the test execution.                                                                             |
| netstats             | hops                             | object   | Statistics about the number of hops for a network test.                                                                            |
| hops                 | avg                              | double   | Average number of hops.                                                                                                            |
| hops                 | max                              | int64    | Maximum number of hops.                                                                                                            |
| hops                 | min                              | int64    | Minimum number of hops.                                                                                                            |
| netstats             | jitter                           | double   | Network jitter in milliseconds.                                                                                                    |
| netstats             | latency                          | object   | Latency statistics for a network probe.                                                                                            |
| latency              | avg                              | double   | Average latency in milliseconds.                                                                                                   |
| latency              | max                              | double   | Maximum latency in milliseconds.                                                                                                   |
| latency              | min                              | double   | Minimum latency in milliseconds.                                                                                                   |
| netstats             | packet_loss_percentage           | double   | Percentage of probe packets lost.                                                                                                  |
| netstats             | packets_received                 | int64    | Number of probe packets received.                                                                                                  |
| netstats             | packets_sent                     | int64    | Number of probe packets sent.                                                                                                      |
| result               | ocsp                             | object   | OCSP response received while validating a certificate.                                                                             |
| ocsp                 | certificate                      | object   | Certificate details returned in an OCSP response.                                                                                  |
| certificate          | revocation_reason                | string   | Reason code for the revocation, when applicable.                                                                                   |
| certificate          | revocation_time                  | int64    | Unix timestamp (ms) of the revocation.                                                                                             |
| certificate          | serial_number                    | string   | Serial number of the certificate.                                                                                                  |
| ocsp                 | status                           | string   | OCSP response status (for example, `good`, `revoked`, `unknown`).                                                                  |
| ocsp                 | updates                          | object   | OCSP response update timestamps.                                                                                                   |
| updates              | next_update                      | int64    | Unix timestamp (ms) of the next expected OCSP update.                                                                              |
| updates              | produced_at                      | int64    | Unix timestamp (ms) of when the OCSP response was produced.                                                                        |
| updates              | this_update                      | int64    | Unix timestamp (ms) of this OCSP update.                                                                                           |
| result               | ping                             | object   | A network probe result, used for traceroute hops and ping summaries.                                                               |
| ping                 | host                             | string   | Target hostname.                                                                                                                   |
| ping                 | latency                          | object   | Latency statistics for a network probe.                                                                                            |
| latency              | avg                              | double   | Average latency in milliseconds.                                                                                                   |
| latency              | max                              | double   | Maximum latency in milliseconds.                                                                                                   |
| latency              | min                              | double   | Minimum latency in milliseconds.                                                                                                   |
| ping                 | packet_loss_percentage           | double   | Percentage of probe packets lost.                                                                                                  |
| ping                 | packet_size                      | int64    | Size of each probe packet in bytes.                                                                                                |
| ping                 | packets_received                 | int64    | Number of probe packets received.                                                                                                  |
| ping                 | packets_sent                     | int64    | Number of probe packets sent.                                                                                                      |
| ping                 | resolved_ip                      | string   | Resolved IP address for the target.                                                                                                |
| ping                 | routers                          | [object] | List of intermediate routers for the traceroute.                                                                                   |
| routers              | ip                               | string   | IP address of the router.                                                                                                          |
| routers              | resolved_host                    | string   | Resolved hostname of the router.                                                                                                   |
| result               | received_email_count             | int64    | Number of emails received during the test (email tests).                                                                           |
| result               | received_message                 | string   | Message received from the target (for WebSocket/TCP/UDP tests).                                                                    |
| result               | request                          | object   | Details of the outgoing request made during the test execution.                                                                    |
| request              | allow_insecure                   | boolean  | Whether insecure certificates are allowed for this request.                                                                        |
| request              | body                             | string   | Body sent with the request.                                                                                                        |
| request              | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                             |
| request              | destination_service              | string   | Destination service for a Network Path test.                                                                                       |
| request              | dns_server                       | string   | DNS server used to resolve the target host.                                                                                        |
| request              | dns_server_port                  | int64    | Port of the DNS server used for resolution.                                                                                        |
| request              | e2e_queries                      | int64    | Number of end-to-end probe queries issued.                                                                                         |
| request              | files                            | [object] | Files attached to the request.                                                                                                     |
| files                | bucket_key                       | string   | Storage bucket key where the file is stored.                                                                                       |
| files                | encoding                         | string   | Encoding of the file contents.                                                                                                     |
| files                | name                             | string   | File name.                                                                                                                         |
| files                | size                             | int64    | File size in bytes.                                                                                                                |
| files                | type                             | string   | File MIME type.                                                                                                                    |
| request              | headers                          | object   | Headers sent with the request.                                                                                                     |
| request              | host                             | string   | Host targeted by the request.                                                                                                      |
| request              | max_ttl                          | int64    | Maximum TTL for network probe packets.                                                                                             |
| request              | message                          | string   | Message sent with the request (for WebSocket/TCP/UDP tests).                                                                       |
| request              | method                           | string   | HTTP method used for the request.                                                                                                  |
| request              | no_saving_response_body          | boolean  | Whether the response body was not saved.                                                                                           |
| request              | port                             |          | Port targeted by the request. Can be a number or a string variable reference.                                                      |
| request              | service                          | string   | Service name targeted by the request (for gRPC tests).                                                                             |
| request              | source_service                   | string   | Source service for a Network Path test.                                                                                            |
| request              | timeout                          | int64    | Request timeout in milliseconds.                                                                                                   |
| request              | tool_name                        | string   | Name of the MCP tool called (MCP tests only).                                                                                      |
| request              | traceroute_queries               | int64    | Number of traceroute probe queries issued.                                                                                         |
| request              | url                              | string   | URL targeted by the request.                                                                                                       |
| result               | resolved_ip                      | string   | IP address resolved for the target host.                                                                                           |
| result               | response                         | object   | Details of the response received during the test execution.                                                                        |
| response             | body                             | string   | Body of the response.                                                                                                              |
| response             | body_compressed                  | string   | Compressed representation of the response body.                                                                                    |
| response             | body_hashes                      | string   | Hashes computed over the response body.                                                                                            |
| response             | body_size                        | int64    | Size of the response body in bytes.                                                                                                |
| response             | cache_headers                    | object   | Cache-related response headers.                                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | cdn                              | object   | CDN provider details inferred from response headers.                                                                               |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                 |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                       |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                          |
| response             | close                            | object   | WebSocket close frame information for WebSocket test responses.                                                                    |
| close                | reason                           | string   | Reason string received in the close frame.                                                                                         |
| close                | status_code                      | int64    | Status code received in the close frame.                                                                                           |
| response             | compressed_message               | string   | Compressed representation of the response message.                                                                                 |
| response             | headers                          | object   | Response headers.                                                                                                                  |
| response             | healthcheck                      | object   | Health check information returned from a gRPC health check call.                                                                   |
| healthcheck          | message                          | object   | Raw health check message payload.                                                                                                  |
| additionalProperties | <any-key>                        | string   |
| healthcheck          | status                           | int64    | Health check status code.                                                                                                          |
| response             | http_version                     | string   | HTTP version of the response.                                                                                                      |
| response             | is_body_truncated                | boolean  | Whether the response body was truncated.                                                                                           |
| response             | is_message_truncated             | boolean  | Whether the response message was truncated.                                                                                        |
| response             | message                          | string   | Message received in the response (for WebSocket/TCP/UDP tests).                                                                    |
| response             | metadata                         | object   | Additional metadata returned with the response.                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | records                          | [object] | DNS records returned in the response (DNS tests only).                                                                             |
| records              | type                             | string   | DNS record type (for example, `A`, `AAAA`, `CNAME`).                                                                               |
| records              | values                           | [string] | Values associated with the DNS record.                                                                                             |
| response             | redirects                        | [object] | Redirect hops encountered while performing the request.                                                                            |
| redirects            | location                         | string   | Target location of the redirect.                                                                                                   |
| redirects            | status_code                      | int64    | HTTP status code of the redirect response.                                                                                         |
| response             | status_code                      | int64    | HTTP status code of the response.                                                                                                  |
| result               | run_type                         | enum     | The type of run for a Synthetic test result. Allowed enum values: `scheduled,fast,ci,triggered`                                    |
| result               | sent_message                     | string   | Message sent to the target (for WebSocket/TCP/UDP tests).                                                                          |
| result               | start_url                        | string   | Start URL for the test (browser tests).                                                                                            |
| result               | started_at                       | int64    | Timestamp of when the test started (in milliseconds).                                                                              |
| result               | status                           | enum     | Status of a Synthetic test result. Allowed enum values: `passed,failed,no_data`                                                    |
| result               | steps                            | [object] | Step results (for browser, mobile, and multistep API tests).                                                                       |
| steps                | allow_failure                    | boolean  | Whether the test continues when this step fails.                                                                                   |
| steps                | api_test                         | object   | Inner API test definition for browser `runApiTest` steps.                                                                          |
| steps                | assertion_result                 | object   | Assertion result for a browser or mobile step.                                                                                     |
| assertion_result     | actual                           |          | Actual value observed during the step assertion. Its type depends on the check type.                                               |
| assertion_result     | check_type                       | string   | Type of the step assertion check.                                                                                                  |
| assertion_result     | expected                         |          | Expected value for the step assertion. Its type depends on the check type.                                                         |
| assertion_result     | has_secure_variables             | boolean  | Whether the assertion involves secure variables.                                                                                   |
| steps                | assertions                       | [object] | Assertion results produced by the step.                                                                                            |
| assertions           | actual                           |          | Actual value observed during the test. Its type depends on the assertion type.                                                     |
| assertions           | error_message                    | string   | Error message if the assertion failed.                                                                                             |
| assertions           | expected                         |          | Expected value for the assertion. Its type depends on the assertion type.                                                          |
| assertions           | operator                         | string   | Operator used for the assertion (for example, `is`, `contains`).                                                                   |
| assertions           | property                         | string   | Property targeted by the assertion, when applicable.                                                                               |
| assertions           | target                           |          | Target value for the assertion. Its type depends on the assertion type.                                                            |
| assertions           | target_path                      | string   | JSON path or XPath evaluated for the assertion.                                                                                    |
| assertions           | target_path_operator             | string   | Operator used for the target path assertion.                                                                                       |
| assertions           | type                             | string   | Type of the assertion (for example, `responseTime`, `statusCode`, `body`).                                                         |
| assertions           | valid                            | boolean  | Whether the assertion passed.                                                                                                      |
| steps                | blocked_requests_urls            | [string] | URLs of requests blocked during the step.                                                                                          |
| steps                | bounds                           | object   | Bounding box of an element on the page.                                                                                            |
| bounds               | height                           | int64    | Height in pixels.                                                                                                                  |
| bounds               | width                            | int64    | Width in pixels.                                                                                                                   |
| bounds               | x                                | int64    | Horizontal position in pixels.                                                                                                     |
| bounds               | y                                | int64    | Vertical position in pixels.                                                                                                       |
| steps                | browser_errors                   | [object] | Browser errors captured during the step.                                                                                           |
| browser_errors       | description                      | string   | Error description.                                                                                                                 |
| browser_errors       | method                           | string   | HTTP method associated with the error (for network errors).                                                                        |
| browser_errors       | name                             | string   | Error name.                                                                                                                        |
| browser_errors       | status                           | int64    | HTTP status code associated with the error (for network errors).                                                                   |
| browser_errors       | type                             | string   | Type of the browser error.                                                                                                         |
| browser_errors       | url                              | object   | URL associated with the error.                                                                                                     |
| steps                | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                  |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                 |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                 |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                   |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                   |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                      |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                              |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                   |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                 |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                         |
| steps                | cdn_resources                    | [object] | CDN resources encountered during the step.                                                                                         |
| cdn_resources        | cdn                              | object   | CDN provider details inferred from response headers.                                                                               |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                 |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                       |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                          |
| cdn_resources        | resolved_ip                      | string   | Resolved IP address for the CDN resource.                                                                                          |
| cdn_resources        | timestamp                        | int64    | Unix timestamp (ms) of when the resource was fetched.                                                                              |
| cdn_resources        | timings                          | object   | Timing breakdown for fetching the CDN resource.                                                                                    |
| steps                | click_type                       | string   | Click type performed in a browser step.                                                                                            |
| steps                | compressed_json_descriptor       | string   | Compressed JSON descriptor for the step (internal format).                                                                         |
| steps                | config                           | object   | Request configuration executed by this step (API test steps).                                                                      |
| steps                | description                      | string   | Human-readable description of the step.                                                                                            |
| steps                | duration                         | double   | Duration of the step in milliseconds.                                                                                              |
| steps                | element_description              | string   | Description of the element interacted with by the step.                                                                            |
| steps                | element_updates                  | object   | Element locator updates produced during a step.                                                                                    |
| element_updates      | multi_locator                    | object   | Updated multi-locator definition.                                                                                                  |
| additionalProperties | <any-key>                        | string   |
| element_updates      | target_outer_html                | string   | Updated outer HTML of the targeted element.                                                                                        |
| element_updates      | version                          | int64    | Version of the element locator definition.                                                                                         |
| steps                | extracted_value                  | object   | A variable used or extracted during a test.                                                                                        |
| extracted_value      | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| extracted_value      | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| extracted_value      | example                          | string   | Example value for the variable.                                                                                                    |
| extracted_value      | id                               | string   | Variable identifier.                                                                                                               |
| extracted_value      | name                             | string   | Variable name.                                                                                                                     |
| extracted_value      | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| extracted_value      | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| extracted_value      | type                             | string   | Variable type.                                                                                                                     |
| extracted_value      | val                              | string   | Evaluated value of the variable.                                                                                                   |
| extracted_value      | value                            | string   | Current value of the variable.                                                                                                     |
| steps                | failure                          | object   | Details about the failure of a Synthetic test.                                                                                     |
| failure              | code                             | string   | Error code for the failure.                                                                                                        |
| failure              | internal_code                    | string   | Internal error code used for debugging.                                                                                            |
| failure              | internal_message                 | string   | Internal error message used for debugging.                                                                                         |
| failure              | message                          | string   | Error message for the failure.                                                                                                     |
| steps                | http_results                     | [object] | HTTP results produced by an MCP step.                                                                                              |
| http_results         | actual                           |          | Actual value observed during the test. Its type depends on the assertion type.                                                     |
| http_results         | error_message                    | string   | Error message if the assertion failed.                                                                                             |
| http_results         | expected                         |          | Expected value for the assertion. Its type depends on the assertion type.                                                          |
| http_results         | operator                         | string   | Operator used for the assertion (for example, `is`, `contains`).                                                                   |
| http_results         | property                         | string   | Property targeted by the assertion, when applicable.                                                                               |
| http_results         | target                           |          | Target value for the assertion. Its type depends on the assertion type.                                                            |
| http_results         | target_path                      | string   | JSON path or XPath evaluated for the assertion.                                                                                    |
| http_results         | target_path_operator             | string   | Operator used for the target path assertion.                                                                                       |
| http_results         | type                             | string   | Type of the assertion (for example, `responseTime`, `statusCode`, `body`).                                                         |
| http_results         | valid                            | boolean  | Whether the assertion passed.                                                                                                      |
| steps                | id                               | string   | Identifier of the step.                                                                                                            |
| steps                | is_critical                      | boolean  | Whether this step is critical for the test outcome.                                                                                |
| steps                | javascript_custom_assertion_code | boolean  | Whether the step uses a custom JavaScript assertion.                                                                               |
| steps                | locate_element_duration          | double   | Time taken to locate the element in milliseconds.                                                                                  |
| steps                | name                             | string   | Name of the step.                                                                                                                  |
| steps                | request                          | object   | Details of the outgoing request made during the test execution.                                                                    |
| request              | allow_insecure                   | boolean  | Whether insecure certificates are allowed for this request.                                                                        |
| request              | body                             | string   | Body sent with the request.                                                                                                        |
| request              | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                             |
| request              | destination_service              | string   | Destination service for a Network Path test.                                                                                       |
| request              | dns_server                       | string   | DNS server used to resolve the target host.                                                                                        |
| request              | dns_server_port                  | int64    | Port of the DNS server used for resolution.                                                                                        |
| request              | e2e_queries                      | int64    | Number of end-to-end probe queries issued.                                                                                         |
| request              | files                            | [object] | Files attached to the request.                                                                                                     |
| files                | bucket_key                       | string   | Storage bucket key where the file is stored.                                                                                       |
| files                | encoding                         | string   | Encoding of the file contents.                                                                                                     |
| files                | name                             | string   | File name.                                                                                                                         |
| files                | size                             | int64    | File size in bytes.                                                                                                                |
| files                | type                             | string   | File MIME type.                                                                                                                    |
| request              | headers                          | object   | Headers sent with the request.                                                                                                     |
| request              | host                             | string   | Host targeted by the request.                                                                                                      |
| request              | max_ttl                          | int64    | Maximum TTL for network probe packets.                                                                                             |
| request              | message                          | string   | Message sent with the request (for WebSocket/TCP/UDP tests).                                                                       |
| request              | method                           | string   | HTTP method used for the request.                                                                                                  |
| request              | no_saving_response_body          | boolean  | Whether the response body was not saved.                                                                                           |
| request              | port                             |          | Port targeted by the request. Can be a number or a string variable reference.                                                      |
| request              | service                          | string   | Service name targeted by the request (for gRPC tests).                                                                             |
| request              | source_service                   | string   | Source service for a Network Path test.                                                                                            |
| request              | timeout                          | int64    | Request timeout in milliseconds.                                                                                                   |
| request              | tool_name                        | string   | Name of the MCP tool called (MCP tests only).                                                                                      |
| request              | traceroute_queries               | int64    | Number of traceroute probe queries issued.                                                                                         |
| request              | url                              | string   | URL targeted by the request.                                                                                                       |
| steps                | response                         | object   | Details of the response received during the test execution.                                                                        |
| response             | body                             | string   | Body of the response.                                                                                                              |
| response             | body_compressed                  | string   | Compressed representation of the response body.                                                                                    |
| response             | body_hashes                      | string   | Hashes computed over the response body.                                                                                            |
| response             | body_size                        | int64    | Size of the response body in bytes.                                                                                                |
| response             | cache_headers                    | object   | Cache-related response headers.                                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | cdn                              | object   | CDN provider details inferred from response headers.                                                                               |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                 |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                       |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                          |
| response             | close                            | object   | WebSocket close frame information for WebSocket test responses.                                                                    |
| close                | reason                           | string   | Reason string received in the close frame.                                                                                         |
| close                | status_code                      | int64    | Status code received in the close frame.                                                                                           |
| response             | compressed_message               | string   | Compressed representation of the response message.                                                                                 |
| response             | headers                          | object   | Response headers.                                                                                                                  |
| response             | healthcheck                      | object   | Health check information returned from a gRPC health check call.                                                                   |
| healthcheck          | message                          | object   | Raw health check message payload.                                                                                                  |
| additionalProperties | <any-key>                        | string   |
| healthcheck          | status                           | int64    | Health check status code.                                                                                                          |
| response             | http_version                     | string   | HTTP version of the response.                                                                                                      |
| response             | is_body_truncated                | boolean  | Whether the response body was truncated.                                                                                           |
| response             | is_message_truncated             | boolean  | Whether the response message was truncated.                                                                                        |
| response             | message                          | string   | Message received in the response (for WebSocket/TCP/UDP tests).                                                                    |
| response             | metadata                         | object   | Additional metadata returned with the response.                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | records                          | [object] | DNS records returned in the response (DNS tests only).                                                                             |
| records              | type                             | string   | DNS record type (for example, `A`, `AAAA`, `CNAME`).                                                                               |
| records              | values                           | [string] | Values associated with the DNS record.                                                                                             |
| response             | redirects                        | [object] | Redirect hops encountered while performing the request.                                                                            |
| redirects            | location                         | string   | Target location of the redirect.                                                                                                   |
| redirects            | status_code                      | int64    | HTTP status code of the redirect response.                                                                                         |
| response             | status_code                      | int64    | HTTP status code of the response.                                                                                                  |
| steps                | retries                          | [object] | Retry results for the step.                                                                                                        |
| steps                | retry_count                      | int64    | Number of times this step was retried.                                                                                             |
| steps                | rum_context                      | object   | RUM application context associated with a step or sub-test.                                                                        |
| rum_context          | application_id                   | string   | RUM application identifier.                                                                                                        |
| rum_context          | session_id                       | string   | RUM session identifier.                                                                                                            |
| rum_context          | view_id                          | string   | RUM view identifier.                                                                                                               |
| steps                | started_at                       | int64    | Unix timestamp (ms) of when the step started.                                                                                      |
| steps                | status                           | string   | Status of the step (for example, `passed`, `failed`).                                                                              |
| steps                | sub_step                         | object   | Information about a sub-step in a nested test execution.                                                                           |
| sub_step             | level                            | int64    | Depth of the sub-step in the execution tree.                                                                                       |
| sub_step             | parent_step                      | object   | Reference to the parent step of a sub-step.                                                                                        |
| parent_step          | id                               | string   | Identifier of the parent step.                                                                                                     |
| sub_step             | parent_test                      | object   | Reference to the parent test of a sub-step.                                                                                        |
| parent_test          | id                               | string   | Identifier of the parent test.                                                                                                     |
| steps                | sub_test                         | object   | Information about a sub-test played from a parent browser test.                                                                    |
| sub_test             | id                               | string   | Identifier of the sub-test.                                                                                                        |
| sub_test             | playing_tab                      | int64    | Index of the browser tab playing the sub-test.                                                                                     |
| sub_test             | rum_context                      | object   | RUM application context associated with a step or sub-test.                                                                        |
| rum_context          | application_id                   | string   | RUM application identifier.                                                                                                        |
| rum_context          | session_id                       | string   | RUM session identifier.                                                                                                            |
| rum_context          | view_id                          | string   | RUM view identifier.                                                                                                               |
| steps                | subtype                          | string   | Subtype of the step.                                                                                                               |
| steps                | tabs                             | [object] | Browser tabs involved in the step.                                                                                                 |
| tabs                 | focused                          | boolean  | Whether the tab was focused during the step.                                                                                       |
| tabs                 | title                            | string   | Title of the tab.                                                                                                                  |
| tabs                 | url                              | string   | URL loaded in the tab.                                                                                                             |
| steps                | timings                          | object   | Timing breakdown of the step execution.                                                                                            |
| steps                | tunnel                           | boolean  | Whether the step was executed through a Synthetics tunnel.                                                                         |
| steps                | type                             | string   | Type of the step (for example, `click`, `assertElementContent`, `runApiTest`).                                                     |
| steps                | url                              | string   | URL associated with the step (for navigation steps).                                                                               |
| steps                | value                            |          | Step value. Its type depends on the step type.                                                                                     |
| steps                | variables                        | object   | Variables captured during a test step.                                                                                             |
| variables            | config                           | [object] | Variables defined in the test configuration.                                                                                       |
| config               | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| config               | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| config               | example                          | string   | Example value for the variable.                                                                                                    |
| config               | id                               | string   | Variable identifier.                                                                                                               |
| config               | name                             | string   | Variable name.                                                                                                                     |
| config               | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| config               | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| config               | type                             | string   | Variable type.                                                                                                                     |
| config               | val                              | string   | Evaluated value of the variable.                                                                                                   |
| config               | value                            | string   | Current value of the variable.                                                                                                     |
| variables            | extracted                        | [object] | Variables extracted during the test execution.                                                                                     |
| extracted            | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| extracted            | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| extracted            | example                          | string   | Example value for the variable.                                                                                                    |
| extracted            | id                               | string   | Variable identifier.                                                                                                               |
| extracted            | name                             | string   | Variable name.                                                                                                                     |
| extracted            | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| extracted            | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| extracted            | type                             | string   | Variable type.                                                                                                                     |
| extracted            | val                              | string   | Evaluated value of the variable.                                                                                                   |
| extracted            | value                            | string   | Current value of the variable.                                                                                                     |
| steps                | vitals_metrics                   | [object] | Web vitals metrics captured during the step.                                                                                       |
| vitals_metrics       | cls                              | double   | Cumulative Layout Shift score.                                                                                                     |
| vitals_metrics       | fcp                              | double   | First Contentful Paint in milliseconds.                                                                                            |
| vitals_metrics       | inp                              | double   | Interaction to Next Paint in milliseconds.                                                                                         |
| vitals_metrics       | lcp                              | double   | Largest Contentful Paint in milliseconds.                                                                                          |
| vitals_metrics       | ttfb                             | double   | Time To First Byte in milliseconds.                                                                                                |
| vitals_metrics       | url                              | string   | URL that produced the metrics.                                                                                                     |
| steps                | warnings                         | [object] | Warnings emitted during the step.                                                                                                  |
| warnings             | element_bounds                   | [object] | Bounds of elements related to the warning.                                                                                         |
| element_bounds       | height                           | int64    | Height in pixels.                                                                                                                  |
| element_bounds       | width                            | int64    | Width in pixels.                                                                                                                   |
| element_bounds       | x                                | int64    | Horizontal position in pixels.                                                                                                     |
| element_bounds       | y                                | int64    | Vertical position in pixels.                                                                                                       |
| warnings             | message                          | string   | Warning message.                                                                                                                   |
| warnings             | type                             | string   | Type of the warning.                                                                                                               |
| result               | time_to_interactive              | int64    | Time to interactive in milliseconds (browser tests).                                                                               |
| result               | timings                          | object   | Timing breakdown of the test request phases (for example, DNS, TCP, TLS, first byte).                                              |
| result               | trace                            | object   | Trace identifiers associated with a Synthetic test result.                                                                         |
| trace                | id                               | string   | Datadog APM trace identifier.                                                                                                      |
| trace                | otel_id                          | string   | OpenTelemetry trace identifier.                                                                                                    |
| result               | traceroute                       | [object] | Traceroute hop results (for network tests).                                                                                        |
| traceroute           | host                             | string   | Target hostname.                                                                                                                   |
| traceroute           | latency                          | object   | Latency statistics for a network probe.                                                                                            |
| latency              | avg                              | double   | Average latency in milliseconds.                                                                                                   |
| latency              | max                              | double   | Maximum latency in milliseconds.                                                                                                   |
| latency              | min                              | double   | Minimum latency in milliseconds.                                                                                                   |
| traceroute           | packet_loss_percentage           | double   | Percentage of probe packets lost.                                                                                                  |
| traceroute           | packet_size                      | int64    | Size of each probe packet in bytes.                                                                                                |
| traceroute           | packets_received                 | int64    | Number of probe packets received.                                                                                                  |
| traceroute           | packets_sent                     | int64    | Number of probe packets sent.                                                                                                      |
| traceroute           | resolved_ip                      | string   | Resolved IP address for the target.                                                                                                |
| traceroute           | routers                          | [object] | List of intermediate routers for the traceroute.                                                                                   |
| routers              | ip                               | string   | IP address of the router.                                                                                                          |
| routers              | resolved_host                    | string   | Resolved hostname of the router.                                                                                                   |
| result               | triggered_at                     | int64    | Timestamp of when the test was triggered (in milliseconds).                                                                        |
| result               | tunnel                           | boolean  | Whether the test was executed through a tunnel.                                                                                    |
| result               | turns                            | [object] | Turns executed by a goal-based browser test.                                                                                       |
| turns                | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                  |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                 |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                 |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                   |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                   |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                      |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                              |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                   |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                 |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                         |
| turns                | name                             | string   | Name of the turn.                                                                                                                  |
| turns                | reasoning                        | string   | Agent reasoning produced for this turn.                                                                                            |
| turns                | status                           | string   | Status of the turn (for example, `passed`, `failed`).                                                                              |
| turns                | steps                            | [object] | Steps executed during the turn.                                                                                                    |
| steps                | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                  |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                 |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                 |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                   |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                   |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                      |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                              |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                   |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                 |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                         |
| steps                | config                           | object   | Browser step configuration for this turn step.                                                                                     |
| turns                | turn_finished_at                 | int64    | Unix timestamp (ms) of when the turn finished.                                                                                     |
| turns                | turn_started_at                  | int64    | Unix timestamp (ms) of when the turn started.                                                                                      |
| result               | unhealthy                        | boolean  | Whether the test runner was unhealthy at the time of execution.                                                                    |
| result               | variables                        | object   | Variables captured during a test step.                                                                                             |
| variables            | config                           | [object] | Variables defined in the test configuration.                                                                                       |
| config               | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| config               | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| config               | example                          | string   | Example value for the variable.                                                                                                    |
| config               | id                               | string   | Variable identifier.                                                                                                               |
| config               | name                             | string   | Variable name.                                                                                                                     |
| config               | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| config               | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| config               | type                             | string   | Variable type.                                                                                                                     |
| config               | val                              | string   | Evaluated value of the variable.                                                                                                   |
| config               | value                            | string   | Current value of the variable.                                                                                                     |
| variables            | extracted                        | [object] | Variables extracted during the test execution.                                                                                     |
| extracted            | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| extracted            | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| extracted            | example                          | string   | Example value for the variable.                                                                                                    |
| extracted            | id                               | string   | Variable identifier.                                                                                                               |
| extracted            | name                             | string   | Variable name.                                                                                                                     |
| extracted            | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| extracted            | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| extracted            | type                             | string   | Variable type.                                                                                                                     |
| extracted            | val                              | string   | Evaluated value of the variable.                                                                                                   |
| extracted            | value                            | string   | Current value of the variable.                                                                                                     |
| attributes           | test_sub_type                    | enum     | Subtype of the Synthetic test that produced this result. Allowed enum values: `dns,grpc,http,icmp,mcp,multi,ssl,tcp,udp,websocket` |
| attributes           | test_type                        | enum     | Type of the Synthetic test that produced this result. Allowed enum values: `api,browser,mobile,network`                            |
| data                 | id                               | string   | The result ID.                                                                                                                     |
| data                 | relationships                    | object   | Relationships for a Synthetic test result.                                                                                         |
| relationships        | test                             | object   | Relationship to the Synthetic test.                                                                                                |
| test                 | data                             | object   | Data for the test relationship.                                                                                                    |
| data                 | id                               | string   | The public ID of the test.                                                                                                         |
| data                 | type                             | string   | Type of the related resource.                                                                                                      |
| data                 | type                             | enum     | Type of the Synthetic test result resource, `result`. Allowed enum values: `result`                                                |
|                      | included                         | [object] | Array of included related resources, such as the test definition.                                                                  |
| included             | attributes                       | object   | Attributes of the included resource.                                                                                               |
| included             | id                               | string   | ID of the included resource.                                                                                                       |
| included             | type                             | string   | Type of the included resource.                                                                                                     |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "batch": {
        "id": "batch-abc-123"
      },
      "ci": {
        "pipeline": {
          "id": "pipeline-abc-123",
          "name": "build-and-test",
          "number": 42,
          "url": "https://github.com/DataDog/example/actions/runs/42"
        },
        "provider": {
          "name": "github"
        },
        "stage": {
          "name": "test"
        },
        "workspace_path": "/home/runner/work/example"
      },
      "device": {
        "browser": {
          "type": "edge",
          "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 Edg/127.0.2651.105 DatadogSynthetics",
          "version": "127.0.2651.105"
        },
        "id": "chrome.laptop_large",
        "name": "Chrome - Laptop Large",
        "platform": {
          "name": "ios",
          "version": "14.8"
        },
        "resolution": {
          "height": 1100,
          "pixel_ratio": 2,
          "width": 1440
        },
        "type": "browser"
      },
      "git": {
        "branch": "main",
        "commit": {
          "author": {
            "date": "2024-08-15T14:23:00Z",
            "email": "jane.doe@example.com",
            "name": "Jane Doe"
          },
          "committer": {
            "date": "2024-08-15T14:23:00Z",
            "email": "jane.doe@example.com",
            "name": "Jane Doe"
          },
          "message": "Fix bug in login flow",
          "sha": "9e107d9d372bb6826bd81d3542a419d6f0e1de56",
          "url": "https://github.com/DataDog/example/commit/9e107d9d372bb6826bd81d3542a419d6f0e1de56"
        },
        "repository_url": "https://github.com/DataDog/example"
      },
      "location": {
        "id": "aws:us-east-1",
        "name": "N. Virginia (AWS)",
        "version": "1.0.0",
        "worker_id": "worker-abc-123"
      },
      "result": {
        "assertions": [
          {
            "actual": 200,
            "error_message": "Assertion failed: expected 200 but got 500",
            "expected": "200",
            "operator": "is",
            "property": "content-type",
            "target": 200,
            "target_path": "$.url",
            "target_path_operator": "contains",
            "type": "statusCode",
            "valid": true
          }
        ],
        "bucket_keys": {
          "after_step_screenshot": "screenshots/after-step-1-1.png",
          "after_turn_screenshot": "screenshots/after-turn-1.png",
          "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
          "before_step_screenshot": "screenshots/before-step-1-1.png",
          "before_turn_screenshot": "screenshots/before-turn-1.png",
          "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
          "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
          "email_messages": [],
          "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
          "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
          "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
        },
        "call_type": "unary",
        "cert": {
          "cipher": "TLS_AES_256_GCM_SHA384",
          "exponent": 65537,
          "ext_key_usage": [
            "1.3.6.1.5.5.7.3.1"
          ],
          "fingerprint": "D6:03:5A:9F:93:E1:B7:28:EC:90:C5:9F:72:30:55:7C:74:5F:53:92",
          "fingerprint256": "04:45:93:A9:4C:14:70:47:DB:3C:FC:05:F9:5A:50:4E:DA:DB:A1:C6:37:3D:15:C0:B2:7E:5D:93:5F:A2:02:C7",
          "issuer": {
            "<any-key>": "string"
          },
          "modulus": "C0FCE9F9...",
          "protocol": "TLSv1.3",
          "serial_number": "7B584A1A6670A1EB0941A9A121569D60",
          "subject": {
            "<any-key>": "string"
          },
          "tls_version": 1.3,
          "valid": {
            "from": 1742469686000,
            "to": 1749727285000
          }
        },
        "compressed_json_descriptor": "compressedJsonDescriptorValue",
        "compressed_steps": "eJzLSM3JyQcABiwCFQ==",
        "connection_outcome": "established",
        "dns_resolution": {
          "attempts": [],
          "resolved_ip": "54.243.255.141",
          "resolved_port": "443",
          "server": "8.8.4.4"
        },
        "duration": 380.7,
        "exited_on_step_success": false,
        "failure": {
          "code": "TIMEOUT",
          "internal_code": "INCORRECT_ASSERTION",
          "internal_message": "Assertion failed on step 2",
          "message": "Connection timed out"
        },
        "finished_at": 1723782422760,
        "handshake": {
          "request": {
            "allow_insecure": false,
            "body": "{\"key\":\"value\"}",
            "call_type": "unary",
            "destination_service": "my-service",
            "dns_server": "8.8.8.8",
            "dns_server_port": 53,
            "e2e_queries": 4,
            "files": [
              {
                "bucket_key": "api-upload-file/s3v-msw-tp3/2024-08-20T12:18:27.628081_f433c953-a58a-4296-834b-0669e32ba55f.json",
                "encoding": "base64",
                "name": "dd_logo_h_rgb.jpg",
                "size": 30294,
                "type": "image/jpeg"
              }
            ],
            "headers": {
              "content-type": "application/json"
            },
            "host": "grpcbin.test.k6.io",
            "max_ttl": 64,
            "message": "My message",
            "method": "GET",
            "no_saving_response_body": true,
            "port": 9000,
            "service": "addsvc.Add",
            "source_service": "synthetics",
            "timeout": 60,
            "tool_name": "search",
            "traceroute_queries": 2,
            "url": "https://httpbin.org/anything/lol valuehugo"
          },
          "response": {
            "body": "{\"status\":\"ok\"}",
            "body_compressed": "eJzLSM3JyQcABiwCFQ==",
            "body_hashes": "9e107d9d372bb6826bd81d3542a419d6",
            "body_size": 793,
            "cache_headers": {
              "<any-key>": "string"
            },
            "cdn": {
              "cache": {
                "cached": true,
                "status": "HIT"
              },
              "provider": "google_cloud"
            },
            "close": {
              "reason": "Normal closure",
              "status_code": 1000
            },
            "compressed_message": "eJzLSM3JyQcABiwCFQ==",
            "headers": {
              "content-type": "application/json"
            },
            "healthcheck": {
              "message": {
                "<any-key>": "string"
              },
              "status": 1
            },
            "http_version": "2.0",
            "is_body_truncated": false,
            "is_message_truncated": false,
            "message": "{\"f_string\":\"concat-STATIC_HIDDEN_VALUE\"}",
            "metadata": {
              "<any-key>": "string"
            },
            "records": [
              {
                "type": "A",
                "values": [
                  "213.186.33.19"
                ]
              }
            ],
            "redirects": [
              {
                "location": "https://example.com/new-location",
                "status_code": 301
              }
            ],
            "status_code": 200
          }
        },
        "id": "5158904793181869365",
        "initial_id": "5158904793181869365",
        "is_fast_retry": true,
        "is_last_retry": true,
        "netpath": {
          "destination": {
            "hostname": "34.95.79.70",
            "ip_address": "34.95.79.70",
            "port": 80
          },
          "hops": [
            {
              "hostname": "70.79.95.34.bc.googleusercontent.com",
              "ip_address": "10.240.134.15",
              "reachable": true,
              "rtt": 0.000346599,
              "ttl": 2
            }
          ],
          "origin": "synthetics",
          "pathtrace_id": "5d3cb978-533b-41ce-85a4-3661c8dd6a0b",
          "protocol": "TCP",
          "source": {
            "hostname": "edge-eu1.staging.dog"
          },
          "tags": [
            "synthetics.test_id:nja-epx-mg8"
          ],
          "timestamp": 1744117822266
        },
        "netstats": {
          "hops": {
            "avg": 11,
            "max": 11,
            "min": 11
          },
          "jitter": 0.08,
          "latency": {
            "avg": 1.8805,
            "max": 1.97,
            "min": 1.76
          },
          "packet_loss_percentage": 0,
          "packets_received": 4,
          "packets_sent": 4
        },
        "ocsp": {
          "certificate": {
            "revocation_reason": "unspecified",
            "revocation_time": 1749727285000,
            "serial_number": "7B584A1A6670A1EB0941A9A121569D60"
          },
          "status": "good",
          "updates": {
            "next_update": 1743074486000,
            "produced_at": 1742469686000,
            "this_update": 1742469686000
          }
        },
        "ping": {
          "host": "34.95.79.70",
          "latency": {
            "avg": 1.8805,
            "max": 1.97,
            "min": 1.76
          },
          "packet_loss_percentage": 0,
          "packet_size": 56,
          "packets_received": 4,
          "packets_sent": 4,
          "resolved_ip": "34.95.79.70",
          "routers": [
            {
              "ip": "34.95.79.70",
              "resolved_host": "70.79.95.34.bc.googleusercontent.com"
            }
          ]
        },
        "received_email_count": 1,
        "received_message": "UDP echo: b'Test message'",
        "request": {
          "allow_insecure": false,
          "body": "{\"key\":\"value\"}",
          "call_type": "unary",
          "destination_service": "my-service",
          "dns_server": "8.8.8.8",
          "dns_server_port": 53,
          "e2e_queries": 4,
          "files": [
            {
              "bucket_key": "api-upload-file/s3v-msw-tp3/2024-08-20T12:18:27.628081_f433c953-a58a-4296-834b-0669e32ba55f.json",
              "encoding": "base64",
              "name": "dd_logo_h_rgb.jpg",
              "size": 30294,
              "type": "image/jpeg"
            }
          ],
          "headers": {
            "content-type": "application/json"
          },
          "host": "grpcbin.test.k6.io",
          "max_ttl": 64,
          "message": "My message",
          "method": "GET",
          "no_saving_response_body": true,
          "port": 9000,
          "service": "addsvc.Add",
          "source_service": "synthetics",
          "timeout": 60,
          "tool_name": "search",
          "traceroute_queries": 2,
          "url": "https://httpbin.org/anything/lol valuehugo"
        },
        "resolved_ip": "54.243.255.141",
        "response": {
          "body": "{\"status\":\"ok\"}",
          "body_compressed": "eJzLSM3JyQcABiwCFQ==",
          "body_hashes": "9e107d9d372bb6826bd81d3542a419d6",
          "body_size": 793,
          "cache_headers": {
            "<any-key>": "string"
          },
          "cdn": {
            "cache": {
              "cached": true,
              "status": "HIT"
            },
            "provider": "google_cloud"
          },
          "close": {
            "reason": "Normal closure",
            "status_code": 1000
          },
          "compressed_message": "eJzLSM3JyQcABiwCFQ==",
          "headers": {
            "content-type": "application/json"
          },
          "healthcheck": {
            "message": {
              "<any-key>": "string"
            },
            "status": 1
          },
          "http_version": "2.0",
          "is_body_truncated": false,
          "is_message_truncated": false,
          "message": "{\"f_string\":\"concat-STATIC_HIDDEN_VALUE\"}",
          "metadata": {
            "<any-key>": "string"
          },
          "records": [
            {
              "type": "A",
              "values": [
                "213.186.33.19"
              ]
            }
          ],
          "redirects": [
            {
              "location": "https://example.com/new-location",
              "status_code": 301
            }
          ],
          "status_code": 200
        },
        "run_type": "scheduled",
        "sent_message": "udp mess",
        "start_url": "http://34.95.79.70/prototype",
        "started_at": 1723782422750,
        "status": "passed",
        "steps": [
          {
            "allow_failure": false,
            "api_test": {},
            "assertion_result": {
              "actual": "True\ngood\ngood\ngood\ngood\nTrue",
              "check_type": "contains",
              "expected": "True good good good good True",
              "has_secure_variables": false
            },
            "assertions": [
              {
                "actual": 200,
                "error_message": "Assertion failed: expected 200 but got 500",
                "expected": "200",
                "operator": "is",
                "property": "content-type",
                "target": 200,
                "target_path": "$.url",
                "target_path_operator": "contains",
                "type": "statusCode",
                "valid": true
              }
            ],
            "blocked_requests_urls": [],
            "bounds": {
              "height": 37,
              "width": 343,
              "x": 16,
              "y": 140
            },
            "browser_errors": [
              {
                "description": "Failed to fetch resource",
                "method": "GET",
                "name": "NetworkError",
                "status": 500,
                "type": "network",
                "url": {}
              }
            ],
            "bucket_keys": {
              "after_step_screenshot": "screenshots/after-step-1-1.png",
              "after_turn_screenshot": "screenshots/after-turn-1.png",
              "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
              "before_step_screenshot": "screenshots/before-step-1-1.png",
              "before_turn_screenshot": "screenshots/before-turn-1.png",
              "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
              "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
              "email_messages": [],
              "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
              "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
              "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
            },
            "cdn_resources": [
              {
                "cdn": {
                  "cache": {
                    "cached": true,
                    "status": "HIT"
                  },
                  "provider": "google_cloud"
                },
                "resolved_ip": "34.95.79.70",
                "timestamp": 1724521406576,
                "timings": {
                  "firstByte": 99.7,
                  "tcp": 0.9
                }
              }
            ],
            "click_type": "primary",
            "compressed_json_descriptor": "compressedJsonDescriptorValue",
            "config": {},
            "description": "Navigate to start URL",
            "duration": 1015,
            "element_description": "<XCUIElementTypeStaticText value=\"Scroll\" name=\"Scroll\" label=\"Scroll\">",
            "element_updates": {
              "multi_locator": {
                "<any-key>": "string"
              },
              "target_outer_html": "<h1>My website - v4</h1>",
              "version": 3
            },
            "extracted_value": {
              "err": "LOCAL_VARIABLE_UNKNOWN",
              "error_message": "Unknown variable name undefined.",
              "example": "lol value",
              "id": "c896702c-1e34-4e62-a67b-432e8092d062",
              "name": "HEADER_VALUE",
              "pattern": "lol value",
              "secure": false,
              "type": "text",
              "val": "value-to-extract",
              "value": "lol value"
            },
            "failure": {
              "code": "TIMEOUT",
              "internal_code": "INCORRECT_ASSERTION",
              "internal_message": "Assertion failed on step 2",
              "message": "Connection timed out"
            },
            "http_results": [
              {
                "actual": 200,
                "error_message": "Assertion failed: expected 200 but got 500",
                "expected": "200",
                "operator": "is",
                "property": "content-type",
                "target": 200,
                "target_path": "$.url",
                "target_path_operator": "contains",
                "type": "statusCode",
                "valid": true
              }
            ],
            "id": "fkk-j2a-gmw",
            "is_critical": true,
            "javascript_custom_assertion_code": false,
            "locate_element_duration": 845,
            "name": "Extract variable from body",
            "request": {
              "allow_insecure": false,
              "body": "{\"key\":\"value\"}",
              "call_type": "unary",
              "destination_service": "my-service",
              "dns_server": "8.8.8.8",
              "dns_server_port": 53,
              "e2e_queries": 4,
              "files": [
                {
                  "bucket_key": "api-upload-file/s3v-msw-tp3/2024-08-20T12:18:27.628081_f433c953-a58a-4296-834b-0669e32ba55f.json",
                  "encoding": "base64",
                  "name": "dd_logo_h_rgb.jpg",
                  "size": 30294,
                  "type": "image/jpeg"
                }
              ],
              "headers": {
                "content-type": "application/json"
              },
              "host": "grpcbin.test.k6.io",
              "max_ttl": 64,
              "message": "My message",
              "method": "GET",
              "no_saving_response_body": true,
              "port": 9000,
              "service": "addsvc.Add",
              "source_service": "synthetics",
              "timeout": 60,
              "tool_name": "search",
              "traceroute_queries": 2,
              "url": "https://httpbin.org/anything/lol valuehugo"
            },
            "response": {
              "body": "{\"status\":\"ok\"}",
              "body_compressed": "eJzLSM3JyQcABiwCFQ==",
              "body_hashes": "9e107d9d372bb6826bd81d3542a419d6",
              "body_size": 793,
              "cache_headers": {
                "<any-key>": "string"
              },
              "cdn": {
                "cache": {
                  "cached": true,
                  "status": "HIT"
                },
                "provider": "google_cloud"
              },
              "close": {
                "reason": "Normal closure",
                "status_code": 1000
              },
              "compressed_message": "eJzLSM3JyQcABiwCFQ==",
              "headers": {
                "content-type": "application/json"
              },
              "healthcheck": {
                "message": {
                  "<any-key>": "string"
                },
                "status": 1
              },
              "http_version": "2.0",
              "is_body_truncated": false,
              "is_message_truncated": false,
              "message": "{\"f_string\":\"concat-STATIC_HIDDEN_VALUE\"}",
              "metadata": {
                "<any-key>": "string"
              },
              "records": [
                {
                  "type": "A",
                  "values": [
                    "213.186.33.19"
                  ]
                }
              ],
              "redirects": [
                {
                  "location": "https://example.com/new-location",
                  "status_code": 301
                }
              ],
              "status_code": 200
            },
            "retries": [],
            "retry_count": 0,
            "rum_context": {
              "application_id": "00000000-0000-0000-0000-000000000000",
              "session_id": "11111111-1111-1111-1111-111111111111",
              "view_id": "22222222-2222-2222-2222-222222222222"
            },
            "started_at": 1724445283308,
            "status": "passed",
            "sub_step": {
              "level": 1,
              "parent_step": {
                "id": "fkk-j2a-gmw"
              },
              "parent_test": {
                "id": "abc-def-123"
              }
            },
            "sub_test": {
              "id": "abc-def-123",
              "playing_tab": 0,
              "rum_context": {
                "application_id": "00000000-0000-0000-0000-000000000000",
                "session_id": "11111111-1111-1111-1111-111111111111",
                "view_id": "22222222-2222-2222-2222-222222222222"
              }
            },
            "subtype": "http",
            "tabs": [
              {
                "focused": true,
                "title": "Team Browser mini-websites",
                "url": "http://34.95.79.70/prototype"
              }
            ],
            "timings": {},
            "tunnel": false,
            "type": "click",
            "url": "http://34.95.79.70/prototype",
            "value": "http://34.95.79.70/prototype",
            "variables": {
              "config": [
                {
                  "err": "LOCAL_VARIABLE_UNKNOWN",
                  "error_message": "Unknown variable name undefined.",
                  "example": "lol value",
                  "id": "c896702c-1e34-4e62-a67b-432e8092d062",
                  "name": "HEADER_VALUE",
                  "pattern": "lol value",
                  "secure": false,
                  "type": "text",
                  "val": "value-to-extract",
                  "value": "lol value"
                }
              ],
              "extracted": [
                {
                  "err": "LOCAL_VARIABLE_UNKNOWN",
                  "error_message": "Unknown variable name undefined.",
                  "example": "lol value",
                  "id": "c896702c-1e34-4e62-a67b-432e8092d062",
                  "name": "HEADER_VALUE",
                  "pattern": "lol value",
                  "secure": false,
                  "type": "text",
                  "val": "value-to-extract",
                  "value": "lol value"
                }
              ]
            },
            "vitals_metrics": [
              {
                "cls": 0,
                "fcp": 120.3,
                "inp": 85,
                "lcp": 210.5,
                "ttfb": 95.2,
                "url": "http://34.95.79.70/prototype"
              }
            ],
            "warnings": [
              {
                "element_bounds": [
                  {
                    "height": 37,
                    "width": 343,
                    "x": 16,
                    "y": 140
                  }
                ],
                "message": "Element is not visible in the viewport",
                "type": "visibility"
              }
            ]
          }
        ],
        "time_to_interactive": 183,
        "timings": {
          "dns": 2.9,
          "download": 2.1,
          "firstByte": 95.2,
          "ssl": 187.9,
          "tcp": 92.6,
          "total": 380.7
        },
        "trace": {
          "id": "5513046492231128177",
          "otel_id": "d8ba00eb1507bdba8643ba8e7a1c022c"
        },
        "traceroute": [
          {
            "host": "34.95.79.70",
            "latency": {
              "avg": 1.8805,
              "max": 1.97,
              "min": 1.76
            },
            "packet_loss_percentage": 0,
            "packet_size": 56,
            "packets_received": 4,
            "packets_sent": 4,
            "resolved_ip": "34.95.79.70",
            "routers": [
              {
                "ip": "34.95.79.70",
                "resolved_host": "70.79.95.34.bc.googleusercontent.com"
              }
            ]
          }
        ],
        "triggered_at": 1723782422715,
        "tunnel": false,
        "turns": [
          {
            "bucket_keys": {
              "after_step_screenshot": "screenshots/after-step-1-1.png",
              "after_turn_screenshot": "screenshots/after-turn-1.png",
              "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
              "before_step_screenshot": "screenshots/before-step-1-1.png",
              "before_turn_screenshot": "screenshots/before-turn-1.png",
              "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
              "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
              "email_messages": [],
              "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
              "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
              "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
            },
            "name": "Turn 1",
            "reasoning": "I need to navigate to the chairs section",
            "status": "passed",
            "steps": [
              {
                "bucket_keys": {
                  "after_step_screenshot": "screenshots/after-step-1-1.png",
                  "after_turn_screenshot": "screenshots/after-turn-1.png",
                  "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
                  "before_step_screenshot": "screenshots/before-step-1-1.png",
                  "before_turn_screenshot": "screenshots/before-turn-1.png",
                  "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
                  "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
                  "email_messages": [],
                  "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
                  "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
                  "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
                },
                "config": {
                  "id": "step-1",
                  "name": "Click on div \"Chairs\"",
                  "type": "click"
                }
              }
            ],
            "turn_finished_at": 1724521438800,
            "turn_started_at": 1724521436800
          }
        ],
        "unhealthy": false,
        "variables": {
          "config": [
            {
              "err": "LOCAL_VARIABLE_UNKNOWN",
              "error_message": "Unknown variable name undefined.",
              "example": "lol value",
              "id": "c896702c-1e34-4e62-a67b-432e8092d062",
              "name": "HEADER_VALUE",
              "pattern": "lol value",
              "secure": false,
              "type": "text",
              "val": "value-to-extract",
              "value": "lol value"
            }
          ],
          "extracted": [
            {
              "err": "LOCAL_VARIABLE_UNKNOWN",
              "error_message": "Unknown variable name undefined.",
              "example": "lol value",
              "id": "c896702c-1e34-4e62-a67b-432e8092d062",
              "name": "HEADER_VALUE",
              "pattern": "lol value",
              "secure": false,
              "type": "text",
              "val": "value-to-extract",
              "value": "lol value"
            }
          ]
        }
      },
      "test_sub_type": "http",
      "test_type": "api"
    },
    "id": "5158904793181869365",
    "relationships": {
      "test": {
        "data": {
          "id": "abc-def-123",
          "type": "test"
        }
      }
    },
    "type": "result"
  },
  "included": [
    {
      "attributes": {},
      "id": "abc-def-123",
      "type": "test"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"export result_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/browser/${public_id}/results/${result_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Get details of batch{% #get-details-of-batch %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                            |
| ----------------- | ----------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/ci/batch/{batch_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/ci/batch/{batch_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/ci/batch/{batch_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/ci/batch/{batch_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/ci/batch/{batch_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/ci/batch/{batch_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/ci/batch/{batch_id} |

### Overview

Get a batch's updated details. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                       | Type   | Description          |
| -------------------------- | ------ | -------------------- |
| batch_id [*required*] | string | The ID of the batch. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Details about a batch response.

| Parent field | Field          | Type     | Description                                                                                                      |
| ------------ | -------------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
|              | data           | object   | Wrapper object that contains the details of a batch.                                                             |
| data         | metadata       | object   | Metadata for the Synthetic tests run.                                                                            |
| metadata     | ci             | object   | Description of the CI provider.                                                                                  |
| ci           | pipeline       | object   | Description of the CI pipeline.                                                                                  |
| pipeline     | url            | string   | URL of the pipeline.                                                                                             |
| ci           | provider       | object   | Description of the CI provider.                                                                                  |
| provider     | name           | string   | Name of the CI provider.                                                                                         |
| metadata     | git            | object   | Git information.                                                                                                 |
| git          | branch         | string   | Branch name.                                                                                                     |
| git          | commitSha      | string   | The commit SHA.                                                                                                  |
| data         | results        | [object] | List of results for the batch.                                                                                   |
| results      | device         | string   | The device ID.                                                                                                   |
| results      | duration       | double   | Total duration in millisecond of the test.                                                                       |
| results      | execution_rule | enum     | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                        |
| results      | location       | string   | Name of the location.                                                                                            |
| results      | result_id      | string   | The ID of the result to get.                                                                                     |
| results      | retries        | double   | Number of times this result has been retried.                                                                    |
| results      | status         | enum     | Determines whether the batch has passed, failed, or is in progress. Allowed enum values: `passed,skipped,failed` |
| results      | test_name      | string   | Name of the test.                                                                                                |
| results      | test_public_id | string   | The public ID of the Synthetic test.                                                                             |
| results      | test_type      | enum     | Type of the Synthetic test. Allowed enum values: `api,browser,mobile,network`                                    |
| data         | status         | enum     | Determines whether the batch has passed, failed, or is in progress. Allowed enum values: `passed,skipped,failed` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "metadata": {
      "ci": {
        "pipeline": {
          "url": "string"
        },
        "provider": {
          "name": "string"
        }
      },
      "git": {
        "branch": "string",
        "commitSha": "string"
      }
    },
    "results": [
      {
        "device": "chrome.laptop_large",
        "duration": "number",
        "execution_rule": "blocking",
        "location": "string",
        "result_id": "string",
        "retries": "number",
        "status": "string",
        "test_name": "string",
        "test_public_id": "string",
        "test_type": "string"
      }
    ],
    "status": "string"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Batch does not exist.
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport batch_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/ci/batch/${batch_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get details of batch returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_synthetics_ci_batch(
        batch_id="batch_id",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get details of batch returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.get_synthetics_ci_batch("batch_id")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get details of batch returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetSyntheticsCIBatch(ctx, "batch_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetSyntheticsCIBatch`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetSyntheticsCIBatch`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get details of batch returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsBatchDetails;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsBatchDetails result = apiInstance.getSyntheticsCIBatch("batch_id");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getSyntheticsCIBatch");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Get details of batch returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.get_synthetics_ci_batch("batch_id".to_string()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get details of batch returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiGetSyntheticsCIBatchRequest = {
  batchId: "batch_id",
};

apiInstance
  .getSyntheticsCIBatch(params)
  .then((data: v1.SyntheticsBatchDetails) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Trigger tests from CI/CD pipelines{% #trigger-tests-from-cicd-pipelines %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                          |
| ----------------- | --------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v1/synthetics/tests/trigger/ci |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v1/synthetics/tests/trigger/ci |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v1/synthetics/tests/trigger/ci      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v1/synthetics/tests/trigger/ci      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v1/synthetics/tests/trigger/ci     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v1/synthetics/tests/trigger/ci |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v1/synthetics/tests/trigger/ci |

### Overview

Trigger a set of Synthetic tests for continuous integration. This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)

Details of the test to trigger.

{% tab title="Model" %}

| Parent field         | Field                                    | Type          | Description                                                                                           |
| -------------------- | ---------------------------------------- | ------------- | ----------------------------------------------------------------------------------------------------- |
|                      | tests                                    | [object]      | List of Synthetic tests with overrides.                                                               |
| tests                | allowInsecureCertificates                | boolean       | Disable certificate checks in API tests.                                                              |
| tests                | basicAuth                                |  <oneOf> | Object to handle basic authentication when performing the test.                                       |
| basicAuth            | Option 1                                 | object        | Object to handle basic authentication when performing the test.                                       |
| Option 1             | password                                 | string        | Password to use for the basic authentication.                                                         |
| Option 1             | type                                     | enum          | The type of basic authentication to use when performing the test. Allowed enum values: `web`          |
| Option 1             | username                                 | string        | Username to use for the basic authentication.                                                         |
| basicAuth            | Option 2                                 | object        | Object to handle `SIGV4` authentication when performing the test.                                     |
| Option 2             | accessKey [*required*]              | string        | Access key for the `SIGV4` authentication.                                                            |
| Option 2             | region                                   | string        | Region for the `SIGV4` authentication.                                                                |
| Option 2             | secretKey [*required*]              | string        | Secret key for the `SIGV4` authentication.                                                            |
| Option 2             | serviceName                              | string        | Service name for the `SIGV4` authentication.                                                          |
| Option 2             | sessionToken                             | string        | Session token for the `SIGV4` authentication.                                                         |
| Option 2             | type [*required*]                   | enum          | The type of authentication to use when performing the test. Allowed enum values: `sigv4`              |
| basicAuth            | Option 3                                 | object        | Object to handle `NTLM` authentication when performing the test.                                      |
| Option 3             | domain                                   | string        | Domain for the authentication to use when performing the test.                                        |
| Option 3             | password                                 | string        | Password for the authentication to use when performing the test.                                      |
| Option 3             | type [*required*]                   | enum          | The type of authentication to use when performing the test. Allowed enum values: `ntlm`               |
| Option 3             | username                                 | string        | Username for the authentication to use when performing the test.                                      |
| Option 3             | workstation                              | string        | Workstation for the authentication to use when performing the test.                                   |
| basicAuth            | Option 4                                 | object        | Object to handle digest authentication when performing the test.                                      |
| Option 4             | password [*required*]               | string        | Password to use for the digest authentication.                                                        |
| Option 4             | type [*required*]                   | enum          | The type of basic authentication to use when performing the test. Allowed enum values: `digest`       |
| Option 4             | username [*required*]               | string        | Username to use for the digest authentication.                                                        |
| basicAuth            | Option 5                                 | object        | Object to handle `oauth client` authentication when performing the test.                              |
| Option 5             | accessTokenUrl [*required*]         | string        | Access token URL to use when performing the authentication.                                           |
| Option 5             | audience                                 | string        | Audience to use when performing the authentication.                                                   |
| Option 5             | clientId [*required*]               | string        | Client ID to use when performing the authentication.                                                  |
| Option 5             | clientSecret [*required*]           | string        | Client secret to use when performing the authentication.                                              |
| Option 5             | resource                                 | string        | Resource to use when performing the authentication.                                                   |
| Option 5             | scope                                    | string        | Scope to use when performing the authentication.                                                      |
| Option 5             | tokenApiAuthentication [*required*] | enum          | Type of token to use when performing the authentication. Allowed enum values: `header,body`           |
| Option 5             | type [*required*]                   | enum          | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client` |
| basicAuth            | Option 6                                 | object        | Object to handle `oauth rop` authentication when performing the test.                                 |
| Option 6             | accessTokenUrl [*required*]         | string        | Access token URL to use when performing the authentication.                                           |
| Option 6             | audience                                 | string        | Audience to use when performing the authentication.                                                   |
| Option 6             | clientId                                 | string        | Client ID to use when performing the authentication.                                                  |
| Option 6             | clientSecret                             | string        | Client secret to use when performing the authentication.                                              |
| Option 6             | password [*required*]               | string        | Password to use when performing the authentication.                                                   |
| Option 6             | resource                                 | string        | Resource to use when performing the authentication.                                                   |
| Option 6             | scope                                    | string        | Scope to use when performing the authentication.                                                      |
| Option 6             | tokenApiAuthentication [*required*] | enum          | Type of token to use when performing the authentication. Allowed enum values: `header,body`           |
| Option 6             | type [*required*]                   | enum          | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`    |
| Option 6             | username [*required*]               | string        | Username to use when performing the authentication.                                                   |
| tests                | body                                     | string        | Body to include in the test.                                                                          |
| tests                | bodyType                                 | string        | Type of the data sent in a Synthetic API test.                                                        |
| tests                | cookies                                  | string        | Cookies for the request.                                                                              |
| tests                | deviceIds                                | [string]      | For browser test, array with the different device IDs used to run the test.                           |
| tests                | followRedirects                          | boolean       | For API HTTP test, whether or not the test should follow redirects.                                   |
| tests                | headers                                  | object        | Headers to include when performing the test.                                                          |
| additionalProperties | <any-key>                                | string        | A single Header.                                                                                      |
| tests                | locations                                | [string]      | Array of locations used to run the test.                                                              |
| tests                | metadata                                 | object        | Metadata for the Synthetic tests run.                                                                 |
| metadata             | ci                                       | object        | Description of the CI provider.                                                                       |
| ci                   | pipeline                                 | object        | Description of the CI pipeline.                                                                       |
| pipeline             | url                                      | string        | URL of the pipeline.                                                                                  |
| ci                   | provider                                 | object        | Description of the CI provider.                                                                       |
| provider             | name                                     | string        | Name of the CI provider.                                                                              |
| metadata             | git                                      | object        | Git information.                                                                                      |
| git                  | branch                                   | string        | Branch name.                                                                                          |
| git                  | commitSha                                | string        | The commit SHA.                                                                                       |
| tests                | public_id [*required*]              | string        | The public ID of the Synthetic test to trigger.                                                       |
| tests                | retry                                    | object        | Object describing the retry strategy to apply to a Synthetic test.                                    |
| retry                | count                                    | int64         | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.        |
| retry                | interval                                 | double        | Time interval between retries (in milliseconds). Defaults to 300ms.                                   |
| tests                | startUrl                                 | string        | Starting URL for the browser test.                                                                    |
| tests                | variables                                | object        | Variables to replace in the test.                                                                     |
| additionalProperties | <any-key>                                | string        | A single variable.                                                                                    |
| tests                | version                                  | int64         | The version number of the Synthetic test version to trigger.                                          |

{% /tab %}

{% tab title="Example" %}

```json
{
  "tests": [
    {
      "allowInsecureCertificates": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "string",
      "cookies": "string",
      "deviceIds": [
        "chrome.laptop_large"
      ],
      "followRedirects": false,
      "headers": {
        "<any-key>": "string"
      },
      "locations": [
        "aws:eu-west-3"
      ],
      "metadata": {
        "ci": {
          "pipeline": {
            "url": "string"
          },
          "provider": {
            "name": "string"
          }
        },
        "git": {
          "branch": "string",
          "commitSha": "string"
        }
      },
      "public_id": "aaa-aaa-aaa",
      "retry": {
        "count": "integer",
        "interval": "number"
      },
      "startUrl": "string",
      "variables": {
        "<any-key>": "string"
      },
      "version": "integer"
    }
  ]
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing information about the tests triggered.

| Parent field | Field               | Type     | Description                                     |
| ------------ | ------------------- | -------- | ----------------------------------------------- |
|              | batch_id            | string   | The public ID of the batch triggered.           |
|              | locations           | [object] | List of Synthetic locations.                    |
| locations    | id                  | int64    | Unique identifier of the location.              |
| locations    | name                | string   | Name of the location.                           |
|              | results             | [object] | Information about the tests runs.               |
| results      | device              | string   | The device ID.                                  |
| results      | location            | int64    | The location ID of the test run.                |
| results      | public_id           | string   | The public ID of the Synthetic test.            |
| results      | result_id           | string   | ID of the result.                               |
|              | triggered_check_ids | [string] | The public IDs of the Synthetic test triggered. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "batch_id": "string",
  "locations": [
    {
      "id": "integer",
      "name": "string"
    }
  ],
  "results": [
    {
      "device": "chrome.laptop_large",
      "location": "integer",
      "public_id": "string",
      "result_id": "string"
    }
  ],
  "triggered_check_ids": []
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
JSON format is wrong
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/trigger/ci" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "tests": [
    {
      "public_id": "aaa-aaa-aaa"
    }
  ]
}
EOF
                
##### 

```python
"""
Trigger tests from CI/CD pipelines returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_basic_auth_web import SyntheticsBasicAuthWeb
from datadog_api_client.v1.model.synthetics_basic_auth_web_type import SyntheticsBasicAuthWebType
from datadog_api_client.v1.model.synthetics_ci_batch_metadata import SyntheticsCIBatchMetadata
from datadog_api_client.v1.model.synthetics_ci_batch_metadata_ci import SyntheticsCIBatchMetadataCI
from datadog_api_client.v1.model.synthetics_ci_batch_metadata_git import SyntheticsCIBatchMetadataGit
from datadog_api_client.v1.model.synthetics_ci_batch_metadata_pipeline import SyntheticsCIBatchMetadataPipeline
from datadog_api_client.v1.model.synthetics_ci_batch_metadata_provider import SyntheticsCIBatchMetadataProvider
from datadog_api_client.v1.model.synthetics_ci_test import SyntheticsCITest
from datadog_api_client.v1.model.synthetics_ci_test_body import SyntheticsCITestBody
from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry

body = SyntheticsCITestBody(
    tests=[
        SyntheticsCITest(
            basic_auth=SyntheticsBasicAuthWeb(
                password="PaSSw0RD!",
                type=SyntheticsBasicAuthWebType.WEB,
                username="my_username",
            ),
            device_ids=[
                "chrome.laptop_large",
            ],
            locations=[
                "aws:eu-west-3",
            ],
            metadata=SyntheticsCIBatchMetadata(
                ci=SyntheticsCIBatchMetadataCI(
                    pipeline=SyntheticsCIBatchMetadataPipeline(),
                    provider=SyntheticsCIBatchMetadataProvider(),
                ),
                git=SyntheticsCIBatchMetadataGit(),
            ),
            public_id="aaa-aaa-aaa",
            retry=SyntheticsTestOptionsRetry(),
        ),
    ],
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.trigger_ci_tests(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Trigger tests from CI/CD pipelines returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsCITestBody.new({
  tests: [
    DatadogAPIClient::V1::SyntheticsCITest.new({
      basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthWeb.new({
        password: "PaSSw0RD!",
        type: DatadogAPIClient::V1::SyntheticsBasicAuthWebType::WEB,
        username: "my_username",
      }),
      device_ids: [
        "chrome.laptop_large",
      ],
      locations: [
        "aws:eu-west-3",
      ],
      metadata: DatadogAPIClient::V1::SyntheticsCIBatchMetadata.new({
        ci: DatadogAPIClient::V1::SyntheticsCIBatchMetadataCI.new({
          pipeline: DatadogAPIClient::V1::SyntheticsCIBatchMetadataPipeline.new({}),
          provider: DatadogAPIClient::V1::SyntheticsCIBatchMetadataProvider.new({}),
        }),
        git: DatadogAPIClient::V1::SyntheticsCIBatchMetadataGit.new({}),
      }),
      public_id: "aaa-aaa-aaa",
      _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({}),
    }),
  ],
})
p api_instance.trigger_ci_tests(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Trigger tests from CI/CD pipelines returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsCITestBody{
		Tests: []datadogV1.SyntheticsCITest{
			{
				BasicAuth: &datadogV1.SyntheticsBasicAuth{
					SyntheticsBasicAuthWeb: &datadogV1.SyntheticsBasicAuthWeb{
						Password: datadog.PtrString("PaSSw0RD!"),
						Type:     datadogV1.SYNTHETICSBASICAUTHWEBTYPE_WEB.Ptr(),
						Username: datadog.PtrString("my_username"),
					}},
				DeviceIds: []string{
					"chrome.laptop_large",
				},
				Locations: []string{
					"aws:eu-west-3",
				},
				Metadata: &datadogV1.SyntheticsCIBatchMetadata{
					Ci: &datadogV1.SyntheticsCIBatchMetadataCI{
						Pipeline: &datadogV1.SyntheticsCIBatchMetadataPipeline{},
						Provider: &datadogV1.SyntheticsCIBatchMetadataProvider{},
					},
					Git: &datadogV1.SyntheticsCIBatchMetadataGit{},
				},
				PublicId: "aaa-aaa-aaa",
				Retry:    &datadogV1.SyntheticsTestOptionsRetry{},
			},
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.TriggerCITests(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.TriggerCITests`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.TriggerCITests`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Trigger tests from CI/CD pipelines returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsBasicAuth;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthWeb;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthWebType;
import com.datadog.api.client.v1.model.SyntheticsCIBatchMetadata;
import com.datadog.api.client.v1.model.SyntheticsCIBatchMetadataCI;
import com.datadog.api.client.v1.model.SyntheticsCIBatchMetadataGit;
import com.datadog.api.client.v1.model.SyntheticsCIBatchMetadataPipeline;
import com.datadog.api.client.v1.model.SyntheticsCIBatchMetadataProvider;
import com.datadog.api.client.v1.model.SyntheticsCITest;
import com.datadog.api.client.v1.model.SyntheticsCITestBody;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry;
import com.datadog.api.client.v1.model.SyntheticsTriggerCITestsResponse;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsCITestBody body =
        new SyntheticsCITestBody()
            .tests(
                Collections.singletonList(
                    new SyntheticsCITest()
                        .basicAuth(
                            new SyntheticsBasicAuth(
                                new SyntheticsBasicAuthWeb()
                                    .password("PaSSw0RD!")
                                    .type(SyntheticsBasicAuthWebType.WEB)
                                    .username("my_username")))
                        .deviceIds(Collections.singletonList("chrome.laptop_large"))
                        .locations(Collections.singletonList("aws:eu-west-3"))
                        .metadata(
                            new SyntheticsCIBatchMetadata()
                                .ci(
                                    new SyntheticsCIBatchMetadataCI()
                                        .pipeline(new SyntheticsCIBatchMetadataPipeline())
                                        .provider(new SyntheticsCIBatchMetadataProvider()))
                                .git(new SyntheticsCIBatchMetadataGit()))
                        .publicId("aaa-aaa-aaa")
                        .retry(new SyntheticsTestOptionsRetry())));

    try {
      SyntheticsTriggerCITestsResponse result = apiInstance.triggerCITests(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#triggerCITests");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Trigger tests from CI/CD pipelines returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuth;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthWeb;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthWebType;
use datadog_api_client::datadogV1::model::SyntheticsCIBatchMetadata;
use datadog_api_client::datadogV1::model::SyntheticsCIBatchMetadataCI;
use datadog_api_client::datadogV1::model::SyntheticsCIBatchMetadataGit;
use datadog_api_client::datadogV1::model::SyntheticsCIBatchMetadataPipeline;
use datadog_api_client::datadogV1::model::SyntheticsCIBatchMetadataProvider;
use datadog_api_client::datadogV1::model::SyntheticsCITest;
use datadog_api_client::datadogV1::model::SyntheticsCITestBody;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsRetry;

#[tokio::main]
async fn main() {
    let body =
        SyntheticsCITestBody::new().tests(vec![SyntheticsCITest::new("aaa-aaa-aaa".to_string())
            .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthWeb(Box::new(
                SyntheticsBasicAuthWeb::new()
                    .password("PaSSw0RD!".to_string())
                    .type_(SyntheticsBasicAuthWebType::WEB)
                    .username("my_username".to_string()),
            )))
            .device_ids(vec!["chrome.laptop_large".to_string()])
            .locations(vec!["aws:eu-west-3".to_string()])
            .metadata(
                SyntheticsCIBatchMetadata::new()
                    .ci(SyntheticsCIBatchMetadataCI::new()
                        .pipeline(SyntheticsCIBatchMetadataPipeline::new())
                        .provider(SyntheticsCIBatchMetadataProvider::new()))
                    .git(SyntheticsCIBatchMetadataGit::new()),
            )
            .retry(SyntheticsTestOptionsRetry::new())]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.trigger_ci_tests(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Trigger tests from CI/CD pipelines returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiTriggerCITestsRequest = {
  body: {
    tests: [
      {
        basicAuth: {
          password: "PaSSw0RD!",
          type: "web",
          username: "my_username",
        },
        deviceIds: ["chrome.laptop_large"],
        locations: ["aws:eu-west-3"],
        metadata: {
          ci: {
            pipeline: {},
            provider: {},
          },
          git: {},
        },
        publicId: "aaa-aaa-aaa",
        retry: {},
      },
    ],
  },
};

apiInstance
  .triggerCITests(params)
  .then((data: v1.SyntheticsTriggerCITestsResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Trigger Synthetic tests{% #trigger-synthetic-tests %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                       |
| ----------------- | ------------------------------------------------------------------ |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v1/synthetics/tests/trigger |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v1/synthetics/tests/trigger |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v1/synthetics/tests/trigger      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v1/synthetics/tests/trigger      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v1/synthetics/tests/trigger     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v1/synthetics/tests/trigger |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v1/synthetics/tests/trigger |

### Overview

Trigger a set of Synthetic tests. This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)

The identifiers of the tests to trigger.

{% tab title="Model" %}

| Parent field | Field                       | Type     | Description                                     |
| ------------ | --------------------------- | -------- | ----------------------------------------------- |
|              | tests [*required*]     | [object] | List of Synthetic tests.                        |
| tests        | metadata                    | object   | Metadata for the Synthetic tests run.           |
| metadata     | ci                          | object   | Description of the CI provider.                 |
| ci           | pipeline                    | object   | Description of the CI pipeline.                 |
| pipeline     | url                         | string   | URL of the pipeline.                            |
| ci           | provider                    | object   | Description of the CI provider.                 |
| provider     | name                        | string   | Name of the CI provider.                        |
| metadata     | git                         | object   | Git information.                                |
| git          | branch                      | string   | Branch name.                                    |
| git          | commitSha                   | string   | The commit SHA.                                 |
| tests        | public_id [*required*] | string   | The public ID of the Synthetic test to trigger. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "tests": [
    {
      "public_id": "123-abc-456"
    }
  ]
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing information about the tests triggered.

| Parent field | Field               | Type     | Description                                     |
| ------------ | ------------------- | -------- | ----------------------------------------------- |
|              | batch_id            | string   | The public ID of the batch triggered.           |
|              | locations           | [object] | List of Synthetic locations.                    |
| locations    | id                  | int64    | Unique identifier of the location.              |
| locations    | name                | string   | Name of the location.                           |
|              | results             | [object] | Information about the tests runs.               |
| results      | device              | string   | The device ID.                                  |
| results      | location            | int64    | The location ID of the test run.                |
| results      | public_id           | string   | The public ID of the Synthetic test.            |
| results      | result_id           | string   | ID of the result.                               |
|              | triggered_check_ids | [string] | The public IDs of the Synthetic test triggered. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "batch_id": "string",
  "locations": [
    {
      "id": "integer",
      "name": "string"
    }
  ],
  "results": [
    {
      "device": "chrome.laptop_large",
      "location": "integer",
      "public_id": "string",
      "result_id": "string"
    }
  ],
  "triggered_check_ids": []
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/trigger" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "tests": [
    {
      "public_id": "aaa-aaa-aaa"
    }
  ]
}
EOF
                        
##### 

```go
// Trigger Synthetic tests returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	// there is a valid "synthetics_api_test" in the system
	SyntheticsAPITestPublicID := os.Getenv("SYNTHETICS_API_TEST_PUBLIC_ID")

	body := datadogV1.SyntheticsTriggerBody{
		Tests: []datadogV1.SyntheticsTriggerTest{
			{
				PublicId: SyntheticsAPITestPublicID,
			},
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.TriggerTests(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.TriggerTests`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.TriggerTests`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Trigger Synthetic tests returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsTriggerBody;
import com.datadog.api.client.v1.model.SyntheticsTriggerCITestsResponse;
import com.datadog.api.client.v1.model.SyntheticsTriggerTest;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    // there is a valid "synthetics_api_test" in the system
    String SYNTHETICS_API_TEST_PUBLIC_ID = System.getenv("SYNTHETICS_API_TEST_PUBLIC_ID");

    SyntheticsTriggerBody body =
        new SyntheticsTriggerBody()
            .tests(
                Collections.singletonList(
                    new SyntheticsTriggerTest().publicId(SYNTHETICS_API_TEST_PUBLIC_ID)));

    try {
      SyntheticsTriggerCITestsResponse result = apiInstance.triggerTests(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#triggerTests");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Trigger Synthetic tests returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_trigger_body import SyntheticsTriggerBody
from datadog_api_client.v1.model.synthetics_trigger_test import SyntheticsTriggerTest

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = environ["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = SyntheticsTriggerBody(
    tests=[
        SyntheticsTriggerTest(
            public_id=SYNTHETICS_API_TEST_PUBLIC_ID,
        ),
    ],
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.trigger_tests(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Trigger Synthetic tests returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = ENV["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = DatadogAPIClient::V1::SyntheticsTriggerBody.new({
  tests: [
    DatadogAPIClient::V1::SyntheticsTriggerTest.new({
      public_id: SYNTHETICS_API_TEST_PUBLIC_ID,
    }),
  ],
})
p api_instance.trigger_tests(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Trigger Synthetic tests returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsTriggerBody;
use datadog_api_client::datadogV1::model::SyntheticsTriggerTest;

#[tokio::main]
async fn main() {
    // there is a valid "synthetics_api_test" in the system
    let synthetics_api_test_public_id = std::env::var("SYNTHETICS_API_TEST_PUBLIC_ID").unwrap();
    let body = SyntheticsTriggerBody::new(vec![SyntheticsTriggerTest::new(
        synthetics_api_test_public_id.clone(),
    )]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.trigger_tests(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Trigger Synthetic tests returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

// there is a valid "synthetics_api_test" in the system
const SYNTHETICS_API_TEST_PUBLIC_ID = process.env
  .SYNTHETICS_API_TEST_PUBLIC_ID as string;

const params: v1.SyntheticsApiTriggerTestsRequest = {
  body: {
    tests: [
      {
        publicId: SYNTHETICS_API_TEST_PUBLIC_ID,
      },
    ],
  },
};

apiInstance
  .triggerTests(params)
  .then((data: v1.SyntheticsTriggerCITestsResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Fetch uptime for multiple tests{% #fetch-uptime-for-multiple-tests %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                       |
| ----------------- | ------------------------------------------------------------------ |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v1/synthetics/tests/uptimes |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v1/synthetics/tests/uptimes |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v1/synthetics/tests/uptimes      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v1/synthetics/tests/uptimes      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v1/synthetics/tests/uptimes     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v1/synthetics/tests/uptimes |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v1/synthetics/tests/uptimes |

### Overview

Fetch uptime for multiple Synthetic tests by ID. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)

Public ID list of the Synthetic tests and timeframe.

{% tab title="Model" %}

| Field                        | Type     | Description                                                |
| ---------------------------- | -------- | ---------------------------------------------------------- |
| from_ts [*required*]    | int64    | Timestamp in seconds (Unix epoch) for the start of uptime. |
| public_ids [*required*] | [string] | An array of Synthetic test IDs you want uptimes for.       |
| to_ts [*required*]      | int64    | Timestamp in seconds (Unix epoch) for the end of uptime.   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "from_ts": 1726041488,
  "public_ids": [
    "p8m-9gw-nte"
  ],
  "to_ts": 1726055954
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK.
{% tab title="Model" %}

| Parent field | Field                           | Type     | Description                                                                                                                                                                                                                                                                                                                                         |
| ------------ | ------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | from_ts                         | int64    | Timestamp in seconds for the start of uptime.                                                                                                                                                                                                                                                                                                       |
|              | overall                         | object   | Object containing the uptime information.                                                                                                                                                                                                                                                                                                           |
| overall      | errors                          | [object] | An array of error objects returned while querying the history data for the service level objective.                                                                                                                                                                                                                                                 |
| errors       | error_message [*required*] | string   | A message with more details about the error.                                                                                                                                                                                                                                                                                                        |
| errors       | error_type [*required*]    | string   | Type of the error.                                                                                                                                                                                                                                                                                                                                  |
| overall      | group                           | string   | The location name                                                                                                                                                                                                                                                                                                                                   |
| overall      | history                         | [array]  | The state transition history for the monitor, represented as an array of pairs. Each pair is an array where the first element is the transition timestamp in Unix epoch format (integer) and the second element is the state (integer). For the state, an integer value of `0` indicates uptime, `1` indicates downtime, and `2` indicates no data. |
| overall      | span_precision                  | double   | The number of decimal places to which the SLI value is accurate for the given from-to timestamps.                                                                                                                                                                                                                                                   |
| overall      | uptime                          | double   | The overall uptime.                                                                                                                                                                                                                                                                                                                                 |
|              | public_id                       | string   | A Synthetic test ID.                                                                                                                                                                                                                                                                                                                                |
|              | to_ts                           | int64    | Timestamp in seconds for the end of uptime.                                                                                                                                                                                                                                                                                                         |

{% /tab %}

{% tab title="Example" %}

```json
{
  "from_ts": "integer",
  "overall": {
    "errors": [
      {
        "error_message": "",
        "error_type": ""
      }
    ],
    "group": "name",
    "history": [
      [
        1579212382,
        0
      ]
    ],
    "span_precision": 2,
    "uptime": 99.99
  },
  "public_id": "abc-def-123",
  "to_ts": "integer"
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
- JSON format is wrong
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/uptimes" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "from_ts": 1726041488,
  "public_ids": [
    "abc-def-123"
  ],
  "to_ts": 1726127888
}
EOF
                        
##### 

```go
// Fetch uptime for multiple tests returns "OK." response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsFetchUptimesPayload{
		FromTs: 1726041488,
		PublicIds: []string{
			"p8m-9gw-nte",
		},
		ToTs: 1726055954,
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.FetchUptimes(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.FetchUptimes`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.FetchUptimes`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Fetch uptime for multiple tests returns "OK." response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsFetchUptimesPayload;
import com.datadog.api.client.v1.model.SyntheticsTestUptime;
import java.util.Collections;
import java.util.List;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsFetchUptimesPayload body =
        new SyntheticsFetchUptimesPayload()
            .fromTs(1726041488L)
            .publicIds(Collections.singletonList("p8m-9gw-nte"))
            .toTs(1726055954L);

    try {
      List<SyntheticsTestUptime> result = apiInstance.fetchUptimes(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#fetchUptimes");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Fetch uptime for multiple tests returns "OK." response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_fetch_uptimes_payload import SyntheticsFetchUptimesPayload

body = SyntheticsFetchUptimesPayload(
    from_ts=1726041488,
    public_ids=[
        "p8m-9gw-nte",
    ],
    to_ts=1726055954,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.fetch_uptimes(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Fetch uptime for multiple tests returns "OK." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsFetchUptimesPayload.new({
  from_ts: 1726041488,
  public_ids: [
    "p8m-9gw-nte",
  ],
  to_ts: 1726055954,
})
p api_instance.fetch_uptimes(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Fetch uptime for multiple tests returns "OK." response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsFetchUptimesPayload;

#[tokio::main]
async fn main() {
    let body =
        SyntheticsFetchUptimesPayload::new(1726041488, vec!["p8m-9gw-nte".to_string()], 1726055954);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.fetch_uptimes(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Fetch uptime for multiple tests returns "OK." response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiFetchUptimesRequest = {
  body: {
    fromTs: 1726041488,
    publicIds: ["p8m-9gw-nte"],
    toTs: 1726055954,
  },
};

apiInstance
  .fetchUptimes(params)
  .then((data: v1.SyntheticsTestUptime[]) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Pause or start a test{% #pause-or-start-a-test %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                 |
| ----------------- | ---------------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v1/synthetics/tests/{public_id}/status |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v1/synthetics/tests/{public_id}/status |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v1/synthetics/tests/{public_id}/status      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v1/synthetics/tests/{public_id}/status      |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v1/synthetics/tests/{public_id}/status     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v1/synthetics/tests/{public_id}/status |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v1/synthetics/tests/{public_id}/status |

### Overview

Pause or start a Synthetic test by changing the status. This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                    |
| --------------------------- | ------ | ---------------------------------------------- |
| public_id [*required*] | string | The public ID of the Synthetic test to update. |

### Request

#### Body Data (required)

Status to set the given Synthetic test to.

{% tab title="Model" %}

| Field      | Type | Description                                                                                                        |
| ---------- | ---- | ------------------------------------------------------------------------------------------------------------------ |
| new_status | enum | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "new_status": "live"
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK - Returns a boolean indicating if the update was successful.
{% tab title="Model" %}

| Field | Type | Description |
| ----- | ---- | ----------- |

{% /tab %}

{% tab title="Example" %}

```json
{}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
JSON format is wrong.
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic Monitoring is not activated for the user - Test is not owned by the user
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/${public_id}/status" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "new_status": "live"
}
EOF
                
##### 

```python
"""
Pause or start a test returns "OK - Returns a boolean indicating if the update was successful." response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_test_pause_status import SyntheticsTestPauseStatus
from datadog_api_client.v1.model.synthetics_update_test_pause_status_payload import (
    SyntheticsUpdateTestPauseStatusPayload,
)

body = SyntheticsUpdateTestPauseStatusPayload(
    new_status=SyntheticsTestPauseStatus.LIVE,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.update_test_pause_status(public_id="public_id", body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Pause or start a test returns "OK - Returns a boolean indicating if the update was successful." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsUpdateTestPauseStatusPayload.new({
  new_status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::LIVE,
})
p api_instance.update_test_pause_status("public_id", body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Pause or start a test returns "OK - Returns a boolean indicating if the update was successful." response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsUpdateTestPauseStatusPayload{
		NewStatus: datadogV1.SYNTHETICSTESTPAUSESTATUS_LIVE.Ptr(),
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.UpdateTestPauseStatus(ctx, "public_id", body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.UpdateTestPauseStatus`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.UpdateTestPauseStatus`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Pause or start a test returns "OK - Returns a boolean indicating if the update was successful."
// response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsTestPauseStatus;
import com.datadog.api.client.v1.model.SyntheticsUpdateTestPauseStatusPayload;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsUpdateTestPauseStatusPayload body =
        new SyntheticsUpdateTestPauseStatusPayload().newStatus(SyntheticsTestPauseStatus.LIVE);

    try {
      Boolean result = apiInstance.updateTestPauseStatus("public_id", body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#updateTestPauseStatus");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Pause or start a test returns "OK - Returns a boolean indicating if the update
// was successful." response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsTestPauseStatus;
use datadog_api_client::datadogV1::model::SyntheticsUpdateTestPauseStatusPayload;

#[tokio::main]
async fn main() {
    let body =
        SyntheticsUpdateTestPauseStatusPayload::new().new_status(SyntheticsTestPauseStatus::LIVE);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .update_test_pause_status("public_id".to_string(), body)
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Pause or start a test returns "OK - Returns a boolean indicating if the update was successful." response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiUpdateTestPauseStatusRequest = {
  body: {
    newStatus: "live",
  },
  publicId: "public_id",
};

apiInstance
  .updateTestPauseStatus(params)
  .then((data: boolean) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Edit a browser test{% #edit-a-browser-test %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                  |
| ----------------- | ----------------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v1/synthetics/tests/browser/{public_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v1/synthetics/tests/browser/{public_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v1/synthetics/tests/browser/{public_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v1/synthetics/tests/browser/{public_id}      |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v1/synthetics/tests/browser/{public_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v1/synthetics/tests/browser/{public_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v1/synthetics/tests/browser/{public_id} |

### Overview

Edit the configuration of a Synthetic browser test. This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                        |
| --------------------------- | ------ | ---------------------------------- |
| public_id [*required*] | string | The public ID of the test to edit. |

### Request

#### Body Data (required)

New test details to be saved.

{% tab title="Model" %}

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]                 | object          | Configuration object for a Synthetic browser test.                                                                                                                                                                                                                                              |
| config               | assertions [*required*]             | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                                                          |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request [*required*]                | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | setCookie                                | string          | Cookies to be used for the request, using the [Set-Cookie](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) syntax.                                                                                                                                                        |
| config               | variables                                | [object]        | Array of variables used for the test steps.                                                                                                                                                                                                                                                     |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | locations [*required*]              | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message [*required*]                | string          | Notification message associated with the test. Message can either be text or an empty string.                                                                                                                                                                                                   |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name [*required*]                   | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options [*required*]                | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The public ID of the test.                                                                                                                                                                                                                                                                      |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | steps                                    | [object]        | Array of steps for the test.                                                                                                                                                                                                                                                                    |
| steps                | allowFailure                             | boolean         | A boolean set to allow this step to fail.                                                                                                                                                                                                                                                       |
| steps                | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| steps                | exitIfSucceed                            | boolean         | A boolean set to exit the test if the step succeeds.                                                                                                                                                                                                                                            |
| steps                | isCritical                               | boolean         | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                                                                                         |
| steps                | name                                     | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| steps                | noScreenshot                             | boolean         | A boolean set to skip taking a screenshot for the step.                                                                                                                                                                                                                                         |
| steps                | params                                   | object          | The parameters of the step.                                                                                                                                                                                                                                                                     |
| steps                | public_id                                | string          | The public ID of the step.                                                                                                                                                                                                                                                                      |
| steps                | timeout                                  | int64           | The time before declaring a step failed.                                                                                                                                                                                                                                                        |
| steps                | type                                     | enum            | Step type used in your Synthetic test. Allowed enum values: `assertCurrentUrl,assertElementAttribute,assertElementContent,assertElementPresent,assertEmail,assertFileDownload,assertFromJavascript,assertPageContains,assertPageLacks,assertRequests`                                           |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type [*required*]                   | enum            | Type of the Synthetic test, `browser`. Allowed enum values: `browser`                                                                                                                                                                                                                           |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      {
        "operator": "contains",
        "property": "string",
        "target": 0,
        "timingsScope": "string",
        "type": "statusCode"
      }
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "setCookie": "string",
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "",
  "name": "Example test name",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "status": "live",
  "steps": [
    {
      "allowFailure": false,
      "alwaysExecute": false,
      "exitIfSucceed": false,
      "isCritical": false,
      "name": "string",
      "noScreenshot": false,
      "params": {},
      "public_id": "string",
      "timeout": "integer",
      "type": "assertElementContent"
    }
  ],
  "tags": [
    "env:prod"
  ],
  "type": "browser"
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing details about a Synthetic browser test.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]                 | object          | Configuration object for a Synthetic browser test.                                                                                                                                                                                                                                              |
| config               | assertions [*required*]             | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                                                          |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request [*required*]                | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | setCookie                                | string          | Cookies to be used for the request, using the [Set-Cookie](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) syntax.                                                                                                                                                        |
| config               | variables                                | [object]        | Array of variables used for the test steps.                                                                                                                                                                                                                                                     |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | locations [*required*]              | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message [*required*]                | string          | Notification message associated with the test. Message can either be text or an empty string.                                                                                                                                                                                                   |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name [*required*]                   | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options [*required*]                | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The public ID of the test.                                                                                                                                                                                                                                                                      |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | steps                                    | [object]        | Array of steps for the test.                                                                                                                                                                                                                                                                    |
| steps                | allowFailure                             | boolean         | A boolean set to allow this step to fail.                                                                                                                                                                                                                                                       |
| steps                | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| steps                | exitIfSucceed                            | boolean         | A boolean set to exit the test if the step succeeds.                                                                                                                                                                                                                                            |
| steps                | isCritical                               | boolean         | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                                                                                         |
| steps                | name                                     | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| steps                | noScreenshot                             | boolean         | A boolean set to skip taking a screenshot for the step.                                                                                                                                                                                                                                         |
| steps                | params                                   | object          | The parameters of the step.                                                                                                                                                                                                                                                                     |
| steps                | public_id                                | string          | The public ID of the step.                                                                                                                                                                                                                                                                      |
| steps                | timeout                                  | int64           | The time before declaring a step failed.                                                                                                                                                                                                                                                        |
| steps                | type                                     | enum            | Step type used in your Synthetic test. Allowed enum values: `assertCurrentUrl,assertElementAttribute,assertElementContent,assertElementPresent,assertEmail,assertFileDownload,assertFromJavascript,assertPageContains,assertPageLacks,assertRequests`                                           |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type [*required*]                   | enum            | Type of the Synthetic test, `browser`. Allowed enum values: `browser`                                                                                                                                                                                                                           |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      {
        "operator": "contains",
        "property": "string",
        "target": 0,
        "timingsScope": "string",
        "type": "statusCode"
      }
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "setCookie": "string",
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "",
  "monitor_id": "integer",
  "name": "Example test name",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "public_id": "string",
  "status": "live",
  "steps": [
    {
      "allowFailure": false,
      "alwaysExecute": false,
      "exitIfSucceed": false,
      "isCritical": false,
      "name": "string",
      "noScreenshot": false,
      "params": {},
      "public_id": "string",
      "timeout": "integer",
      "type": "assertElementContent"
    }
  ],
  "tags": [
    "env:prod"
  ],
  "type": "browser"
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
- JSON format is wrong - Updating sub-type is forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic Monitoring is not activated for the user - Test is not owned by the user - Test can't be found
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/browser/${public_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "",
  "name": "Example browser test",
  "options": {
    "device_ids": [
      "chrome.laptop_large"
    ],
    "tick_every": 3600
  },
  "status": "live",
  "steps": [
    {
      "name": "Check current URL",
      "params": {
        "check": "contains",
        "value": "example"
      },
      "type": "assertCurrentUrl"
    }
  ],
  "tags": [
    "env:production"
  ],
  "type": "browser"
}
EOF
                
##### 

```python
"""
Edit a browser test returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_basic_auth_web import SyntheticsBasicAuthWeb
from datadog_api_client.v1.model.synthetics_basic_auth_web_type import SyntheticsBasicAuthWebType
from datadog_api_client.v1.model.synthetics_browser_test import SyntheticsBrowserTest
from datadog_api_client.v1.model.synthetics_browser_test_config import SyntheticsBrowserTestConfig
from datadog_api_client.v1.model.synthetics_browser_test_rum_settings import SyntheticsBrowserTestRumSettings
from datadog_api_client.v1.model.synthetics_browser_test_type import SyntheticsBrowserTestType
from datadog_api_client.v1.model.synthetics_browser_variable import SyntheticsBrowserVariable
from datadog_api_client.v1.model.synthetics_browser_variable_type import SyntheticsBrowserVariableType
from datadog_api_client.v1.model.synthetics_config_variable import SyntheticsConfigVariable
from datadog_api_client.v1.model.synthetics_config_variable_type import SyntheticsConfigVariableType
from datadog_api_client.v1.model.synthetics_restricted_roles import SyntheticsRestrictedRoles
from datadog_api_client.v1.model.synthetics_step import SyntheticsStep
from datadog_api_client.v1.model.synthetics_step_type import SyntheticsStepType
from datadog_api_client.v1.model.synthetics_test_call_type import SyntheticsTestCallType
from datadog_api_client.v1.model.synthetics_test_ci_options import SyntheticsTestCiOptions
from datadog_api_client.v1.model.synthetics_test_execution_rule import SyntheticsTestExecutionRule
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_options_http_version import SyntheticsTestOptionsHTTPVersion
from datadog_api_client.v1.model.synthetics_test_options_monitor_options import SyntheticsTestOptionsMonitorOptions
from datadog_api_client.v1.model.synthetics_test_options_monitor_options_notification_preset_name import (
    SyntheticsTestOptionsMonitorOptionsNotificationPresetName,
)
from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry
from datadog_api_client.v1.model.synthetics_test_options_scheduling import SyntheticsTestOptionsScheduling
from datadog_api_client.v1.model.synthetics_test_options_scheduling_timeframe import (
    SyntheticsTestOptionsSchedulingTimeframe,
)
from datadog_api_client.v1.model.synthetics_test_pause_status import SyntheticsTestPauseStatus
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest
from datadog_api_client.v1.model.synthetics_test_request_body_file import SyntheticsTestRequestBodyFile
from datadog_api_client.v1.model.synthetics_test_request_body_type import SyntheticsTestRequestBodyType
from datadog_api_client.v1.model.synthetics_test_request_certificate import SyntheticsTestRequestCertificate
from datadog_api_client.v1.model.synthetics_test_request_certificate_item import SyntheticsTestRequestCertificateItem
from datadog_api_client.v1.model.synthetics_test_request_proxy import SyntheticsTestRequestProxy

body = SyntheticsBrowserTest(
    config=SyntheticsBrowserTestConfig(
        assertions=[],
        config_variables=[
            SyntheticsConfigVariable(
                name="VARIABLE_NAME",
                secure=False,
                type=SyntheticsConfigVariableType.TEXT,
            ),
        ],
        request=SyntheticsTestRequest(
            basic_auth=SyntheticsBasicAuthWeb(
                password="PaSSw0RD!",
                type=SyntheticsBasicAuthWebType.WEB,
                username="my_username",
            ),
            body_type=SyntheticsTestRequestBodyType.TEXT_PLAIN,
            call_type=SyntheticsTestCallType.UNARY,
            certificate=SyntheticsTestRequestCertificate(
                cert=SyntheticsTestRequestCertificateItem(),
                key=SyntheticsTestRequestCertificateItem(),
            ),
            certificate_domains=[],
            files=[
                SyntheticsTestRequestBodyFile(),
            ],
            http_version=SyntheticsTestOptionsHTTPVersion.HTTP1,
            proxy=SyntheticsTestRequestProxy(
                url="https://example.com",
            ),
            service="Greeter",
            url="https://example.com",
        ),
        variables=[
            SyntheticsBrowserVariable(
                name="VARIABLE_NAME",
                type=SyntheticsBrowserVariableType.TEXT,
            ),
        ],
    ),
    locations=[
        "aws:eu-west-3",
    ],
    message="",
    name="Example test name",
    options=SyntheticsTestOptions(
        blocked_request_patterns=[],
        ci=SyntheticsTestCiOptions(
            execution_rule=SyntheticsTestExecutionRule.BLOCKING,
        ),
        device_ids=[
            "chrome.laptop_large",
        ],
        http_version=SyntheticsTestOptionsHTTPVersion.HTTP1,
        monitor_options=SyntheticsTestOptionsMonitorOptions(
            notification_preset_name=SyntheticsTestOptionsMonitorOptionsNotificationPresetName.SHOW_ALL,
        ),
        restricted_roles=SyntheticsRestrictedRoles(
            [
                "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            ]
        ),
        retry=SyntheticsTestOptionsRetry(),
        rum_settings=SyntheticsBrowserTestRumSettings(
            application_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            client_token_id=12345,
            is_enabled=True,
        ),
        scheduling=SyntheticsTestOptionsScheduling(
            timeframes=[
                SyntheticsTestOptionsSchedulingTimeframe(
                    day=1,
                    _from="07:00",
                    to="16:00",
                ),
                SyntheticsTestOptionsSchedulingTimeframe(
                    day=3,
                    _from="07:00",
                    to="16:00",
                ),
            ],
            timezone="America/New_York",
        ),
    ),
    status=SyntheticsTestPauseStatus.LIVE,
    steps=[
        SyntheticsStep(
            type=SyntheticsStepType.ASSERT_ELEMENT_CONTENT,
        ),
    ],
    tags=[
        "env:prod",
    ],
    type=SyntheticsBrowserTestType.BROWSER,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.update_browser_test(public_id="public_id", body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Edit a browser test returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
  config: DatadogAPIClient::V1::SyntheticsBrowserTestConfig.new({
    assertions: [],
    config_variables: [
      DatadogAPIClient::V1::SyntheticsConfigVariable.new({
        name: "VARIABLE_NAME",
        secure: false,
        type: DatadogAPIClient::V1::SyntheticsConfigVariableType::TEXT,
      }),
    ],
    request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
      basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthWeb.new({
        password: "PaSSw0RD!",
        type: DatadogAPIClient::V1::SyntheticsBasicAuthWebType::WEB,
        username: "my_username",
      }),
      body_type: DatadogAPIClient::V1::SyntheticsTestRequestBodyType::TEXT_PLAIN,
      call_type: DatadogAPIClient::V1::SyntheticsTestCallType::UNARY,
      certificate: DatadogAPIClient::V1::SyntheticsTestRequestCertificate.new({
        cert: DatadogAPIClient::V1::SyntheticsTestRequestCertificateItem.new({}),
        key: DatadogAPIClient::V1::SyntheticsTestRequestCertificateItem.new({}),
      }),
      certificate_domains: [],
      files: [
        DatadogAPIClient::V1::SyntheticsTestRequestBodyFile.new({}),
      ],
      http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
      proxy: DatadogAPIClient::V1::SyntheticsTestRequestProxy.new({
        url: "https://example.com",
      }),
      service: "Greeter",
      url: "https://example.com",
    }),
    variables: [
      DatadogAPIClient::V1::SyntheticsBrowserVariable.new({
        name: "VARIABLE_NAME",
        type: DatadogAPIClient::V1::SyntheticsBrowserVariableType::TEXT,
      }),
    ],
  }),
  locations: [
    "aws:eu-west-3",
  ],
  message: "",
  name: "Example test name",
  options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
    blocked_request_patterns: [],
    ci: DatadogAPIClient::V1::SyntheticsTestCiOptions.new({
      execution_rule: DatadogAPIClient::V1::SyntheticsTestExecutionRule::BLOCKING,
    }),
    device_ids: [
      "chrome.laptop_large",
    ],
    http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
    monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({
      notification_preset_name: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptionsNotificationPresetName::SHOW_ALL,
    }),
    restricted_roles: [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    ],
    _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({}),
    rum_settings: DatadogAPIClient::V1::SyntheticsBrowserTestRumSettings.new({
      application_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      client_token_id: 12345,
      is_enabled: true,
    }),
    scheduling: DatadogAPIClient::V1::SyntheticsTestOptionsScheduling.new({
      timeframes: [
        DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe.new({
          day: 1,
          from: "07:00",
          to: "16:00",
        }),
        DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe.new({
          day: 3,
          from: "07:00",
          to: "16:00",
        }),
      ],
      timezone: "America/New_York",
    }),
  }),
  status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::LIVE,
  steps: [
    DatadogAPIClient::V1::SyntheticsStep.new({
      type: DatadogAPIClient::V1::SyntheticsStepType::ASSERT_ELEMENT_CONTENT,
    }),
  ],
  tags: [
    "env:prod",
  ],
  type: DatadogAPIClient::V1::SyntheticsBrowserTestType::BROWSER,
})
p api_instance.update_browser_test("public_id", body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Edit a browser test returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsBrowserTest{
		Config: datadogV1.SyntheticsBrowserTestConfig{
			Assertions: []datadogV1.SyntheticsAssertion{},
			ConfigVariables: []datadogV1.SyntheticsConfigVariable{
				{
					Name:   "VARIABLE_NAME",
					Secure: datadog.PtrBool(false),
					Type:   datadogV1.SYNTHETICSCONFIGVARIABLETYPE_TEXT,
				},
			},
			Request: datadogV1.SyntheticsTestRequest{
				BasicAuth: &datadogV1.SyntheticsBasicAuth{
					SyntheticsBasicAuthWeb: &datadogV1.SyntheticsBasicAuthWeb{
						Password: datadog.PtrString("PaSSw0RD!"),
						Type:     datadogV1.SYNTHETICSBASICAUTHWEBTYPE_WEB.Ptr(),
						Username: datadog.PtrString("my_username"),
					}},
				BodyType: datadogV1.SYNTHETICSTESTREQUESTBODYTYPE_TEXT_PLAIN.Ptr(),
				CallType: datadogV1.SYNTHETICSTESTCALLTYPE_UNARY.Ptr(),
				Certificate: &datadogV1.SyntheticsTestRequestCertificate{
					Cert: &datadogV1.SyntheticsTestRequestCertificateItem{},
					Key:  &datadogV1.SyntheticsTestRequestCertificateItem{},
				},
				CertificateDomains: []string{},
				Files: []datadogV1.SyntheticsTestRequestBodyFile{
					{},
				},
				HttpVersion: datadogV1.SYNTHETICSTESTOPTIONSHTTPVERSION_HTTP1.Ptr(),
				Proxy: &datadogV1.SyntheticsTestRequestProxy{
					Url: "https://example.com",
				},
				Service: datadog.PtrString("Greeter"),
				Url:     datadog.PtrString("https://example.com"),
			},
			Variables: []datadogV1.SyntheticsBrowserVariable{
				{
					Name: "VARIABLE_NAME",
					Type: datadogV1.SYNTHETICSBROWSERVARIABLETYPE_TEXT,
				},
			},
		},
		Locations: []string{
			"aws:eu-west-3",
		},
		Message: "",
		Name:    "Example test name",
		Options: datadogV1.SyntheticsTestOptions{
			BlockedRequestPatterns: []string{},
			Ci: &datadogV1.SyntheticsTestCiOptions{
				ExecutionRule: datadogV1.SYNTHETICSTESTEXECUTIONRULE_BLOCKING,
			},
			DeviceIds: []string{
				"chrome.laptop_large",
			},
			HttpVersion: datadogV1.SYNTHETICSTESTOPTIONSHTTPVERSION_HTTP1.Ptr(),
			MonitorOptions: &datadogV1.SyntheticsTestOptionsMonitorOptions{
				NotificationPresetName: datadogV1.SYNTHETICSTESTOPTIONSMONITOROPTIONSNOTIFICATIONPRESETNAME_SHOW_ALL.Ptr(),
			},
			RestrictedRoles: []string{
				"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
			},
			Retry: &datadogV1.SyntheticsTestOptionsRetry{},
			RumSettings: &datadogV1.SyntheticsBrowserTestRumSettings{
				ApplicationId: datadog.PtrString("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
				ClientTokenId: datadog.PtrInt64(12345),
				IsEnabled:     true,
			},
			Scheduling: &datadogV1.SyntheticsTestOptionsScheduling{
				Timeframes: []datadogV1.SyntheticsTestOptionsSchedulingTimeframe{
					{
						Day:  1,
						From: "07:00",
						To:   "16:00",
					},
					{
						Day:  3,
						From: "07:00",
						To:   "16:00",
					},
				},
				Timezone: "America/New_York",
			},
		},
		Status: datadogV1.SYNTHETICSTESTPAUSESTATUS_LIVE.Ptr(),
		Steps: []datadogV1.SyntheticsStep{
			{
				Type: datadogV1.SYNTHETICSSTEPTYPE_ASSERT_ELEMENT_CONTENT.Ptr(),
			},
		},
		Tags: []string{
			"env:prod",
		},
		Type: datadogV1.SYNTHETICSBROWSERTESTTYPE_BROWSER,
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.UpdateBrowserTest(ctx, "public_id", body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.UpdateBrowserTest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.UpdateBrowserTest`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Edit a browser test returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsBasicAuth;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthWeb;
import com.datadog.api.client.v1.model.SyntheticsBasicAuthWebType;
import com.datadog.api.client.v1.model.SyntheticsBrowserTest;
import com.datadog.api.client.v1.model.SyntheticsBrowserTestConfig;
import com.datadog.api.client.v1.model.SyntheticsBrowserTestRumSettings;
import com.datadog.api.client.v1.model.SyntheticsBrowserTestType;
import com.datadog.api.client.v1.model.SyntheticsBrowserVariable;
import com.datadog.api.client.v1.model.SyntheticsBrowserVariableType;
import com.datadog.api.client.v1.model.SyntheticsConfigVariable;
import com.datadog.api.client.v1.model.SyntheticsConfigVariableType;
import com.datadog.api.client.v1.model.SyntheticsStep;
import com.datadog.api.client.v1.model.SyntheticsStepType;
import com.datadog.api.client.v1.model.SyntheticsTestCallType;
import com.datadog.api.client.v1.model.SyntheticsTestCiOptions;
import com.datadog.api.client.v1.model.SyntheticsTestExecutionRule;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsHTTPVersion;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsMonitorOptions;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsMonitorOptionsNotificationPresetName;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsScheduling;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsSchedulingTimeframe;
import com.datadog.api.client.v1.model.SyntheticsTestPauseStatus;
import com.datadog.api.client.v1.model.SyntheticsTestRequest;
import com.datadog.api.client.v1.model.SyntheticsTestRequestBodyFile;
import com.datadog.api.client.v1.model.SyntheticsTestRequestBodyType;
import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificate;
import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificateItem;
import com.datadog.api.client.v1.model.SyntheticsTestRequestProxy;
import java.util.Arrays;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsBrowserTest body =
        new SyntheticsBrowserTest()
            .config(
                new SyntheticsBrowserTestConfig()
                    .configVariables(
                        Collections.singletonList(
                            new SyntheticsConfigVariable()
                                .name("VARIABLE_NAME")
                                .secure(false)
                                .type(SyntheticsConfigVariableType.TEXT)))
                    .request(
                        new SyntheticsTestRequest()
                            .basicAuth(
                                new SyntheticsBasicAuth(
                                    new SyntheticsBasicAuthWeb()
                                        .password("PaSSw0RD!")
                                        .type(SyntheticsBasicAuthWebType.WEB)
                                        .username("my_username")))
                            .bodyType(SyntheticsTestRequestBodyType.TEXT_PLAIN)
                            .callType(SyntheticsTestCallType.UNARY)
                            .certificate(
                                new SyntheticsTestRequestCertificate()
                                    .cert(new SyntheticsTestRequestCertificateItem())
                                    .key(new SyntheticsTestRequestCertificateItem()))
                            .files(Collections.singletonList(new SyntheticsTestRequestBodyFile()))
                            .httpVersion(SyntheticsTestOptionsHTTPVersion.HTTP1)
                            .proxy(new SyntheticsTestRequestProxy().url("https://example.com"))
                            .service("Greeter")
                            .url("https://example.com"))
                    .variables(
                        Collections.singletonList(
                            new SyntheticsBrowserVariable()
                                .name("VARIABLE_NAME")
                                .type(SyntheticsBrowserVariableType.TEXT))))
            .locations(Collections.singletonList("aws:eu-west-3"))
            .message("")
            .name("Example test name")
            .options(
                new SyntheticsTestOptions()
                    .ci(
                        new SyntheticsTestCiOptions()
                            .executionRule(SyntheticsTestExecutionRule.BLOCKING))
                    .deviceIds(Collections.singletonList("chrome.laptop_large"))
                    .httpVersion(SyntheticsTestOptionsHTTPVersion.HTTP1)
                    .monitorOptions(
                        new SyntheticsTestOptionsMonitorOptions()
                            .notificationPresetName(
                                SyntheticsTestOptionsMonitorOptionsNotificationPresetName.SHOW_ALL))
                    .restrictedRoles(
                        Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"))
                    .retry(new SyntheticsTestOptionsRetry())
                    .rumSettings(
                        new SyntheticsBrowserTestRumSettings()
                            .applicationId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
                            .clientTokenId(12345L)
                            .isEnabled(true))
                    .scheduling(
                        new SyntheticsTestOptionsScheduling()
                            .timeframes(
                                Arrays.asList(
                                    new SyntheticsTestOptionsSchedulingTimeframe()
                                        .day(1)
                                        .from("07:00")
                                        .to("16:00"),
                                    new SyntheticsTestOptionsSchedulingTimeframe()
                                        .day(3)
                                        .from("07:00")
                                        .to("16:00")))
                            .timezone("America/New_York")))
            .status(SyntheticsTestPauseStatus.LIVE)
            .steps(
                Collections.singletonList(
                    new SyntheticsStep().type(SyntheticsStepType.ASSERT_ELEMENT_CONTENT)))
            .tags(Collections.singletonList("env:prod"))
            .type(SyntheticsBrowserTestType.BROWSER);

    try {
      SyntheticsBrowserTest result = apiInstance.updateBrowserTest("public_id", body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#updateBrowserTest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Edit a browser test returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuth;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthWeb;
use datadog_api_client::datadogV1::model::SyntheticsBasicAuthWebType;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTest;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestConfig;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestRumSettings;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestType;
use datadog_api_client::datadogV1::model::SyntheticsBrowserVariable;
use datadog_api_client::datadogV1::model::SyntheticsBrowserVariableType;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariable;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariableType;
use datadog_api_client::datadogV1::model::SyntheticsStep;
use datadog_api_client::datadogV1::model::SyntheticsStepType;
use datadog_api_client::datadogV1::model::SyntheticsTestCallType;
use datadog_api_client::datadogV1::model::SyntheticsTestCiOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestExecutionRule;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsHTTPVersion;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsMonitorOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsMonitorOptionsNotificationPresetName;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsRetry;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsScheduling;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsSchedulingTimeframe;
use datadog_api_client::datadogV1::model::SyntheticsTestPauseStatus;
use datadog_api_client::datadogV1::model::SyntheticsTestRequest;
use datadog_api_client::datadogV1::model::SyntheticsTestRequestBodyFile;
use datadog_api_client::datadogV1::model::SyntheticsTestRequestBodyType;
use datadog_api_client::datadogV1::model::SyntheticsTestRequestCertificate;
use datadog_api_client::datadogV1::model::SyntheticsTestRequestCertificateItem;
use datadog_api_client::datadogV1::model::SyntheticsTestRequestProxy;

#[tokio::main]
async fn main() {
    let body = SyntheticsBrowserTest::new(
        SyntheticsBrowserTestConfig::new(
            vec![],
            SyntheticsTestRequest::new()
                .basic_auth(SyntheticsBasicAuth::SyntheticsBasicAuthWeb(Box::new(
                    SyntheticsBasicAuthWeb::new()
                        .password("PaSSw0RD!".to_string())
                        .type_(SyntheticsBasicAuthWebType::WEB)
                        .username("my_username".to_string()),
                )))
                .body_type(SyntheticsTestRequestBodyType::TEXT_PLAIN)
                .call_type(SyntheticsTestCallType::UNARY)
                .certificate(
                    SyntheticsTestRequestCertificate::new()
                        .cert(SyntheticsTestRequestCertificateItem::new())
                        .key(SyntheticsTestRequestCertificateItem::new()),
                )
                .certificate_domains(vec![])
                .files(vec![SyntheticsTestRequestBodyFile::new()])
                .http_version(SyntheticsTestOptionsHTTPVersion::HTTP1)
                .proxy(SyntheticsTestRequestProxy::new(
                    "https://example.com".to_string(),
                ))
                .service("Greeter".to_string())
                .url("https://example.com".to_string()),
        )
        .config_variables(vec![SyntheticsConfigVariable::new(
            "VARIABLE_NAME".to_string(),
            SyntheticsConfigVariableType::TEXT,
        )
        .secure(false)])
        .variables(vec![SyntheticsBrowserVariable::new(
            "VARIABLE_NAME".to_string(),
            SyntheticsBrowserVariableType::TEXT,
        )]),
        vec!["aws:eu-west-3".to_string()],
        "".to_string(),
        "Example test name".to_string(),
        SyntheticsTestOptions::new()
            .blocked_request_patterns(vec![])
            .ci(SyntheticsTestCiOptions::new(
                SyntheticsTestExecutionRule::BLOCKING,
            ))
            .device_ids(vec!["chrome.laptop_large".to_string()])
            .http_version(SyntheticsTestOptionsHTTPVersion::HTTP1)
            .monitor_options(
                SyntheticsTestOptionsMonitorOptions::new().notification_preset_name(
                    SyntheticsTestOptionsMonitorOptionsNotificationPresetName::SHOW_ALL,
                ),
            )
            .restricted_roles(vec!["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".to_string()])
            .retry(SyntheticsTestOptionsRetry::new())
            .rum_settings(
                SyntheticsBrowserTestRumSettings::new(true)
                    .application_id("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".to_string())
                    .client_token_id(12345),
            )
            .scheduling(SyntheticsTestOptionsScheduling::new(
                vec![
                    SyntheticsTestOptionsSchedulingTimeframe::new(
                        1,
                        "07:00".to_string(),
                        "16:00".to_string(),
                    ),
                    SyntheticsTestOptionsSchedulingTimeframe::new(
                        3,
                        "07:00".to_string(),
                        "16:00".to_string(),
                    ),
                ],
                "America/New_York".to_string(),
            )),
        SyntheticsBrowserTestType::BROWSER,
    )
    .status(SyntheticsTestPauseStatus::LIVE)
    .steps(vec![
        SyntheticsStep::new().type_(SyntheticsStepType::ASSERT_ELEMENT_CONTENT)
    ])
    .tags(vec!["env:prod".to_string()]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.update_browser_test("public_id".to_string(), body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Edit a browser test returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiUpdateBrowserTestRequest = {
  body: {
    config: {
      assertions: [],
      configVariables: [
        {
          name: "VARIABLE_NAME",
          secure: false,
          type: "text",
        },
      ],
      request: {
        basicAuth: {
          password: "PaSSw0RD!",
          type: "web",
          username: "my_username",
        },
        bodyType: "text/plain",
        callType: "unary",
        certificate: {
          cert: {},
          key: {},
        },
        certificateDomains: [],
        files: [{}],
        httpVersion: "http1",
        proxy: {
          url: "https://example.com",
        },
        service: "Greeter",
        url: "https://example.com",
      },
      variables: [
        {
          name: "VARIABLE_NAME",
          type: "text",
        },
      ],
    },
    locations: ["aws:eu-west-3"],
    message: "",
    name: "Example test name",
    options: {
      blockedRequestPatterns: [],
      ci: {
        executionRule: "blocking",
      },
      deviceIds: ["chrome.laptop_large"],
      httpVersion: "http1",
      monitorOptions: {
        notificationPresetName: "show_all",
      },
      restrictedRoles: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
      retry: {},
      rumSettings: {
        applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        clientTokenId: 12345,
        isEnabled: true,
      },
      scheduling: {
        timeframes: [
          {
            day: 1,
            from: "07:00",
            to: "16:00",
          },
          {
            day: 3,
            from: "07:00",
            to: "16:00",
          },
        ],
        timezone: "America/New_York",
      },
    },
    status: "live",
    steps: [
      {
        type: "assertElementContent",
      },
    ],
    tags: ["env:prod"],
    type: "browser",
  },
  publicId: "public_id",
};

apiInstance
  .updateBrowserTest(params)
  .then((data: v1.SyntheticsBrowserTest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Patch a Synthetic test{% #patch-a-synthetic-test %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                            |
| ----------------- | ----------------------------------------------------------------------- |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v1/synthetics/tests/{public_id} |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v1/synthetics/tests/{public_id} |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v1/synthetics/tests/{public_id}      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v1/synthetics/tests/{public_id}      |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v1/synthetics/tests/{public_id}     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v1/synthetics/tests/{public_id} |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v1/synthetics/tests/{public_id} |

### Overview

Patch the configuration of a Synthetic test with partial data. This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                         |
| --------------------------- | ------ | ----------------------------------- |
| public_id [*required*] | string | The public ID of the test to patch. |

### Request

#### Body Data (required)

[JSON Patch](https://jsonpatch.com/) compliant list of operations

{% tab title="Model" %}

| Parent field | Field | Type     | Description                                                                       |
| ------------ | ----- | -------- | --------------------------------------------------------------------------------- |
|              | data  | [object] | Array of [JSON Patch](https://jsonpatch.com) operations to perform on the test    |
| data         | op    | enum     | The operation to perform Allowed enum values: `add,remove,replace,move,copy,test` |
| data         | path  | string   | The path to the value to modify                                                   |
| data         | value |          | A value to use in a [JSON Patch](https://jsonpatch.com) operation                 |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "op": "replace",
      "path": "/name",
      "value": "New test name"
    },
    {
      "op": "remove",
      "path": "/config/assertions/0"
    }
  ]
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing details about your Synthetic test.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config                                   | object          | Configuration object for a Synthetic test.                                                                                                                                                                                                                                                      |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | variables                                | [object]        | Browser tests only - array of variables used for the test steps.                                                                                                                                                                                                                                |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | creator                                  | object          | Object describing the creator of the shared element.                                                                                                                                                                                                                                            |
| creator              | email                                    | string          | Email of the creator.                                                                                                                                                                                                                                                                           |
| creator              | handle                                   | string          | Handle of the creator.                                                                                                                                                                                                                                                                          |
| creator              | name                                     | string          | Name of the creator.                                                                                                                                                                                                                                                                            |
|                      | locations                                | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message                                  | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name                                     | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options                                  | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The test public ID.                                                                                                                                                                                                                                                                             |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | steps                                    | [object]        | The steps of the test if they exist.                                                                                                                                                                                                                                                            |
| steps                | allowFailure                             | boolean         | A boolean set to allow this step to fail.                                                                                                                                                                                                                                                       |
| steps                | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| steps                | exitIfSucceed                            | boolean         | A boolean set to exit the test if the step succeeds.                                                                                                                                                                                                                                            |
| steps                | isCritical                               | boolean         | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                                                                                         |
| steps                | name                                     | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| steps                | noScreenshot                             | boolean         | A boolean set to skip taking a screenshot for the step.                                                                                                                                                                                                                                         |
| steps                | params                                   | object          | The parameters of the step.                                                                                                                                                                                                                                                                     |
| steps                | public_id                                | string          | The public ID of the step.                                                                                                                                                                                                                                                                      |
| steps                | timeout                                  | int64           | The time before declaring a step failed.                                                                                                                                                                                                                                                        |
| steps                | type                                     | enum            | Step type used in your Synthetic test. Allowed enum values: `assertCurrentUrl,assertElementAttribute,assertElementContent,assertElementPresent,assertEmail,assertFileDownload,assertFromJavascript,assertPageContains,assertPageLacks,assertRequests`                                           |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type                                     | enum            | Type of the Synthetic test. Allowed enum values: `api,browser,mobile,network`                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      {
        "operator": "contains",
        "property": "string",
        "target": 0,
        "timingsScope": "string",
        "type": "statusCode"
      }
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "creator": {
    "email": "string",
    "handle": "string",
    "name": "string"
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "string",
  "monitor_id": "integer",
  "name": "string",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "public_id": "string",
  "status": "live",
  "steps": [
    {
      "allowFailure": false,
      "alwaysExecute": false,
      "exitIfSucceed": false,
      "isCritical": false,
      "name": "string",
      "noScreenshot": false,
      "params": {},
      "public_id": "string",
      "timeout": "integer",
      "type": "assertElementContent"
    }
  ],
  "subtype": "http",
  "tags": [],
  "type": "string"
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
- JSON format is wrong - Updating sub-type is forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic Monitoring is not activated for the user - Test is not owned by the user - Test can't be found
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
\# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/${public_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": [
    {
      "op": "replace",
      "path": "/name",
      "value": "New test name"
    },
    {
      "op": "remove",
      "path": "/config/assertions/0"
    }
  ]
}
EOF
                        
##### 

```go
// Patch a Synthetic test returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	// there is a valid "synthetics_api_test" in the system
	SyntheticsAPITestPublicID := os.Getenv("SYNTHETICS_API_TEST_PUBLIC_ID")

	body := datadogV1.SyntheticsPatchTestBody{
		Data: []datadogV1.SyntheticsPatchTestOperation{
			{
				Op:    datadogV1.SYNTHETICSPATCHTESTOPERATIONNAME_REPLACE.Ptr(),
				Path:  datadog.PtrString("/name"),
				Value: "New test name",
			},
			{
				Op:   datadogV1.SYNTHETICSPATCHTESTOPERATIONNAME_REMOVE.Ptr(),
				Path: datadog.PtrString("/config/assertions/0"),
			},
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.PatchTest(ctx, SyntheticsAPITestPublicID, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.PatchTest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.PatchTest`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Patch a Synthetic test returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsPatchTestBody;
import com.datadog.api.client.v1.model.SyntheticsPatchTestOperation;
import com.datadog.api.client.v1.model.SyntheticsPatchTestOperationName;
import com.datadog.api.client.v1.model.SyntheticsTestDetails;
import java.util.Arrays;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    // there is a valid "synthetics_api_test" in the system
    String SYNTHETICS_API_TEST_PUBLIC_ID = System.getenv("SYNTHETICS_API_TEST_PUBLIC_ID");

    SyntheticsPatchTestBody body =
        new SyntheticsPatchTestBody()
            .data(
                Arrays.asList(
                    new SyntheticsPatchTestOperation()
                        .op(SyntheticsPatchTestOperationName.REPLACE)
                        .path("/name")
                        .value("New test name"),
                    new SyntheticsPatchTestOperation()
                        .op(SyntheticsPatchTestOperationName.REMOVE)
                        .path("/config/assertions/0")));

    try {
      SyntheticsTestDetails result = apiInstance.patchTest(SYNTHETICS_API_TEST_PUBLIC_ID, body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#patchTest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Patch a Synthetic test returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_patch_test_body import SyntheticsPatchTestBody
from datadog_api_client.v1.model.synthetics_patch_test_operation import SyntheticsPatchTestOperation
from datadog_api_client.v1.model.synthetics_patch_test_operation_name import SyntheticsPatchTestOperationName

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = environ["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = SyntheticsPatchTestBody(
    data=[
        SyntheticsPatchTestOperation(
            op=SyntheticsPatchTestOperationName.REPLACE,
            path="/name",
            value="New test name",
        ),
        SyntheticsPatchTestOperation(
            op=SyntheticsPatchTestOperationName.REMOVE,
            path="/config/assertions/0",
        ),
    ],
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.patch_test(public_id=SYNTHETICS_API_TEST_PUBLIC_ID, body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Patch a Synthetic test returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = ENV["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = DatadogAPIClient::V1::SyntheticsPatchTestBody.new({
  data: [
    DatadogAPIClient::V1::SyntheticsPatchTestOperation.new({
      op: DatadogAPIClient::V1::SyntheticsPatchTestOperationName::REPLACE,
      path: "/name",
      value: "New test name",
    }),
    DatadogAPIClient::V1::SyntheticsPatchTestOperation.new({
      op: DatadogAPIClient::V1::SyntheticsPatchTestOperationName::REMOVE,
      path: "/config/assertions/0",
    }),
  ],
})
p api_instance.patch_test(SYNTHETICS_API_TEST_PUBLIC_ID, body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Patch a Synthetic test returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsPatchTestBody;
use datadog_api_client::datadogV1::model::SyntheticsPatchTestOperation;
use datadog_api_client::datadogV1::model::SyntheticsPatchTestOperationName;
use serde_json::Value;

#[tokio::main]
async fn main() {
    // there is a valid "synthetics_api_test" in the system
    let synthetics_api_test_public_id = std::env::var("SYNTHETICS_API_TEST_PUBLIC_ID").unwrap();
    let body = SyntheticsPatchTestBody::new().data(vec![
        SyntheticsPatchTestOperation::new()
            .op(SyntheticsPatchTestOperationName::REPLACE)
            .path("/name".to_string())
            .value(Value::from("New test name")),
        SyntheticsPatchTestOperation::new()
            .op(SyntheticsPatchTestOperationName::REMOVE)
            .path("/config/assertions/0".to_string()),
    ]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .patch_test(synthetics_api_test_public_id.clone(), body)
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Patch a Synthetic test returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

// there is a valid "synthetics_api_test" in the system
const SYNTHETICS_API_TEST_PUBLIC_ID = process.env
  .SYNTHETICS_API_TEST_PUBLIC_ID as string;

const params: v1.SyntheticsApiPatchTestRequest = {
  body: {
    data: [
      {
        op: "replace",
        path: "/name",
        value: "New test name",
      },
      {
        op: "remove",
        path: "/config/assertions/0",
      },
    ],
  },
  publicId: SYNTHETICS_API_TEST_PUBLIC_ID,
};

apiInstance
  .patchTest(params)
  .then((data: v1.SyntheticsTestDetails) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Edit an API test{% #edit-an-api-test %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                              |
| ----------------- | ------------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v1/synthetics/tests/api/{public_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v1/synthetics/tests/api/{public_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v1/synthetics/tests/api/{public_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v1/synthetics/tests/api/{public_id}      |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v1/synthetics/tests/api/{public_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v1/synthetics/tests/api/{public_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v1/synthetics/tests/api/{public_id} |

### Overview

Edit the configuration of a Synthetic API test. This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                    |
| --------------------------- | ------ | ---------------------------------------------- |
| public_id [*required*] | string | The public ID of the test to get details from. |

### Request

#### Body Data (required)

New test details to be saved.

{% tab title="Model" %}

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]                 | object          | Configuration object for a Synthetic API test.                                                                                                                                                                                                                                                  |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | steps                                    | [ <oneOf>] | When the test subtype is `multi`, the steps of the test.                                                                                                                                                                                                                                        |
| steps                | Option 1                                 | object          | The Test step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 1             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 1             | assertions [*required*]             | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                                                          |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| Option 1             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 1             | extractedValues                          | [object]        | Array of values to parse and save as variables from the response.                                                                                                                                                                                                                               |
| extractedValues      | field                                    | string          | When type is `http_header` or `grpc_metadata`, name of the header or metadatum to extract.                                                                                                                                                                                                      |
| extractedValues      | name                                     | string          | Name of the variable to extract.                                                                                                                                                                                                                                                                |
| extractedValues      | parser                                   | object          | Details of the parser to use for the global variable.                                                                                                                                                                                                                                           |
| parser               | type [*required*]                   | enum            | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                                                                                                        |
| parser               | value                                    | string          | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                                                                                                               |
| extractedValues      | secure                                   | boolean         | Determines whether or not the extracted value will be obfuscated.                                                                                                                                                                                                                               |
| extractedValues      | type                                     | enum            | Property of the Synthetic Test Response to extract into a local variable. Allowed enum values: `grpc_message,grpc_metadata,http_body,http_header,http_status_code`                                                                                                                              |
| Option 1             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 1             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 1             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 1             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 1             | request [*required*]                | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| Option 1             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 1             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API test step. Allowed enum values: `http,grpc,ssl,dns,tcp,udp,icmp,websocket`                                                                                                                                                                          |
| steps                | Option 2                                 | object          | The Wait step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 2             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 2             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 2             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API wait step. Allowed enum values: `wait`                                                                                                                                                                                                              |
| Option 2             | value [*required*]                  | int32           | The time to wait in seconds. Minimum value: 0. Maximum value: 180.                                                                                                                                                                                                                              |
| steps                | Option 3                                 | object          | The subtest step used in a Synthetics multi-step API test.                                                                                                                                                                                                                                      |
| Option 3             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 3             | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| Option 3             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 3             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 3             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 3             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 3             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 3             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 3             | subtestPublicId [*required*]        | string          | Public ID of the test to be played as part of a `playSubTest` step type.                                                                                                                                                                                                                        |
| Option 3             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API subtest step. Allowed enum values: `playSubTest`                                                                                                                                                                                                    |
| config               | variablesFromScript                      | string          | Variables defined from JavaScript code.                                                                                                                                                                                                                                                         |
|                      | locations [*required*]              | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message [*required*]                | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name [*required*]                   | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options [*required*]                | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The public ID for the test.                                                                                                                                                                                                                                                                     |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type [*required*]                   | enum            | Type of the Synthetic test, `api`. Allowed enum values: `api`                                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      {
        "operator": "is",
        "property": "{{ PROPERTY }}",
        "target": "text/html",
        "type": "header"
      },
      {
        "operator": "lessThan",
        "target": 2000,
        "type": "responseTime"
      },
      {
        "operator": "validatesJSONPath",
        "target": {
          "jsonPath": "topKey",
          "operator": "isNot",
          "targetValue": "0"
        },
        "type": "body"
      },
      {
        "operator": "validatesJSONSchema",
        "target": {
          "metaSchema": "draft-07",
          "jsonSchema": "{\"type\": \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}"
        },
        "type": "body"
      }
    ],
    "configVariables": [
      {
        "example": "content-type",
        "name": "PROPERTY",
        "pattern": "content-type",
        "type": "text"
      }
    ],
    "request": {
      "certificate": {
        "cert": {
          "filename": "cert-filename",
          "updatedAt": "2020-10-16T09:23:24.857Z"
        },
        "key": {
          "filename": "key-filename",
          "updatedAt": "2020-10-16T09:23:24.857Z"
        }
      },
      "headers": {
        "unique": "examplesynthetic"
      },
      "method": "GET",
      "timeout": 10,
      "url": "https://datadoghq.com"
    }
  },
  "locations": [
    "aws:us-east-2"
  ],
  "message": "BDD test payload: synthetics_api_test_payload.json",
  "name": "Example-Synthetic-updated",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": true,
    "follow_redirects": true,
    "min_failure_duration": 10,
    "min_location_failed": 1,
    "monitor_name": "Test-TestSyntheticsAPITestLifecycle-1623076664",
    "monitor_priority": 5,
    "retry": {
      "count": 3,
      "interval": 10
    },
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "testing:api"
  ],
  "type": "api"
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing details about a Synthetic API test.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]                 | object          | Configuration object for a Synthetic API test.                                                                                                                                                                                                                                                  |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | steps                                    | [ <oneOf>] | When the test subtype is `multi`, the steps of the test.                                                                                                                                                                                                                                        |
| steps                | Option 1                                 | object          | The Test step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 1             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 1             | assertions [*required*]             | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                                                          |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| Option 1             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 1             | extractedValues                          | [object]        | Array of values to parse and save as variables from the response.                                                                                                                                                                                                                               |
| extractedValues      | field                                    | string          | When type is `http_header` or `grpc_metadata`, name of the header or metadatum to extract.                                                                                                                                                                                                      |
| extractedValues      | name                                     | string          | Name of the variable to extract.                                                                                                                                                                                                                                                                |
| extractedValues      | parser                                   | object          | Details of the parser to use for the global variable.                                                                                                                                                                                                                                           |
| parser               | type [*required*]                   | enum            | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                                                                                                        |
| parser               | value                                    | string          | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                                                                                                               |
| extractedValues      | secure                                   | boolean         | Determines whether or not the extracted value will be obfuscated.                                                                                                                                                                                                                               |
| extractedValues      | type                                     | enum            | Property of the Synthetic Test Response to extract into a local variable. Allowed enum values: `grpc_message,grpc_metadata,http_body,http_header,http_status_code`                                                                                                                              |
| Option 1             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 1             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 1             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 1             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 1             | request [*required*]                | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| Option 1             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 1             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API test step. Allowed enum values: `http,grpc,ssl,dns,tcp,udp,icmp,websocket`                                                                                                                                                                          |
| steps                | Option 2                                 | object          | The Wait step used in a Synthetic multi-step API test.                                                                                                                                                                                                                                          |
| Option 2             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 2             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 2             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API wait step. Allowed enum values: `wait`                                                                                                                                                                                                              |
| Option 2             | value [*required*]                  | int32           | The time to wait in seconds. Minimum value: 0. Maximum value: 180.                                                                                                                                                                                                                              |
| steps                | Option 3                                 | object          | The subtest step used in a Synthetics multi-step API test.                                                                                                                                                                                                                                      |
| Option 3             | allowFailure                             | boolean         | Determines whether or not to continue with test if this step fails.                                                                                                                                                                                                                             |
| Option 3             | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| Option 3             | exitIfSucceed                            | boolean         | Determines whether or not to exit the test if the step succeeds.                                                                                                                                                                                                                                |
| Option 3             | extractedValuesFromScript                | string          | Generate variables using JavaScript.                                                                                                                                                                                                                                                            |
| Option 3             | id                                       | string          | ID of the step.                                                                                                                                                                                                                                                                                 |
| Option 3             | isCritical                               | boolean         | Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allowFailure` is `true`.                                                                                                                                                               |
| Option 3             | name [*required*]                   | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| Option 3             | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| Option 3             | subtestPublicId [*required*]        | string          | Public ID of the test to be played as part of a `playSubTest` step type.                                                                                                                                                                                                                        |
| Option 3             | subtype [*required*]                | enum            | The subtype of the Synthetic multi-step API subtest step. Allowed enum values: `playSubTest`                                                                                                                                                                                                    |
| config               | variablesFromScript                      | string          | Variables defined from JavaScript code.                                                                                                                                                                                                                                                         |
|                      | locations [*required*]              | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message [*required*]                | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name [*required*]                   | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options [*required*]                | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The public ID for the test.                                                                                                                                                                                                                                                                     |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type [*required*]                   | enum            | Type of the Synthetic test, `api`. Allowed enum values: `api`                                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      []
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "steps": [],
    "variablesFromScript": "dd.variable.set(\"FOO\", \"foo\")"
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "monitor_id": 12345678,
  "name": "Example test name",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "public_id": "123-abc-456",
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
- JSON format is wrong - Updating sub-type is forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic Monitoring is not activated for the user - Test is not owned by the user - Test can't be found
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
\# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/api/${public_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "name": "Example API test",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "tick_every": 60
  },
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}
EOF
                        
##### 

```go
// Edit an API test returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	// there is a valid "synthetics_api_test" in the system
	SyntheticsAPITestPublicID := os.Getenv("SYNTHETICS_API_TEST_PUBLIC_ID")

	body := datadogV1.SyntheticsAPITest{
		Config: datadogV1.SyntheticsAPITestConfig{
			Assertions: []datadogV1.SyntheticsAssertion{
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_IS,
						Property: datadog.PtrString("{{ PROPERTY }}"),
						Target: datadogV1.SyntheticsAssertionTargetValue{
							SyntheticsAssertionTargetValueString: datadog.PtrString("text/html")},
						Type: datadogV1.SYNTHETICSASSERTIONTYPE_HEADER,
					}},
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionTarget: &datadogV1.SyntheticsAssertionTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONOPERATOR_LESS_THAN,
						Target: datadogV1.SyntheticsAssertionTargetValue{
							SyntheticsAssertionTargetValueNumber: datadog.PtrFloat64(2000)},
						Type: datadogV1.SYNTHETICSASSERTIONTYPE_RESPONSE_TIME,
					}},
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionJSONPathTarget: &datadogV1.SyntheticsAssertionJSONPathTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONJSONPATHOPERATOR_VALIDATES_JSON_PATH,
						Target: &datadogV1.SyntheticsAssertionJSONPathTargetTarget{
							JsonPath: datadog.PtrString("topKey"),
							Operator: datadog.PtrString("isNot"),
							TargetValue: &datadogV1.SyntheticsAssertionTargetValue{
								SyntheticsAssertionTargetValueString: datadog.PtrString("0")},
						},
						Type: datadogV1.SYNTHETICSASSERTIONTYPE_BODY,
					}},
				datadogV1.SyntheticsAssertion{
					SyntheticsAssertionJSONSchemaTarget: &datadogV1.SyntheticsAssertionJSONSchemaTarget{
						Operator: datadogV1.SYNTHETICSASSERTIONJSONSCHEMAOPERATOR_VALIDATES_JSON_SCHEMA,
						Target: &datadogV1.SyntheticsAssertionJSONSchemaTargetTarget{
							MetaSchema: datadogV1.SYNTHETICSASSERTIONJSONSCHEMAMETASCHEMA_DRAFT_07.Ptr(),
							JsonSchema: datadog.PtrString(`{"type": "object", "properties":{"slideshow":{"type":"object"}}}`),
						},
						Type: datadogV1.SYNTHETICSASSERTIONTYPE_BODY,
					}},
			},
			ConfigVariables: []datadogV1.SyntheticsConfigVariable{
				{
					Example: datadog.PtrString("content-type"),
					Name:    "PROPERTY",
					Pattern: datadog.PtrString("content-type"),
					Type:    datadogV1.SYNTHETICSCONFIGVARIABLETYPE_TEXT,
				},
			},
			Request: &datadogV1.SyntheticsTestRequest{
				Certificate: &datadogV1.SyntheticsTestRequestCertificate{
					Cert: &datadogV1.SyntheticsTestRequestCertificateItem{
						Filename:  datadog.PtrString("cert-filename"),
						UpdatedAt: datadog.PtrString("2020-10-16T09:23:24.857Z"),
					},
					Key: &datadogV1.SyntheticsTestRequestCertificateItem{
						Filename:  datadog.PtrString("key-filename"),
						UpdatedAt: datadog.PtrString("2020-10-16T09:23:24.857Z"),
					},
				},
				Headers: map[string]string{
					"unique": "examplesynthetic",
				},
				Method:  datadog.PtrString("GET"),
				Timeout: datadog.PtrFloat64(10),
				Url:     datadog.PtrString("https://datadoghq.com"),
			},
		},
		Locations: []string{
			"aws:us-east-2",
		},
		Message: "BDD test payload: synthetics_api_test_payload.json",
		Name:    "Example-Synthetic-updated",
		Options: datadogV1.SyntheticsTestOptions{
			AcceptSelfSigned:   datadog.PtrBool(false),
			AllowInsecure:      datadog.PtrBool(true),
			FollowRedirects:    datadog.PtrBool(true),
			MinFailureDuration: datadog.PtrInt64(10),
			MinLocationFailed:  datadog.PtrInt64(1),
			MonitorName:        datadog.PtrString("Test-TestSyntheticsAPITestLifecycle-1623076664"),
			MonitorPriority:    datadog.PtrInt32(5),
			Retry: &datadogV1.SyntheticsTestOptionsRetry{
				Count:    datadog.PtrInt64(3),
				Interval: datadog.PtrFloat64(10),
			},
			TickEvery: datadog.PtrInt64(60),
		},
		Status:  datadogV1.SYNTHETICSTESTPAUSESTATUS_LIVE.Ptr(),
		Subtype: datadogV1.SYNTHETICSTESTDETAILSSUBTYPE_HTTP.Ptr(),
		Tags: []string{
			"testing:api",
		},
		Type: datadogV1.SYNTHETICSAPITESTTYPE_API,
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.UpdateAPITest(ctx, SyntheticsAPITestPublicID, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.UpdateAPITest`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.UpdateAPITest`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Edit an API test returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsAPITest;
import com.datadog.api.client.v1.model.SyntheticsAPITestConfig;
import com.datadog.api.client.v1.model.SyntheticsAPITestType;
import com.datadog.api.client.v1.model.SyntheticsAssertion;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONPathOperator;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONPathTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONPathTargetTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONSchemaMetaSchema;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONSchemaOperator;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONSchemaTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONSchemaTargetTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionOperator;
import com.datadog.api.client.v1.model.SyntheticsAssertionTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionTargetValue;
import com.datadog.api.client.v1.model.SyntheticsAssertionType;
import com.datadog.api.client.v1.model.SyntheticsConfigVariable;
import com.datadog.api.client.v1.model.SyntheticsConfigVariableType;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsSubType;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry;
import com.datadog.api.client.v1.model.SyntheticsTestPauseStatus;
import com.datadog.api.client.v1.model.SyntheticsTestRequest;
import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificate;
import com.datadog.api.client.v1.model.SyntheticsTestRequestCertificateItem;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    // there is a valid "synthetics_api_test" in the system
    String SYNTHETICS_API_TEST_PUBLIC_ID = System.getenv("SYNTHETICS_API_TEST_PUBLIC_ID");

    SyntheticsAPITest body =
        new SyntheticsAPITest()
            .config(
                new SyntheticsAPITestConfig()
                    .assertions(
                        Arrays.asList(
                            new SyntheticsAssertion(
                                new SyntheticsAssertionTarget()
                                    .operator(SyntheticsAssertionOperator.IS)
                                    .property("{{ PROPERTY }}")
                                    .target(new SyntheticsAssertionTargetValue("text/html"))
                                    .type(SyntheticsAssertionType.HEADER)),
                            new SyntheticsAssertion(
                                new SyntheticsAssertionTarget()
                                    .operator(SyntheticsAssertionOperator.LESS_THAN)
                                    .target(new SyntheticsAssertionTargetValue(2000.0))
                                    .type(SyntheticsAssertionType.RESPONSE_TIME)),
                            new SyntheticsAssertion(
                                new SyntheticsAssertionJSONPathTarget()
                                    .operator(
                                        SyntheticsAssertionJSONPathOperator.VALIDATES_JSON_PATH)
                                    .target(
                                        new SyntheticsAssertionJSONPathTargetTarget()
                                            .jsonPath("topKey")
                                            .operator("isNot")
                                            .targetValue(new SyntheticsAssertionTargetValue("0")))
                                    .type(SyntheticsAssertionType.BODY)),
                            new SyntheticsAssertion(
                                new SyntheticsAssertionJSONSchemaTarget()
                                    .operator(
                                        SyntheticsAssertionJSONSchemaOperator.VALIDATES_JSON_SCHEMA)
                                    .target(
                                        new SyntheticsAssertionJSONSchemaTargetTarget()
                                            .metaSchema(
                                                SyntheticsAssertionJSONSchemaMetaSchema.DRAFT_07)
                                            .jsonSchema(
                                                """
{"type": "object", "properties":{"slideshow":{"type":"object"}}}
"""))
                                    .type(SyntheticsAssertionType.BODY))))
                    .configVariables(
                        Collections.singletonList(
                            new SyntheticsConfigVariable()
                                .example("content-type")
                                .name("PROPERTY")
                                .pattern("content-type")
                                .type(SyntheticsConfigVariableType.TEXT)))
                    .request(
                        new SyntheticsTestRequest()
                            .certificate(
                                new SyntheticsTestRequestCertificate()
                                    .cert(
                                        new SyntheticsTestRequestCertificateItem()
                                            .filename("cert-filename")
                                            .updatedAt("2020-10-16T09:23:24.857Z"))
                                    .key(
                                        new SyntheticsTestRequestCertificateItem()
                                            .filename("key-filename")
                                            .updatedAt("2020-10-16T09:23:24.857Z")))
                            .headers(Map.ofEntries(Map.entry("unique", "examplesynthetic")))
                            .method("GET")
                            .timeout(10.0)
                            .url("https://datadoghq.com")))
            .locations(Collections.singletonList("aws:us-east-2"))
            .message("BDD test payload: synthetics_api_test_payload.json")
            .name("Example-Synthetic-updated")
            .options(
                new SyntheticsTestOptions()
                    .acceptSelfSigned(false)
                    .allowInsecure(true)
                    .followRedirects(true)
                    .minFailureDuration(10L)
                    .minLocationFailed(1L)
                    .monitorName("Test-TestSyntheticsAPITestLifecycle-1623076664")
                    .monitorPriority(5)
                    .retry(new SyntheticsTestOptionsRetry().count(3L).interval(10.0))
                    .tickEvery(60L))
            .status(SyntheticsTestPauseStatus.LIVE)
            .subtype(SyntheticsTestDetailsSubType.HTTP)
            .tags(Collections.singletonList("testing:api"))
            .type(SyntheticsAPITestType.API);

    try {
      SyntheticsAPITest result = apiInstance.updateAPITest(SYNTHETICS_API_TEST_PUBLIC_ID, body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#updateAPITest");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Edit an API test returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_api_test import SyntheticsAPITest
from datadog_api_client.v1.model.synthetics_api_test_config import SyntheticsAPITestConfig
from datadog_api_client.v1.model.synthetics_api_test_type import SyntheticsAPITestType
from datadog_api_client.v1.model.synthetics_assertion_json_path_operator import SyntheticsAssertionJSONPathOperator
from datadog_api_client.v1.model.synthetics_assertion_json_path_target import SyntheticsAssertionJSONPathTarget
from datadog_api_client.v1.model.synthetics_assertion_json_path_target_target import (
    SyntheticsAssertionJSONPathTargetTarget,
)
from datadog_api_client.v1.model.synthetics_assertion_json_schema_meta_schema import (
    SyntheticsAssertionJSONSchemaMetaSchema,
)
from datadog_api_client.v1.model.synthetics_assertion_json_schema_operator import SyntheticsAssertionJSONSchemaOperator
from datadog_api_client.v1.model.synthetics_assertion_json_schema_target import SyntheticsAssertionJSONSchemaTarget
from datadog_api_client.v1.model.synthetics_assertion_json_schema_target_target import (
    SyntheticsAssertionJSONSchemaTargetTarget,
)
from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator
from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget
from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType
from datadog_api_client.v1.model.synthetics_config_variable import SyntheticsConfigVariable
from datadog_api_client.v1.model.synthetics_config_variable_type import SyntheticsConfigVariableType
from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType
from datadog_api_client.v1.model.synthetics_test_headers import SyntheticsTestHeaders
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry
from datadog_api_client.v1.model.synthetics_test_pause_status import SyntheticsTestPauseStatus
from datadog_api_client.v1.model.synthetics_test_request import SyntheticsTestRequest
from datadog_api_client.v1.model.synthetics_test_request_certificate import SyntheticsTestRequestCertificate
from datadog_api_client.v1.model.synthetics_test_request_certificate_item import SyntheticsTestRequestCertificateItem

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = environ["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = SyntheticsAPITest(
    config=SyntheticsAPITestConfig(
        assertions=[
            SyntheticsAssertionTarget(
                operator=SyntheticsAssertionOperator.IS,
                _property="{{ PROPERTY }}",
                target="text/html",
                type=SyntheticsAssertionType.HEADER,
            ),
            SyntheticsAssertionTarget(
                operator=SyntheticsAssertionOperator.LESS_THAN,
                target=2000,
                type=SyntheticsAssertionType.RESPONSE_TIME,
            ),
            SyntheticsAssertionJSONPathTarget(
                operator=SyntheticsAssertionJSONPathOperator.VALIDATES_JSON_PATH,
                target=SyntheticsAssertionJSONPathTargetTarget(
                    json_path="topKey",
                    operator="isNot",
                    target_value="0",
                ),
                type=SyntheticsAssertionType.BODY,
            ),
            SyntheticsAssertionJSONSchemaTarget(
                operator=SyntheticsAssertionJSONSchemaOperator.VALIDATES_JSON_SCHEMA,
                target=SyntheticsAssertionJSONSchemaTargetTarget(
                    meta_schema=SyntheticsAssertionJSONSchemaMetaSchema.DRAFT_07,
                    json_schema='{"type": "object", "properties":{"slideshow":{"type":"object"}}}',
                ),
                type=SyntheticsAssertionType.BODY,
            ),
        ],
        config_variables=[
            SyntheticsConfigVariable(
                example="content-type",
                name="PROPERTY",
                pattern="content-type",
                type=SyntheticsConfigVariableType.TEXT,
            ),
        ],
        request=SyntheticsTestRequest(
            certificate=SyntheticsTestRequestCertificate(
                cert=SyntheticsTestRequestCertificateItem(
                    filename="cert-filename",
                    updated_at="2020-10-16T09:23:24.857Z",
                ),
                key=SyntheticsTestRequestCertificateItem(
                    filename="key-filename",
                    updated_at="2020-10-16T09:23:24.857Z",
                ),
            ),
            headers=SyntheticsTestHeaders(
                unique="examplesynthetic",
            ),
            method="GET",
            timeout=10.0,
            url="https://datadoghq.com",
        ),
    ),
    locations=[
        "aws:us-east-2",
    ],
    message="BDD test payload: synthetics_api_test_payload.json",
    name="Example-Synthetic-updated",
    options=SyntheticsTestOptions(
        accept_self_signed=False,
        allow_insecure=True,
        follow_redirects=True,
        min_failure_duration=10,
        min_location_failed=1,
        monitor_name="Test-TestSyntheticsAPITestLifecycle-1623076664",
        monitor_priority=5,
        retry=SyntheticsTestOptionsRetry(
            count=3,
            interval=10.0,
        ),
        tick_every=60,
    ),
    status=SyntheticsTestPauseStatus.LIVE,
    subtype=SyntheticsTestDetailsSubType.HTTP,
    tags=[
        "testing:api",
    ],
    type=SyntheticsAPITestType.API,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.update_api_test(public_id=SYNTHETICS_API_TEST_PUBLIC_ID, body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Edit an API test returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = ENV["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = DatadogAPIClient::V1::SyntheticsAPITest.new({
  config: DatadogAPIClient::V1::SyntheticsAPITestConfig.new({
    assertions: [
      DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
        property: "{{ PROPERTY }}",
        target: "text/html",
        type: DatadogAPIClient::V1::SyntheticsAssertionType::HEADER,
      }),
      DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
        target: 2000,
        type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
      }),
      DatadogAPIClient::V1::SyntheticsAssertionJSONPathTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH,
        target: DatadogAPIClient::V1::SyntheticsAssertionJSONPathTargetTarget.new({
          json_path: "topKey",
          operator: "isNot",
          target_value: "0",
        }),
        type: DatadogAPIClient::V1::SyntheticsAssertionType::BODY,
      }),
      DatadogAPIClient::V1::SyntheticsAssertionJSONSchemaTarget.new({
        operator: DatadogAPIClient::V1::SyntheticsAssertionJSONSchemaOperator::VALIDATES_JSON_SCHEMA,
        target: DatadogAPIClient::V1::SyntheticsAssertionJSONSchemaTargetTarget.new({
          meta_schema: DatadogAPIClient::V1::SyntheticsAssertionJSONSchemaMetaSchema::DRAFT_07,
          json_schema: '{"type": "object", "properties":{"slideshow":{"type":"object"}}}',
        }),
        type: DatadogAPIClient::V1::SyntheticsAssertionType::BODY,
      }),
    ],
    config_variables: [
      DatadogAPIClient::V1::SyntheticsConfigVariable.new({
        example: "content-type",
        name: "PROPERTY",
        pattern: "content-type",
        type: DatadogAPIClient::V1::SyntheticsConfigVariableType::TEXT,
      }),
    ],
    request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
      certificate: DatadogAPIClient::V1::SyntheticsTestRequestCertificate.new({
        cert: DatadogAPIClient::V1::SyntheticsTestRequestCertificateItem.new({
          filename: "cert-filename",
          updated_at: "2020-10-16T09:23:24.857Z",
        }),
        key: DatadogAPIClient::V1::SyntheticsTestRequestCertificateItem.new({
          filename: "key-filename",
          updated_at: "2020-10-16T09:23:24.857Z",
        }),
      }),
      headers: {
        unique: "examplesynthetic",
      },
      method: "GET",
      timeout: 10,
      url: "https://datadoghq.com",
    }),
  }),
  locations: [
    "aws:us-east-2",
  ],
  message: "BDD test payload: synthetics_api_test_payload.json",
  name: "Example-Synthetic-updated",
  options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
    accept_self_signed: false,
    allow_insecure: true,
    follow_redirects: true,
    min_failure_duration: 10,
    min_location_failed: 1,
    monitor_name: "Test-TestSyntheticsAPITestLifecycle-1623076664",
    monitor_priority: 5,
    _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
      count: 3,
      interval: 10,
    }),
    tick_every: 60,
  }),
  status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::LIVE,
  subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::HTTP,
  tags: [
    "testing:api",
  ],
  type: DatadogAPIClient::V1::SyntheticsAPITestType::API,
})
p api_instance.update_api_test(SYNTHETICS_API_TEST_PUBLIC_ID, body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Edit an API test returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsAPITest;
use datadog_api_client::datadogV1::model::SyntheticsAPITestConfig;
use datadog_api_client::datadogV1::model::SyntheticsAPITestType;
use datadog_api_client::datadogV1::model::SyntheticsAssertion;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONPathOperator;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONPathTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONPathTargetTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONSchemaMetaSchema;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONSchemaOperator;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONSchemaTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionJSONSchemaTargetTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionOperator;
use datadog_api_client::datadogV1::model::SyntheticsAssertionTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionTargetValue;
use datadog_api_client::datadogV1::model::SyntheticsAssertionType;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariable;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariableType;
use datadog_api_client::datadogV1::model::SyntheticsTestDetailsSubType;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsRetry;
use datadog_api_client::datadogV1::model::SyntheticsTestPauseStatus;
use datadog_api_client::datadogV1::model::SyntheticsTestRequest;
use datadog_api_client::datadogV1::model::SyntheticsTestRequestCertificate;
use datadog_api_client::datadogV1::model::SyntheticsTestRequestCertificateItem;
use std::collections::BTreeMap;

#[tokio::main]
async fn main() {
    // there is a valid "synthetics_api_test" in the system
    let synthetics_api_test_public_id = std::env::var("SYNTHETICS_API_TEST_PUBLIC_ID").unwrap();
    let body =
        SyntheticsAPITest::new(
            SyntheticsAPITestConfig::new()
                .assertions(
                    vec![
                        SyntheticsAssertion::SyntheticsAssertionTarget(
                            Box::new(
                                SyntheticsAssertionTarget::new(
                                    SyntheticsAssertionOperator::IS,
                                    SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueString(
                                        "text/html".to_string(),
                                    ),
                                    SyntheticsAssertionType::HEADER,
                                ).property("{{ PROPERTY }}".to_string()),
                            ),
                        ),
                        SyntheticsAssertion::SyntheticsAssertionTarget(
                            Box::new(
                                SyntheticsAssertionTarget::new(
                                    SyntheticsAssertionOperator::LESS_THAN,
                                    SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueNumber(
                                        2000.0 as f64,
                                    ),
                                    SyntheticsAssertionType::RESPONSE_TIME,
                                ),
                            ),
                        ),
                        SyntheticsAssertion::SyntheticsAssertionJSONPathTarget(
                            Box::new(
                                SyntheticsAssertionJSONPathTarget::new(
                                    SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH,
                                    SyntheticsAssertionType::BODY,
                                ).target(
                                    SyntheticsAssertionJSONPathTargetTarget::new()
                                        .json_path("topKey".to_string())
                                        .operator("isNot".to_string())
                                        .target_value(
                                            SyntheticsAssertionTargetValue::SyntheticsAssertionTargetValueString(
                                                "0".to_string(),
                                            ),
                                        ),
                                ),
                            ),
                        ),
                        SyntheticsAssertion::SyntheticsAssertionJSONSchemaTarget(
                            Box::new(
                                SyntheticsAssertionJSONSchemaTarget::new(
                                    SyntheticsAssertionJSONSchemaOperator::VALIDATES_JSON_SCHEMA,
                                    SyntheticsAssertionType::BODY,
                                ).target(
                                    SyntheticsAssertionJSONSchemaTargetTarget::new()
                                        .json_schema(
                                            r#"{"type": "object", "properties":{"slideshow":{"type":"object"}}}"#.to_string(),
                                        )
                                        .meta_schema(SyntheticsAssertionJSONSchemaMetaSchema::DRAFT_07),
                                ),
                            ),
                        )
                    ],
                )
                .config_variables(
                    vec![
                        SyntheticsConfigVariable::new("PROPERTY".to_string(), SyntheticsConfigVariableType::TEXT)
                            .example("content-type".to_string())
                            .pattern("content-type".to_string())
                    ],
                )
                .request(
                    SyntheticsTestRequest::new()
                        .certificate(
                            SyntheticsTestRequestCertificate::new()
                                .cert(
                                    SyntheticsTestRequestCertificateItem::new()
                                        .filename("cert-filename".to_string())
                                        .updated_at("2020-10-16T09:23:24.857Z".to_string()),
                                )
                                .key(
                                    SyntheticsTestRequestCertificateItem::new()
                                        .filename("key-filename".to_string())
                                        .updated_at("2020-10-16T09:23:24.857Z".to_string()),
                                ),
                        )
                        .headers(BTreeMap::from([("unique".to_string(), "examplesynthetic".to_string())]))
                        .method("GET".to_string())
                        .timeout(10.0 as f64)
                        .url("https://datadoghq.com".to_string()),
                ),
            vec!["aws:us-east-2".to_string()],
            "BDD test payload: synthetics_api_test_payload.json".to_string(),
            "Example-Synthetic-updated".to_string(),
            SyntheticsTestOptions::new()
                .accept_self_signed(false)
                .allow_insecure(true)
                .follow_redirects(true)
                .min_failure_duration(10)
                .min_location_failed(1)
                .monitor_name("Test-TestSyntheticsAPITestLifecycle-1623076664".to_string())
                .monitor_priority(5)
                .retry(SyntheticsTestOptionsRetry::new().count(3).interval(10.0 as f64))
                .tick_every(60),
            SyntheticsAPITestType::API,
        )
            .status(SyntheticsTestPauseStatus::LIVE)
            .subtype(SyntheticsTestDetailsSubType::HTTP)
            .tags(vec!["testing:api".to_string()]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .update_api_test(synthetics_api_test_public_id.clone(), body)
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Edit an API test returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

// there is a valid "synthetics_api_test" in the system
const SYNTHETICS_API_TEST_PUBLIC_ID = process.env
  .SYNTHETICS_API_TEST_PUBLIC_ID as string;

const params: v1.SyntheticsApiUpdateAPITestRequest = {
  body: {
    config: {
      assertions: [
        {
          operator: "is",
          property: "{{ PROPERTY }}",
          target: "text/html",
          type: "header",
        },
        {
          operator: "lessThan",
          target: 2000,
          type: "responseTime",
        },
        {
          operator: "validatesJSONPath",
          target: {
            jsonPath: "topKey",
            operator: "isNot",
            targetValue: "0",
          },
          type: "body",
        },
        {
          operator: "validatesJSONSchema",
          target: {
            metaSchema: "draft-07",
            jsonSchema: `{"type": "object", "properties":{"slideshow":{"type":"object"}}}`,
          },
          type: "body",
        },
      ],
      configVariables: [
        {
          example: "content-type",
          name: "PROPERTY",
          pattern: "content-type",
          type: "text",
        },
      ],
      request: {
        certificate: {
          cert: {
            filename: "cert-filename",
            updatedAt: "2020-10-16T09:23:24.857Z",
          },
          key: {
            filename: "key-filename",
            updatedAt: "2020-10-16T09:23:24.857Z",
          },
        },
        headers: {
          unique: "examplesynthetic",
        },
        method: "GET",
        timeout: 10,
        url: "https://datadoghq.com",
      },
    },
    locations: ["aws:us-east-2"],
    message: "BDD test payload: synthetics_api_test_payload.json",
    name: "Example-Synthetic-updated",
    options: {
      acceptSelfSigned: false,
      allowInsecure: true,
      followRedirects: true,
      minFailureDuration: 10,
      minLocationFailed: 1,
      monitorName: "Test-TestSyntheticsAPITestLifecycle-1623076664",
      monitorPriority: 5,
      retry: {
        count: 3,
        interval: 10,
      },
      tickEvery: 60,
    },
    status: "live",
    subtype: "http",
    tags: ["testing:api"],
    type: "api",
  },
  publicId: SYNTHETICS_API_TEST_PUBLIC_ID,
};

apiInstance
  .updateAPITest(params)
  .then((data: v1.SyntheticsAPITest) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Edit a mobile test{% #edit-a-mobile-test %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                 |
| ----------------- | ---------------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v1/synthetics/tests/mobile/{public_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v1/synthetics/tests/mobile/{public_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v1/synthetics/tests/mobile/{public_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v1/synthetics/tests/mobile/{public_id}      |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v1/synthetics/tests/mobile/{public_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v1/synthetics/tests/mobile/{public_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v1/synthetics/tests/mobile/{public_id} |

### Overview

Edit the configuration of a Synthetic mobile test. This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                    |
| --------------------------- | ------ | ---------------------------------------------- |
| public_id [*required*] | string | The public ID of the test to get details from. |

### Request

#### Body Data (required)

New test details to be saved.

{% tab title="Model" %}

| Parent field         | Field                               | Type          | Description                                                                                                                                                                                                            |
| -------------------- | ----------------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]            | object        | Configuration object for a Synthetic mobile test.                                                                                                                                                                      |
| config               | initialApplicationArguments         | object        | Initial application arguments for a mobile test.                                                                                                                                                                       |
| additionalProperties | <any-key>                           | string        | A single application argument.                                                                                                                                                                                         |
| config               | variables                           | [object]      | Array of variables used for the test steps.                                                                                                                                                                            |
| variables            | example                             | string        | Example for the variable.                                                                                                                                                                                              |
| variables            | id                                  | string        | ID of the variable for global variables.                                                                                                                                                                               |
| variables            | name [*required*]              | string        | Name of the variable.                                                                                                                                                                                                  |
| variables            | pattern                             | string        | Pattern of the variable.                                                                                                                                                                                               |
| variables            | secure                              | boolean       | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                       |
| variables            | type [*required*]              | enum          | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                           |
|                      | device_ids                          | [string]      | Array with the different device IDs used to run the test.                                                                                                                                                              |
|                      | message [*required*]           | string        | Notification message associated with the test.                                                                                                                                                                         |
|                      | monitor_id                          | int64         | The associated monitor ID.                                                                                                                                                                                             |
|                      | name [*required*]              | string        | Name of the test.                                                                                                                                                                                                      |
|                      | options [*required*]           | object        | Object describing the extra options for a Synthetic test.                                                                                                                                                              |
| options              | allowApplicationCrash               | boolean       | A boolean to set if an application crash would mark the test as failed.                                                                                                                                                |
| options              | bindings                            | [object]      | Array of bindings used for the mobile test.                                                                                                                                                                            |
| bindings             | principals                          | [string]      | List of principals for a mobile test binding.                                                                                                                                                                          |
| bindings             | relation                            | enum          | The type of relation for the binding. Allowed enum values: `editor,viewer`                                                                                                                                             |
| options              | ci                                  | object        | CI/CD options for a Synthetic test.                                                                                                                                                                                    |
| ci                   | executionRule [*required*]     | enum          | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                              |
| options              | defaultStepTimeout                  | int32         | The default timeout for steps in the test (in seconds).                                                                                                                                                                |
| options              | device_ids [*required*]        | [string]      | For mobile test, array with the different device IDs used to run the test.                                                                                                                                             |
| options              | disableAutoAcceptAlert              | boolean       | A boolean to disable auto accepting alerts.                                                                                                                                                                            |
| options              | min_failure_duration                | int64         | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                        |
| options              | mobileApplication [*required*] | object        | Mobile application for mobile synthetics test.                                                                                                                                                                         |
| mobileApplication    | applicationId [*required*]     | string        | Application ID of the mobile application.                                                                                                                                                                              |
| mobileApplication    | referenceId [*required*]       | string        | Reference ID of the mobile application.                                                                                                                                                                                |
| mobileApplication    | referenceType [*required*]     | enum          | Reference type for the mobile application for a mobile synthetics test. Allowed enum values: `latest,version`                                                                                                          |
| options              | monitor_name                        | string        | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                    |
| options              | monitor_options                     | object        | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                         |
| monitor_options      | escalation_message                  | string        | Message to include in the escalation notification.                                                                                                                                                                     |
| monitor_options      | notification_preset_name            | enum          | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                        |
| monitor_options      | renotify_interval                   | int64         | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                            |
| monitor_options      | renotify_occurrences                | int64         | The number of times to renotify if the test is still failing.                                                                                                                                                          |
| options              | monitor_priority                    | int32         | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                            |
| options              | noScreenshot                        | boolean       | A boolean set to not take a screenshot for the step.                                                                                                                                                                   |
| options              | restricted_roles                    | [string]      | **DEPRECATED**: 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.             |
| options              | retry                               | object        | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                     |
| retry                | count                               | int64         | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                         |
| retry                | interval                            | double        | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                    |
| options              | scheduling                          | object        | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                |
| scheduling           | timeframes [*required*]        | [object]      | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                       |
| timeframes           | day [*required*]               | int32         | Number representing the day of the week.                                                                                                                                                                               |
| timeframes           | from [*required*]              | string        | The hour of the day on which scheduling starts.                                                                                                                                                                        |
| timeframes           | to [*required*]                | string        | The hour of the day on which scheduling ends.                                                                                                                                                                          |
| scheduling           | timezone [*required*]          | string        | Timezone in which the timeframe is based.                                                                                                                                                                              |
| options              | tick_every [*required*]        | int64         | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                         |
| options              | verbosity                           | int32         | The level of verbosity for the mobile test. This field can not be set by a user.                                                                                                                                       |
|                      | public_id                           | string        | The public ID of the test.                                                                                                                                                                                             |
|                      | status                              | enum          | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                     |
|                      | steps                               | [object]      | Array of steps for the test.                                                                                                                                                                                           |
| steps                | allowFailure                        | boolean       | A boolean set to allow this step to fail.                                                                                                                                                                              |
| steps                | hasNewStepElement                   | boolean       | A boolean set to determine if the step has a new step element.                                                                                                                                                         |
| steps                | isCritical                          | boolean       | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                |
| steps                | name [*required*]              | string        | The name of the step.                                                                                                                                                                                                  |
| steps                | noScreenshot                        | boolean       | A boolean set to not take a screenshot for the step.                                                                                                                                                                   |
| steps                | params [*required*]            | object        | The parameters of a mobile step.                                                                                                                                                                                       |
| params               | check                               | enum          | Type of assertion to apply in an API test. Allowed enum values: `equals,notEquals,contains,notContains,startsWith,notStartsWith,greater,lower,greaterEquals,lowerEquals`                                               |
| params               | delay                               | int64         | Number of milliseconds to wait between inputs in a `typeText` step type.                                                                                                                                               |
| params               | direction                           | enum          | The direction of the scroll for a `scrollToElement` step type. Allowed enum values: `up,down,left,right`                                                                                                               |
| params               | element                             | object        | Information about the element used for a step.                                                                                                                                                                         |
| element              | context                             | string        | Context of the element.                                                                                                                                                                                                |
| element              | contextType                         | enum          | Type of the context that the element is in. Allowed enum values: `native,web`                                                                                                                                          |
| element              | elementDescription                  | string        | Description of the element.                                                                                                                                                                                            |
| element              | multiLocator                        | object        | Multi-locator to find the element.                                                                                                                                                                                     |
| element              | relativePosition                    | object        | Position of the action relative to the element.                                                                                                                                                                        |
| relativePosition     | x                                   | double        | The `relativePosition` on the `x` axis for the element.                                                                                                                                                                |
| relativePosition     | y                                   | double        | The `relativePosition` on the `y` axis for the element.                                                                                                                                                                |
| element              | textContent                         | string        | Text content of the element.                                                                                                                                                                                           |
| element              | userLocator                         | object        | User locator to find the element.                                                                                                                                                                                      |
| userLocator          | failTestOnCannotLocate              | boolean       | Whether if the test should fail if the element cannot be found.                                                                                                                                                        |
| userLocator          | values                              | [object]      | Values of the user locator.                                                                                                                                                                                            |
| values               | type                                | enum          | Type of a user locator. Allowed enum values: `accessibility-id,id,ios-predicate-string,ios-class-chain,xpath`                                                                                                          |
| values               | value                               | string        | Value of a user locator.                                                                                                                                                                                               |
| element              | viewName                            | string        | Name of the view of the element.                                                                                                                                                                                       |
| params               | enabled                             | boolean       | Boolean to change the state of the wifi for a `toggleWiFi` step type.                                                                                                                                                  |
| params               | maxScrolls                          | int64         | Maximum number of scrolls to do for a `scrollToElement` step type.                                                                                                                                                     |
| params               | positions                           | [object]      | List of positions for the `flick` step type. The maximum is 10 flicks per step                                                                                                                                         |
| positions            | x                                   | double        | The `x` position for the flick.                                                                                                                                                                                        |
| positions            | y                                   | double        | The `y` position for the flick.                                                                                                                                                                                        |
| params               | subtestPublicId                     | string        | Public ID of the test to be played as part of a `playSubTest` step type.                                                                                                                                               |
| params               | value                               |  <oneOf> | Values used in the step for in multiple step types.                                                                                                                                                                    |
| value                | Option 1                            | string        | Value used in the step for in multiple step types.                                                                                                                                                                     |
| value                | Option 2                            | int64         | Value used in the step for in multiple step types.                                                                                                                                                                     |
| params               | variable                            | object        | Variable object for `extractVariable` step type.                                                                                                                                                                       |
| variable             | example [*required*]           | string        | An example for the variable.                                                                                                                                                                                           |
| variable             | name [*required*]              | string        | The variable name.                                                                                                                                                                                                     |
| params               | withEnter                           | boolean       | Boolean to indicate if `Enter` should be pressed at the end of the `typeText` step type.                                                                                                                               |
| params               | x                                   | double        | Amount to scroll by on the `x` axis for a `scroll` step type.                                                                                                                                                          |
| params               | y                                   | double        | Amount to scroll by on the `y` axis for a `scroll` step type.                                                                                                                                                          |
| steps                | publicId                            | string        | The public ID of the step.                                                                                                                                                                                             |
| steps                | timeout                             | int64         | The time before declaring a step failed.                                                                                                                                                                               |
| steps                | type [*required*]              | enum          | Step type used in your mobile Synthetic test. Allowed enum values: `assertElementContent,assertScreenContains,assertScreenLacks,doubleTap,extractVariable,flick,openDeeplink,playSubTest,pressBack,restartApplication` |
|                      | tags                                | [string]      | Array of tags attached to the test.                                                                                                                                                                                    |
|                      | type [*required*]              | enum          | Type of the Synthetic test, `mobile`. Allowed enum values: `mobile`                                                                                                                                                    |

{% /tab %}

{% tab title="Example" %}

```json
{
  "name": "Example-Synthetic-updated",
  "status": "paused",
  "type": "mobile",
  "config": {
    "variables": []
  },
  "message": "",
  "options": {
    "device_ids": [
      "synthetics:mobile:device:iphone_15_ios_17"
    ],
    "mobileApplication": {
      "applicationId": "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
      "referenceId": "6115922a-5f5d-455e-bc7e-7955a57f3815",
      "referenceType": "version"
    },
    "tick_every": 3600
  },
  "steps": []
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing details about a Synthetic mobile test.

| Parent field         | Field                               | Type          | Description                                                                                                                                                                                                            |
| -------------------- | ----------------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config [*required*]            | object        | Configuration object for a Synthetic mobile test.                                                                                                                                                                      |
| config               | initialApplicationArguments         | object        | Initial application arguments for a mobile test.                                                                                                                                                                       |
| additionalProperties | <any-key>                           | string        | A single application argument.                                                                                                                                                                                         |
| config               | variables                           | [object]      | Array of variables used for the test steps.                                                                                                                                                                            |
| variables            | example                             | string        | Example for the variable.                                                                                                                                                                                              |
| variables            | id                                  | string        | ID of the variable for global variables.                                                                                                                                                                               |
| variables            | name [*required*]              | string        | Name of the variable.                                                                                                                                                                                                  |
| variables            | pattern                             | string        | Pattern of the variable.                                                                                                                                                                                               |
| variables            | secure                              | boolean       | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                       |
| variables            | type [*required*]              | enum          | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                           |
|                      | device_ids                          | [string]      | Array with the different device IDs used to run the test.                                                                                                                                                              |
|                      | message [*required*]           | string        | Notification message associated with the test.                                                                                                                                                                         |
|                      | monitor_id                          | int64         | The associated monitor ID.                                                                                                                                                                                             |
|                      | name [*required*]              | string        | Name of the test.                                                                                                                                                                                                      |
|                      | options [*required*]           | object        | Object describing the extra options for a Synthetic test.                                                                                                                                                              |
| options              | allowApplicationCrash               | boolean       | A boolean to set if an application crash would mark the test as failed.                                                                                                                                                |
| options              | bindings                            | [object]      | Array of bindings used for the mobile test.                                                                                                                                                                            |
| bindings             | principals                          | [string]      | List of principals for a mobile test binding.                                                                                                                                                                          |
| bindings             | relation                            | enum          | The type of relation for the binding. Allowed enum values: `editor,viewer`                                                                                                                                             |
| options              | ci                                  | object        | CI/CD options for a Synthetic test.                                                                                                                                                                                    |
| ci                   | executionRule [*required*]     | enum          | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                              |
| options              | defaultStepTimeout                  | int32         | The default timeout for steps in the test (in seconds).                                                                                                                                                                |
| options              | device_ids [*required*]        | [string]      | For mobile test, array with the different device IDs used to run the test.                                                                                                                                             |
| options              | disableAutoAcceptAlert              | boolean       | A boolean to disable auto accepting alerts.                                                                                                                                                                            |
| options              | min_failure_duration                | int64         | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                        |
| options              | mobileApplication [*required*] | object        | Mobile application for mobile synthetics test.                                                                                                                                                                         |
| mobileApplication    | applicationId [*required*]     | string        | Application ID of the mobile application.                                                                                                                                                                              |
| mobileApplication    | referenceId [*required*]       | string        | Reference ID of the mobile application.                                                                                                                                                                                |
| mobileApplication    | referenceType [*required*]     | enum          | Reference type for the mobile application for a mobile synthetics test. Allowed enum values: `latest,version`                                                                                                          |
| options              | monitor_name                        | string        | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                    |
| options              | monitor_options                     | object        | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                         |
| monitor_options      | escalation_message                  | string        | Message to include in the escalation notification.                                                                                                                                                                     |
| monitor_options      | notification_preset_name            | enum          | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                        |
| monitor_options      | renotify_interval                   | int64         | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                            |
| monitor_options      | renotify_occurrences                | int64         | The number of times to renotify if the test is still failing.                                                                                                                                                          |
| options              | monitor_priority                    | int32         | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                            |
| options              | noScreenshot                        | boolean       | A boolean set to not take a screenshot for the step.                                                                                                                                                                   |
| options              | restricted_roles                    | [string]      | **DEPRECATED**: 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.             |
| options              | retry                               | object        | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                     |
| retry                | count                               | int64         | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                         |
| retry                | interval                            | double        | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                    |
| options              | scheduling                          | object        | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                |
| scheduling           | timeframes [*required*]        | [object]      | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                       |
| timeframes           | day [*required*]               | int32         | Number representing the day of the week.                                                                                                                                                                               |
| timeframes           | from [*required*]              | string        | The hour of the day on which scheduling starts.                                                                                                                                                                        |
| timeframes           | to [*required*]                | string        | The hour of the day on which scheduling ends.                                                                                                                                                                          |
| scheduling           | timezone [*required*]          | string        | Timezone in which the timeframe is based.                                                                                                                                                                              |
| options              | tick_every [*required*]        | int64         | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                         |
| options              | verbosity                           | int32         | The level of verbosity for the mobile test. This field can not be set by a user.                                                                                                                                       |
|                      | public_id                           | string        | The public ID of the test.                                                                                                                                                                                             |
|                      | status                              | enum          | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                     |
|                      | steps                               | [object]      | Array of steps for the test.                                                                                                                                                                                           |
| steps                | allowFailure                        | boolean       | A boolean set to allow this step to fail.                                                                                                                                                                              |
| steps                | hasNewStepElement                   | boolean       | A boolean set to determine if the step has a new step element.                                                                                                                                                         |
| steps                | isCritical                          | boolean       | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                |
| steps                | name [*required*]              | string        | The name of the step.                                                                                                                                                                                                  |
| steps                | noScreenshot                        | boolean       | A boolean set to not take a screenshot for the step.                                                                                                                                                                   |
| steps                | params [*required*]            | object        | The parameters of a mobile step.                                                                                                                                                                                       |
| params               | check                               | enum          | Type of assertion to apply in an API test. Allowed enum values: `equals,notEquals,contains,notContains,startsWith,notStartsWith,greater,lower,greaterEquals,lowerEquals`                                               |
| params               | delay                               | int64         | Number of milliseconds to wait between inputs in a `typeText` step type.                                                                                                                                               |
| params               | direction                           | enum          | The direction of the scroll for a `scrollToElement` step type. Allowed enum values: `up,down,left,right`                                                                                                               |
| params               | element                             | object        | Information about the element used for a step.                                                                                                                                                                         |
| element              | context                             | string        | Context of the element.                                                                                                                                                                                                |
| element              | contextType                         | enum          | Type of the context that the element is in. Allowed enum values: `native,web`                                                                                                                                          |
| element              | elementDescription                  | string        | Description of the element.                                                                                                                                                                                            |
| element              | multiLocator                        | object        | Multi-locator to find the element.                                                                                                                                                                                     |
| element              | relativePosition                    | object        | Position of the action relative to the element.                                                                                                                                                                        |
| relativePosition     | x                                   | double        | The `relativePosition` on the `x` axis for the element.                                                                                                                                                                |
| relativePosition     | y                                   | double        | The `relativePosition` on the `y` axis for the element.                                                                                                                                                                |
| element              | textContent                         | string        | Text content of the element.                                                                                                                                                                                           |
| element              | userLocator                         | object        | User locator to find the element.                                                                                                                                                                                      |
| userLocator          | failTestOnCannotLocate              | boolean       | Whether if the test should fail if the element cannot be found.                                                                                                                                                        |
| userLocator          | values                              | [object]      | Values of the user locator.                                                                                                                                                                                            |
| values               | type                                | enum          | Type of a user locator. Allowed enum values: `accessibility-id,id,ios-predicate-string,ios-class-chain,xpath`                                                                                                          |
| values               | value                               | string        | Value of a user locator.                                                                                                                                                                                               |
| element              | viewName                            | string        | Name of the view of the element.                                                                                                                                                                                       |
| params               | enabled                             | boolean       | Boolean to change the state of the wifi for a `toggleWiFi` step type.                                                                                                                                                  |
| params               | maxScrolls                          | int64         | Maximum number of scrolls to do for a `scrollToElement` step type.                                                                                                                                                     |
| params               | positions                           | [object]      | List of positions for the `flick` step type. The maximum is 10 flicks per step                                                                                                                                         |
| positions            | x                                   | double        | The `x` position for the flick.                                                                                                                                                                                        |
| positions            | y                                   | double        | The `y` position for the flick.                                                                                                                                                                                        |
| params               | subtestPublicId                     | string        | Public ID of the test to be played as part of a `playSubTest` step type.                                                                                                                                               |
| params               | value                               |  <oneOf> | Values used in the step for in multiple step types.                                                                                                                                                                    |
| value                | Option 1                            | string        | Value used in the step for in multiple step types.                                                                                                                                                                     |
| value                | Option 2                            | int64         | Value used in the step for in multiple step types.                                                                                                                                                                     |
| params               | variable                            | object        | Variable object for `extractVariable` step type.                                                                                                                                                                       |
| variable             | example [*required*]           | string        | An example for the variable.                                                                                                                                                                                           |
| variable             | name [*required*]              | string        | The variable name.                                                                                                                                                                                                     |
| params               | withEnter                           | boolean       | Boolean to indicate if `Enter` should be pressed at the end of the `typeText` step type.                                                                                                                               |
| params               | x                                   | double        | Amount to scroll by on the `x` axis for a `scroll` step type.                                                                                                                                                          |
| params               | y                                   | double        | Amount to scroll by on the `y` axis for a `scroll` step type.                                                                                                                                                          |
| steps                | publicId                            | string        | The public ID of the step.                                                                                                                                                                                             |
| steps                | timeout                             | int64         | The time before declaring a step failed.                                                                                                                                                                               |
| steps                | type [*required*]              | enum          | Step type used in your mobile Synthetic test. Allowed enum values: `assertElementContent,assertScreenContains,assertScreenLacks,doubleTap,extractVariable,flick,openDeeplink,playSubTest,pressBack,restartApplication` |
|                      | tags                                | [string]      | Array of tags attached to the test.                                                                                                                                                                                    |
|                      | type [*required*]              | enum          | Type of the Synthetic test, `mobile`. Allowed enum values: `mobile`                                                                                                                                                    |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "initialApplicationArguments": {
      "<any-key>": "string"
    },
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "device_ids": [
    "chrome.laptop_large"
  ],
  "message": "Notification message",
  "monitor_id": 12345678,
  "name": "Example test name",
  "options": {
    "allowApplicationCrash": false,
    "bindings": [
      {
        "principals": [],
        "relation": "string"
      }
    ],
    "ci": {
      "executionRule": "blocking"
    },
    "defaultStepTimeout": "integer",
    "device_ids": [
      "synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"
    ],
    "disableAutoAcceptAlert": false,
    "min_failure_duration": "integer",
    "mobileApplication": {
      "applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa",
      "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab",
      "referenceType": "latest"
    },
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": 300,
    "verbosity": "integer"
  },
  "public_id": "123-abc-456",
  "status": "live",
  "steps": [
    {
      "allowFailure": false,
      "hasNewStepElement": false,
      "isCritical": false,
      "name": "",
      "noScreenshot": false,
      "params": {
        "check": "string",
        "delay": "integer",
        "direction": "string",
        "element": {
          "context": "string",
          "contextType": "string",
          "elementDescription": "string",
          "multiLocator": {},
          "relativePosition": {
            "x": "number",
            "y": "number"
          },
          "textContent": "string",
          "userLocator": {
            "failTestOnCannotLocate": false,
            "values": [
              {
                "type": "string",
                "value": "string"
              }
            ]
          },
          "viewName": "string"
        },
        "enabled": false,
        "maxScrolls": "integer",
        "positions": [
          {
            "x": "number",
            "y": "number"
          }
        ],
        "subtestPublicId": "string",
        "value": {
          "description": "undefined",
          "type": "undefined"
        },
        "variable": {
          "example": "",
          "name": "VAR_NAME"
        },
        "withEnter": false,
        "x": "number",
        "y": "number"
      },
      "publicId": "pub-lic-id0",
      "timeout": "integer",
      "type": "assertElementContent"
    }
  ],
  "tags": [
    "env:production"
  ],
  "type": "mobile"
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
- JSON format is wrong - Updating sub-type is forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic Monitoring is not activated for the user - Test is not owned by the user - Test can't be found
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
\# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/mobile/${public_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "variables": []
  },
  "device_ids": [
    "synthetics:mobile:device:apple_iphone_14_ios_16"
  ],
  "message": "Notification message",
  "name": "Example mobile test",
  "options": {
    "min_failure_duration": 0,
    "min_location_failed": 1,
    "tick_every": 3600
  },
  "tags": [
    "env:production"
  ],
  "type": "mobile"
}
EOF
                        
{% /tab %}

## Delete tests{% #delete-tests %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                      |
| ----------------- | ----------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v1/synthetics/tests/delete |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v1/synthetics/tests/delete |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v1/synthetics/tests/delete      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v1/synthetics/tests/delete      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v1/synthetics/tests/delete     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v1/synthetics/tests/delete |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v1/synthetics/tests/delete |

### Overview

Delete multiple Synthetic tests by ID. This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)

Public ID list of the Synthetic tests to be deleted.

{% tab title="Model" %}

| Field                     | Type     | Description                                                                                                      |
| ------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| force_delete_dependencies | boolean  | Delete the Synthetic test even if it's referenced by other resources (for example, SLOs and composite monitors). |
| public_ids                | [string] | An array of Synthetic test IDs you want to delete.                                                               |

{% /tab %}

{% tab title="Example" %}

```json
{
  "force_delete_dependencies": false,
  "public_ids": [
    []
  ]
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK.
{% tab title="Model" %}
Response object for deleting Synthetic tests.

| Parent field  | Field         | Type      | Description                                                                                     |
| ------------- | ------------- | --------- | ----------------------------------------------------------------------------------------------- |
|               | deleted_tests | [object]  | Array of objects containing a deleted Synthetic test ID with the associated deletion timestamp. |
| deleted_tests | deleted_at    | date-time | Deletion timestamp of the Synthetic test ID.                                                    |
| deleted_tests | public_id     | string    | The Synthetic test ID deleted.                                                                  |

{% /tab %}

{% tab title="Example" %}

```json
{
  "deleted_tests": [
    {
      "deleted_at": "2019-09-19T10:00:00.000Z",
      "public_id": "string"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
- JSON format is wrong - Test cannot be deleted as it's used elsewhere (as a sub-test or in an uptime widget) - Some IDs are not owned by the user
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Tests to be deleted can't be found - Synthetic is not activated for the user
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/delete" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "public_ids": [
    "abc-def-123"
  ]
}
EOF
                
##### 

```python
"""
Delete tests returns "OK." response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_delete_tests_payload import SyntheticsDeleteTestsPayload

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = environ["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = SyntheticsDeleteTestsPayload(
    public_ids=[
        SYNTHETICS_API_TEST_PUBLIC_ID,
    ],
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.delete_tests(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Delete tests returns "OK." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = ENV["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = DatadogAPIClient::V1::SyntheticsDeleteTestsPayload.new({
  public_ids: [
    SYNTHETICS_API_TEST_PUBLIC_ID,
  ],
})
p api_instance.delete_tests(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```ruby
require 'dogapi'

api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'

dog = Dogapi::Client.new(api_key, app_key)

test_ids = ['<SYNTHETICS_TEST_PUBLIC_ID_1>','<SYNTHETICS_TEST_PUBLIC_ID_2>']

dog.delete_synthetics_tests('test_ids' => test_ids)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby-legacy) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Delete tests returns "OK." response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	// there is a valid "synthetics_api_test" in the system
	SyntheticsAPITestPublicID := os.Getenv("SYNTHETICS_API_TEST_PUBLIC_ID")

	body := datadogV1.SyntheticsDeleteTestsPayload{
		PublicIds: []string{
			SyntheticsAPITestPublicID,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.DeleteTests(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.DeleteTests`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.DeleteTests`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Delete tests returns "OK." response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsDeleteTestsPayload;
import com.datadog.api.client.v1.model.SyntheticsDeleteTestsResponse;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    // there is a valid "synthetics_api_test" in the system
    String SYNTHETICS_API_TEST_PUBLIC_ID = System.getenv("SYNTHETICS_API_TEST_PUBLIC_ID");

    SyntheticsDeleteTestsPayload body =
        new SyntheticsDeleteTestsPayload()
            .publicIds(Collections.singletonList(SYNTHETICS_API_TEST_PUBLIC_ID));

    try {
      SyntheticsDeleteTestsResponse result = apiInstance.deleteTests(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#deleteTests");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
from datadog import initialize, api

options = {
    'api_key': '<DATADOG_API_KEY>',
    'app_key': '<DATADOG_APPLICATION_KEY>'
}

test_ids = ['<SYNTHETICS_TEST_PUBLIC_ID_1>','<SYNTHETICS_TEST_PUBLIC_ID_2>']

initialize(**options)

api.Synthetics.delete_test(public_ids=test_ids)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python-legacy) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"
##### 

```rust
// Delete tests returns "OK." response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsDeleteTestsPayload;

#[tokio::main]
async fn main() {
    // there is a valid "synthetics_api_test" in the system
    let synthetics_api_test_public_id = std::env::var("SYNTHETICS_API_TEST_PUBLIC_ID").unwrap();
    let body =
        SyntheticsDeleteTestsPayload::new().public_ids(vec![synthetics_api_test_public_id.clone()]);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.delete_tests(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Delete tests returns "OK." response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

// there is a valid "synthetics_api_test" in the system
const SYNTHETICS_API_TEST_PUBLIC_ID = process.env
  .SYNTHETICS_API_TEST_PUBLIC_ID as string;

const params: v1.SyntheticsApiDeleteTestsRequest = {
  body: {
    publicIds: [SYNTHETICS_API_TEST_PUBLIC_ID],
  },
};

apiInstance
  .deleteTests(params)
  .then((data: v1.SyntheticsDeleteTestsResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Create a global variable{% #create-a-global-variable %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                   |
| ----------------- | -------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v1/synthetics/variables |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v1/synthetics/variables |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v1/synthetics/variables      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v1/synthetics/variables      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v1/synthetics/variables     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v1/synthetics/variables |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v1/synthetics/variables |

### Overview

Create a Synthetic global variable. This endpoint requires the `synthetics_global_variable_write` permission.

OAuth apps require the `synthetics_global_variable_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)

Details of the global variable to create.

{% tab title="Model" %}

| Parent field       | Field                         | Type     | Description                                                                                                                                                                                                |
| ------------------ | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                    | attributes                    | object   | Attributes of the global variable.                                                                                                                                                                         |
| attributes         | restricted_roles              | [string] | **DEPRECATED**: 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. |
|                    | 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_options | field                         | string   | When type is `http_header`, name of the header to use to extract the value.                                                                                                                                |
| parse_test_options | localVariableName             | string   | When type is `local_variable`, name of the local variable to use to extract the value.                                                                                                                     |
| parse_test_options | parser                        | object   | Details of the parser to use for the global variable.                                                                                                                                                      |
| parser             | type [*required*]        | enum     | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                   |
| parser             | value                         | string   | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                          |
| parse_test_options | type [*required*]        | enum     | Type of value to extract from a test for a Synthetic global variable. Allowed enum values: `http_body,http_header,http_status_code,local_variable`                                                         |
|                    | 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                         | object   | Value of the global variable.                                                                                                                                                                              |
| value              | options                       | object   | Options for the Global Variable for MFA.                                                                                                                                                                   |
| options            | totp_parameters               | object   | Parameters for the TOTP/MFA variable                                                                                                                                                                       |
| totp_parameters    | digits                        | int32    | Number of digits for the OTP code.                                                                                                                                                                         |
| totp_parameters    | refresh_interval              | int32    | Interval for which to refresh the token (in seconds).                                                                                                                                                      |
| value              | secure                        | boolean  | Determines if the value of the variable is hidden.                                                                                                                                                         |
| value              | value                         | string   | Value of the global variable. When reading a global variable, the value will not be present if the variable is hidden with the `secure` property.                                                          |

{% /tab %}

{% tab title="Example" %}
##### 

```json
{
  "description": "",
  "is_fido": true,
  "name": "GLOBAL_VARIABLE_FIDO_PAYLOAD_EXAMPLESYNTHETIC",
  "tags": []
}
```

##### 

```json
{
  "description": "",
  "is_totp": true,
  "name": "GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC",
  "tags": [],
  "value": {
    "secure": false,
    "value": "",
    "options": {
      "totp_parameters": {
        "digits": 6,
        "refresh_interval": 30
      }
    }
  }
}
```

##### 

```json
{
  "description": "",
  "name": "GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_EXAMPLESYNTHETIC",
  "tags": [],
  "value": {
    "secure": false,
    "value": ""
  },
  "parse_test_public_id": "123-abc-456",
  "parse_test_options": {
    "type": "local_variable",
    "localVariableName": "EXTRACTED_VALUE"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Synthetic global variable.

| Parent field       | Field                         | Type     | Description                                                                                                                                                                                                |
| ------------------ | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                    | attributes                    | object   | Attributes of the global variable.                                                                                                                                                                         |
| attributes         | restricted_roles              | [string] | **DEPRECATED**: 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. |
|                    | 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_options | field                         | string   | When type is `http_header`, name of the header to use to extract the value.                                                                                                                                |
| parse_test_options | localVariableName             | string   | When type is `local_variable`, name of the local variable to use to extract the value.                                                                                                                     |
| parse_test_options | parser                        | object   | Details of the parser to use for the global variable.                                                                                                                                                      |
| parser             | type [*required*]        | enum     | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                   |
| parser             | value                         | string   | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                          |
| parse_test_options | type [*required*]        | enum     | Type of value to extract from a test for a Synthetic global variable. Allowed enum values: `http_body,http_header,http_status_code,local_variable`                                                         |
|                    | 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.                                                                                                                                                                              |
| value              | options                       | object   | Options for the Global Variable for MFA.                                                                                                                                                                   |
| options            | totp_parameters               | object   | Parameters for the TOTP/MFA variable                                                                                                                                                                       |
| totp_parameters    | digits                        | int32    | Number of digits for the OTP code.                                                                                                                                                                         |
| totp_parameters    | refresh_interval              | int32    | Interval for which to refresh the token (in seconds).                                                                                                                                                      |
| value              | secure                        | boolean  | Determines if the value of the variable is hidden.                                                                                                                                                         |
| value              | value                         | string   | Value of the global variable. When reading a global variable, the value will not be present if the variable is hidden with the `secure` property.                                                          |

{% /tab %}

{% tab title="Example" %}

```json
{
  "attributes": {
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ]
  },
  "description": "Example description",
  "id": "string",
  "is_fido": false,
  "is_totp": false,
  "name": "MY_VARIABLE",
  "parse_test_options": {
    "field": "content-type",
    "localVariableName": "LOCAL_VARIABLE",
    "parser": {
      "type": "raw",
      "value": "string"
    },
    "type": "http_body"
  },
  "parse_test_public_id": "abc-def-123",
  "tags": [
    "team:front",
    "test:workflow-1"
  ],
  "value": {
    "options": {
      "totp_parameters": {
        "digits": 6,
        "refresh_interval": 30
      }
    },
    "secure": false,
    "value": "example-value"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Invalid request
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="409" %}
Conflict
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/variables" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "description": "Example description",
  "name": "MY_VARIABLE",
  "tags": [
    "team:front",
    "test:workflow-1"
  ],
  "value": {
    "secure": false,
    "value": "variable-value"
  }
}
EOF
                        
##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/variables" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "description": "Example description",
  "name": "MY_VARIABLE",
  "tags": [
    "team:front",
    "test:workflow-1"
  ],
  "value": {
    "secure": false,
    "value": "variable-value"
  }
}
EOF
                        
##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/variables" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "description": "Example description",
  "name": "MY_VARIABLE",
  "tags": [
    "team:front",
    "test:workflow-1"
  ],
  "value": {
    "secure": false,
    "value": "variable-value"
  }
}
EOF
                        
##### 

```go
// Create a FIDO global variable returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsGlobalVariableRequest{
		Description: "",
		IsFido:      datadog.PtrBool(true),
		Name:        "GLOBAL_VARIABLE_FIDO_PAYLOAD_EXAMPLESYNTHETIC",
		Tags:        []string{},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateGlobalVariable(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateGlobalVariable`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateGlobalVariable`:\n%s\n", responseContent)
}
```

##### 

```go
// Create a TOTP global variable returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsGlobalVariableRequest{
		Description: "",
		IsTotp:      datadog.PtrBool(true),
		Name:        "GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC",
		Tags:        []string{},
		Value: &datadogV1.SyntheticsGlobalVariableValue{
			Secure: datadog.PtrBool(false),
			Value:  datadog.PtrString(""),
			Options: &datadogV1.SyntheticsGlobalVariableOptions{
				TotpParameters: &datadogV1.SyntheticsGlobalVariableTOTPParameters{
					Digits:          datadog.PtrInt32(6),
					RefreshInterval: datadog.PtrInt32(30),
				},
			},
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateGlobalVariable(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateGlobalVariable`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateGlobalVariable`:\n%s\n", responseContent)
}
```

##### 

```go
// Create a global variable from test returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	// there is a valid "synthetics_api_test_multi_step" in the system
	SyntheticsAPITestMultiStepPublicID := os.Getenv("SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID")

	body := datadogV1.SyntheticsGlobalVariableRequest{
		Description: "",
		Name:        "GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_EXAMPLESYNTHETIC",
		Tags:        []string{},
		Value: &datadogV1.SyntheticsGlobalVariableValue{
			Secure: datadog.PtrBool(false),
			Value:  datadog.PtrString(""),
		},
		ParseTestPublicId: datadog.PtrString(SyntheticsAPITestMultiStepPublicID),
		ParseTestOptions: &datadogV1.SyntheticsGlobalVariableParseTestOptions{
			Type:              datadogV1.SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_LOCAL_VARIABLE,
			LocalVariableName: datadog.PtrString("EXTRACTED_VALUE"),
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateGlobalVariable(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateGlobalVariable`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateGlobalVariable`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Create a FIDO global variable returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariable;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableRequest;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsGlobalVariableRequest body =
        new SyntheticsGlobalVariableRequest()
            .description("")
            .isFido(true)
            .name("GLOBAL_VARIABLE_FIDO_PAYLOAD_EXAMPLESYNTHETIC");

    try {
      SyntheticsGlobalVariable result = apiInstance.createGlobalVariable(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createGlobalVariable");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

##### 

```java
// Create a TOTP global variable returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariable;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableOptions;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableRequest;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableTOTPParameters;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableValue;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsGlobalVariableRequest body =
        new SyntheticsGlobalVariableRequest()
            .description("")
            .isTotp(true)
            .name("GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC")
            .value(
                new SyntheticsGlobalVariableValue()
                    .secure(false)
                    .value("")
                    .options(
                        new SyntheticsGlobalVariableOptions()
                            .totpParameters(
                                new SyntheticsGlobalVariableTOTPParameters()
                                    .digits(6)
                                    .refreshInterval(30))));

    try {
      SyntheticsGlobalVariable result = apiInstance.createGlobalVariable(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createGlobalVariable");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

##### 

```java
// Create a global variable from test returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariable;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptions;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptionsType;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableRequest;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableValue;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    // there is a valid "synthetics_api_test_multi_step" in the system
    String SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID =
        System.getenv("SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID");

    SyntheticsGlobalVariableRequest body =
        new SyntheticsGlobalVariableRequest()
            .description("")
            .name("GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_EXAMPLESYNTHETIC")
            .value(new SyntheticsGlobalVariableValue().secure(false).value(""))
            .parseTestPublicId(SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID)
            .parseTestOptions(
                new SyntheticsGlobalVariableParseTestOptions()
                    .type(SyntheticsGlobalVariableParseTestOptionsType.LOCAL_VARIABLE)
                    .localVariableName("EXTRACTED_VALUE"));

    try {
      SyntheticsGlobalVariable result = apiInstance.createGlobalVariable(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createGlobalVariable");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Create a FIDO global variable returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_global_variable_request import SyntheticsGlobalVariableRequest

body = SyntheticsGlobalVariableRequest(
    description="",
    is_fido=True,
    name="GLOBAL_VARIABLE_FIDO_PAYLOAD_EXAMPLESYNTHETIC",
    tags=[],
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_global_variable(body=body)

    print(response)
```

##### 

```python
"""
Create a TOTP global variable returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_global_variable_options import SyntheticsGlobalVariableOptions
from datadog_api_client.v1.model.synthetics_global_variable_request import SyntheticsGlobalVariableRequest
from datadog_api_client.v1.model.synthetics_global_variable_totp_parameters import (
    SyntheticsGlobalVariableTOTPParameters,
)
from datadog_api_client.v1.model.synthetics_global_variable_value import SyntheticsGlobalVariableValue

body = SyntheticsGlobalVariableRequest(
    description="",
    is_totp=True,
    name="GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC",
    tags=[],
    value=SyntheticsGlobalVariableValue(
        secure=False,
        value="",
        options=SyntheticsGlobalVariableOptions(
            totp_parameters=SyntheticsGlobalVariableTOTPParameters(
                digits=6,
                refresh_interval=30,
            ),
        ),
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_global_variable(body=body)

    print(response)
```

##### 

```python
"""
Create a global variable from test returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_global_variable_parse_test_options import (
    SyntheticsGlobalVariableParseTestOptions,
)
from datadog_api_client.v1.model.synthetics_global_variable_parse_test_options_type import (
    SyntheticsGlobalVariableParseTestOptionsType,
)
from datadog_api_client.v1.model.synthetics_global_variable_request import SyntheticsGlobalVariableRequest
from datadog_api_client.v1.model.synthetics_global_variable_value import SyntheticsGlobalVariableValue

# there is a valid "synthetics_api_test_multi_step" in the system
SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID = environ["SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID"]

body = SyntheticsGlobalVariableRequest(
    description="",
    name="GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_EXAMPLESYNTHETIC",
    tags=[],
    value=SyntheticsGlobalVariableValue(
        secure=False,
        value="",
    ),
    parse_test_public_id=SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID,
    parse_test_options=SyntheticsGlobalVariableParseTestOptions(
        type=SyntheticsGlobalVariableParseTestOptionsType.LOCAL_VARIABLE,
        local_variable_name="EXTRACTED_VALUE",
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_global_variable(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Create a FIDO global variable returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsGlobalVariableRequest.new({
  description: "",
  is_fido: true,
  name: "GLOBAL_VARIABLE_FIDO_PAYLOAD_EXAMPLESYNTHETIC",
  tags: [],
})
p api_instance.create_global_variable(body)
```

##### 

```ruby
# Create a TOTP global variable returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsGlobalVariableRequest.new({
  description: "",
  is_totp: true,
  name: "GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC",
  tags: [],
  value: DatadogAPIClient::V1::SyntheticsGlobalVariableValue.new({
    secure: false,
    value: "",
    options: DatadogAPIClient::V1::SyntheticsGlobalVariableOptions.new({
      totp_parameters: DatadogAPIClient::V1::SyntheticsGlobalVariableTOTPParameters.new({
        digits: 6,
        refresh_interval: 30,
      }),
    }),
  }),
})
p api_instance.create_global_variable(body)
```

##### 

```ruby
# Create a global variable from test returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

# there is a valid "synthetics_api_test_multi_step" in the system
SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID = ENV["SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID"]

body = DatadogAPIClient::V1::SyntheticsGlobalVariableRequest.new({
  description: "",
  name: "GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_EXAMPLESYNTHETIC",
  tags: [],
  value: DatadogAPIClient::V1::SyntheticsGlobalVariableValue.new({
    secure: false,
    value: "",
  }),
  parse_test_public_id: SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID,
  parse_test_options: DatadogAPIClient::V1::SyntheticsGlobalVariableParseTestOptions.new({
    type: DatadogAPIClient::V1::SyntheticsGlobalVariableParseTestOptionsType::LOCAL_VARIABLE,
    local_variable_name: "EXTRACTED_VALUE",
  }),
})
p api_instance.create_global_variable(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Create a FIDO global variable returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableRequest;

#[tokio::main]
async fn main() {
    let body = SyntheticsGlobalVariableRequest::new(
        "".to_string(),
        "GLOBAL_VARIABLE_FIDO_PAYLOAD_EXAMPLESYNTHETIC".to_string(),
        vec![],
    )
    .is_fido(true);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_global_variable(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

##### 

```rust
// Create a TOTP global variable returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableOptions;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableRequest;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableTOTPParameters;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableValue;

#[tokio::main]
async fn main() {
    let body = SyntheticsGlobalVariableRequest::new(
        "".to_string(),
        "GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC".to_string(),
        vec![],
    )
    .is_totp(true)
    .value(
        SyntheticsGlobalVariableValue::new()
            .options(
                SyntheticsGlobalVariableOptions::new().totp_parameters(
                    SyntheticsGlobalVariableTOTPParameters::new()
                        .digits(6)
                        .refresh_interval(30),
                ),
            )
            .secure(false)
            .value("".to_string()),
    );
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_global_variable(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

##### 

```rust
// Create a global variable from test returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParseTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParseTestOptionsType;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableRequest;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableValue;

#[tokio::main]
async fn main() {
    // there is a valid "synthetics_api_test_multi_step" in the system
    let synthetics_api_test_multi_step_public_id =
        std::env::var("SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID").unwrap();
    let body = SyntheticsGlobalVariableRequest::new(
        "".to_string(),
        "GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_EXAMPLESYNTHETIC".to_string(),
        vec![],
    )
    .parse_test_options(
        SyntheticsGlobalVariableParseTestOptions::new(
            SyntheticsGlobalVariableParseTestOptionsType::LOCAL_VARIABLE,
        )
        .local_variable_name("EXTRACTED_VALUE".to_string()),
    )
    .parse_test_public_id(synthetics_api_test_multi_step_public_id.clone())
    .value(
        SyntheticsGlobalVariableValue::new()
            .secure(false)
            .value("".to_string()),
    );
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_global_variable(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Create a FIDO global variable returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiCreateGlobalVariableRequest = {
  body: {
    description: "",
    isFido: true,
    name: "GLOBAL_VARIABLE_FIDO_PAYLOAD_EXAMPLESYNTHETIC",
    tags: [],
  },
};

apiInstance
  .createGlobalVariable(params)
  .then((data: v1.SyntheticsGlobalVariable) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

##### 

```typescript
/**
 * Create a TOTP global variable returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiCreateGlobalVariableRequest = {
  body: {
    description: "",
    isTotp: true,
    name: "GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC",
    tags: [],
    value: {
      secure: false,
      value: "",
      options: {
        totpParameters: {
          digits: 6,
          refreshInterval: 30,
        },
      },
    },
  },
};

apiInstance
  .createGlobalVariable(params)
  .then((data: v1.SyntheticsGlobalVariable) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

##### 

```typescript
/**
 * Create a global variable from test returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

// there is a valid "synthetics_api_test_multi_step" in the system
const SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID = process.env
  .SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID as string;

const params: v1.SyntheticsApiCreateGlobalVariableRequest = {
  body: {
    description: "",
    name: "GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_EXAMPLESYNTHETIC",
    tags: [],
    value: {
      secure: false,
      value: "",
    },
    parseTestPublicId: SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID,
    parseTestOptions: {
      type: "local_variable",
      localVariableName: "EXTRACTED_VALUE",
    },
  },
};

apiInstance
  .createGlobalVariable(params)
  .then((data: v1.SyntheticsGlobalVariable) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get all global variables{% #get-all-global-variables %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                  |
| ----------------- | ------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/variables |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/variables |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/variables      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/variables      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/variables     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/variables |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/variables |

### Overview

Get the list of all Synthetic global variables. This endpoint requires any of the following permissions:
`synthetics_global_variable_read``apm_api_catalog_read`


OAuth apps require the `apm_api_catalog_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing an array of Synthetic global variables.

| Parent field       | Field                         | Type     | Description                                                                                                                                                                                                |
| ------------------ | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                    | variables                     | [object] | Array of Synthetic global variables.                                                                                                                                                                       |
| variables          | attributes                    | object   | Attributes of the global variable.                                                                                                                                                                         |
| attributes         | restricted_roles              | [string] | **DEPRECATED**: 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. |
| variables          | description [*required*] | string   | Description of the global variable.                                                                                                                                                                        |
| variables          | id                            | string   | Unique identifier of the global variable.                                                                                                                                                                  |
| variables          | is_fido                       | boolean  | Determines if the global variable is a FIDO variable.                                                                                                                                                      |
| variables          | is_totp                       | boolean  | Determines if the global variable is a TOTP/MFA variable.                                                                                                                                                  |
| variables          | name [*required*]        | string   | Name of the global variable. Unique across Synthetic global variables.                                                                                                                                     |
| 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_options | field                         | string   | When type is `http_header`, name of the header to use to extract the value.                                                                                                                                |
| parse_test_options | localVariableName             | string   | When type is `local_variable`, name of the local variable to use to extract the value.                                                                                                                     |
| parse_test_options | parser                        | object   | Details of the parser to use for the global variable.                                                                                                                                                      |
| parser             | type [*required*]        | enum     | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                   |
| parser             | value                         | string   | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                          |
| parse_test_options | type [*required*]        | enum     | Type of value to extract from a test for a Synthetic global variable. Allowed enum values: `http_body,http_header,http_status_code,local_variable`                                                         |
| variables          | parse_test_public_id          | string   | A Synthetic test ID to use as a test to generate the variable value.                                                                                                                                       |
| variables          | tags [*required*]        | [string] | Tags of the global variable.                                                                                                                                                                               |
| variables          | value [*required*]       | object   | Value of the global variable.                                                                                                                                                                              |
| value              | options                       | object   | Options for the Global Variable for MFA.                                                                                                                                                                   |
| options            | totp_parameters               | object   | Parameters for the TOTP/MFA variable                                                                                                                                                                       |
| totp_parameters    | digits                        | int32    | Number of digits for the OTP code.                                                                                                                                                                         |
| totp_parameters    | refresh_interval              | int32    | Interval for which to refresh the token (in seconds).                                                                                                                                                      |
| value              | secure                        | boolean  | Determines if the value of the variable is hidden.                                                                                                                                                         |
| value              | value                         | string   | Value of the global variable. When reading a global variable, the value will not be present if the variable is hidden with the `secure` property.                                                          |

{% /tab %}

{% tab title="Example" %}

```json
{
  "variables": [
    {
      "attributes": {
        "restricted_roles": [
          "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        ]
      },
      "description": "Example description",
      "id": "string",
      "is_fido": false,
      "is_totp": false,
      "name": "MY_VARIABLE",
      "parse_test_options": {
        "field": "content-type",
        "localVariableName": "LOCAL_VARIABLE",
        "parser": {
          "type": "raw",
          "value": "string"
        },
        "type": "http_body"
      },
      "parse_test_public_id": "abc-def-123",
      "tags": [
        "team:front",
        "test:workflow-1"
      ],
      "value": {
        "options": {
          "totp_parameters": {
            "digits": 6,
            "refresh_interval": 30
          }
        },
        "secure": false,
        "value": "example-value"
      }
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/variables" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get all global variables returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.list_global_variables()

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get all global variables returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.list_global_variables()
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get all global variables returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.ListGlobalVariables(ctx)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.ListGlobalVariables`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.ListGlobalVariables`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get all global variables returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsListGlobalVariablesResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsListGlobalVariablesResponse result = apiInstance.listGlobalVariables();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#listGlobalVariables");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Get all global variables returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.list_global_variables().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get all global variables returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

apiInstance
  .listGlobalVariables()
  .then((data: v1.SyntheticsListGlobalVariablesResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get a global variable{% #get-a-global-variable %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                |
| ----------------- | --------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/variables/{variable_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/variables/{variable_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/variables/{variable_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/variables/{variable_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/variables/{variable_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/variables/{variable_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.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](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                          | Type   | Description                    |
| ----------------------------- | ------ | ------------------------------ |
| variable_id [*required*] | string | The ID of the global variable. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Synthetic global variable.

| Parent field       | Field                         | Type     | Description                                                                                                                                                                                                |
| ------------------ | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                    | attributes                    | object   | Attributes of the global variable.                                                                                                                                                                         |
| attributes         | restricted_roles              | [string] | **DEPRECATED**: 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. |
|                    | 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_options | field                         | string   | When type is `http_header`, name of the header to use to extract the value.                                                                                                                                |
| parse_test_options | localVariableName             | string   | When type is `local_variable`, name of the local variable to use to extract the value.                                                                                                                     |
| parse_test_options | parser                        | object   | Details of the parser to use for the global variable.                                                                                                                                                      |
| parser             | type [*required*]        | enum     | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                   |
| parser             | value                         | string   | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                          |
| parse_test_options | type [*required*]        | enum     | Type of value to extract from a test for a Synthetic global variable. Allowed enum values: `http_body,http_header,http_status_code,local_variable`                                                         |
|                    | 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.                                                                                                                                                                              |
| value              | options                       | object   | Options for the Global Variable for MFA.                                                                                                                                                                   |
| options            | totp_parameters               | object   | Parameters for the TOTP/MFA variable                                                                                                                                                                       |
| totp_parameters    | digits                        | int32    | Number of digits for the OTP code.                                                                                                                                                                         |
| totp_parameters    | refresh_interval              | int32    | Interval for which to refresh the token (in seconds).                                                                                                                                                      |
| value              | secure                        | boolean  | Determines if the value of the variable is hidden.                                                                                                                                                         |
| value              | value                         | string   | Value of the global variable. When reading a global variable, the value will not be present if the variable is hidden with the `secure` property.                                                          |

{% /tab %}

{% tab title="Example" %}

```json
{
  "attributes": {
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ]
  },
  "description": "Example description",
  "id": "string",
  "is_fido": false,
  "is_totp": false,
  "name": "MY_VARIABLE",
  "parse_test_options": {
    "field": "content-type",
    "localVariableName": "LOCAL_VARIABLE",
    "parser": {
      "type": "raw",
      "value": "string"
    },
    "type": "http_body"
  },
  "parse_test_public_id": "abc-def-123",
  "tags": [
    "team:front",
    "test:workflow-1"
  ],
  "value": {
    "options": {
      "totp_parameters": {
        "digits": 6,
        "refresh_interval": 30
      }
    },
    "secure": false,
    "value": "example-value"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not found
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport variable_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/variables/${variable_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get a global variable returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_global_variable(
        variable_id="variable_id",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get a global variable returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.get_global_variable("variable_id")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get a global variable returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetGlobalVariable(ctx, "variable_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetGlobalVariable`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetGlobalVariable`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get a global variable returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariable;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsGlobalVariable result = apiInstance.getGlobalVariable("variable_id");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getGlobalVariable");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Get a global variable returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.get_global_variable("variable_id".to_string()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get a global variable returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiGetGlobalVariableRequest = {
  variableId: "variable_id",
};

apiInstance
  .getGlobalVariable(params)
  .then((data: v1.SyntheticsGlobalVariable) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Edit a global variable{% #edit-a-global-variable %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                |
| ----------------- | --------------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v1/synthetics/variables/{variable_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v1/synthetics/variables/{variable_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v1/synthetics/variables/{variable_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v1/synthetics/variables/{variable_id}      |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v1/synthetics/variables/{variable_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v1/synthetics/variables/{variable_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v1/synthetics/variables/{variable_id} |

### Overview

Edit a Synthetic global variable. This endpoint requires the `synthetics_global_variable_write` permission.

OAuth apps require the `synthetics_global_variable_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                          | Type   | Description                    |
| ----------------------------- | ------ | ------------------------------ |
| variable_id [*required*] | string | The ID of the global variable. |

### Request

#### Body Data (required)

Details of the global variable to update.

{% tab title="Model" %}

| Parent field       | Field                         | Type     | Description                                                                                                                                                                                                |
| ------------------ | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                    | attributes                    | object   | Attributes of the global variable.                                                                                                                                                                         |
| attributes         | restricted_roles              | [string] | **DEPRECATED**: 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. |
|                    | 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_options | field                         | string   | When type is `http_header`, name of the header to use to extract the value.                                                                                                                                |
| parse_test_options | localVariableName             | string   | When type is `local_variable`, name of the local variable to use to extract the value.                                                                                                                     |
| parse_test_options | parser                        | object   | Details of the parser to use for the global variable.                                                                                                                                                      |
| parser             | type [*required*]        | enum     | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                   |
| parser             | value                         | string   | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                          |
| parse_test_options | type [*required*]        | enum     | Type of value to extract from a test for a Synthetic global variable. Allowed enum values: `http_body,http_header,http_status_code,local_variable`                                                         |
|                    | 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                         | object   | Value of the global variable.                                                                                                                                                                              |
| value              | options                       | object   | Options for the Global Variable for MFA.                                                                                                                                                                   |
| options            | totp_parameters               | object   | Parameters for the TOTP/MFA variable                                                                                                                                                                       |
| totp_parameters    | digits                        | int32    | Number of digits for the OTP code.                                                                                                                                                                         |
| totp_parameters    | refresh_interval              | int32    | Interval for which to refresh the token (in seconds).                                                                                                                                                      |
| value              | secure                        | boolean  | Determines if the value of the variable is hidden.                                                                                                                                                         |
| value              | value                         | string   | Value of the global variable. When reading a global variable, the value will not be present if the variable is hidden with the `secure` property.                                                          |

{% /tab %}

{% tab title="Example" %}

```json
{
  "attributes": {
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ]
  },
  "description": "Example description",
  "is_fido": false,
  "is_totp": false,
  "name": "MY_VARIABLE",
  "parse_test_options": {
    "field": "content-type",
    "localVariableName": "LOCAL_VARIABLE",
    "parser": {
      "type": "raw",
      "value": "string"
    },
    "type": "http_body"
  },
  "parse_test_public_id": "abc-def-123",
  "tags": [
    "team:front",
    "test:workflow-1"
  ],
  "value": {
    "options": {
      "totp_parameters": {
        "digits": 6,
        "refresh_interval": 30
      }
    },
    "secure": false,
    "value": "example-value"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Synthetic global variable.

| Parent field       | Field                         | Type     | Description                                                                                                                                                                                                |
| ------------------ | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                    | attributes                    | object   | Attributes of the global variable.                                                                                                                                                                         |
| attributes         | restricted_roles              | [string] | **DEPRECATED**: 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. |
|                    | 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_options | field                         | string   | When type is `http_header`, name of the header to use to extract the value.                                                                                                                                |
| parse_test_options | localVariableName             | string   | When type is `local_variable`, name of the local variable to use to extract the value.                                                                                                                     |
| parse_test_options | parser                        | object   | Details of the parser to use for the global variable.                                                                                                                                                      |
| parser             | type [*required*]        | enum     | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                   |
| parser             | value                         | string   | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                          |
| parse_test_options | type [*required*]        | enum     | Type of value to extract from a test for a Synthetic global variable. Allowed enum values: `http_body,http_header,http_status_code,local_variable`                                                         |
|                    | 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.                                                                                                                                                                              |
| value              | options                       | object   | Options for the Global Variable for MFA.                                                                                                                                                                   |
| options            | totp_parameters               | object   | Parameters for the TOTP/MFA variable                                                                                                                                                                       |
| totp_parameters    | digits                        | int32    | Number of digits for the OTP code.                                                                                                                                                                         |
| totp_parameters    | refresh_interval              | int32    | Interval for which to refresh the token (in seconds).                                                                                                                                                      |
| value              | secure                        | boolean  | Determines if the value of the variable is hidden.                                                                                                                                                         |
| value              | value                         | string   | Value of the global variable. When reading a global variable, the value will not be present if the variable is hidden with the `secure` property.                                                          |

{% /tab %}

{% tab title="Example" %}

```json
{
  "attributes": {
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ]
  },
  "description": "Example description",
  "id": "string",
  "is_fido": false,
  "is_totp": false,
  "name": "MY_VARIABLE",
  "parse_test_options": {
    "field": "content-type",
    "localVariableName": "LOCAL_VARIABLE",
    "parser": {
      "type": "raw",
      "value": "string"
    },
    "type": "http_body"
  },
  "parse_test_public_id": "abc-def-123",
  "tags": [
    "team:front",
    "test:workflow-1"
  ],
  "value": {
    "options": {
      "totp_parameters": {
        "digits": 6,
        "refresh_interval": 30
      }
    },
    "secure": false,
    "value": "example-value"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Invalid request
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport variable_id="CHANGE_ME"\# Curl commandcurl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/variables/${variable_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "description": "Example description",
  "name": "MY_VARIABLE",
  "tags": [
    "team:front",
    "test:workflow-1"
  ],
  "value": {
    "secure": false,
    "value": "variable-value"
  }
}
EOF
                
##### 

```python
"""
Edit a global variable returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_global_variable_attributes import SyntheticsGlobalVariableAttributes
from datadog_api_client.v1.model.synthetics_global_variable_parse_test_options import (
    SyntheticsGlobalVariableParseTestOptions,
)
from datadog_api_client.v1.model.synthetics_global_variable_parse_test_options_type import (
    SyntheticsGlobalVariableParseTestOptionsType,
)
from datadog_api_client.v1.model.synthetics_global_variable_parser_type import SyntheticsGlobalVariableParserType
from datadog_api_client.v1.model.synthetics_global_variable_request import SyntheticsGlobalVariableRequest
from datadog_api_client.v1.model.synthetics_global_variable_value import SyntheticsGlobalVariableValue
from datadog_api_client.v1.model.synthetics_restricted_roles import SyntheticsRestrictedRoles
from datadog_api_client.v1.model.synthetics_variable_parser import SyntheticsVariableParser

body = SyntheticsGlobalVariableRequest(
    attributes=SyntheticsGlobalVariableAttributes(
        restricted_roles=SyntheticsRestrictedRoles(
            [
                "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            ]
        ),
    ),
    description="Example description",
    name="MY_VARIABLE",
    parse_test_options=SyntheticsGlobalVariableParseTestOptions(
        field="content-type",
        local_variable_name="LOCAL_VARIABLE",
        parser=SyntheticsVariableParser(
            type=SyntheticsGlobalVariableParserType.REGEX,
            value=".*",
        ),
        type=SyntheticsGlobalVariableParseTestOptionsType.HTTP_BODY,
    ),
    parse_test_public_id="abc-def-123",
    tags=[
        "team:front",
        "test:workflow-1",
    ],
    value=SyntheticsGlobalVariableValue(
        secure=True,
        value="value",
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.edit_global_variable(variable_id="variable_id", body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Edit a global variable returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsGlobalVariableRequest.new({
  attributes: DatadogAPIClient::V1::SyntheticsGlobalVariableAttributes.new({
    restricted_roles: [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    ],
  }),
  description: "Example description",
  name: "MY_VARIABLE",
  parse_test_options: DatadogAPIClient::V1::SyntheticsGlobalVariableParseTestOptions.new({
    field: "content-type",
    local_variable_name: "LOCAL_VARIABLE",
    parser: DatadogAPIClient::V1::SyntheticsVariableParser.new({
      type: DatadogAPIClient::V1::SyntheticsGlobalVariableParserType::REGEX,
      value: ".*",
    }),
    type: DatadogAPIClient::V1::SyntheticsGlobalVariableParseTestOptionsType::HTTP_BODY,
  }),
  parse_test_public_id: "abc-def-123",
  tags: [
    "team:front",
    "test:workflow-1",
  ],
  value: DatadogAPIClient::V1::SyntheticsGlobalVariableValue.new({
    secure: true,
    value: "value",
  }),
})
p api_instance.edit_global_variable("variable_id", body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Edit a global variable returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsGlobalVariableRequest{
		Attributes: &datadogV1.SyntheticsGlobalVariableAttributes{
			RestrictedRoles: []string{
				"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
			},
		},
		Description: "Example description",
		Name:        "MY_VARIABLE",
		ParseTestOptions: &datadogV1.SyntheticsGlobalVariableParseTestOptions{
			Field:             datadog.PtrString("content-type"),
			LocalVariableName: datadog.PtrString("LOCAL_VARIABLE"),
			Parser: &datadogV1.SyntheticsVariableParser{
				Type:  datadogV1.SYNTHETICSGLOBALVARIABLEPARSERTYPE_REGEX,
				Value: datadog.PtrString(".*"),
			},
			Type: datadogV1.SYNTHETICSGLOBALVARIABLEPARSETESTOPTIONSTYPE_HTTP_BODY,
		},
		ParseTestPublicId: datadog.PtrString("abc-def-123"),
		Tags: []string{
			"team:front",
			"test:workflow-1",
		},
		Value: &datadogV1.SyntheticsGlobalVariableValue{
			Secure: datadog.PtrBool(true),
			Value:  datadog.PtrString("value"),
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.EditGlobalVariable(ctx, "variable_id", body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.EditGlobalVariable`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.EditGlobalVariable`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Edit a global variable returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariable;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableAttributes;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptions;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptionsType;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParserType;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableRequest;
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableValue;
import com.datadog.api.client.v1.model.SyntheticsVariableParser;
import java.util.Arrays;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsGlobalVariableRequest body =
        new SyntheticsGlobalVariableRequest()
            .attributes(
                new SyntheticsGlobalVariableAttributes()
                    .restrictedRoles(
                        Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")))
            .description("Example description")
            .name("MY_VARIABLE")
            .parseTestOptions(
                new SyntheticsGlobalVariableParseTestOptions()
                    .field("content-type")
                    .localVariableName("LOCAL_VARIABLE")
                    .parser(
                        new SyntheticsVariableParser()
                            .type(SyntheticsGlobalVariableParserType.REGEX)
                            .value(".*"))
                    .type(SyntheticsGlobalVariableParseTestOptionsType.HTTP_BODY))
            .parseTestPublicId("abc-def-123")
            .tags(Arrays.asList("team:front", "test:workflow-1"))
            .value(new SyntheticsGlobalVariableValue().secure(true).value("value"));

    try {
      SyntheticsGlobalVariable result = apiInstance.editGlobalVariable("variable_id", body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#editGlobalVariable");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Edit a global variable returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableAttributes;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParseTestOptions;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParseTestOptionsType;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParserType;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableRequest;
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableValue;
use datadog_api_client::datadogV1::model::SyntheticsVariableParser;

#[tokio::main]
async fn main() {
    let body = SyntheticsGlobalVariableRequest::new(
        "Example description".to_string(),
        "MY_VARIABLE".to_string(),
        vec!["team:front".to_string(), "test:workflow-1".to_string()],
    )
    .attributes(
        SyntheticsGlobalVariableAttributes::new()
            .restricted_roles(vec!["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".to_string()]),
    )
    .parse_test_options(
        SyntheticsGlobalVariableParseTestOptions::new(
            SyntheticsGlobalVariableParseTestOptionsType::HTTP_BODY,
        )
        .field("content-type".to_string())
        .local_variable_name("LOCAL_VARIABLE".to_string())
        .parser(
            SyntheticsVariableParser::new(SyntheticsGlobalVariableParserType::REGEX)
                .value(".*".to_string()),
        ),
    )
    .parse_test_public_id("abc-def-123".to_string())
    .value(
        SyntheticsGlobalVariableValue::new()
            .secure(true)
            .value("value".to_string()),
    );
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .edit_global_variable("variable_id".to_string(), body)
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Edit a global variable returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiEditGlobalVariableRequest = {
  body: {
    attributes: {
      restrictedRoles: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
    },
    description: "Example description",
    name: "MY_VARIABLE",
    parseTestOptions: {
      field: "content-type",
      localVariableName: "LOCAL_VARIABLE",
      parser: {
        type: "regex",
        value: ".*",
      },
      type: "http_body",
    },
    parseTestPublicId: "abc-def-123",
    tags: ["team:front", "test:workflow-1"],
    value: {
      secure: true,
      value: "value",
    },
  },
  variableId: "variable_id",
};

apiInstance
  .editGlobalVariable(params)
  .then((data: v1.SyntheticsGlobalVariable) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Delete a global variable{% #delete-a-global-variable %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                   |
| ----------------- | ------------------------------------------------------------------------------ |
| ap1.datadoghq.com | DELETE https://api.ap1.datadoghq.com/api/v1/synthetics/variables/{variable_id} |
| ap2.datadoghq.com | DELETE https://api.ap2.datadoghq.com/api/v1/synthetics/variables/{variable_id} |
| app.datadoghq.eu  | DELETE https://api.datadoghq.eu/api/v1/synthetics/variables/{variable_id}      |
| app.ddog-gov.com  | DELETE https://api.ddog-gov.com/api/v1/synthetics/variables/{variable_id}      |
| app.datadoghq.com | DELETE https://api.datadoghq.com/api/v1/synthetics/variables/{variable_id}     |
| us3.datadoghq.com | DELETE https://api.us3.datadoghq.com/api/v1/synthetics/variables/{variable_id} |
| us5.datadoghq.com | DELETE https://api.us5.datadoghq.com/api/v1/synthetics/variables/{variable_id} |

### Overview

Delete a Synthetic global variable. This endpoint requires the `synthetics_global_variable_write` permission.

OAuth apps require the `synthetics_global_variable_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                          | Type   | Description                    |
| ----------------------------- | ------ | ------------------------------ |
| variable_id [*required*] | string | The ID of the global variable. |

### Response

{% tab title="200" %}
OK
{% /tab %}

{% tab title="400" %}
JSON format is wrong
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not found
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport variable_id="CHANGE_ME"\# Curl commandcurl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/variables/${variable_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Delete a global variable returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    api_instance.delete_global_variable(
        variable_id="variable_id",
    )
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Delete a global variable returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.delete_global_variable("variable_id")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Delete a global variable returns "OK" response

package main

import (
	"context"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	r, err := api.DeleteGlobalVariable(ctx, "variable_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.DeleteGlobalVariable`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Delete a global variable returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      apiInstance.deleteGlobalVariable("variable_id");
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#deleteGlobalVariable");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Delete a global variable returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.delete_global_variable("variable_id".to_string()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Delete a global variable returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiDeleteGlobalVariableRequest = {
  variableId: "variable_id",
};

apiInstance
  .deleteGlobalVariable(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Create a private location{% #create-a-private-location %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                           |
| ----------------- | ---------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v1/synthetics/private-locations |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v1/synthetics/private-locations |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v1/synthetics/private-locations      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v1/synthetics/private-locations      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v1/synthetics/private-locations     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v1/synthetics/private-locations |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v1/synthetics/private-locations |

### Overview

Create a new Synthetic private location. This endpoint requires the `synthetics_private_location_write` permission.

OAuth apps require the `synthetics_private_location_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)

Details of the private location to create.

{% tab title="Model" %}

| Parent field      | Field                         | Type     | Description                                                                                                                                                                                                |
| ----------------- | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                   | description [*required*] | string   | Description of the private location.                                                                                                                                                                       |
|                   | id                            | string   | Unique identifier of the private location.                                                                                                                                                                 |
|                   | metadata                      | object   | Object containing metadata about the private location.                                                                                                                                                     |
| metadata          | restricted_roles              | [string] | **DEPRECATED**: 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 [*required*]        | string   | Name of the private location.                                                                                                                                                                              |
|                   | secrets                       | object   | Secrets for the private location. Only present in the response when creating the private location.                                                                                                         |
| secrets           | authentication                | object   | Authentication part of the secrets.                                                                                                                                                                        |
| authentication    | id                            | string   | Access key for the private location.                                                                                                                                                                       |
| authentication    | key                           | string   | Secret access key for the private location.                                                                                                                                                                |
| secrets           | config_decryption             | object   | Private key for the private location.                                                                                                                                                                      |
| config_decryption | key                           | string   | Private key for the private location.                                                                                                                                                                      |
|                   | tags [*required*]        | [string] | Array of tags attached to the private location.                                                                                                                                                            |

{% /tab %}

{% tab title="Example" %}

```json
{
  "description": "Test Example-Synthetic description",
  "metadata": {
    "restricted_roles": [
      "string"
    ]
  },
  "name": "Example-Synthetic",
  "tags": [
    "test:examplesynthetic"
  ]
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object that contains the new private location, the public key for result encryption, and the configuration skeleton.

| Parent field      | Field                         | Type     | Description                                                                                                                                                                                                |
| ----------------- | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                   | config                        | object   | Configuration skeleton for the private location. See installation instructions of the private location on how to use this configuration.                                                                   |
|                   | private_location              | object   | Object containing information about the private location to create.                                                                                                                                        |
| private_location  | description [*required*] | string   | Description of the private location.                                                                                                                                                                       |
| private_location  | id                            | string   | Unique identifier of the private location.                                                                                                                                                                 |
| private_location  | metadata                      | object   | Object containing metadata about the private location.                                                                                                                                                     |
| metadata          | restricted_roles              | [string] | **DEPRECATED**: 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. |
| private_location  | name [*required*]        | string   | Name of the private location.                                                                                                                                                                              |
| private_location  | secrets                       | object   | Secrets for the private location. Only present in the response when creating the private location.                                                                                                         |
| secrets           | authentication                | object   | Authentication part of the secrets.                                                                                                                                                                        |
| authentication    | id                            | string   | Access key for the private location.                                                                                                                                                                       |
| authentication    | key                           | string   | Secret access key for the private location.                                                                                                                                                                |
| secrets           | config_decryption             | object   | Private key for the private location.                                                                                                                                                                      |
| config_decryption | key                           | string   | Private key for the private location.                                                                                                                                                                      |
| private_location  | tags [*required*]        | [string] | Array of tags attached to the private location.                                                                                                                                                            |
|                   | result_encryption             | object   | Public key for the result encryption.                                                                                                                                                                      |
| result_encryption | id                            | string   | Fingerprint for the encryption key.                                                                                                                                                                        |
| result_encryption | key                           | string   | Public key for result encryption.                                                                                                                                                                          |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {},
  "private_location": {
    "description": "Description of private location",
    "id": "string",
    "metadata": {
      "restricted_roles": [
        "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      ]
    },
    "name": "New private location",
    "secrets": {
      "authentication": {
        "id": "string",
        "key": "string"
      },
      "config_decryption": {
        "key": "string"
      }
    },
    "tags": [
      "team:front"
    ]
  },
  "result_encryption": {
    "id": "string",
    "key": "string"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="402" %}
Quota reached for private locations
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Private locations are not activated for the user
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/private-locations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "description": "Description of private location",
  "name": "New private location",
  "tags": [
    "team:front"
  ]
}
EOF
                        
##### 

```go
// Create a private location returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	// there is a valid "role" in the system
	RoleDataID := os.Getenv("ROLE_DATA_ID")

	body := datadogV1.SyntheticsPrivateLocation{
		Description: "Test Example-Synthetic description",
		Metadata: &datadogV1.SyntheticsPrivateLocationMetadata{
			RestrictedRoles: []string{
				RoleDataID,
			},
		},
		Name: "Example-Synthetic",
		Tags: []string{
			"test:examplesynthetic",
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreatePrivateLocation(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreatePrivateLocation`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreatePrivateLocation`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Create a private location returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsPrivateLocation;
import com.datadog.api.client.v1.model.SyntheticsPrivateLocationCreationResponse;
import com.datadog.api.client.v1.model.SyntheticsPrivateLocationMetadata;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    // there is a valid "role" in the system
    String ROLE_DATA_ID = System.getenv("ROLE_DATA_ID");

    SyntheticsPrivateLocation body =
        new SyntheticsPrivateLocation()
            .description("Test Example-Synthetic description")
            .metadata(
                new SyntheticsPrivateLocationMetadata()
                    .restrictedRoles(Collections.singletonList(ROLE_DATA_ID)))
            .name("Example-Synthetic")
            .tags(Collections.singletonList("test:examplesynthetic"));

    try {
      SyntheticsPrivateLocationCreationResponse result = apiInstance.createPrivateLocation(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createPrivateLocation");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Create a private location returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_private_location import SyntheticsPrivateLocation
from datadog_api_client.v1.model.synthetics_private_location_metadata import SyntheticsPrivateLocationMetadata
from datadog_api_client.v1.model.synthetics_restricted_roles import SyntheticsRestrictedRoles

# there is a valid "role" in the system
ROLE_DATA_ID = environ["ROLE_DATA_ID"]

body = SyntheticsPrivateLocation(
    description="Test Example-Synthetic description",
    metadata=SyntheticsPrivateLocationMetadata(
        restricted_roles=SyntheticsRestrictedRoles(
            [
                ROLE_DATA_ID,
            ]
        ),
    ),
    name="Example-Synthetic",
    tags=[
        "test:examplesynthetic",
    ],
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_private_location(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Create a private location returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

# there is a valid "role" in the system
ROLE_DATA_ID = ENV["ROLE_DATA_ID"]

body = DatadogAPIClient::V1::SyntheticsPrivateLocation.new({
  description: "Test Example-Synthetic description",
  metadata: DatadogAPIClient::V1::SyntheticsPrivateLocationMetadata.new({
    restricted_roles: [
      ROLE_DATA_ID,
    ],
  }),
  name: "Example-Synthetic",
  tags: [
    "test:examplesynthetic",
  ],
})
p api_instance.create_private_location(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Create a private location returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsPrivateLocation;
use datadog_api_client::datadogV1::model::SyntheticsPrivateLocationMetadata;

#[tokio::main]
async fn main() {
    // there is a valid "role" in the system
    let role_data_id = std::env::var("ROLE_DATA_ID").unwrap();
    let body = SyntheticsPrivateLocation::new(
        "Test Example-Synthetic description".to_string(),
        "Example-Synthetic".to_string(),
        vec!["test:examplesynthetic".to_string()],
    )
    .metadata(
        SyntheticsPrivateLocationMetadata::new().restricted_roles(vec![role_data_id.clone()]),
    );
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_private_location(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Create a private location returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

// there is a valid "role" in the system
const ROLE_DATA_ID = process.env.ROLE_DATA_ID as string;

const params: v1.SyntheticsApiCreatePrivateLocationRequest = {
  body: {
    description: "Test Example-Synthetic description",
    metadata: {
      restrictedRoles: [ROLE_DATA_ID],
    },
    name: "Example-Synthetic",
    tags: ["test:examplesynthetic"],
  },
};

apiInstance
  .createPrivateLocation(params)
  .then((data: v1.SyntheticsPrivateLocationCreationResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get all locations (public and private){% #get-all-locations-public-and-private %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                  |
| ----------------- | ------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/locations |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/locations |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/locations      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/locations      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/locations     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/locations |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/locations |

### Overview

Get the list of public and private locations available for Synthetic tests. No arguments required. This endpoint requires the `synthetics_private_location_read` permission.

OAuth apps require the `synthetics_private_location_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
List of Synthetic locations.

| Parent field | Field     | Type     | Description                        |
| ------------ | --------- | -------- | ---------------------------------- |
|              | locations | [object] | List of Synthetic locations.       |
| locations    | id        | string   | Unique identifier of the location. |
| locations    | name      | string   | Name of the location.              |

{% /tab %}

{% tab title="Example" %}

```json
{
  "locations": [
    {
      "id": "string",
      "name": "string"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/locations" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get all locations (public and private) returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.list_locations()

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get all locations (public and private) returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.list_locations()
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get all locations (public and private) returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.ListLocations(ctx)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.ListLocations`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.ListLocations`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get all locations (public and private) returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsLocations;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsLocations result = apiInstance.listLocations();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#listLocations");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Get all locations (public and private) returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.list_locations().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get all locations (public and private) returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

apiInstance
  .listLocations()
  .then((data: v1.SyntheticsLocations) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get a private location{% #get-a-private-location %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                        |
| ----------------- | ----------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/private-locations/{location_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/private-locations/{location_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/private-locations/{location_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/private-locations/{location_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/private-locations/{location_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/private-locations/{location_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/private-locations/{location_id} |

### Overview

Get a Synthetic private location. This endpoint requires the `synthetics_private_location_read` permission.

OAuth apps require the `synthetics_private_location_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                          | Type   | Description                     |
| ----------------------------- | ------ | ------------------------------- |
| location_id [*required*] | string | The ID of the private location. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing information about the private location to create.

| Parent field      | Field                         | Type     | Description                                                                                                                                                                                                |
| ----------------- | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                   | description [*required*] | string   | Description of the private location.                                                                                                                                                                       |
|                   | id                            | string   | Unique identifier of the private location.                                                                                                                                                                 |
|                   | metadata                      | object   | Object containing metadata about the private location.                                                                                                                                                     |
| metadata          | restricted_roles              | [string] | **DEPRECATED**: 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 [*required*]        | string   | Name of the private location.                                                                                                                                                                              |
|                   | secrets                       | object   | Secrets for the private location. Only present in the response when creating the private location.                                                                                                         |
| secrets           | authentication                | object   | Authentication part of the secrets.                                                                                                                                                                        |
| authentication    | id                            | string   | Access key for the private location.                                                                                                                                                                       |
| authentication    | key                           | string   | Secret access key for the private location.                                                                                                                                                                |
| secrets           | config_decryption             | object   | Private key for the private location.                                                                                                                                                                      |
| config_decryption | key                           | string   | Private key for the private location.                                                                                                                                                                      |
|                   | tags [*required*]        | [string] | Array of tags attached to the private location.                                                                                                                                                            |

{% /tab %}

{% tab title="Example" %}

```json
{
  "description": "Description of private location",
  "id": "string",
  "metadata": {
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ]
  },
  "name": "New private location",
  "secrets": {
    "authentication": {
      "id": "string",
      "key": "string"
    },
    "config_decryption": {
      "key": "string"
    }
  },
  "tags": [
    "team:front"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic private locations are not activated for the user - Private location does not exist
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport location_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/private-locations/${location_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get a private location returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_private_location(
        location_id="location_id",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get a private location returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.get_private_location("location_id")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get a private location returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetPrivateLocation(ctx, "location_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetPrivateLocation`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetPrivateLocation`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get a private location returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsPrivateLocation;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsPrivateLocation result = apiInstance.getPrivateLocation("location_id");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getPrivateLocation");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Get a private location returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.get_private_location("location_id".to_string()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get a private location returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiGetPrivateLocationRequest = {
  locationId: "location_id",
};

apiInstance
  .getPrivateLocation(params)
  .then((data: v1.SyntheticsPrivateLocation) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Edit a private location{% #edit-a-private-location %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                        |
| ----------------- | ----------------------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v1/synthetics/private-locations/{location_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v1/synthetics/private-locations/{location_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v1/synthetics/private-locations/{location_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v1/synthetics/private-locations/{location_id}      |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v1/synthetics/private-locations/{location_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v1/synthetics/private-locations/{location_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v1/synthetics/private-locations/{location_id} |

### Overview

Edit a Synthetic private location. This endpoint requires the `synthetics_private_location_write` permission.

OAuth apps require the `synthetics_private_location_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                          | Type   | Description                     |
| ----------------------------- | ------ | ------------------------------- |
| location_id [*required*] | string | The ID of the private location. |

### Request

#### Body Data (required)

Details of the private location to be updated.

{% tab title="Model" %}

| Parent field      | Field                         | Type     | Description                                                                                                                                                                                                |
| ----------------- | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                   | description [*required*] | string   | Description of the private location.                                                                                                                                                                       |
|                   | id                            | string   | Unique identifier of the private location.                                                                                                                                                                 |
|                   | metadata                      | object   | Object containing metadata about the private location.                                                                                                                                                     |
| metadata          | restricted_roles              | [string] | **DEPRECATED**: 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 [*required*]        | string   | Name of the private location.                                                                                                                                                                              |
|                   | secrets                       | object   | Secrets for the private location. Only present in the response when creating the private location.                                                                                                         |
| secrets           | authentication                | object   | Authentication part of the secrets.                                                                                                                                                                        |
| authentication    | id                            | string   | Access key for the private location.                                                                                                                                                                       |
| authentication    | key                           | string   | Secret access key for the private location.                                                                                                                                                                |
| secrets           | config_decryption             | object   | Private key for the private location.                                                                                                                                                                      |
| config_decryption | key                           | string   | Private key for the private location.                                                                                                                                                                      |
|                   | tags [*required*]        | [string] | Array of tags attached to the private location.                                                                                                                                                            |

{% /tab %}

{% tab title="Example" %}

```json
{
  "description": "Description of private location",
  "metadata": {
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ]
  },
  "name": "New private location",
  "tags": [
    "team:front"
  ]
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing information about the private location to create.

| Parent field      | Field                         | Type     | Description                                                                                                                                                                                                |
| ----------------- | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                   | description [*required*] | string   | Description of the private location.                                                                                                                                                                       |
|                   | id                            | string   | Unique identifier of the private location.                                                                                                                                                                 |
|                   | metadata                      | object   | Object containing metadata about the private location.                                                                                                                                                     |
| metadata          | restricted_roles              | [string] | **DEPRECATED**: 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 [*required*]        | string   | Name of the private location.                                                                                                                                                                              |
|                   | secrets                       | object   | Secrets for the private location. Only present in the response when creating the private location.                                                                                                         |
| secrets           | authentication                | object   | Authentication part of the secrets.                                                                                                                                                                        |
| authentication    | id                            | string   | Access key for the private location.                                                                                                                                                                       |
| authentication    | key                           | string   | Secret access key for the private location.                                                                                                                                                                |
| secrets           | config_decryption             | object   | Private key for the private location.                                                                                                                                                                      |
| config_decryption | key                           | string   | Private key for the private location.                                                                                                                                                                      |
|                   | tags [*required*]        | [string] | Array of tags attached to the private location.                                                                                                                                                            |

{% /tab %}

{% tab title="Example" %}

```json
{
  "description": "Description of private location",
  "id": "string",
  "metadata": {
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ]
  },
  "name": "New private location",
  "secrets": {
    "authentication": {
      "id": "string",
      "key": "string"
    },
    "config_decryption": {
      "key": "string"
    }
  },
  "tags": [
    "team:front"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Private locations are not activated for the user - Private location does not exist
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport location_id="CHANGE_ME"\# Curl commandcurl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/private-locations/${location_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "description": "Description of private location",
  "name": "New private location",
  "tags": [
    "team:front"
  ]
}
EOF
                
##### 

```python
"""
Edit a private location returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
from datadog_api_client.v1.model.synthetics_private_location import SyntheticsPrivateLocation
from datadog_api_client.v1.model.synthetics_private_location_metadata import SyntheticsPrivateLocationMetadata
from datadog_api_client.v1.model.synthetics_restricted_roles import SyntheticsRestrictedRoles

body = SyntheticsPrivateLocation(
    description="Description of private location",
    metadata=SyntheticsPrivateLocationMetadata(
        restricted_roles=SyntheticsRestrictedRoles(
            [
                "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            ]
        ),
    ),
    name="New private location",
    tags=[
        "team:front",
    ],
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.update_private_location(location_id="location_id", body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Edit a private location returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsPrivateLocation.new({
  description: "Description of private location",
  metadata: DatadogAPIClient::V1::SyntheticsPrivateLocationMetadata.new({
    restricted_roles: [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    ],
  }),
  name: "New private location",
  tags: [
    "team:front",
  ],
})
p api_instance.update_private_location("location_id", body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Edit a private location returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	body := datadogV1.SyntheticsPrivateLocation{
		Description: "Description of private location",
		Metadata: &datadogV1.SyntheticsPrivateLocationMetadata{
			RestrictedRoles: []string{
				"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
			},
		},
		Name: "New private location",
		Tags: []string{
			"team:front",
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.UpdatePrivateLocation(ctx, "location_id", body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.UpdatePrivateLocation`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.UpdatePrivateLocation`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Edit a private location returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import com.datadog.api.client.v1.model.SyntheticsPrivateLocation;
import com.datadog.api.client.v1.model.SyntheticsPrivateLocationMetadata;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SyntheticsPrivateLocation body =
        new SyntheticsPrivateLocation()
            .description("Description of private location")
            .metadata(
                new SyntheticsPrivateLocationMetadata()
                    .restrictedRoles(
                        Collections.singletonList("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")))
            .name("New private location")
            .tags(Collections.singletonList("team:front"));

    try {
      SyntheticsPrivateLocation result = apiInstance.updatePrivateLocation("location_id", body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#updatePrivateLocation");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Edit a private location returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV1::model::SyntheticsPrivateLocation;
use datadog_api_client::datadogV1::model::SyntheticsPrivateLocationMetadata;

#[tokio::main]
async fn main() {
    let body = SyntheticsPrivateLocation::new(
        "Description of private location".to_string(),
        "New private location".to_string(),
        vec!["team:front".to_string()],
    )
    .metadata(
        SyntheticsPrivateLocationMetadata::new()
            .restricted_roles(vec!["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".to_string()]),
    );
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .update_private_location("location_id".to_string(), body)
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Edit a private location returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiUpdatePrivateLocationRequest = {
  body: {
    description: "Description of private location",
    metadata: {
      restrictedRoles: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
    },
    name: "New private location",
    tags: ["team:front"],
  },
  locationId: "location_id",
};

apiInstance
  .updatePrivateLocation(params)
  .then((data: v1.SyntheticsPrivateLocation) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Delete a private location{% #delete-a-private-location %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                           |
| ----------------- | -------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | DELETE https://api.ap1.datadoghq.com/api/v1/synthetics/private-locations/{location_id} |
| ap2.datadoghq.com | DELETE https://api.ap2.datadoghq.com/api/v1/synthetics/private-locations/{location_id} |
| app.datadoghq.eu  | DELETE https://api.datadoghq.eu/api/v1/synthetics/private-locations/{location_id}      |
| app.ddog-gov.com  | DELETE https://api.ddog-gov.com/api/v1/synthetics/private-locations/{location_id}      |
| app.datadoghq.com | DELETE https://api.datadoghq.com/api/v1/synthetics/private-locations/{location_id}     |
| us3.datadoghq.com | DELETE https://api.us3.datadoghq.com/api/v1/synthetics/private-locations/{location_id} |
| us5.datadoghq.com | DELETE https://api.us5.datadoghq.com/api/v1/synthetics/private-locations/{location_id} |

### Overview

Delete a Synthetic private location. This endpoint requires the `synthetics_private_location_write` permission.

OAuth apps require the `synthetics_private_location_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                          | Type   | Description                     |
| ----------------------------- | ------ | ------------------------------- |
| location_id [*required*] | string | The ID of the private location. |

### Response

{% tab title="204" %}
OK
{% /tab %}

{% tab title="404" %}
- Private locations are not activated for the user - Private location does not exist
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport location_id="CHANGE_ME"\# Curl commandcurl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/private-locations/${location_id}" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Delete a private location returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    api_instance.delete_private_location(
        location_id="location_id",
    )
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Delete a private location returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
api_instance.delete_private_location("location_id")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Delete a private location returns "OK" response

package main

import (
	"context"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	r, err := api.DeletePrivateLocation(ctx, "location_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.DeletePrivateLocation`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Delete a private location returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      apiInstance.deletePrivateLocation("location_id");
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#deletePrivateLocation");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Delete a private location returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.delete_private_location("location_id".to_string()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Delete a private location returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

const params: v1.SyntheticsApiDeletePrivateLocationRequest = {
  locationId: "location_id",
};

apiInstance
  .deletePrivateLocation(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get the default locations{% #get-the-default-locations %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                                   |
| ----------------- | ------------------------------------------------------------------------------ |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/synthetics/settings/default_locations |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/synthetics/settings/default_locations |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/synthetics/settings/default_locations      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/synthetics/settings/default_locations      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/synthetics/settings/default_locations     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/synthetics/settings/default_locations |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/synthetics/settings/default_locations |

### Overview

Get the default locations settings. This endpoint requires the `synthetics_default_settings_read` permission.

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
List of Synthetics default locations settings.

| Field       | Type   | Description           |
| ----------- | ------ | --------------------- |
| description |        | Name of the location. |
|             | string |

{% /tab %}

{% tab title="Example" %}

```json
[
  "aws:eu-west-3"
]
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/settings/default_locations" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get the default locations returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_synthetics_default_locations()

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
##### 

```ruby
# Get the default locations returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
p api_instance.get_synthetics_default_locations()
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
##### 

```go
// Get the default locations returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetSyntheticsDefaultLocations(ctx)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetSyntheticsDefaultLocations`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetSyntheticsDefaultLocations`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
##### 

```java
// Get the default locations returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.SyntheticsApi;
import java.util.List;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      List<String> result = apiInstance.getSyntheticsDefaultLocations();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getSyntheticsDefaultLocations");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
##### 

```rust
// Get the default locations returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.get_synthetics_default_locations().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
##### 

```typescript
/**
 * Get the default locations returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.SyntheticsApi(configuration);

apiInstance
  .getSyntheticsDefaultLocations()
  .then((data: string[]) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"
{% /tab %}

## Create a test{% #create-a-test %}

| Datadog site      | API endpoint                                               |
| ----------------- | ---------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v1/synthetics/tests |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v1/synthetics/tests |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v1/synthetics/tests      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v1/synthetics/tests      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v1/synthetics/tests     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v1/synthetics/tests |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v1/synthetics/tests |

### Overview

This endpoint is deprecated. To create a test, use [Create an API test](https://docs.datadoghq.com/api/latest/synthetics.md#create-an-api-test), or [Create a browser test](https://docs.datadoghq.com/api/latest/synthetics.md#create-a-browser-test). This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)

Details of the test to create.

{% tab title="Model" %}

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config                                   | object          | Configuration object for a Synthetic test.                                                                                                                                                                                                                                                      |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | variables                                | [object]        | Browser tests only - array of variables used for the test steps.                                                                                                                                                                                                                                |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | creator                                  | object          | Object describing the creator of the shared element.                                                                                                                                                                                                                                            |
| creator              | email                                    | string          | Email of the creator.                                                                                                                                                                                                                                                                           |
| creator              | handle                                   | string          | Handle of the creator.                                                                                                                                                                                                                                                                          |
| creator              | name                                     | string          | Name of the creator.                                                                                                                                                                                                                                                                            |
|                      | locations                                | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message                                  | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name                                     | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options                                  | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The test public ID.                                                                                                                                                                                                                                                                             |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | steps                                    | [object]        | The steps of the test if they exist.                                                                                                                                                                                                                                                            |
| steps                | allowFailure                             | boolean         | A boolean set to allow this step to fail.                                                                                                                                                                                                                                                       |
| steps                | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| steps                | exitIfSucceed                            | boolean         | A boolean set to exit the test if the step succeeds.                                                                                                                                                                                                                                            |
| steps                | isCritical                               | boolean         | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                                                                                         |
| steps                | name                                     | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| steps                | noScreenshot                             | boolean         | A boolean set to skip taking a screenshot for the step.                                                                                                                                                                                                                                         |
| steps                | params                                   | object          | The parameters of the step.                                                                                                                                                                                                                                                                     |
| steps                | public_id                                | string          | The public ID of the step.                                                                                                                                                                                                                                                                      |
| steps                | timeout                                  | int64           | The time before declaring a step failed.                                                                                                                                                                                                                                                        |
| steps                | type                                     | enum            | Step type used in your Synthetic test. Allowed enum values: `assertCurrentUrl,assertElementAttribute,assertElementContent,assertElementPresent,assertEmail,assertFileDownload,assertFromJavascript,assertPageContains,assertPageLacks,assertRequests`                                           |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type                                     | enum            | Type of the Synthetic test. Allowed enum values: `api,browser,mobile,network`                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      {
        "operator": "contains",
        "property": "string",
        "target": 0,
        "timingsScope": "string",
        "type": "statusCode"
      }
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "string",
  "name": "string",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "status": "live",
  "steps": [
    {
      "allowFailure": false,
      "alwaysExecute": false,
      "exitIfSucceed": false,
      "isCritical": false,
      "name": "string",
      "noScreenshot": false,
      "params": {},
      "public_id": "string",
      "timeout": "integer",
      "type": "assertElementContent"
    }
  ],
  "subtype": "http",
  "tags": [],
  "type": "string"
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK - Returns the created test details.
{% tab title="Model" %}
Object containing details about your Synthetic test.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config                                   | object          | Configuration object for a Synthetic test.                                                                                                                                                                                                                                                      |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | variables                                | [object]        | Browser tests only - array of variables used for the test steps.                                                                                                                                                                                                                                |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | creator                                  | object          | Object describing the creator of the shared element.                                                                                                                                                                                                                                            |
| creator              | email                                    | string          | Email of the creator.                                                                                                                                                                                                                                                                           |
| creator              | handle                                   | string          | Handle of the creator.                                                                                                                                                                                                                                                                          |
| creator              | name                                     | string          | Name of the creator.                                                                                                                                                                                                                                                                            |
|                      | locations                                | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message                                  | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name                                     | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options                                  | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The test public ID.                                                                                                                                                                                                                                                                             |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | steps                                    | [object]        | The steps of the test if they exist.                                                                                                                                                                                                                                                            |
| steps                | allowFailure                             | boolean         | A boolean set to allow this step to fail.                                                                                                                                                                                                                                                       |
| steps                | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| steps                | exitIfSucceed                            | boolean         | A boolean set to exit the test if the step succeeds.                                                                                                                                                                                                                                            |
| steps                | isCritical                               | boolean         | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                                                                                         |
| steps                | name                                     | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| steps                | noScreenshot                             | boolean         | A boolean set to skip taking a screenshot for the step.                                                                                                                                                                                                                                         |
| steps                | params                                   | object          | The parameters of the step.                                                                                                                                                                                                                                                                     |
| steps                | public_id                                | string          | The public ID of the step.                                                                                                                                                                                                                                                                      |
| steps                | timeout                                  | int64           | The time before declaring a step failed.                                                                                                                                                                                                                                                        |
| steps                | type                                     | enum            | Step type used in your Synthetic test. Allowed enum values: `assertCurrentUrl,assertElementAttribute,assertElementContent,assertElementPresent,assertEmail,assertFileDownload,assertFromJavascript,assertPageContains,assertPageLacks,assertRequests`                                           |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type                                     | enum            | Type of the Synthetic test. Allowed enum values: `api,browser,mobile,network`                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      {
        "operator": "contains",
        "property": "string",
        "target": 0,
        "timingsScope": "string",
        "type": "statusCode"
      }
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "creator": {
    "email": "string",
    "handle": "string",
    "name": "string"
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "string",
  "monitor_id": "integer",
  "name": "string",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "public_id": "string",
  "status": "live",
  "steps": [
    {
      "allowFailure": false,
      "alwaysExecute": false,
      "exitIfSucceed": false,
      "isCritical": false,
      "name": "string",
      "noScreenshot": false,
      "params": {},
      "public_id": "string",
      "timeout": "integer",
      "type": "assertElementContent"
    }
  ],
  "subtype": "http",
  "tags": [],
  "type": "string"
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
- JSON format is wrong - Creation failed
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="402" %}
Test quota is reached
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "name": "Example API test",
  "options": {
    "tick_every": 60
  },
  "status": "live",
  "type": "api"
}
EOF
                
## Edit a test{% #edit-a-test %}

| Datadog site      | API endpoint                                                          |
| ----------------- | --------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v1/synthetics/tests/{public_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v1/synthetics/tests/{public_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v1/synthetics/tests/{public_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v1/synthetics/tests/{public_id}      |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v1/synthetics/tests/{public_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v1/synthetics/tests/{public_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v1/synthetics/tests/{public_id} |

### Overview

This endpoint is deprecated. To edit a test, use [Edit an API test](https://docs.datadoghq.com/api/latest/synthetics.md#edit-an-api-test) or [Edit a browser test](https://docs.datadoghq.com/api/latest/synthetics.md#edit-a-browser-test). This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                    |
| --------------------------- | ------ | ---------------------------------------------- |
| public_id [*required*] | string | The public ID of the test to get details from. |

### Request

#### Body Data (required)

New test details to be saved.

{% tab title="Model" %}

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config                                   | object          | Configuration object for a Synthetic test.                                                                                                                                                                                                                                                      |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | variables                                | [object]        | Browser tests only - array of variables used for the test steps.                                                                                                                                                                                                                                |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | creator                                  | object          | Object describing the creator of the shared element.                                                                                                                                                                                                                                            |
| creator              | email                                    | string          | Email of the creator.                                                                                                                                                                                                                                                                           |
| creator              | handle                                   | string          | Handle of the creator.                                                                                                                                                                                                                                                                          |
| creator              | name                                     | string          | Name of the creator.                                                                                                                                                                                                                                                                            |
|                      | locations                                | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message                                  | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name                                     | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options                                  | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The test public ID.                                                                                                                                                                                                                                                                             |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | steps                                    | [object]        | The steps of the test if they exist.                                                                                                                                                                                                                                                            |
| steps                | allowFailure                             | boolean         | A boolean set to allow this step to fail.                                                                                                                                                                                                                                                       |
| steps                | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| steps                | exitIfSucceed                            | boolean         | A boolean set to exit the test if the step succeeds.                                                                                                                                                                                                                                            |
| steps                | isCritical                               | boolean         | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                                                                                         |
| steps                | name                                     | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| steps                | noScreenshot                             | boolean         | A boolean set to skip taking a screenshot for the step.                                                                                                                                                                                                                                         |
| steps                | params                                   | object          | The parameters of the step.                                                                                                                                                                                                                                                                     |
| steps                | public_id                                | string          | The public ID of the step.                                                                                                                                                                                                                                                                      |
| steps                | timeout                                  | int64           | The time before declaring a step failed.                                                                                                                                                                                                                                                        |
| steps                | type                                     | enum            | Step type used in your Synthetic test. Allowed enum values: `assertCurrentUrl,assertElementAttribute,assertElementContent,assertElementPresent,assertEmail,assertFileDownload,assertFromJavascript,assertPageContains,assertPageLacks,assertRequests`                                           |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type                                     | enum            | Type of the Synthetic test. Allowed enum values: `api,browser,mobile,network`                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      {
        "operator": "contains",
        "property": "string",
        "target": 0,
        "timingsScope": "string",
        "type": "statusCode"
      }
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "string",
  "name": "string",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "status": "live",
  "steps": [
    {
      "allowFailure": false,
      "alwaysExecute": false,
      "exitIfSucceed": false,
      "isCritical": false,
      "name": "string",
      "noScreenshot": false,
      "params": {},
      "public_id": "string",
      "timeout": "integer",
      "type": "assertElementContent"
    }
  ],
  "subtype": "http",
  "tags": [],
  "type": "string"
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Object containing details about your Synthetic test.

| Parent field         | Field                                    | Type            | Description                                                                                                                                                                                                                                                                                     |
| -------------------- | ---------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | config                                   | object          | Configuration object for a Synthetic test.                                                                                                                                                                                                                                                      |
| config               | assertions                               | [ <oneOf>] | Array of assertions used for the test. Required for single API tests.                                                                                                                                                                                                                           |
| assertions           | Option 1                                 | object          | An assertion which uses a simple target.                                                                                                                                                                                                                                                        |
| Option 1             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 1             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 1             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 1             | timingsScope                             | enum            | Timings scope for response time assertions. Allowed enum values: `all,withoutDNS`                                                                                                                                                                                                               |
| Option 1             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 2                                 | object          | An assertion which targets body hash.                                                                                                                                                                                                                                                           |
| Option 2             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `md5,sha1,sha256`                                                                                                                                                                                                                             |
| Option 2             | target [*required*]                 |  <oneOf>   | Value used by the operator.                                                                                                                                                                                                                                                                     |
| target               | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| target               | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 2             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `bodyHash`                                                                                                                                                                                                                                          |
| assertions           | Option 3                                 | object          | An assertion for the `validatesJSONPath` operator.                                                                                                                                                                                                                                              |
| Option 3             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONPath`                                                                                                                                                                                                                           |
| Option 3             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 3             | target                                   | object          | Composed target for `validatesJSONPath` operator.                                                                                                                                                                                                                                               |
| target               | elementsOperator                         | string          | The element from the list of results to assert on. To choose from the first element in the list `firstElementMatches`, every element in the list `everyElementMatches`, at least one element in the list `atLeastOneElementMatches` or the serialized value of the list `serializationMatches`. |
| target               | jsonPath                                 | string          | The JSON path to assert.                                                                                                                                                                                                                                                                        |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| Option 3             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 4                                 | object          | An assertion for the `validatesJSONSchema` operator.                                                                                                                                                                                                                                            |
| Option 4             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesJSONSchema`                                                                                                                                                                                                                         |
| Option 4             | target                                   | object          | Composed target for `validatesJSONSchema` operator.                                                                                                                                                                                                                                             |
| target               | jsonSchema                               | string          | The JSON Schema to assert.                                                                                                                                                                                                                                                                      |
| target               | metaSchema                               | enum            | The JSON Schema meta-schema version used in the assertion. Allowed enum values: `draft-07,draft-06`                                                                                                                                                                                             |
| Option 4             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 5                                 | object          | An assertion for the `validatesXPath` operator.                                                                                                                                                                                                                                                 |
| Option 5             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `validatesXPath`                                                                                                                                                                                                                              |
| Option 5             | property                                 | string          | The associated assertion property.                                                                                                                                                                                                                                                              |
| Option 5             | target                                   | object          | Composed target for `validatesXPath` operator.                                                                                                                                                                                                                                                  |
| target               | operator                                 | string          | The specific operator to use on the path.                                                                                                                                                                                                                                                       |
| target               | targetValue                              |  <oneOf>   | The path target value to compare to.                                                                                                                                                                                                                                                            |
| targetValue          | Option 1                                 | double          | Numeric value used by the operator in assertions.                                                                                                                                                                                                                                               |
| targetValue          | Option 2                                 | string          | String value used by the operator in assertions. Supports templated variables.                                                                                                                                                                                                                  |
| target               | xPath                                    | string          | The X path to assert.                                                                                                                                                                                                                                                                           |
| Option 5             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `body,header,statusCode,certificate,responseTime,property,recordEvery,recordSome,tlsVersion,minTlsVersion`                                                                                                                                          |
| assertions           | Option 6                                 | object          | A JavaScript assertion.                                                                                                                                                                                                                                                                         |
| Option 6             | code [*required*]                   | string          | The JavaScript code that performs the assertions.                                                                                                                                                                                                                                               |
| Option 6             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `javascript`                                                                                                                                                                                                                                        |
| config               | configVariables                          | [object]        | Array of variables used for the test.                                                                                                                                                                                                                                                           |
| configVariables      | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| configVariables      | id                                       | string          | ID of the variable for global variables.                                                                                                                                                                                                                                                        |
| configVariables      | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| configVariables      | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| configVariables      | secure                                   | boolean         | Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.                                                                                                                                                                                |
| configVariables      | type [*required*]                   | enum            | Type of the configuration variable. Allowed enum values: `global,text,email`                                                                                                                                                                                                                    |
| config               | request                                  | object          | Object describing the Synthetic test request.                                                                                                                                                                                                                                                   |
| request              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in a multistep test step.                                                                                                                                                                                                                   |
| request              | basicAuth                                |  <oneOf>   | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| basicAuth            | Option 1                                 | object          | Object to handle basic authentication when performing the test.                                                                                                                                                                                                                                 |
| Option 1             | password                                 | string          | Password to use for the basic authentication.                                                                                                                                                                                                                                                   |
| Option 1             | type                                     | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `web`                                                                                                                                                                                                    |
| Option 1             | username                                 | string          | Username to use for the basic authentication.                                                                                                                                                                                                                                                   |
| basicAuth            | Option 2                                 | object          | Object to handle `SIGV4` authentication when performing the test.                                                                                                                                                                                                                               |
| Option 2             | accessKey [*required*]              | string          | Access key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | region                                   | string          | Region for the `SIGV4` authentication.                                                                                                                                                                                                                                                          |
| Option 2             | secretKey [*required*]              | string          | Secret key for the `SIGV4` authentication.                                                                                                                                                                                                                                                      |
| Option 2             | serviceName                              | string          | Service name for the `SIGV4` authentication.                                                                                                                                                                                                                                                    |
| Option 2             | sessionToken                             | string          | Session token for the `SIGV4` authentication.                                                                                                                                                                                                                                                   |
| Option 2             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `sigv4`                                                                                                                                                                                                        |
| basicAuth            | Option 3                                 | object          | Object to handle `NTLM` authentication when performing the test.                                                                                                                                                                                                                                |
| Option 3             | domain                                   | string          | Domain for the authentication to use when performing the test.                                                                                                                                                                                                                                  |
| Option 3             | password                                 | string          | Password for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | type [*required*]                   | enum            | The type of authentication to use when performing the test. Allowed enum values: `ntlm`                                                                                                                                                                                                         |
| Option 3             | username                                 | string          | Username for the authentication to use when performing the test.                                                                                                                                                                                                                                |
| Option 3             | workstation                              | string          | Workstation for the authentication to use when performing the test.                                                                                                                                                                                                                             |
| basicAuth            | Option 4                                 | object          | Object to handle digest authentication when performing the test.                                                                                                                                                                                                                                |
| Option 4             | password [*required*]               | string          | Password to use for the digest authentication.                                                                                                                                                                                                                                                  |
| Option 4             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `digest`                                                                                                                                                                                                 |
| Option 4             | username [*required*]               | string          | Username to use for the digest authentication.                                                                                                                                                                                                                                                  |
| basicAuth            | Option 5                                 | object          | Object to handle `oauth client` authentication when performing the test.                                                                                                                                                                                                                        |
| Option 5             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 5             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | clientId [*required*]               | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 5             | clientSecret [*required*]           | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 5             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 5             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 5             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 5             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-client`                                                                                                                                                                                           |
| basicAuth            | Option 6                                 | object          | Object to handle `oauth rop` authentication when performing the test.                                                                                                                                                                                                                           |
| Option 6             | accessTokenUrl [*required*]         | string          | Access token URL to use when performing the authentication.                                                                                                                                                                                                                                     |
| Option 6             | audience                                 | string          | Audience to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | clientId                                 | string          | Client ID to use when performing the authentication.                                                                                                                                                                                                                                            |
| Option 6             | clientSecret                             | string          | Client secret to use when performing the authentication.                                                                                                                                                                                                                                        |
| Option 6             | password [*required*]               | string          | Password to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | resource                                 | string          | Resource to use when performing the authentication.                                                                                                                                                                                                                                             |
| Option 6             | scope                                    | string          | Scope to use when performing the authentication.                                                                                                                                                                                                                                                |
| Option 6             | tokenApiAuthentication [*required*] | enum            | Type of token to use when performing the authentication. Allowed enum values: `header,body`                                                                                                                                                                                                     |
| Option 6             | type [*required*]                   | enum            | The type of basic authentication to use when performing the test. Allowed enum values: `oauth-rop`                                                                                                                                                                                              |
| Option 6             | username [*required*]               | string          | Username to use when performing the authentication.                                                                                                                                                                                                                                             |
| request              | body                                     | string          | Body to include in the test.                                                                                                                                                                                                                                                                    |
| request              | bodyType                                 | enum            | Type of the request body. Allowed enum values: `text/plain,application/json,text/xml,text/html,application/x-www-form-urlencoded,graphql,application/octet-stream,multipart/form-data`                                                                                                          |
| request              | callType                                 | enum            | The type of gRPC call to perform. Allowed enum values: `healthcheck,unary`                                                                                                                                                                                                                      |
| request              | certificate                              | object          | Client certificate to use when performing the test request.                                                                                                                                                                                                                                     |
| certificate          | cert                                     | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| cert                 | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| cert                 | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| cert                 | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| certificate          | key                                      | object          | Define a request certificate.                                                                                                                                                                                                                                                                   |
| key                  | content                                  | string          | Content of the certificate or key.                                                                                                                                                                                                                                                              |
| key                  | filename                                 | string          | File name for the certificate or key.                                                                                                                                                                                                                                                           |
| key                  | updatedAt                                | string          | Date of update of the certificate or key, ISO format.                                                                                                                                                                                                                                           |
| request              | certificateDomains                       | [string]        | By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.                                                                                |
| request              | checkCertificateRevocation               | boolean         | Check for certificate revocation.                                                                                                                                                                                                                                                               |
| request              | compressedJsonDescriptor                 | string          | A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                  |
| request              | compressedProtoFile                      | string          | A protobuf file that needs to be gzipped first then base64 encoded.                                                                                                                                                                                                                             |
| request              | disableAiaIntermediateFetching           | boolean         | Disable fetching intermediate certificates from AIA.                                                                                                                                                                                                                                            |
| request              | dnsServer                                | string          | DNS server to use for DNS tests.                                                                                                                                                                                                                                                                |
| request              | dnsServerPort                            |  <oneOf>   | DNS server port to use for DNS tests.                                                                                                                                                                                                                                                           |
| dnsServerPort        | Option 1                                 | int64           | Integer DNS server port number to use when performing the test.                                                                                                                                                                                                                                 |
| dnsServerPort        | Option 2                                 | string          | String DNS server port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                    |
| request              | files                                    | [object]        | Files to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                         |
| files                | bucketKey                                | string          | Bucket key of the file.                                                                                                                                                                                                                                                                         |
| files                | content                                  | string          | Content of the file.                                                                                                                                                                                                                                                                            |
| files                | encoding                                 | string          | Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.                                                                                                                                                                |
| files                | name                                     | string          | Name of the file.                                                                                                                                                                                                                                                                               |
| files                | originalFileName                         | string          | Original name of the file.                                                                                                                                                                                                                                                                      |
| files                | size                                     | int64           | Size of the file.                                                                                                                                                                                                                                                                               |
| files                | type                                     | string          | Type of the file.                                                                                                                                                                                                                                                                               |
| request              | follow_redirects                         | boolean         | Specifies whether or not the request follows redirects.                                                                                                                                                                                                                                         |
| request              | form                                     | object          | Form to be used as part of the request in the test. Only valid if `bodyType` is `multipart/form-data`.                                                                                                                                                                                          |
| additionalProperties | <any-key>                                | string          | A single form entry.                                                                                                                                                                                                                                                                            |
| request              | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| request              | host                                     | string          | Host name to perform the test with.                                                                                                                                                                                                                                                             |
| request              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| request              | isMessageBase64Encoded                   | boolean         | Whether the message is base64 encoded.                                                                                                                                                                                                                                                          |
| request              | message                                  | string          | Message to send for UDP or WebSocket tests.                                                                                                                                                                                                                                                     |
| request              | metadata                                 | object          | Metadata to include when performing the gRPC test.                                                                                                                                                                                                                                              |
| additionalProperties | <any-key>                                | string          | A single metadatum.                                                                                                                                                                                                                                                                             |
| request              | method                                   | string          | Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`.                                                                                                   |
| request              | noSavingResponseBody                     | boolean         | Determines whether or not to save the response body.                                                                                                                                                                                                                                            |
| request              | numberOfPackets                          | int32           | Number of pings to use per test.                                                                                                                                                                                                                                                                |
| request              | persistCookies                           | boolean         | Persist cookies across redirects.                                                                                                                                                                                                                                                               |
| request              | port                                     |  <oneOf>   | Port to use when performing the test.                                                                                                                                                                                                                                                           |
| port                 | Option 1                                 | int64           | Integer Port number to use when performing the test.                                                                                                                                                                                                                                            |
| port                 | Option 2                                 | string          | String Port number to use when performing the test. Supports templated variables.                                                                                                                                                                                                               |
| request              | proxy                                    | object          | The proxy to perform the test.                                                                                                                                                                                                                                                                  |
| proxy                | headers                                  | object          | Headers to include when performing the test.                                                                                                                                                                                                                                                    |
| additionalProperties | <any-key>                                | string          | A single Header.                                                                                                                                                                                                                                                                                |
| proxy                | url [*required*]                    | string          | URL of the proxy to perform the test.                                                                                                                                                                                                                                                           |
| request              | query                                    | object          | Query to use for the test.                                                                                                                                                                                                                                                                      |
| request              | servername                               | string          | For SSL tests, it specifies on which server you want to initiate the TLS handshake, allowing the server to present one of multiple possible certificates on the same IP address and TCP port number.                                                                                            |
| request              | service                                  | string          | The gRPC service on which you want to perform the gRPC call.                                                                                                                                                                                                                                    |
| request              | shouldTrackHops                          | boolean         | Turns on a traceroute probe to discover all gateways along the path to the host destination.                                                                                                                                                                                                    |
| request              | timeout                                  | double          | Timeout in seconds for the test.                                                                                                                                                                                                                                                                |
| request              | url                                      | string          | URL to perform the test with.                                                                                                                                                                                                                                                                   |
| config               | variables                                | [object]        | Browser tests only - array of variables used for the test steps.                                                                                                                                                                                                                                |
| variables            | example                                  | string          | Example for the variable.                                                                                                                                                                                                                                                                       |
| variables            | id                                       | string          | ID for the variable. Global variables require an ID.                                                                                                                                                                                                                                            |
| variables            | name [*required*]                   | string          | Name of the variable.                                                                                                                                                                                                                                                                           |
| variables            | pattern                                  | string          | Pattern of the variable.                                                                                                                                                                                                                                                                        |
| variables            | secure                                   | boolean         | Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`.                                                                                                                                                                      |
| variables            | type [*required*]                   | enum            | Type of browser test variable. Allowed enum values: `element,email,global,text`                                                                                                                                                                                                                 |
|                      | creator                                  | object          | Object describing the creator of the shared element.                                                                                                                                                                                                                                            |
| creator              | email                                    | string          | Email of the creator.                                                                                                                                                                                                                                                                           |
| creator              | handle                                   | string          | Handle of the creator.                                                                                                                                                                                                                                                                          |
| creator              | name                                     | string          | Name of the creator.                                                                                                                                                                                                                                                                            |
|                      | locations                                | [string]        | Array of locations used to run the test.                                                                                                                                                                                                                                                        |
|                      | message                                  | string          | Notification message associated with the test.                                                                                                                                                                                                                                                  |
|                      | monitor_id                               | int64           | The associated monitor ID.                                                                                                                                                                                                                                                                      |
|                      | name                                     | string          | Name of the test.                                                                                                                                                                                                                                                                               |
|                      | options                                  | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                                                       |
| options              | accept_self_signed                       | boolean         | For SSL tests, whether or not the test should allow self signed certificates.                                                                                                                                                                                                                   |
| options              | allow_insecure                           | boolean         | Allows loading insecure content for an HTTP request in an API test.                                                                                                                                                                                                                             |
| options              | blockedRequestPatterns                   | [string]        | Array of URL patterns to block.                                                                                                                                                                                                                                                                 |
| options              | checkCertificateRevocation               | boolean         | For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.                                                                                                                                                                                                      |
| options              | ci                                       | object          | CI/CD options for a Synthetic test.                                                                                                                                                                                                                                                             |
| ci                   | executionRule [*required*]          | enum            | Execution rule for a Synthetic test. Allowed enum values: `blocking,non_blocking,skipped`                                                                                                                                                                                                       |
| options              | device_ids                               | [string]        | For browser test, array with the different device IDs used to run the test.                                                                                                                                                                                                                     |
| options              | disableAiaIntermediateFetching           | boolean         | For SSL tests, whether or not the test should disable fetching intermediate certificates from AIA.                                                                                                                                                                                              |
| options              | disableCors                              | boolean         | Whether or not to disable CORS mechanism.                                                                                                                                                                                                                                                       |
| options              | disableCsp                               | boolean         | Disable Content Security Policy for browser tests.                                                                                                                                                                                                                                              |
| options              | enableProfiling                          | boolean         | Enable profiling for browser tests.                                                                                                                                                                                                                                                             |
| options              | enableSecurityTesting                    | boolean         | **DEPRECATED**: Enable security testing for browser tests. Security testing is not available anymore. This field is deprecated and won't be used.                                                                                                                                               |
| options              | follow_redirects                         | boolean         | For API HTTP test, whether or not the test should follow redirects.                                                                                                                                                                                                                             |
| options              | httpVersion                              | enum            | HTTP version to use for a Synthetic test. Allowed enum values: `http1,http2,any`                                                                                                                                                                                                                |
| options              | ignoreServerCertificateError             | boolean         | Ignore server certificate error for browser tests.                                                                                                                                                                                                                                              |
| options              | initialNavigationTimeout                 | int64           | Timeout before declaring the initial step as failed (in seconds) for browser tests.                                                                                                                                                                                                             |
| options              | min_failure_duration                     | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                                                 |
| options              | min_location_failed                      | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                                                            |
| options              | monitor_name                             | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                                                             |
| options              | monitor_options                          | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                                                  |
| monitor_options      | escalation_message                       | string          | Message to include in the escalation notification.                                                                                                                                                                                                                                              |
| monitor_options      | notification_preset_name                 | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                                                 |
| monitor_options      | renotify_interval                        | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                                                     |
| monitor_options      | renotify_occurrences                     | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                                                   |
| options              | monitor_priority                         | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                                                     |
| options              | noScreenshot                             | boolean         | Prevents saving screenshots of the steps.                                                                                                                                                                                                                                                       |
| options              | restricted_roles                         | [string]        | **DEPRECATED**: 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.                                                                                      |
| options              | retry                                    | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                                                              |
| retry                | count                                    | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                                                  |
| retry                | interval                                 | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                                                             |
| options              | rumSettings                              | object          | The RUM data collection settings for the Synthetic browser test. **Note:** There are 3 ways to format RUM settings:                                                                                                                                                                             | `{ isEnabled: false }` RUM data is not collected. | `{ isEnabled: true }` RUM data is collected from the Synthetic test's default application. | `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` RUM data is collected using the specified application. |
| rumSettings          | applicationId                            | string          | RUM application ID used to collect RUM data for the browser test.                                                                                                                                                                                                                               |
| rumSettings          | clientTokenId                            | int64           | RUM application API key ID used to collect RUM data for the browser test.                                                                                                                                                                                                                       |
| rumSettings          | isEnabled [*required*]              | boolean         | Determines whether RUM data is collected during test runs.                                                                                                                                                                                                                                      |
| options              | scheduling                               | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                                                         |
| scheduling           | timeframes [*required*]             | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                                                |
| timeframes           | day [*required*]                    | int32           | Number representing the day of the week.                                                                                                                                                                                                                                                        |
| timeframes           | from [*required*]                   | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                                                 |
| timeframes           | to [*required*]                     | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                                                   |
| scheduling           | timezone [*required*]               | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                                                       |
| options              | tick_every                               | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                                                  |
|                      | public_id                                | string          | The test public ID.                                                                                                                                                                                                                                                                             |
|                      | status                                   | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                                                              |
|                      | steps                                    | [object]        | The steps of the test if they exist.                                                                                                                                                                                                                                                            |
| steps                | allowFailure                             | boolean         | A boolean set to allow this step to fail.                                                                                                                                                                                                                                                       |
| steps                | alwaysExecute                            | boolean         | A boolean set to always execute this step even if the previous step failed or was skipped.                                                                                                                                                                                                      |
| steps                | exitIfSucceed                            | boolean         | A boolean set to exit the test if the step succeeds.                                                                                                                                                                                                                                            |
| steps                | isCritical                               | boolean         | A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.                                                                                                                                                                         |
| steps                | name                                     | string          | The name of the step.                                                                                                                                                                                                                                                                           |
| steps                | noScreenshot                             | boolean         | A boolean set to skip taking a screenshot for the step.                                                                                                                                                                                                                                         |
| steps                | params                                   | object          | The parameters of the step.                                                                                                                                                                                                                                                                     |
| steps                | public_id                                | string          | The public ID of the step.                                                                                                                                                                                                                                                                      |
| steps                | timeout                                  | int64           | The time before declaring a step failed.                                                                                                                                                                                                                                                        |
| steps                | type                                     | enum            | Step type used in your Synthetic test. Allowed enum values: `assertCurrentUrl,assertElementAttribute,assertElementContent,assertElementPresent,assertEmail,assertFileDownload,assertFromJavascript,assertPageContains,assertPageLacks,assertRequests`                                           |
|                      | subtype                                  | enum            | The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. Allowed enum values: `http,ssl,tcp,dns,multi,icmp,udp,websocket,grpc`                                                                                                        |
|                      | tags                                     | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                                                             |
|                      | type                                     | enum            | Type of the Synthetic test. Allowed enum values: `api,browser,mobile,network`                                                                                                                                                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "config": {
    "assertions": [
      {
        "operator": "contains",
        "property": "string",
        "target": 0,
        "timingsScope": "string",
        "type": "statusCode"
      }
    ],
    "configVariables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ],
    "request": {
      "allow_insecure": false,
      "basicAuth": {
        "password": "PaSSw0RD!",
        "type": "web",
        "username": "my_username"
      },
      "body": "string",
      "bodyType": "text/plain",
      "callType": "unary",
      "certificate": {
        "cert": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        },
        "key": {
          "content": "string",
          "filename": "string",
          "updatedAt": "string"
        }
      },
      "certificateDomains": [],
      "checkCertificateRevocation": false,
      "compressedJsonDescriptor": "string",
      "compressedProtoFile": "string",
      "disableAiaIntermediateFetching": false,
      "dnsServer": "string",
      "dnsServerPort": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "files": [
        {
          "bucketKey": "string",
          "content": "string",
          "encoding": "string",
          "name": "string",
          "originalFileName": "string",
          "size": "integer",
          "type": "string"
        }
      ],
      "follow_redirects": false,
      "form": {
        "<any-key>": "string"
      },
      "headers": {
        "<any-key>": "string"
      },
      "host": "string",
      "httpVersion": "string",
      "isMessageBase64Encoded": false,
      "message": "string",
      "metadata": {
        "<any-key>": "string"
      },
      "method": "string",
      "noSavingResponseBody": false,
      "numberOfPackets": "integer",
      "persistCookies": false,
      "port": {
        "description": "undefined",
        "format": "undefined",
        "type": "undefined"
      },
      "proxy": {
        "headers": {
          "<any-key>": "string"
        },
        "url": "https://example.com"
      },
      "query": {},
      "servername": "string",
      "service": "Greeter",
      "shouldTrackHops": false,
      "timeout": "number",
      "url": "https://example.com"
    },
    "variables": [
      {
        "example": "string",
        "id": "string",
        "name": "VARIABLE_NAME",
        "pattern": "string",
        "secure": false,
        "type": "text"
      }
    ]
  },
  "creator": {
    "email": "string",
    "handle": "string",
    "name": "string"
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "string",
  "monitor_id": "integer",
  "name": "string",
  "options": {
    "accept_self_signed": false,
    "allow_insecure": false,
    "blockedRequestPatterns": [],
    "checkCertificateRevocation": false,
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "disableAiaIntermediateFetching": false,
    "disableCors": false,
    "disableCsp": false,
    "enableProfiling": false,
    "enableSecurityTesting": false,
    "follow_redirects": false,
    "httpVersion": "string",
    "ignoreServerCertificateError": false,
    "initialNavigationTimeout": "integer",
    "min_failure_duration": "integer",
    "min_location_failed": "integer",
    "monitor_name": "string",
    "monitor_options": {
      "escalation_message": "string",
      "notification_preset_name": "string",
      "renotify_interval": "integer",
      "renotify_occurrences": "integer"
    },
    "monitor_priority": "integer",
    "noScreenshot": false,
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "retry": {
      "count": "integer",
      "interval": "number"
    },
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    },
    "tick_every": "integer"
  },
  "public_id": "string",
  "status": "live",
  "steps": [
    {
      "allowFailure": false,
      "alwaysExecute": false,
      "exitIfSucceed": false,
      "isCritical": false,
      "name": "string",
      "noScreenshot": false,
      "params": {},
      "public_id": "string",
      "timeout": "integer",
      "type": "assertElementContent"
    }
  ],
  "subtype": "http",
  "tags": [],
  "type": "string"
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
- JSON format is wrong - Updating sub-type is forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
- Synthetic is not activated for the user - Test is not owned by the user - Test can't be found
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/synthetics/tests/${public_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "config": {
    "assertions": [
      {
        "operator": "is",
        "target": 200,
        "type": "statusCode"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "name": "Example API test",
  "options": {
    "tick_every": 60
  },
  "status": "live",
  "type": "api"
}
EOF
                
## Save new value for on-demand concurrency cap{% #save-new-value-for-on-demand-concurrency-cap %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                            |
| ----------------- | --------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/synthetics/settings/on_demand_concurrency_cap |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/synthetics/settings/on_demand_concurrency_cap |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/synthetics/settings/on_demand_concurrency_cap      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/synthetics/settings/on_demand_concurrency_cap      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/synthetics/settings/on_demand_concurrency_cap     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/synthetics/settings/on_demand_concurrency_cap |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/synthetics/settings/on_demand_concurrency_cap |

### Overview

Save new value for on-demand concurrency cap. This endpoint requires the `billing_edit` permission.

### Request

#### Body Data (required)

.

{% tab title="Model" %}

| Field                     | Type   | Description                             |
| ------------------------- | ------ | --------------------------------------- |
| on_demand_concurrency_cap | double | Value of the on-demand concurrency cap. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "on_demand_concurrency_cap": 20
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
On-demand concurrency cap response.

| Parent field | Field                     | Type   | Description                                                                      |
| ------------ | ------------------------- | ------ | -------------------------------------------------------------------------------- |
|              | data                      | object | On-demand concurrency cap.                                                       |
| data         | attributes                | object | On-demand concurrency cap attributes.                                            |
| attributes   | on_demand_concurrency_cap | double | Value of the on-demand concurrency cap.                                          |
| data         | type                      | enum   | On-demand concurrency cap type. Allowed enum values: `on_demand_concurrency_cap` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "on_demand_concurrency_cap": "number"
    },
    "type": "string"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/settings/on_demand_concurrency_cap" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "on_demand_concurrency_cap": 20
}
EOF
                        
##### 

```go
// Save new value for on-demand concurrency cap returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.OnDemandConcurrencyCapAttributes{
		OnDemandConcurrencyCap: datadog.PtrFloat64(20),
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSyntheticsApi(apiClient)
	resp, r, err := api.SetOnDemandConcurrencyCap(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.SetOnDemandConcurrencyCap`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.SetOnDemandConcurrencyCap`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
##### 

```java
// Save new value for on-demand concurrency cap returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SyntheticsApi;
import com.datadog.api.client.v2.model.OnDemandConcurrencyCapAttributes;
import com.datadog.api.client.v2.model.OnDemandConcurrencyCapResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    OnDemandConcurrencyCapAttributes body =
        new OnDemandConcurrencyCapAttributes().onDemandConcurrencyCap(20.0);

    try {
      OnDemandConcurrencyCapResponse result = apiInstance.setOnDemandConcurrencyCap(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#setOnDemandConcurrencyCap");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
##### 

```python
"""
Save new value for on-demand concurrency cap returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi
from datadog_api_client.v2.model.on_demand_concurrency_cap_attributes import OnDemandConcurrencyCapAttributes

body = OnDemandConcurrencyCapAttributes(
    on_demand_concurrency_cap=20.0,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.set_on_demand_concurrency_cap(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
##### 

```ruby
# Save new value for on-demand concurrency cap returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new

body = DatadogAPIClient::V2::OnDemandConcurrencyCapAttributes.new({
  on_demand_concurrency_cap: 20,
})
p api_instance.set_on_demand_concurrency_cap(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
##### 

```rust
// Save new value for on-demand concurrency cap returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV2::model::OnDemandConcurrencyCapAttributes;

#[tokio::main]
async fn main() {
    let body = OnDemandConcurrencyCapAttributes::new().on_demand_concurrency_cap(20.0 as f64);
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.set_on_demand_concurrency_cap(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
##### 

```typescript
/**
 * Save new value for on-demand concurrency cap returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.SyntheticsApi(configuration);

const params: v2.SyntheticsApiSetOnDemandConcurrencyCapRequest = {
  body: {
    onDemandConcurrencyCap: 20,
  },
};

apiInstance
  .setOnDemandConcurrencyCap(params)
  .then((data: v2.OnDemandConcurrencyCapResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"
{% /tab %}

## Get the on-demand concurrency cap{% #get-the-on-demand-concurrency-cap %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                           |
| ----------------- | -------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/settings/on_demand_concurrency_cap |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/settings/on_demand_concurrency_cap |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/settings/on_demand_concurrency_cap      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/settings/on_demand_concurrency_cap      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/settings/on_demand_concurrency_cap     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/settings/on_demand_concurrency_cap |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/settings/on_demand_concurrency_cap |

### Overview

Get the on-demand concurrency cap. This endpoint requires the `billing_read` permission.

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
On-demand concurrency cap response.

| Parent field | Field                     | Type   | Description                                                                      |
| ------------ | ------------------------- | ------ | -------------------------------------------------------------------------------- |
|              | data                      | object | On-demand concurrency cap.                                                       |
| data         | attributes                | object | On-demand concurrency cap attributes.                                            |
| attributes   | on_demand_concurrency_cap | double | Value of the on-demand concurrency cap.                                          |
| data         | type                      | enum   | On-demand concurrency cap type. Allowed enum values: `on_demand_concurrency_cap` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "on_demand_concurrency_cap": "number"
    },
    "type": "string"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/settings/on_demand_concurrency_cap" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Get the on-demand concurrency cap returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_on_demand_concurrency_cap()

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
##### 

```ruby
# Get the on-demand concurrency cap returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.get_on_demand_concurrency_cap()
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
##### 

```go
// Get the on-demand concurrency cap returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetOnDemandConcurrencyCap(ctx)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetOnDemandConcurrencyCap`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetOnDemandConcurrencyCap`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
##### 

```java
// Get the on-demand concurrency cap returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SyntheticsApi;
import com.datadog.api.client.v2.model.OnDemandConcurrencyCapResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      OnDemandConcurrencyCapResponse result = apiInstance.getOnDemandConcurrencyCap();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getOnDemandConcurrencyCap");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
##### 

```rust
// Get the on-demand concurrency cap returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.get_on_demand_concurrency_cap().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
##### 

```typescript
/**
 * Get the on-demand concurrency cap returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.SyntheticsApi(configuration);

apiInstance
  .getOnDemandConcurrencyCap()
  .then((data: v2.OnDemandConcurrencyCapResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"
{% /tab %}

## Search test suites{% #search-test-suites %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                      |
| ----------------- | ----------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/suites/search |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/suites/search |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/suites/search      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/suites/search      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/suites/search     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/suites/search |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/suites/search |

### Overview

Search for test suites. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Query Strings

| Name        | Type    | Description                                                       |
| ----------- | ------- | ----------------------------------------------------------------- |
| query       | string  | The search query.                                                 |
| sort        | string  | The sort order for the results (e.g., `name,asc` or `name,desc`). |
| facets_only | boolean | If true, return only facets instead of full test details.         |
| start       | integer | The offset from which to start returning results.                 |
| count       | integer | The maximum number of results to return.                          |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Synthetics suite search response

| Parent field | Field                       | Type     | Description                                                                                           |
| ------------ | --------------------------- | -------- | ----------------------------------------------------------------------------------------------------- |
|              | data                        | object   | Synthetics suite search response data                                                                 |
| data         | attributes                  | object   | Synthetics suite search response data attributes                                                      |
| attributes   | suites                      | [object] | List of Synthetic suites matching the search query.                                                   |
| suites       | message                     | string   | Notification message associated with the suite.                                                       |
| suites       | monitor_id                  | int64    | The associated monitor ID.                                                                            |
| suites       | name [*required*]      | string   | Name of the suite.                                                                                    |
| suites       | options [*required*]   | object   | Object describing the extra options for a Synthetic suite.                                            |
| options      | alerting_threshold          | double   | Percentage of critical tests failure needed for a suite to fail.                                      |
| suites       | public_id                   | string   | The public ID for the test.                                                                           |
| suites       | tags                        | [string] | Array of tags attached to the suite.                                                                  |
| suites       | tests [*required*]     | [object] | Array of Synthetic tests included in the suite.                                                       |
| tests        | alerting_criticality        | enum     | Alerting criticality for each the test. Allowed enum values: `ignore,critical`                        |
| tests        | public_id [*required*] | string   | The public ID of the Synthetic test included in the suite.                                            |
| suites       | type [*required*]      | enum     | Type of the Synthetic suite, `suite`. Allowed enum values: `suite`                                    |
| attributes   | total                       | int32    | Total number of Synthetic suites matching the search query.                                           |
| data         | id                          | uuid     | The unique identifier of the suite search response data.                                              |
| data         | type                        | enum     | Type for the Synthetics suites search response, `suites_search`. Allowed enum values: `suites_search` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "suites": [
        {
          "message": "Notification message",
          "monitor_id": 12345678,
          "name": "Example suite name",
          "options": {
            "alerting_threshold": "number"
          },
          "public_id": "123-abc-456",
          "tags": [
            "env:production"
          ],
          "tests": [
            {
              "alerting_criticality": "critical",
              "public_id": ""
            }
          ],
          "type": "suite"
        }
      ],
      "total": "integer"
    },
    "id": "string",
    "type": "suites_search"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/suites/search" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Search Synthetics suites returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.search_suites()

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Search Synthetics suites returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.search_suites()
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Search Synthetics suites returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSyntheticsApi(apiClient)
	resp, r, err := api.SearchSuites(ctx, *datadogV2.NewSearchSuitesOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.SearchSuites`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.SearchSuites`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Search Synthetics suites returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SyntheticsApi;
import com.datadog.api.client.v2.model.SyntheticsSuiteSearchResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsSuiteSearchResponse result = apiInstance.searchSuites();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#searchSuites");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Search Synthetics suites returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_synthetics::SearchSuitesOptionalParams;
use datadog_api_client::datadogV2::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .search_suites(SearchSuitesOptionalParams::default())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Search Synthetics suites returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.SyntheticsApi(configuration);

apiInstance
  .searchSuites()
  .then((data: v2.SyntheticsSuiteSearchResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Get a suite{% #get-a-suite %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                           |
| ----------------- | ---------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/suites/{public_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/suites/{public_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/suites/{public_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/suites/{public_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/suites/{public_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/suites/{public_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/suites/{public_id} |

### Overview

This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                     |
| --------------------------- | ------ | ----------------------------------------------- |
| public_id [*required*] | string | The public ID of the suite to get details from. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Synthetics suite response

| Parent field | Field                       | Type     | Description                                                                       |
| ------------ | --------------------------- | -------- | --------------------------------------------------------------------------------- |
|              | data                        | object   | Synthetics suite response data                                                    |
| data         | attributes                  | object   | Object containing details about a Synthetic suite.                                |
| attributes   | message                     | string   | Notification message associated with the suite.                                   |
| attributes   | monitor_id                  | int64    | The associated monitor ID.                                                        |
| attributes   | name [*required*]      | string   | Name of the suite.                                                                |
| attributes   | options [*required*]   | object   | Object describing the extra options for a Synthetic suite.                        |
| options      | alerting_threshold          | double   | Percentage of critical tests failure needed for a suite to fail.                  |
| attributes   | public_id                   | string   | The public ID for the test.                                                       |
| attributes   | tags                        | [string] | Array of tags attached to the suite.                                              |
| attributes   | tests [*required*]     | [object] | Array of Synthetic tests included in the suite.                                   |
| tests        | alerting_criticality        | enum     | Alerting criticality for each the test. Allowed enum values: `ignore,critical`    |
| tests        | public_id [*required*] | string   | The public ID of the Synthetic test included in the suite.                        |
| attributes   | type [*required*]      | enum     | Type of the Synthetic suite, `suite`. Allowed enum values: `suite`                |
| data         | id                          | string   | The public ID for the suite.                                                      |
| data         | type                        | enum     | Type for the Synthetics suites responses, `suites`. Allowed enum values: `suites` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "message": "Notification message",
      "monitor_id": 12345678,
      "name": "Example suite name",
      "options": {
        "alerting_threshold": "number"
      },
      "public_id": "123-abc-456",
      "tags": [
        "env:production"
      ],
      "tests": [
        {
          "alerting_criticality": "critical",
          "public_id": ""
        }
      ],
      "type": "suite"
    },
    "id": "123-abc-456",
    "type": "suites"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/suites/${public_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
##### 

```python
"""
Synthetics: Get a suite returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.get_synthetics_suite(
        public_id="public_id",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Synthetics: Get a suite returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.get_synthetics_suite("public_id")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Synthetics: Get a suite returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSyntheticsApi(apiClient)
	resp, r, err := api.GetSyntheticsSuite(ctx, "public_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.GetSyntheticsSuite`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.GetSyntheticsSuite`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Synthetics: Get a suite returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SyntheticsApi;
import com.datadog.api.client.v2.model.SyntheticsSuiteResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    try {
      SyntheticsSuiteResponse result = apiInstance.getSyntheticsSuite("public_id");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#getSyntheticsSuite");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Synthetics: Get a suite returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_synthetics::SyntheticsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.get_synthetics_suite("public_id".to_string()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Synthetics: Get a suite returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.SyntheticsApi(configuration);

const params: v2.SyntheticsApiGetSyntheticsSuiteRequest = {
  publicId: "public_id",
};

apiInstance
  .getSyntheticsSuite(params)
  .then((data: v2.SyntheticsSuiteResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Edit a test suite{% #edit-a-test-suite %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                           |
| ----------------- | ---------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v2/synthetics/suites/{public_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v2/synthetics/suites/{public_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v2/synthetics/suites/{public_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v2/synthetics/suites/{public_id}      |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v2/synthetics/suites/{public_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v2/synthetics/suites/{public_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v2/synthetics/suites/{public_id} |

### Overview

This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                         |
| --------------------------- | ------ | ----------------------------------- |
| public_id [*required*] | string | The public ID of the suite to edit. |

### Request

#### Body Data (required)

New suite details to be saved.

{% tab title="Model" %}

| Parent field | Field                        | Type     | Description                                                                       |
| ------------ | ---------------------------- | -------- | --------------------------------------------------------------------------------- |
|              | data [*required*]       | object   | Data object for creating or editing a Synthetic test suite.                       |
| data         | attributes [*required*] | object   | Object containing details about a Synthetic suite.                                |
| attributes   | message                      | string   | Notification message associated with the suite.                                   |
| attributes   | monitor_id                   | int64    | The associated monitor ID.                                                        |
| attributes   | name [*required*]       | string   | Name of the suite.                                                                |
| attributes   | options [*required*]    | object   | Object describing the extra options for a Synthetic suite.                        |
| options      | alerting_threshold           | double   | Percentage of critical tests failure needed for a suite to fail.                  |
| attributes   | public_id                    | string   | The public ID for the test.                                                       |
| attributes   | tags                         | [string] | Array of tags attached to the suite.                                              |
| attributes   | tests [*required*]      | [object] | Array of Synthetic tests included in the suite.                                   |
| tests        | alerting_criticality         | enum     | Alerting criticality for each the test. Allowed enum values: `ignore,critical`    |
| tests        | public_id [*required*]  | string   | The public ID of the Synthetic test included in the suite.                        |
| attributes   | type [*required*]       | enum     | Type of the Synthetic suite, `suite`. Allowed enum values: `suite`                |
| data         | type [*required*]       | enum     | Type for the Synthetics suites responses, `suites`. Allowed enum values: `suites` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "message": "Notification message",
      "name": "Example suite name",
      "options": {
        "alerting_threshold": "number"
      },
      "tags": [
        "env:production"
      ],
      "tests": [
        {
          "alerting_criticality": "critical",
          "public_id": ""
        }
      ],
      "type": "suite"
    },
    "type": "suites"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Synthetics suite response

| Parent field | Field                       | Type     | Description                                                                       |
| ------------ | --------------------------- | -------- | --------------------------------------------------------------------------------- |
|              | data                        | object   | Synthetics suite response data                                                    |
| data         | attributes                  | object   | Object containing details about a Synthetic suite.                                |
| attributes   | message                     | string   | Notification message associated with the suite.                                   |
| attributes   | monitor_id                  | int64    | The associated monitor ID.                                                        |
| attributes   | name [*required*]      | string   | Name of the suite.                                                                |
| attributes   | options [*required*]   | object   | Object describing the extra options for a Synthetic suite.                        |
| options      | alerting_threshold          | double   | Percentage of critical tests failure needed for a suite to fail.                  |
| attributes   | public_id                   | string   | The public ID for the test.                                                       |
| attributes   | tags                        | [string] | Array of tags attached to the suite.                                              |
| attributes   | tests [*required*]     | [object] | Array of Synthetic tests included in the suite.                                   |
| tests        | alerting_criticality        | enum     | Alerting criticality for each the test. Allowed enum values: `ignore,critical`    |
| tests        | public_id [*required*] | string   | The public ID of the Synthetic test included in the suite.                        |
| attributes   | type [*required*]      | enum     | Type of the Synthetic suite, `suite`. Allowed enum values: `suite`                |
| data         | id                          | string   | The public ID for the suite.                                                      |
| data         | type                        | enum     | Type for the Synthetics suites responses, `suites`. Allowed enum values: `suites` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "message": "Notification message",
      "monitor_id": 12345678,
      "name": "Example suite name",
      "options": {
        "alerting_threshold": "number"
      },
      "public_id": "123-abc-456",
      "tags": [
        "env:production"
      ],
      "tests": [
        {
          "alerting_criticality": "critical",
          "public_id": ""
        }
      ],
      "type": "suite"
    },
    "id": "123-abc-456",
    "type": "suites"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/suites/${public_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "message": "Notification message",
      "monitor_id": 12345678,
      "name": "Example suite name",
      "public_id": "123-abc-456",
      "tags": [
        "env:production"
      ],
      "tests": [
        {
          "alerting_criticality": "critical",
          "public_id": ""
        }
      ],
      "type": "suite"
    },
    "type": "suites"
  }
}
EOF
                
##### 

```python
"""
Synthetics: Edit a test suite returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi
from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit
from datadog_api_client.v2.model.suite_create_edit_request import SuiteCreateEditRequest
from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite
from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions
from datadog_api_client.v2.model.synthetics_suite_test import SyntheticsSuiteTest
from datadog_api_client.v2.model.synthetics_suite_test_alerting_criticality import (
    SyntheticsSuiteTestAlertingCriticality,
)
from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType
from datadog_api_client.v2.model.synthetics_suite_types import SyntheticsSuiteTypes

body = SuiteCreateEditRequest(
    data=SuiteCreateEdit(
        attributes=SyntheticsSuite(
            message="Notification message",
            name="Example suite name",
            options=SyntheticsSuiteOptions(),
            tags=[
                "env:production",
            ],
            tests=[
                SyntheticsSuiteTest(
                    alerting_criticality=SyntheticsSuiteTestAlertingCriticality.CRITICAL,
                    public_id="",
                ),
            ],
            type=SyntheticsSuiteType.SUITE,
        ),
        type=SyntheticsSuiteTypes.SUITES,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.edit_synthetics_suite(public_id="public_id", body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Synthetics: Edit a test suite returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new

body = DatadogAPIClient::V2::SuiteCreateEditRequest.new({
  data: DatadogAPIClient::V2::SuiteCreateEdit.new({
    attributes: DatadogAPIClient::V2::SyntheticsSuite.new({
      message: "Notification message",
      name: "Example suite name",
      options: DatadogAPIClient::V2::SyntheticsSuiteOptions.new({}),
      tags: [
        "env:production",
      ],
      tests: [
        DatadogAPIClient::V2::SyntheticsSuiteTest.new({
          alerting_criticality: DatadogAPIClient::V2::SyntheticsSuiteTestAlertingCriticality::CRITICAL,
          public_id: "",
        }),
      ],
      type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
    }),
    type: DatadogAPIClient::V2::SyntheticsSuiteTypes::SUITES,
  }),
})
p api_instance.edit_synthetics_suite("public_id", body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Synthetics: Edit a test suite returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.SuiteCreateEditRequest{
		Data: datadogV2.SuiteCreateEdit{
			Attributes: datadogV2.SyntheticsSuite{
				Message: datadog.PtrString("Notification message"),
				Name:    "Example suite name",
				Options: datadogV2.SyntheticsSuiteOptions{},
				Tags: []string{
					"env:production",
				},
				Tests: []datadogV2.SyntheticsSuiteTest{
					{
						AlertingCriticality: datadogV2.SYNTHETICSSUITETESTALERTINGCRITICALITY_CRITICAL.Ptr(),
						PublicId:            "",
					},
				},
				Type: datadogV2.SYNTHETICSSUITETYPE_SUITE,
			},
			Type: datadogV2.SYNTHETICSSUITETYPES_SUITES,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSyntheticsApi(apiClient)
	resp, r, err := api.EditSyntheticsSuite(ctx, "public_id", body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.EditSyntheticsSuite`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.EditSyntheticsSuite`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Synthetics: Edit a test suite returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SyntheticsApi;
import com.datadog.api.client.v2.model.SuiteCreateEdit;
import com.datadog.api.client.v2.model.SuiteCreateEditRequest;
import com.datadog.api.client.v2.model.SyntheticsSuite;
import com.datadog.api.client.v2.model.SyntheticsSuiteOptions;
import com.datadog.api.client.v2.model.SyntheticsSuiteResponse;
import com.datadog.api.client.v2.model.SyntheticsSuiteTest;
import com.datadog.api.client.v2.model.SyntheticsSuiteTestAlertingCriticality;
import com.datadog.api.client.v2.model.SyntheticsSuiteType;
import com.datadog.api.client.v2.model.SyntheticsSuiteTypes;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SuiteCreateEditRequest body =
        new SuiteCreateEditRequest()
            .data(
                new SuiteCreateEdit()
                    .attributes(
                        new SyntheticsSuite()
                            .message("Notification message")
                            .name("Example suite name")
                            .options(new SyntheticsSuiteOptions())
                            .tags(Collections.singletonList("env:production"))
                            .tests(
                                Collections.singletonList(
                                    new SyntheticsSuiteTest()
                                        .alertingCriticality(
                                            SyntheticsSuiteTestAlertingCriticality.CRITICAL)
                                        .publicId("")))
                            .type(SyntheticsSuiteType.SUITE))
                    .type(SyntheticsSuiteTypes.SUITES));

    try {
      SyntheticsSuiteResponse result = apiInstance.editSyntheticsSuite("public_id", body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#editSyntheticsSuite");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Synthetics: Edit a test suite returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV2::model::SuiteCreateEdit;
use datadog_api_client::datadogV2::model::SuiteCreateEditRequest;
use datadog_api_client::datadogV2::model::SyntheticsSuite;
use datadog_api_client::datadogV2::model::SyntheticsSuiteOptions;
use datadog_api_client::datadogV2::model::SyntheticsSuiteTest;
use datadog_api_client::datadogV2::model::SyntheticsSuiteTestAlertingCriticality;
use datadog_api_client::datadogV2::model::SyntheticsSuiteType;
use datadog_api_client::datadogV2::model::SyntheticsSuiteTypes;

#[tokio::main]
async fn main() {
    let body = SuiteCreateEditRequest::new(SuiteCreateEdit::new(
        SyntheticsSuite::new(
            "Example suite name".to_string(),
            SyntheticsSuiteOptions::new(),
            vec![SyntheticsSuiteTest::new("".to_string())
                .alerting_criticality(SyntheticsSuiteTestAlertingCriticality::CRITICAL)],
            SyntheticsSuiteType::SUITE,
        )
        .message("Notification message".to_string())
        .tags(vec!["env:production".to_string()]),
        SyntheticsSuiteTypes::SUITES,
    ));
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .edit_synthetics_suite("public_id".to_string(), body)
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Synthetics: Edit a test suite returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.SyntheticsApi(configuration);

const params: v2.SyntheticsApiEditSyntheticsSuiteRequest = {
  body: {
    data: {
      attributes: {
        message: "Notification message",
        name: "Example suite name",
        options: {},
        tags: ["env:production"],
        tests: [
          {
            alertingCriticality: "critical",
            publicId: "",
          },
        ],
        type: "suite",
      },
      type: "suites",
    },
  },
  publicId: "public_id",
};

apiInstance
  .editSyntheticsSuite(params)
  .then((data: v2.SyntheticsSuiteResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Create a test suite{% #create-a-test-suite %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                |
| ----------------- | ----------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/synthetics/suites |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/synthetics/suites |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/synthetics/suites      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/synthetics/suites      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/synthetics/suites     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/synthetics/suites |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/synthetics/suites |

### Overview

This endpoint requires any of the following permissions:
`synthetics_write``synthetics_create_edit_trigger`


OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                        | Type     | Description                                                                       |
| ------------ | ---------------------------- | -------- | --------------------------------------------------------------------------------- |
|              | data [*required*]       | object   | Data object for creating or editing a Synthetic test suite.                       |
| data         | attributes [*required*] | object   | Object containing details about a Synthetic suite.                                |
| attributes   | message                      | string   | Notification message associated with the suite.                                   |
| attributes   | monitor_id                   | int64    | The associated monitor ID.                                                        |
| attributes   | name [*required*]       | string   | Name of the suite.                                                                |
| attributes   | options [*required*]    | object   | Object describing the extra options for a Synthetic suite.                        |
| options      | alerting_threshold           | double   | Percentage of critical tests failure needed for a suite to fail.                  |
| attributes   | public_id                    | string   | The public ID for the test.                                                       |
| attributes   | tags                         | [string] | Array of tags attached to the suite.                                              |
| attributes   | tests [*required*]      | [object] | Array of Synthetic tests included in the suite.                                   |
| tests        | alerting_criticality         | enum     | Alerting criticality for each the test. Allowed enum values: `ignore,critical`    |
| tests        | public_id [*required*]  | string   | The public ID of the Synthetic test included in the suite.                        |
| attributes   | type [*required*]       | enum     | Type of the Synthetic suite, `suite`. Allowed enum values: `suite`                |
| data         | type [*required*]       | enum     | Type for the Synthetics suites responses, `suites`. Allowed enum values: `suites` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "message": "Notification message",
      "name": "Example suite name",
      "options": {},
      "tags": [
        "env:production"
      ],
      "tests": [],
      "type": "suite"
    },
    "type": "suites"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Synthetics suite response

| Parent field | Field                       | Type     | Description                                                                       |
| ------------ | --------------------------- | -------- | --------------------------------------------------------------------------------- |
|              | data                        | object   | Synthetics suite response data                                                    |
| data         | attributes                  | object   | Object containing details about a Synthetic suite.                                |
| attributes   | message                     | string   | Notification message associated with the suite.                                   |
| attributes   | monitor_id                  | int64    | The associated monitor ID.                                                        |
| attributes   | name [*required*]      | string   | Name of the suite.                                                                |
| attributes   | options [*required*]   | object   | Object describing the extra options for a Synthetic suite.                        |
| options      | alerting_threshold          | double   | Percentage of critical tests failure needed for a suite to fail.                  |
| attributes   | public_id                   | string   | The public ID for the test.                                                       |
| attributes   | tags                        | [string] | Array of tags attached to the suite.                                              |
| attributes   | tests [*required*]     | [object] | Array of Synthetic tests included in the suite.                                   |
| tests        | alerting_criticality        | enum     | Alerting criticality for each the test. Allowed enum values: `ignore,critical`    |
| tests        | public_id [*required*] | string   | The public ID of the Synthetic test included in the suite.                        |
| attributes   | type [*required*]      | enum     | Type of the Synthetic suite, `suite`. Allowed enum values: `suite`                |
| data         | id                          | string   | The public ID for the suite.                                                      |
| data         | type                        | enum     | Type for the Synthetics suites responses, `suites`. Allowed enum values: `suites` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "message": "Notification message",
      "monitor_id": 12345678,
      "name": "Example suite name",
      "options": {
        "alerting_threshold": "number"
      },
      "public_id": "123-abc-456",
      "tags": [
        "env:production"
      ],
      "tests": [
        {
          "alerting_criticality": "critical",
          "public_id": ""
        }
      ],
      "type": "suite"
    },
    "id": "123-abc-456",
    "type": "suites"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/suites" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "message": "Notification message",
      "monitor_id": 12345678,
      "name": "Example suite name",
      "public_id": "123-abc-456",
      "tags": [
        "env:production"
      ],
      "tests": [
        {
          "alerting_criticality": "critical",
          "public_id": ""
        }
      ],
      "type": "suite"
    },
    "type": "suites"
  }
}
EOF
                        
##### 

```go
// Synthetics: Create a test suite returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.SuiteCreateEditRequest{
		Data: datadogV2.SuiteCreateEdit{
			Attributes: datadogV2.SyntheticsSuite{
				Message: datadog.PtrString("Notification message"),
				Name:    "Example suite name",
				Options: datadogV2.SyntheticsSuiteOptions{},
				Tags: []string{
					"env:production",
				},
				Tests: []datadogV2.SyntheticsSuiteTest{},
				Type:  datadogV2.SYNTHETICSSUITETYPE_SUITE,
			},
			Type: datadogV2.SYNTHETICSSUITETYPES_SUITES,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSyntheticsApi(apiClient)
	resp, r, err := api.CreateSyntheticsSuite(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.CreateSyntheticsSuite`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.CreateSyntheticsSuite`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Synthetics: Create a test suite returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SyntheticsApi;
import com.datadog.api.client.v2.model.SuiteCreateEdit;
import com.datadog.api.client.v2.model.SuiteCreateEditRequest;
import com.datadog.api.client.v2.model.SyntheticsSuite;
import com.datadog.api.client.v2.model.SyntheticsSuiteOptions;
import com.datadog.api.client.v2.model.SyntheticsSuiteResponse;
import com.datadog.api.client.v2.model.SyntheticsSuiteType;
import com.datadog.api.client.v2.model.SyntheticsSuiteTypes;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    SuiteCreateEditRequest body =
        new SuiteCreateEditRequest()
            .data(
                new SuiteCreateEdit()
                    .attributes(
                        new SyntheticsSuite()
                            .message("Notification message")
                            .name("Example suite name")
                            .options(new SyntheticsSuiteOptions())
                            .tags(Collections.singletonList("env:production"))
                            .type(SyntheticsSuiteType.SUITE))
                    .type(SyntheticsSuiteTypes.SUITES));

    try {
      SyntheticsSuiteResponse result = apiInstance.createSyntheticsSuite(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#createSyntheticsSuite");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Synthetics: Create a test suite returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi
from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit
from datadog_api_client.v2.model.suite_create_edit_request import SuiteCreateEditRequest
from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite
from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions
from datadog_api_client.v2.model.synthetics_suite_type import SyntheticsSuiteType
from datadog_api_client.v2.model.synthetics_suite_types import SyntheticsSuiteTypes

body = SuiteCreateEditRequest(
    data=SuiteCreateEdit(
        attributes=SyntheticsSuite(
            message="Notification message",
            name="Example suite name",
            options=SyntheticsSuiteOptions(),
            tags=[
                "env:production",
            ],
            tests=[],
            type=SyntheticsSuiteType.SUITE,
        ),
        type=SyntheticsSuiteTypes.SUITES,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.create_synthetics_suite(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Synthetics: Create a test suite returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new

body = DatadogAPIClient::V2::SuiteCreateEditRequest.new({
  data: DatadogAPIClient::V2::SuiteCreateEdit.new({
    attributes: DatadogAPIClient::V2::SyntheticsSuite.new({
      message: "Notification message",
      name: "Example suite name",
      options: DatadogAPIClient::V2::SyntheticsSuiteOptions.new({}),
      tags: [
        "env:production",
      ],
      tests: [],
      type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
    }),
    type: DatadogAPIClient::V2::SyntheticsSuiteTypes::SUITES,
  }),
})
p api_instance.create_synthetics_suite(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Synthetics: Create a test suite returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV2::model::SuiteCreateEdit;
use datadog_api_client::datadogV2::model::SuiteCreateEditRequest;
use datadog_api_client::datadogV2::model::SyntheticsSuite;
use datadog_api_client::datadogV2::model::SyntheticsSuiteOptions;
use datadog_api_client::datadogV2::model::SyntheticsSuiteType;
use datadog_api_client::datadogV2::model::SyntheticsSuiteTypes;

#[tokio::main]
async fn main() {
    let body = SuiteCreateEditRequest::new(SuiteCreateEdit::new(
        SyntheticsSuite::new(
            "Example suite name".to_string(),
            SyntheticsSuiteOptions::new(),
            vec![],
            SyntheticsSuiteType::SUITE,
        )
        .message("Notification message".to_string())
        .tags(vec!["env:production".to_string()]),
        SyntheticsSuiteTypes::SUITES,
    ));
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.create_synthetics_suite(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Synthetics: Create a test suite returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.SyntheticsApi(configuration);

const params: v2.SyntheticsApiCreateSyntheticsSuiteRequest = {
  body: {
    data: {
      attributes: {
        message: "Notification message",
        name: "Example suite name",
        options: {},
        tags: ["env:production"],
        tests: [],
        type: "suite",
      },
      type: "suites",
    },
  },
};

apiInstance
  .createSyntheticsSuite(params)
  .then((data: v2.SyntheticsSuiteResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Bulk delete suites{% #bulk-delete-suites %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                            |
| ----------------- | ----------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/synthetics/suites/bulk-delete |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/synthetics/suites/bulk-delete |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/synthetics/suites/bulk-delete      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/synthetics/suites/bulk-delete      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/synthetics/suites/bulk-delete     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/synthetics/suites/bulk-delete |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/synthetics/suites/bulk-delete |

### Overview

This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                        | Type     | Description                                                                                                              |
| ------------ | ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
|              | data [*required*]       | object   | Data object for a bulk delete Synthetic test suites request.                                                             |
| data         | attributes [*required*] | object   | Attributes for a bulk delete Synthetic test suites request.                                                              |
| attributes   | force_delete_dependencies    | boolean  | Whether to force deletion of suites that have dependent resources.                                                       |
| attributes   | public_ids [*required*] | [string] | List of public IDs of the Synthetic test suites to delete.                                                               |
| data         | id                           | string   | An optional identifier for the delete request.                                                                           |
| data         | type                         | enum     | Type for the bulk delete Synthetic suites request, `delete_suites_request`. Allowed enum values: `delete_suites_request` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "force_delete_dependencies": false,
      "public_ids": [
        ""
      ]
    },
    "id": "string",
    "type": "delete_suites_request"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing the list of deleted Synthetic test suites.

| Parent field | Field      | Type     | Description                                                                               |
| ------------ | ---------- | -------- | ----------------------------------------------------------------------------------------- |
|              | data       | [object] | List of deleted Synthetic suite data objects.                                             |
| data         | attributes | object   | Attributes of a deleted Synthetic test suite, including deletion timestamp and public ID. |
| attributes   | deleted_at | string   | Deletion timestamp of the Synthetic suite ID.                                             |
| attributes   | public_id  | string   | The Synthetic suite ID deleted.                                                           |
| data         | id         | string   | The public ID of the deleted Synthetic test suite.                                        |
| data         | type       | enum     | Type for the Synthetics suites responses, `suites`. Allowed enum values: `suites`         |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "deleted_at": "string",
        "public_id": "string"
      },
      "id": "string",
      "type": "suites"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/suites/bulk-delete" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "public_ids": [
        ""
      ]
    },
    "type": "delete_suites_request"
  }
}
EOF
                
##### 

```python
"""
Synthetics: Bulk delete suites returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi
from datadog_api_client.v2.model.deleted_suites_request_delete import DeletedSuitesRequestDelete
from datadog_api_client.v2.model.deleted_suites_request_delete_attributes import DeletedSuitesRequestDeleteAttributes
from datadog_api_client.v2.model.deleted_suites_request_delete_request import DeletedSuitesRequestDeleteRequest
from datadog_api_client.v2.model.deleted_suites_request_type import DeletedSuitesRequestType

body = DeletedSuitesRequestDeleteRequest(
    data=DeletedSuitesRequestDelete(
        attributes=DeletedSuitesRequestDeleteAttributes(
            public_ids=[
                "",
            ],
        ),
        type=DeletedSuitesRequestType.DELETE_SUITES_REQUEST,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.delete_synthetics_suites(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Synthetics: Bulk delete suites returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new

body = DatadogAPIClient::V2::DeletedSuitesRequestDeleteRequest.new({
  data: DatadogAPIClient::V2::DeletedSuitesRequestDelete.new({
    attributes: DatadogAPIClient::V2::DeletedSuitesRequestDeleteAttributes.new({
      public_ids: [
        "",
      ],
    }),
    type: DatadogAPIClient::V2::DeletedSuitesRequestType::DELETE_SUITES_REQUEST,
  }),
})
p api_instance.delete_synthetics_suites(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Synthetics: Bulk delete suites returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.DeletedSuitesRequestDeleteRequest{
		Data: datadogV2.DeletedSuitesRequestDelete{
			Attributes: datadogV2.DeletedSuitesRequestDeleteAttributes{
				PublicIds: []string{
					"",
				},
			},
			Type: datadogV2.DELETEDSUITESREQUESTTYPE_DELETE_SUITES_REQUEST.Ptr(),
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSyntheticsApi(apiClient)
	resp, r, err := api.DeleteSyntheticsSuites(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.DeleteSyntheticsSuites`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.DeleteSyntheticsSuites`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Synthetics: Bulk delete suites returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SyntheticsApi;
import com.datadog.api.client.v2.model.DeletedSuitesRequestDelete;
import com.datadog.api.client.v2.model.DeletedSuitesRequestDeleteAttributes;
import com.datadog.api.client.v2.model.DeletedSuitesRequestDeleteRequest;
import com.datadog.api.client.v2.model.DeletedSuitesRequestType;
import com.datadog.api.client.v2.model.DeletedSuitesResponse;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    DeletedSuitesRequestDeleteRequest body =
        new DeletedSuitesRequestDeleteRequest()
            .data(
                new DeletedSuitesRequestDelete()
                    .attributes(
                        new DeletedSuitesRequestDeleteAttributes()
                            .publicIds(Collections.singletonList("")))
                    .type(DeletedSuitesRequestType.DELETE_SUITES_REQUEST));

    try {
      DeletedSuitesResponse result = apiInstance.deleteSyntheticsSuites(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#deleteSyntheticsSuites");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Synthetics: Bulk delete suites returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV2::model::DeletedSuitesRequestDelete;
use datadog_api_client::datadogV2::model::DeletedSuitesRequestDeleteAttributes;
use datadog_api_client::datadogV2::model::DeletedSuitesRequestDeleteRequest;
use datadog_api_client::datadogV2::model::DeletedSuitesRequestType;

#[tokio::main]
async fn main() {
    let body = DeletedSuitesRequestDeleteRequest::new(
        DeletedSuitesRequestDelete::new(DeletedSuitesRequestDeleteAttributes::new(vec![
            "".to_string()
        ]))
        .type_(DeletedSuitesRequestType::DELETE_SUITES_REQUEST),
    );
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api.delete_synthetics_suites(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Synthetics: Bulk delete suites returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.SyntheticsApi(configuration);

const params: v2.SyntheticsApiDeleteSyntheticsSuitesRequest = {
  body: {
    data: {
      attributes: {
        publicIds: [""],
      },
      type: "delete_suites_request",
    },
  },
};

apiInstance
  .deleteSyntheticsSuites(params)
  .then((data: v2.DeletedSuitesResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

## Create a Network Path test{% #create-a-network-path-test %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                       |
| ----------------- | ------------------------------------------------------------------ |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/synthetics/tests/network |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/synthetics/tests/network |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/synthetics/tests/network      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/synthetics/tests/network      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/synthetics/tests/network     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/synthetics/tests/network |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/synthetics/tests/network |

### Overview

This endpoint requires any of the following permissions:
`synthetics_write``synthetics_create_edit_trigger`


OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field    | Field                                | Type            | Description                                                                                                                                                                                                                                                      |
| --------------- | ------------------------------------ | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                 | data [*required*]               | object          | Data object for creating or editing a Network Path test.                                                                                                                                                                                                         |
| data            | attributes [*required*]         | object          | Object containing details about a Network Path test.                                                                                                                                                                                                             |
| attributes      | config [*required*]             | object          | Configuration object for a Network Path test.                                                                                                                                                                                                                    |
| config          | assertions                           | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                           |
| assertions      | Option 1                             | object          | Network latency assertion for a Network Path test.                                                                                                                                                                                                               |
| Option 1        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 1        | property [*required*]           | enum            | The associated assertion property. Allowed enum values: `avg,max,min`                                                                                                                                                                                            |
| Option 1        | target [*required*]             | double          | Target value in milliseconds.                                                                                                                                                                                                                                    |
| Option 1        | type [*required*]               | enum            | Type of the latency assertion. Allowed enum values: `latency`                                                                                                                                                                                                    |
| assertions      | Option 2                             | object          | Multi-network hop assertion for a Network Path test.                                                                                                                                                                                                             |
| Option 2        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 2        | property [*required*]           | enum            | The associated assertion property. Allowed enum values: `avg,max,min`                                                                                                                                                                                            |
| Option 2        | target [*required*]             | double          | Target value in number of hops.                                                                                                                                                                                                                                  |
| Option 2        | type [*required*]               | enum            | Type of the multi-network hop assertion. Allowed enum values: `multiNetworkHop`                                                                                                                                                                                  |
| assertions      | Option 3                             | object          | Packet loss percentage assertion for a Network Path test.                                                                                                                                                                                                        |
| Option 3        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 3        | target [*required*]             | double          | Target value as a percentage (0 to 1).                                                                                                                                                                                                                           |
| Option 3        | type [*required*]               | enum            | Type of the packet loss percentage assertion. Allowed enum values: `packetLossPercentage`                                                                                                                                                                        |
| assertions      | Option 4                             | object          | Jitter assertion for a Network Path test.                                                                                                                                                                                                                        |
| Option 4        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 4        | target [*required*]             | double          | Target value in milliseconds.                                                                                                                                                                                                                                    |
| Option 4        | type [*required*]               | enum            | Type of the jitter assertion. Allowed enum values: `jitter`                                                                                                                                                                                                      |
| config          | request                              | object          | Object describing the request for a Network Path test.                                                                                                                                                                                                           |
| request         | destination_service                  | string          | An optional label displayed for the destination host in the Network Path visualization.                                                                                                                                                                          |
| request         | e2e_queries [*required*]        | int64           | The number of packets sent to probe the destination to measure packet loss, latency and jitter.                                                                                                                                                                  |
| request         | host [*required*]               | string          | Host name to query.                                                                                                                                                                                                                                              |
| request         | max_ttl [*required*]            | int64           | The maximum time-to-live (max number of hops) used in outgoing probe packets.                                                                                                                                                                                    |
| request         | port                                 | int64           | For TCP or UDP tests, the port to use when performing the test. If not set on a UDP test, a random port is assigned, which may affect the results.                                                                                                               |
| request         | source_service                       | string          | An optional label displayed for the source host in the Network Path visualization.                                                                                                                                                                               |
| request         | tcp_method                           | enum            | For TCP tests, the TCP traceroute strategy. Allowed enum values: `prefer_sack,syn,sack`                                                                                                                                                                          |
| request         | timeout                              | int64           | Timeout in seconds.                                                                                                                                                                                                                                              |
| request         | traceroute_queries [*required*] | int64           | The number of traceroute path tracings.                                                                                                                                                                                                                          |
| attributes      | locations [*required*]          | [string]        | Array of locations used to run the test. Network Path tests can be run from managed locations to test public endpoints, or from a [Datadog Agent](https://docs.datadoghq.com/synthetics/network_path_tests.md#agent-configuration) to test private environments. |
| attributes      | message [*required*]            | string          | Notification message associated with the test.                                                                                                                                                                                                                   |
| attributes      | monitor_id                           | int64           | The associated monitor ID.                                                                                                                                                                                                                                       |
| attributes      | name [*required*]               | string          | Name of the test.                                                                                                                                                                                                                                                |
| attributes      | options [*required*]            | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                        |
| options         | min_failure_duration                 | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                  |
| options         | min_location_failed                  | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                             |
| options         | monitor_name                         | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                              |
| options         | monitor_options                      | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                   |
| monitor_options | escalation_message                   | string          | Message to include in the escalation notification.                                                                                                                                                                                                               |
| monitor_options | notification_preset_name             | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                  |
| monitor_options | renotify_interval                    | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                      |
| monitor_options | renotify_occurrences                 | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                    |
| options         | monitor_priority                     | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                      |
| options         | restricted_roles                     | [string]        | **DEPRECATED**: 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.                                                       |
| options         | retry                                | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                               |
| retry           | count                                | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                   |
| retry           | interval                             | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                              |
| options         | scheduling                           | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                          |
| scheduling      | timeframes [*required*]         | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                 |
| timeframes      | day [*required*]                | int32           | Number representing the day of the week.                                                                                                                                                                                                                         |
| timeframes      | from [*required*]               | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                  |
| timeframes      | to [*required*]                 | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                    |
| scheduling      | timezone [*required*]           | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                        |
| options         | tick_every                           | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                   |
| attributes      | public_id                            | string          | The public ID for the test.                                                                                                                                                                                                                                      |
| attributes      | status                               | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                               |
| attributes      | subtype                              | enum            | Subtype of the Synthetic Network Path test: `tcp`, `udp`, or `icmp`. Allowed enum values: `tcp,udp,icmp`                                                                                                                                                         |
| attributes      | tags                                 | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                              |
| attributes      | type [*required*]               | enum            | Type of the Synthetic test, `network`. Allowed enum values: `network`                                                                                                                                                                                            |
| data            | type [*required*]               | enum            | Type of the Synthetic test, `network`. Allowed enum values: `network`                                                                                                                                                                                            |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "config": {
        "assertions": [
          {
            "operator": "lessThan",
            "property": "avg",
            "target": 500,
            "type": "latency"
          }
        ],
        "request": {
          "host": "example.com",
          "port": 443,
          "tcp_method": "prefer_sack",
          "max_ttl": 30,
          "e2e_queries": 50,
          "traceroute_queries": 3
        }
      },
      "locations": [
        "aws:us-east-1",
        "agent:my-agent-name"
      ],
      "message": "Network Path test notification",
      "name": "Example Network Path test",
      "options": {
        "tick_every": 60
      },
      "status": "live",
      "subtype": "tcp",
      "tags": [
        "env:production"
      ],
      "type": "network"
    },
    "type": "network"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Network Path test response.

| Parent field    | Field                                | Type            | Description                                                                                                                                                                                                                                                      |
| --------------- | ------------------------------------ | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                 | data                                 | object          | Network Path test response data.                                                                                                                                                                                                                                 |
| data            | attributes                           | object          | Object containing details about a Network Path test.                                                                                                                                                                                                             |
| attributes      | config [*required*]             | object          | Configuration object for a Network Path test.                                                                                                                                                                                                                    |
| config          | assertions                           | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                           |
| assertions      | Option 1                             | object          | Network latency assertion for a Network Path test.                                                                                                                                                                                                               |
| Option 1        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 1        | property [*required*]           | enum            | The associated assertion property. Allowed enum values: `avg,max,min`                                                                                                                                                                                            |
| Option 1        | target [*required*]             | double          | Target value in milliseconds.                                                                                                                                                                                                                                    |
| Option 1        | type [*required*]               | enum            | Type of the latency assertion. Allowed enum values: `latency`                                                                                                                                                                                                    |
| assertions      | Option 2                             | object          | Multi-network hop assertion for a Network Path test.                                                                                                                                                                                                             |
| Option 2        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 2        | property [*required*]           | enum            | The associated assertion property. Allowed enum values: `avg,max,min`                                                                                                                                                                                            |
| Option 2        | target [*required*]             | double          | Target value in number of hops.                                                                                                                                                                                                                                  |
| Option 2        | type [*required*]               | enum            | Type of the multi-network hop assertion. Allowed enum values: `multiNetworkHop`                                                                                                                                                                                  |
| assertions      | Option 3                             | object          | Packet loss percentage assertion for a Network Path test.                                                                                                                                                                                                        |
| Option 3        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 3        | target [*required*]             | double          | Target value as a percentage (0 to 1).                                                                                                                                                                                                                           |
| Option 3        | type [*required*]               | enum            | Type of the packet loss percentage assertion. Allowed enum values: `packetLossPercentage`                                                                                                                                                                        |
| assertions      | Option 4                             | object          | Jitter assertion for a Network Path test.                                                                                                                                                                                                                        |
| Option 4        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 4        | target [*required*]             | double          | Target value in milliseconds.                                                                                                                                                                                                                                    |
| Option 4        | type [*required*]               | enum            | Type of the jitter assertion. Allowed enum values: `jitter`                                                                                                                                                                                                      |
| config          | request                              | object          | Object describing the request for a Network Path test.                                                                                                                                                                                                           |
| request         | destination_service                  | string          | An optional label displayed for the destination host in the Network Path visualization.                                                                                                                                                                          |
| request         | e2e_queries [*required*]        | int64           | The number of packets sent to probe the destination to measure packet loss, latency and jitter.                                                                                                                                                                  |
| request         | host [*required*]               | string          | Host name to query.                                                                                                                                                                                                                                              |
| request         | max_ttl [*required*]            | int64           | The maximum time-to-live (max number of hops) used in outgoing probe packets.                                                                                                                                                                                    |
| request         | port                                 | int64           | For TCP or UDP tests, the port to use when performing the test. If not set on a UDP test, a random port is assigned, which may affect the results.                                                                                                               |
| request         | source_service                       | string          | An optional label displayed for the source host in the Network Path visualization.                                                                                                                                                                               |
| request         | tcp_method                           | enum            | For TCP tests, the TCP traceroute strategy. Allowed enum values: `prefer_sack,syn,sack`                                                                                                                                                                          |
| request         | timeout                              | int64           | Timeout in seconds.                                                                                                                                                                                                                                              |
| request         | traceroute_queries [*required*] | int64           | The number of traceroute path tracings.                                                                                                                                                                                                                          |
| attributes      | locations [*required*]          | [string]        | Array of locations used to run the test. Network Path tests can be run from managed locations to test public endpoints, or from a [Datadog Agent](https://docs.datadoghq.com/synthetics/network_path_tests.md#agent-configuration) to test private environments. |
| attributes      | message [*required*]            | string          | Notification message associated with the test.                                                                                                                                                                                                                   |
| attributes      | monitor_id                           | int64           | The associated monitor ID.                                                                                                                                                                                                                                       |
| attributes      | name [*required*]               | string          | Name of the test.                                                                                                                                                                                                                                                |
| attributes      | options [*required*]            | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                        |
| options         | min_failure_duration                 | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                  |
| options         | min_location_failed                  | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                             |
| options         | monitor_name                         | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                              |
| options         | monitor_options                      | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                   |
| monitor_options | escalation_message                   | string          | Message to include in the escalation notification.                                                                                                                                                                                                               |
| monitor_options | notification_preset_name             | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                  |
| monitor_options | renotify_interval                    | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                      |
| monitor_options | renotify_occurrences                 | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                    |
| options         | monitor_priority                     | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                      |
| options         | restricted_roles                     | [string]        | **DEPRECATED**: 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.                                                       |
| options         | retry                                | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                               |
| retry           | count                                | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                   |
| retry           | interval                             | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                              |
| options         | scheduling                           | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                          |
| scheduling      | timeframes [*required*]         | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                 |
| timeframes      | day [*required*]                | int32           | Number representing the day of the week.                                                                                                                                                                                                                         |
| timeframes      | from [*required*]               | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                  |
| timeframes      | to [*required*]                 | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                    |
| scheduling      | timezone [*required*]           | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                        |
| options         | tick_every                           | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                   |
| attributes      | public_id                            | string          | The public ID for the test.                                                                                                                                                                                                                                      |
| attributes      | status                               | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                               |
| attributes      | subtype                              | enum            | Subtype of the Synthetic Network Path test: `tcp`, `udp`, or `icmp`. Allowed enum values: `tcp,udp,icmp`                                                                                                                                                         |
| attributes      | tags                                 | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                              |
| attributes      | type [*required*]               | enum            | Type of the Synthetic test, `network`. Allowed enum values: `network`                                                                                                                                                                                            |
| data            | id                                   | string          | The public ID of the Network Path test.                                                                                                                                                                                                                          |
| data            | type                                 | enum            | Type of response, `network_test`. Allowed enum values: `network_test`                                                                                                                                                                                            |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "config": {
        "assertions": [
          {
            "operator": "lessThan",
            "property": "avg",
            "target": 500,
            "type": "latency"
          }
        ],
        "request": {
          "destination_service": "string",
          "e2e_queries": 50,
          "host": "",
          "max_ttl": 30,
          "port": 443,
          "source_service": "string",
          "tcp_method": "prefer_sack",
          "timeout": "integer",
          "traceroute_queries": 3
        }
      },
      "locations": [
        "aws:us-east-1",
        "agent:my-agent-name"
      ],
      "message": "Network Path test notification",
      "monitor_id": 12345678,
      "name": "Example Network Path test",
      "options": {
        "min_failure_duration": "integer",
        "min_location_failed": "integer",
        "monitor_name": "string",
        "monitor_options": {
          "escalation_message": "string",
          "notification_preset_name": "string",
          "renotify_interval": "integer",
          "renotify_occurrences": "integer"
        },
        "monitor_priority": "integer",
        "restricted_roles": [
          "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        ],
        "retry": {
          "count": "integer",
          "interval": "number"
        },
        "scheduling": {
          "timeframes": [
            {
              "day": 1,
              "from": "07:00",
              "to": "16:00"
            }
          ],
          "timezone": "America/New_York"
        },
        "tick_every": "integer"
      },
      "public_id": "abc-def-123",
      "status": "live",
      "subtype": "tcp",
      "tags": [
        "env:production"
      ],
      "type": "network"
    },
    "id": "abc-def-123",
    "type": "network_test"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/network" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "config": {
        "assertions": [
          {
            "operator": "lessThan",
            "property": "avg",
            "target": 500,
            "type": "latency"
          }
        ],
        "request": {
          "e2e_queries": 50,
          "host": "",
          "max_ttl": 30,
          "port": 443,
          "tcp_method": "prefer_sack",
          "traceroute_queries": 3
        }
      },
      "locations": [
        "aws:us-east-1",
        "agent:my-agent-name"
      ],
      "message": "Network Path test notification",
      "monitor_id": 12345678,
      "name": "Example Network Path test",
      "options": {
        "monitor_options": {
          "notification_preset_name": "show_all"
        },
        "scheduling": {
          "timeframes": [
            {
              "day": 1,
              "from": "07:00",
              "to": "16:00"
            },
            {
              "day": 3,
              "from": "07:00",
              "to": "16:00"
            }
          ],
          "timezone": "America/New_York"
        }
      },
      "public_id": "abc-def-123",
      "status": "live",
      "subtype": "tcp",
      "tags": [
        "env:production"
      ],
      "type": "network"
    },
    "type": "network"
  }
}
EOF
                        
{% /tab %}

## Get a Network Path test{% #get-a-network-path-test %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                  |
| ----------------- | ----------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/tests/network/{public_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/tests/network/{public_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/tests/network/{public_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/tests/network/{public_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/tests/network/{public_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/tests/network/{public_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/tests/network/{public_id} |

### Overview

This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                                 |
| --------------------------- | ------ | ----------------------------------------------------------- |
| public_id [*required*] | string | The public ID of the Network Path test to get details from. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Network Path test response.

| Parent field    | Field                                | Type            | Description                                                                                                                                                                                                                                                      |
| --------------- | ------------------------------------ | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                 | data                                 | object          | Network Path test response data.                                                                                                                                                                                                                                 |
| data            | attributes                           | object          | Object containing details about a Network Path test.                                                                                                                                                                                                             |
| attributes      | config [*required*]             | object          | Configuration object for a Network Path test.                                                                                                                                                                                                                    |
| config          | assertions                           | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                           |
| assertions      | Option 1                             | object          | Network latency assertion for a Network Path test.                                                                                                                                                                                                               |
| Option 1        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 1        | property [*required*]           | enum            | The associated assertion property. Allowed enum values: `avg,max,min`                                                                                                                                                                                            |
| Option 1        | target [*required*]             | double          | Target value in milliseconds.                                                                                                                                                                                                                                    |
| Option 1        | type [*required*]               | enum            | Type of the latency assertion. Allowed enum values: `latency`                                                                                                                                                                                                    |
| assertions      | Option 2                             | object          | Multi-network hop assertion for a Network Path test.                                                                                                                                                                                                             |
| Option 2        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 2        | property [*required*]           | enum            | The associated assertion property. Allowed enum values: `avg,max,min`                                                                                                                                                                                            |
| Option 2        | target [*required*]             | double          | Target value in number of hops.                                                                                                                                                                                                                                  |
| Option 2        | type [*required*]               | enum            | Type of the multi-network hop assertion. Allowed enum values: `multiNetworkHop`                                                                                                                                                                                  |
| assertions      | Option 3                             | object          | Packet loss percentage assertion for a Network Path test.                                                                                                                                                                                                        |
| Option 3        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 3        | target [*required*]             | double          | Target value as a percentage (0 to 1).                                                                                                                                                                                                                           |
| Option 3        | type [*required*]               | enum            | Type of the packet loss percentage assertion. Allowed enum values: `packetLossPercentage`                                                                                                                                                                        |
| assertions      | Option 4                             | object          | Jitter assertion for a Network Path test.                                                                                                                                                                                                                        |
| Option 4        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 4        | target [*required*]             | double          | Target value in milliseconds.                                                                                                                                                                                                                                    |
| Option 4        | type [*required*]               | enum            | Type of the jitter assertion. Allowed enum values: `jitter`                                                                                                                                                                                                      |
| config          | request                              | object          | Object describing the request for a Network Path test.                                                                                                                                                                                                           |
| request         | destination_service                  | string          | An optional label displayed for the destination host in the Network Path visualization.                                                                                                                                                                          |
| request         | e2e_queries [*required*]        | int64           | The number of packets sent to probe the destination to measure packet loss, latency and jitter.                                                                                                                                                                  |
| request         | host [*required*]               | string          | Host name to query.                                                                                                                                                                                                                                              |
| request         | max_ttl [*required*]            | int64           | The maximum time-to-live (max number of hops) used in outgoing probe packets.                                                                                                                                                                                    |
| request         | port                                 | int64           | For TCP or UDP tests, the port to use when performing the test. If not set on a UDP test, a random port is assigned, which may affect the results.                                                                                                               |
| request         | source_service                       | string          | An optional label displayed for the source host in the Network Path visualization.                                                                                                                                                                               |
| request         | tcp_method                           | enum            | For TCP tests, the TCP traceroute strategy. Allowed enum values: `prefer_sack,syn,sack`                                                                                                                                                                          |
| request         | timeout                              | int64           | Timeout in seconds.                                                                                                                                                                                                                                              |
| request         | traceroute_queries [*required*] | int64           | The number of traceroute path tracings.                                                                                                                                                                                                                          |
| attributes      | locations [*required*]          | [string]        | Array of locations used to run the test. Network Path tests can be run from managed locations to test public endpoints, or from a [Datadog Agent](https://docs.datadoghq.com/synthetics/network_path_tests.md#agent-configuration) to test private environments. |
| attributes      | message [*required*]            | string          | Notification message associated with the test.                                                                                                                                                                                                                   |
| attributes      | monitor_id                           | int64           | The associated monitor ID.                                                                                                                                                                                                                                       |
| attributes      | name [*required*]               | string          | Name of the test.                                                                                                                                                                                                                                                |
| attributes      | options [*required*]            | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                        |
| options         | min_failure_duration                 | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                  |
| options         | min_location_failed                  | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                             |
| options         | monitor_name                         | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                              |
| options         | monitor_options                      | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                   |
| monitor_options | escalation_message                   | string          | Message to include in the escalation notification.                                                                                                                                                                                                               |
| monitor_options | notification_preset_name             | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                  |
| monitor_options | renotify_interval                    | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                      |
| monitor_options | renotify_occurrences                 | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                    |
| options         | monitor_priority                     | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                      |
| options         | restricted_roles                     | [string]        | **DEPRECATED**: 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.                                                       |
| options         | retry                                | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                               |
| retry           | count                                | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                   |
| retry           | interval                             | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                              |
| options         | scheduling                           | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                          |
| scheduling      | timeframes [*required*]         | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                 |
| timeframes      | day [*required*]                | int32           | Number representing the day of the week.                                                                                                                                                                                                                         |
| timeframes      | from [*required*]               | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                  |
| timeframes      | to [*required*]                 | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                    |
| scheduling      | timezone [*required*]           | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                        |
| options         | tick_every                           | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                   |
| attributes      | public_id                            | string          | The public ID for the test.                                                                                                                                                                                                                                      |
| attributes      | status                               | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                               |
| attributes      | subtype                              | enum            | Subtype of the Synthetic Network Path test: `tcp`, `udp`, or `icmp`. Allowed enum values: `tcp,udp,icmp`                                                                                                                                                         |
| attributes      | tags                                 | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                              |
| attributes      | type [*required*]               | enum            | Type of the Synthetic test, `network`. Allowed enum values: `network`                                                                                                                                                                                            |
| data            | id                                   | string          | The public ID of the Network Path test.                                                                                                                                                                                                                          |
| data            | type                                 | enum            | Type of response, `network_test`. Allowed enum values: `network_test`                                                                                                                                                                                            |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "config": {
        "assertions": [
          {
            "operator": "lessThan",
            "property": "avg",
            "target": 500,
            "type": "latency"
          }
        ],
        "request": {
          "destination_service": "string",
          "e2e_queries": 50,
          "host": "",
          "max_ttl": 30,
          "port": 443,
          "source_service": "string",
          "tcp_method": "prefer_sack",
          "timeout": "integer",
          "traceroute_queries": 3
        }
      },
      "locations": [
        "aws:us-east-1",
        "agent:my-agent-name"
      ],
      "message": "Network Path test notification",
      "monitor_id": 12345678,
      "name": "Example Network Path test",
      "options": {
        "min_failure_duration": "integer",
        "min_location_failed": "integer",
        "monitor_name": "string",
        "monitor_options": {
          "escalation_message": "string",
          "notification_preset_name": "string",
          "renotify_interval": "integer",
          "renotify_occurrences": "integer"
        },
        "monitor_priority": "integer",
        "restricted_roles": [
          "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        ],
        "retry": {
          "count": "integer",
          "interval": "number"
        },
        "scheduling": {
          "timeframes": [
            {
              "day": 1,
              "from": "07:00",
              "to": "16:00"
            }
          ],
          "timezone": "America/New_York"
        },
        "tick_every": "integer"
      },
      "public_id": "abc-def-123",
      "status": "live",
      "subtype": "tcp",
      "tags": [
        "env:production"
      ],
      "type": "network"
    },
    "id": "abc-def-123",
    "type": "network_test"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/network/${public_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Edit a Network Path test{% #edit-a-network-path-test %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                  |
| ----------------- | ----------------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v2/synthetics/tests/network/{public_id} |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v2/synthetics/tests/network/{public_id} |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v2/synthetics/tests/network/{public_id}      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v2/synthetics/tests/network/{public_id}      |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v2/synthetics/tests/network/{public_id}     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v2/synthetics/tests/network/{public_id} |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v2/synthetics/tests/network/{public_id} |

### Overview

This endpoint requires any of the following permissions:
`synthetics_write``synthetics_create_edit_trigger`


OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                     |
| --------------------------- | ------ | ----------------------------------------------- |
| public_id [*required*] | string | The public ID of the Network Path test to edit. |

### Request

#### Body Data (required)

New Network Path test details to be saved.

{% tab title="Model" %}

| Parent field    | Field                                | Type            | Description                                                                                                                                                                                                                                                      |
| --------------- | ------------------------------------ | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                 | data [*required*]               | object          | Data object for creating or editing a Network Path test.                                                                                                                                                                                                         |
| data            | attributes [*required*]         | object          | Object containing details about a Network Path test.                                                                                                                                                                                                             |
| attributes      | config [*required*]             | object          | Configuration object for a Network Path test.                                                                                                                                                                                                                    |
| config          | assertions                           | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                           |
| assertions      | Option 1                             | object          | Network latency assertion for a Network Path test.                                                                                                                                                                                                               |
| Option 1        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 1        | property [*required*]           | enum            | The associated assertion property. Allowed enum values: `avg,max,min`                                                                                                                                                                                            |
| Option 1        | target [*required*]             | double          | Target value in milliseconds.                                                                                                                                                                                                                                    |
| Option 1        | type [*required*]               | enum            | Type of the latency assertion. Allowed enum values: `latency`                                                                                                                                                                                                    |
| assertions      | Option 2                             | object          | Multi-network hop assertion for a Network Path test.                                                                                                                                                                                                             |
| Option 2        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 2        | property [*required*]           | enum            | The associated assertion property. Allowed enum values: `avg,max,min`                                                                                                                                                                                            |
| Option 2        | target [*required*]             | double          | Target value in number of hops.                                                                                                                                                                                                                                  |
| Option 2        | type [*required*]               | enum            | Type of the multi-network hop assertion. Allowed enum values: `multiNetworkHop`                                                                                                                                                                                  |
| assertions      | Option 3                             | object          | Packet loss percentage assertion for a Network Path test.                                                                                                                                                                                                        |
| Option 3        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 3        | target [*required*]             | double          | Target value as a percentage (0 to 1).                                                                                                                                                                                                                           |
| Option 3        | type [*required*]               | enum            | Type of the packet loss percentage assertion. Allowed enum values: `packetLossPercentage`                                                                                                                                                                        |
| assertions      | Option 4                             | object          | Jitter assertion for a Network Path test.                                                                                                                                                                                                                        |
| Option 4        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 4        | target [*required*]             | double          | Target value in milliseconds.                                                                                                                                                                                                                                    |
| Option 4        | type [*required*]               | enum            | Type of the jitter assertion. Allowed enum values: `jitter`                                                                                                                                                                                                      |
| config          | request                              | object          | Object describing the request for a Network Path test.                                                                                                                                                                                                           |
| request         | destination_service                  | string          | An optional label displayed for the destination host in the Network Path visualization.                                                                                                                                                                          |
| request         | e2e_queries [*required*]        | int64           | The number of packets sent to probe the destination to measure packet loss, latency and jitter.                                                                                                                                                                  |
| request         | host [*required*]               | string          | Host name to query.                                                                                                                                                                                                                                              |
| request         | max_ttl [*required*]            | int64           | The maximum time-to-live (max number of hops) used in outgoing probe packets.                                                                                                                                                                                    |
| request         | port                                 | int64           | For TCP or UDP tests, the port to use when performing the test. If not set on a UDP test, a random port is assigned, which may affect the results.                                                                                                               |
| request         | source_service                       | string          | An optional label displayed for the source host in the Network Path visualization.                                                                                                                                                                               |
| request         | tcp_method                           | enum            | For TCP tests, the TCP traceroute strategy. Allowed enum values: `prefer_sack,syn,sack`                                                                                                                                                                          |
| request         | timeout                              | int64           | Timeout in seconds.                                                                                                                                                                                                                                              |
| request         | traceroute_queries [*required*] | int64           | The number of traceroute path tracings.                                                                                                                                                                                                                          |
| attributes      | locations [*required*]          | [string]        | Array of locations used to run the test. Network Path tests can be run from managed locations to test public endpoints, or from a [Datadog Agent](https://docs.datadoghq.com/synthetics/network_path_tests.md#agent-configuration) to test private environments. |
| attributes      | message [*required*]            | string          | Notification message associated with the test.                                                                                                                                                                                                                   |
| attributes      | monitor_id                           | int64           | The associated monitor ID.                                                                                                                                                                                                                                       |
| attributes      | name [*required*]               | string          | Name of the test.                                                                                                                                                                                                                                                |
| attributes      | options [*required*]            | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                        |
| options         | min_failure_duration                 | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                  |
| options         | min_location_failed                  | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                             |
| options         | monitor_name                         | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                              |
| options         | monitor_options                      | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                   |
| monitor_options | escalation_message                   | string          | Message to include in the escalation notification.                                                                                                                                                                                                               |
| monitor_options | notification_preset_name             | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                  |
| monitor_options | renotify_interval                    | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                      |
| monitor_options | renotify_occurrences                 | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                    |
| options         | monitor_priority                     | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                      |
| options         | restricted_roles                     | [string]        | **DEPRECATED**: 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.                                                       |
| options         | retry                                | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                               |
| retry           | count                                | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                   |
| retry           | interval                             | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                              |
| options         | scheduling                           | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                          |
| scheduling      | timeframes [*required*]         | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                 |
| timeframes      | day [*required*]                | int32           | Number representing the day of the week.                                                                                                                                                                                                                         |
| timeframes      | from [*required*]               | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                  |
| timeframes      | to [*required*]                 | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                    |
| scheduling      | timezone [*required*]           | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                        |
| options         | tick_every                           | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                   |
| attributes      | public_id                            | string          | The public ID for the test.                                                                                                                                                                                                                                      |
| attributes      | status                               | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                               |
| attributes      | subtype                              | enum            | Subtype of the Synthetic Network Path test: `tcp`, `udp`, or `icmp`. Allowed enum values: `tcp,udp,icmp`                                                                                                                                                         |
| attributes      | tags                                 | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                              |
| attributes      | type [*required*]               | enum            | Type of the Synthetic test, `network`. Allowed enum values: `network`                                                                                                                                                                                            |
| data            | type [*required*]               | enum            | Type of the Synthetic test, `network`. Allowed enum values: `network`                                                                                                                                                                                            |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "config": {
        "assertions": [
          {
            "operator": "lessThan",
            "property": "avg",
            "target": 500,
            "type": "latency"
          }
        ],
        "request": {
          "destination_service": "string",
          "e2e_queries": 50,
          "host": "",
          "max_ttl": 30,
          "port": 443,
          "source_service": "string",
          "tcp_method": "prefer_sack",
          "timeout": "integer",
          "traceroute_queries": 3
        }
      },
      "locations": [
        "aws:us-east-1",
        "agent:my-agent-name"
      ],
      "message": "Network Path test notification",
      "name": "Example Network Path test",
      "options": {
        "min_failure_duration": "integer",
        "min_location_failed": "integer",
        "monitor_name": "string",
        "monitor_options": {
          "escalation_message": "string",
          "notification_preset_name": "string",
          "renotify_interval": "integer",
          "renotify_occurrences": "integer"
        },
        "monitor_priority": "integer",
        "restricted_roles": [
          "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        ],
        "retry": {
          "count": "integer",
          "interval": "number"
        },
        "scheduling": {
          "timeframes": [
            {
              "day": 1,
              "from": "07:00",
              "to": "16:00"
            }
          ],
          "timezone": "America/New_York"
        },
        "tick_every": "integer"
      },
      "status": "live",
      "subtype": "tcp",
      "tags": [
        "env:production"
      ],
      "type": "network"
    },
    "type": "network"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Network Path test response.

| Parent field    | Field                                | Type            | Description                                                                                                                                                                                                                                                      |
| --------------- | ------------------------------------ | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                 | data                                 | object          | Network Path test response data.                                                                                                                                                                                                                                 |
| data            | attributes                           | object          | Object containing details about a Network Path test.                                                                                                                                                                                                             |
| attributes      | config [*required*]             | object          | Configuration object for a Network Path test.                                                                                                                                                                                                                    |
| config          | assertions                           | [ <oneOf>] | Array of assertions used for the test.                                                                                                                                                                                                                           |
| assertions      | Option 1                             | object          | Network latency assertion for a Network Path test.                                                                                                                                                                                                               |
| Option 1        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 1        | property [*required*]           | enum            | The associated assertion property. Allowed enum values: `avg,max,min`                                                                                                                                                                                            |
| Option 1        | target [*required*]             | double          | Target value in milliseconds.                                                                                                                                                                                                                                    |
| Option 1        | type [*required*]               | enum            | Type of the latency assertion. Allowed enum values: `latency`                                                                                                                                                                                                    |
| assertions      | Option 2                             | object          | Multi-network hop assertion for a Network Path test.                                                                                                                                                                                                             |
| Option 2        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 2        | property [*required*]           | enum            | The associated assertion property. Allowed enum values: `avg,max,min`                                                                                                                                                                                            |
| Option 2        | target [*required*]             | double          | Target value in number of hops.                                                                                                                                                                                                                                  |
| Option 2        | type [*required*]               | enum            | Type of the multi-network hop assertion. Allowed enum values: `multiNetworkHop`                                                                                                                                                                                  |
| assertions      | Option 3                             | object          | Packet loss percentage assertion for a Network Path test.                                                                                                                                                                                                        |
| Option 3        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 3        | target [*required*]             | double          | Target value as a percentage (0 to 1).                                                                                                                                                                                                                           |
| Option 3        | type [*required*]               | enum            | Type of the packet loss percentage assertion. Allowed enum values: `packetLossPercentage`                                                                                                                                                                        |
| assertions      | Option 4                             | object          | Jitter assertion for a Network Path test.                                                                                                                                                                                                                        |
| Option 4        | operator [*required*]           | enum            | Assertion operator to apply. Allowed enum values: `is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual`                                                                                                                                                   |
| Option 4        | target [*required*]             | double          | Target value in milliseconds.                                                                                                                                                                                                                                    |
| Option 4        | type [*required*]               | enum            | Type of the jitter assertion. Allowed enum values: `jitter`                                                                                                                                                                                                      |
| config          | request                              | object          | Object describing the request for a Network Path test.                                                                                                                                                                                                           |
| request         | destination_service                  | string          | An optional label displayed for the destination host in the Network Path visualization.                                                                                                                                                                          |
| request         | e2e_queries [*required*]        | int64           | The number of packets sent to probe the destination to measure packet loss, latency and jitter.                                                                                                                                                                  |
| request         | host [*required*]               | string          | Host name to query.                                                                                                                                                                                                                                              |
| request         | max_ttl [*required*]            | int64           | The maximum time-to-live (max number of hops) used in outgoing probe packets.                                                                                                                                                                                    |
| request         | port                                 | int64           | For TCP or UDP tests, the port to use when performing the test. If not set on a UDP test, a random port is assigned, which may affect the results.                                                                                                               |
| request         | source_service                       | string          | An optional label displayed for the source host in the Network Path visualization.                                                                                                                                                                               |
| request         | tcp_method                           | enum            | For TCP tests, the TCP traceroute strategy. Allowed enum values: `prefer_sack,syn,sack`                                                                                                                                                                          |
| request         | timeout                              | int64           | Timeout in seconds.                                                                                                                                                                                                                                              |
| request         | traceroute_queries [*required*] | int64           | The number of traceroute path tracings.                                                                                                                                                                                                                          |
| attributes      | locations [*required*]          | [string]        | Array of locations used to run the test. Network Path tests can be run from managed locations to test public endpoints, or from a [Datadog Agent](https://docs.datadoghq.com/synthetics/network_path_tests.md#agent-configuration) to test private environments. |
| attributes      | message [*required*]            | string          | Notification message associated with the test.                                                                                                                                                                                                                   |
| attributes      | monitor_id                           | int64           | The associated monitor ID.                                                                                                                                                                                                                                       |
| attributes      | name [*required*]               | string          | Name of the test.                                                                                                                                                                                                                                                |
| attributes      | options [*required*]            | object          | Object describing the extra options for a Synthetic test.                                                                                                                                                                                                        |
| options         | min_failure_duration                 | int64           | Minimum amount of time in failure required to trigger an alert.                                                                                                                                                                                                  |
| options         | min_location_failed                  | int64           | Minimum number of locations in failure required to trigger an alert.                                                                                                                                                                                             |
| options         | monitor_name                         | string          | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.                                                                                                                                                              |
| options         | monitor_options                      | object          | Object containing the options for a Synthetic test as a monitor (for example, renotification).                                                                                                                                                                   |
| monitor_options | escalation_message                   | string          | Message to include in the escalation notification.                                                                                                                                                                                                               |
| monitor_options | notification_preset_name             | enum            | The name of the preset for the notification for the monitor. Allowed enum values: `show_all,hide_all,hide_query,hide_handles,hide_query_and_handles,show_only_snapshot,hide_handles_and_footer`                                                                  |
| monitor_options | renotify_interval                    | int64           | Time interval before renotifying if the test is still failing (in minutes).                                                                                                                                                                                      |
| monitor_options | renotify_occurrences                 | int64           | The number of times to renotify if the test is still failing.                                                                                                                                                                                                    |
| options         | monitor_priority                     | int32           | Integer from 1 (high) to 5 (low) indicating alert severity.                                                                                                                                                                                                      |
| options         | restricted_roles                     | [string]        | **DEPRECATED**: 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.                                                       |
| options         | retry                                | object          | Object describing the retry strategy to apply to a Synthetic test.                                                                                                                                                                                               |
| retry           | count                                | int64           | Number of times a test needs to be retried before marking a location as failed. Defaults to 0.                                                                                                                                                                   |
| retry           | interval                             | double          | Time interval between retries (in milliseconds). Defaults to 300ms.                                                                                                                                                                                              |
| options         | scheduling                           | object          | Object containing timeframes and timezone used for advanced scheduling.                                                                                                                                                                                          |
| scheduling      | timeframes [*required*]         | [object]        | Array containing objects describing the scheduling pattern to apply to each day.                                                                                                                                                                                 |
| timeframes      | day [*required*]                | int32           | Number representing the day of the week.                                                                                                                                                                                                                         |
| timeframes      | from [*required*]               | string          | The hour of the day on which scheduling starts.                                                                                                                                                                                                                  |
| timeframes      | to [*required*]                 | string          | The hour of the day on which scheduling ends.                                                                                                                                                                                                                    |
| scheduling      | timezone [*required*]           | string          | Timezone in which the timeframe is based.                                                                                                                                                                                                                        |
| options         | tick_every                           | int64           | The frequency at which to run the Synthetic test (in seconds).                                                                                                                                                                                                   |
| attributes      | public_id                            | string          | The public ID for the test.                                                                                                                                                                                                                                      |
| attributes      | status                               | enum            | Define whether you want to start (`live`) or pause (`paused`) a Synthetic test. Allowed enum values: `live,paused`                                                                                                                                               |
| attributes      | subtype                              | enum            | Subtype of the Synthetic Network Path test: `tcp`, `udp`, or `icmp`. Allowed enum values: `tcp,udp,icmp`                                                                                                                                                         |
| attributes      | tags                                 | [string]        | Array of tags attached to the test.                                                                                                                                                                                                                              |
| attributes      | type [*required*]               | enum            | Type of the Synthetic test, `network`. Allowed enum values: `network`                                                                                                                                                                                            |
| data            | id                                   | string          | The public ID of the Network Path test.                                                                                                                                                                                                                          |
| data            | type                                 | enum            | Type of response, `network_test`. Allowed enum values: `network_test`                                                                                                                                                                                            |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "config": {
        "assertions": [
          {
            "operator": "lessThan",
            "property": "avg",
            "target": 500,
            "type": "latency"
          }
        ],
        "request": {
          "destination_service": "string",
          "e2e_queries": 50,
          "host": "",
          "max_ttl": 30,
          "port": 443,
          "source_service": "string",
          "tcp_method": "prefer_sack",
          "timeout": "integer",
          "traceroute_queries": 3
        }
      },
      "locations": [
        "aws:us-east-1",
        "agent:my-agent-name"
      ],
      "message": "Network Path test notification",
      "monitor_id": 12345678,
      "name": "Example Network Path test",
      "options": {
        "min_failure_duration": "integer",
        "min_location_failed": "integer",
        "monitor_name": "string",
        "monitor_options": {
          "escalation_message": "string",
          "notification_preset_name": "string",
          "renotify_interval": "integer",
          "renotify_occurrences": "integer"
        },
        "monitor_priority": "integer",
        "restricted_roles": [
          "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        ],
        "retry": {
          "count": "integer",
          "interval": "number"
        },
        "scheduling": {
          "timeframes": [
            {
              "day": 1,
              "from": "07:00",
              "to": "16:00"
            }
          ],
          "timezone": "America/New_York"
        },
        "tick_every": "integer"
      },
      "public_id": "abc-def-123",
      "status": "live",
      "subtype": "tcp",
      "tags": [
        "env:production"
      ],
      "type": "network"
    },
    "id": "abc-def-123",
    "type": "network_test"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X PUT "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/network/${public_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "config": {
        "assertions": [
          {
            "operator": "lessThan",
            "property": "avg",
            "target": 500,
            "type": "latency"
          }
        ],
        "request": {
          "e2e_queries": 50,
          "host": "",
          "max_ttl": 30,
          "port": 443,
          "tcp_method": "prefer_sack",
          "traceroute_queries": 3
        }
      },
      "locations": [
        "aws:us-east-1",
        "agent:my-agent-name"
      ],
      "message": "Network Path test notification",
      "monitor_id": 12345678,
      "name": "Example Network Path test",
      "options": {
        "monitor_options": {
          "notification_preset_name": "show_all"
        },
        "scheduling": {
          "timeframes": [
            {
              "day": 1,
              "from": "07:00",
              "to": "16:00"
            },
            {
              "day": 3,
              "from": "07:00",
              "to": "16:00"
            }
          ],
          "timezone": "America/New_York"
        }
      },
      "public_id": "abc-def-123",
      "status": "live",
      "subtype": "tcp",
      "tags": [
        "env:production"
      ],
      "type": "network"
    },
    "type": "network"
  }
}
EOF
                
{% /tab %}

## Bulk delete tests{% #bulk-delete-tests %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                           |
| ----------------- | ---------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/synthetics/tests/bulk-delete |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/synthetics/tests/bulk-delete |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/synthetics/tests/bulk-delete      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/synthetics/tests/bulk-delete      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/synthetics/tests/bulk-delete     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/synthetics/tests/bulk-delete |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/synthetics/tests/bulk-delete |

### Overview

This endpoint requires the `synthetics_write` permission.

OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                        | Type     | Description                                                                                                           |
| ------------ | ---------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]       | object   | Data object for a bulk delete Synthetic tests request.                                                                |
| data         | attributes [*required*] | object   | Attributes for a bulk delete Synthetic tests request.                                                                 |
| attributes   | force_delete_dependencies    | boolean  | Whether to force deletion of tests that have dependent resources.                                                     |
| attributes   | public_ids [*required*] | [string] | List of public IDs of the Synthetic tests to delete.                                                                  |
| data         | id                           | string   | An optional identifier for the delete request.                                                                        |
| data         | type                         | enum     | Type for the bulk delete Synthetic tests request, `delete_tests_request`. Allowed enum values: `delete_tests_request` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "force_delete_dependencies": false,
      "public_ids": [
        "abc-def-123"
      ]
    },
    "id": "string",
    "type": "delete_tests_request"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing the list of deleted Synthetic tests.

| Parent field | Field      | Type     | Description                                                                                            |
| ------------ | ---------- | -------- | ------------------------------------------------------------------------------------------------------ |
|              | data       | [object] | List of deleted Synthetic test data objects.                                                           |
| data         | attributes | object   | Attributes of a deleted Synthetic test, including deletion timestamp and public ID.                    |
| attributes   | deleted_at | string   | Deletion timestamp of the Synthetic test ID.                                                           |
| attributes   | public_id  | string   | The Synthetic test ID deleted.                                                                         |
| data         | id         | string   | The public ID of the deleted Synthetic test.                                                           |
| data         | type       | enum     | Type for the bulk delete Synthetic tests response, `delete_tests`. Allowed enum values: `delete_tests` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "deleted_at": "string",
        "public_id": "string"
      },
      "id": "string",
      "type": "delete_tests"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/bulk-delete" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "public_ids": [
        "abc-def-123",
        "xyz-uvw-456"
      ]
    },
    "type": "delete_tests_request"
  }
}
EOF
                
{% /tab %}

## Patch a global variable{% #patch-a-global-variable %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                            |
| ----------------- | --------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/synthetics/variables/{variable_id}/jsonpatch |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/synthetics/variables/{variable_id}/jsonpatch |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/synthetics/variables/{variable_id}/jsonpatch      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/synthetics/variables/{variable_id}/jsonpatch      |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/synthetics/variables/{variable_id}/jsonpatch     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/synthetics/variables/{variable_id}/jsonpatch |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/synthetics/variables/{variable_id}/jsonpatch |

### Overview



Patch a global variable using JSON Patch (RFC 6902). This endpoint allows partial updates to a global variable by specifying only the fields to modify.

Common operations include:

- Replace field values: `{"op": "replace", "path": "/name", "value": "new_name"}`
- Update nested values: `{"op": "replace", "path": "/value/value", "value": "new_value"}`
- Add/update tags: `{"op": "add", "path": "/tags/-", "value": "new_tag"}`
- Remove fields: `{"op": "remove", "path": "/description"}`
This endpoint requires the `synthetics_global_variable_write` permission.


### Arguments

#### Path Parameters

| Name                          | Type   | Description                    |
| ----------------------------- | ------ | ------------------------------ |
| variable_id [*required*] | string | The ID of the global variable. |

### Request

#### Body Data (required)

JSON Patch document with operations to apply.

{% tab title="Model" %}

| Parent field | Field                  | Type     | Description                                                                             |
| ------------ | ---------------------- | -------- | --------------------------------------------------------------------------------------- |
|              | data [*required*] | object   | Data object for a JSON Patch request on a Synthetic global variable.                    |
| data         | attributes             | object   | Attributes for a JSON Patch request on a Synthetic global variable.                     |
| attributes   | json_patch             | [object] | JSON Patch operations following RFC 6902.                                               |
| json_patch   | op [*required*]   | enum     | The operation to perform. Allowed enum values: `add,remove,replace,move,copy,test`      |
| json_patch   | path [*required*] | string   | A JSON Pointer path (e.g., "/name", "/value/secure").                                   |
| json_patch   | value                  |          | The value to use for the operation (not applicable for "remove" and "test" operations). |
| data         | type                   | enum     | Global variable JSON Patch type. Allowed enum values: `global_variables_json_patch`     |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name",
          "value": "undefined"
        }
      ]
    },
    "type": "string"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Global variable response.

| Parent field       | Field                         | Type     | Description                                                                                                                                                                                                |
| ------------------ | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                    | data                          | object   | Synthetics global variable data. Wrapper around the global variable object.                                                                                                                                |
| data               | attributes                    | object   | Synthetic global variable.                                                                                                                                                                                 |
| attributes         | attributes                    | object   | Attributes of the global variable.                                                                                                                                                                         |
| attributes         | restricted_roles              | [string] | **DEPRECATED**: 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. |
| attributes         | description [*required*] | string   | Description of the global variable.                                                                                                                                                                        |
| attributes         | id                            | string   | Unique identifier of the global variable.                                                                                                                                                                  |
| attributes         | is_fido                       | boolean  | Determines if the global variable is a FIDO variable.                                                                                                                                                      |
| attributes         | is_totp                       | boolean  | Determines if the global variable is a TOTP/MFA variable.                                                                                                                                                  |
| attributes         | name [*required*]        | string   | Name of the global variable. Unique across Synthetic global variables.                                                                                                                                     |
| attributes         | 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_options | field                         | string   | When type is `http_header`, name of the header to use to extract the value.                                                                                                                                |
| parse_test_options | localVariableName             | string   | When type is `local_variable`, name of the local variable to use to extract the value.                                                                                                                     |
| parse_test_options | parser                        | object   | Details of the parser to use for the global variable.                                                                                                                                                      |
| parser             | type [*required*]        | enum     | Type of parser for a Synthetic global variable from a synthetics test. Allowed enum values: `raw,json_path,regex,x_path`                                                                                   |
| parser             | value                         | string   | Regex or JSON path used for the parser. Not used with type `raw`.                                                                                                                                          |
| parse_test_options | type [*required*]        | enum     | Type of value to extract from a test for a Synthetic global variable. Allowed enum values: `http_body,http_header,http_status_code,local_variable`                                                         |
| attributes         | parse_test_public_id          | string   | A Synthetic test ID to use as a test to generate the variable value.                                                                                                                                       |
| attributes         | tags [*required*]        | [string] | Tags of the global variable.                                                                                                                                                                               |
| attributes         | value [*required*]       | object   | Value of the global variable.                                                                                                                                                                              |
| value              | options                       | object   | Options for the Global Variable for MFA.                                                                                                                                                                   |
| options            | totp_parameters               | object   | Parameters for the TOTP/MFA variable                                                                                                                                                                       |
| totp_parameters    | digits                        | int32    | Number of digits for the OTP code.                                                                                                                                                                         |
| totp_parameters    | refresh_interval              | int32    | Interval for which to refresh the token (in seconds).                                                                                                                                                      |
| value              | secure                        | boolean  | Determines if the value of the variable is hidden.                                                                                                                                                         |
| value              | value                         | string   | Value of the global variable. When reading a global variable, the value will not be present if the variable is hidden with the `secure` property.                                                          |
| data               | id                            | string   | Global variable identifier.                                                                                                                                                                                |
| data               | type                          | enum     | Global variable type. Allowed enum values: `global_variables`                                                                                                                                              |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "attributes": {
        "restricted_roles": [
          "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        ]
      },
      "description": "Example description",
      "id": "string",
      "is_fido": false,
      "is_totp": false,
      "name": "MY_VARIABLE",
      "parse_test_options": {
        "field": "content-type",
        "localVariableName": "LOCAL_VARIABLE",
        "parser": {
          "type": "raw",
          "value": "string"
        },
        "type": "http_body"
      },
      "parse_test_public_id": "abc-def-123",
      "tags": [
        "team:front",
        "test:workflow-1"
      ],
      "value": {
        "options": {
          "totp_parameters": {
            "digits": 6,
            "refresh_interval": 30
          }
        },
        "secure": false,
        "value": "example-value"
      }
    },
    "id": "string",
    "type": "string"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport variable_id="CHANGE_ME"\# Curl commandcurl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/variables/${variable_id}/jsonpatch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name"
        }
      ]
    },
    "type": "global_variables_json_patch"
  }
}
EOF
                
##### 

```python
"""
Patch a global variable returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.synthetics_api import SyntheticsApi
from datadog_api_client.v2.model.global_variable_json_patch_request import GlobalVariableJsonPatchRequest
from datadog_api_client.v2.model.global_variable_json_patch_request_data import GlobalVariableJsonPatchRequestData
from datadog_api_client.v2.model.global_variable_json_patch_request_data_attributes import (
    GlobalVariableJsonPatchRequestDataAttributes,
)
from datadog_api_client.v2.model.global_variable_json_patch_type import GlobalVariableJsonPatchType
from datadog_api_client.v2.model.json_patch_operation import JsonPatchOperation
from datadog_api_client.v2.model.json_patch_operation_op import JsonPatchOperationOp

body = GlobalVariableJsonPatchRequest(
    data=GlobalVariableJsonPatchRequestData(
        attributes=GlobalVariableJsonPatchRequestDataAttributes(
            json_patch=[
                JsonPatchOperation(
                    op=JsonPatchOperationOp.ADD,
                    path="/name",
                ),
            ],
        ),
        type=GlobalVariableJsonPatchType.GLOBAL_VARIABLES_JSON_PATCH,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = SyntheticsApi(api_client)
    response = api_instance.patch_global_variable(variable_id="variable_id", body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
##### 

```ruby
# Patch a global variable returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new

body = DatadogAPIClient::V2::GlobalVariableJsonPatchRequest.new({
  data: DatadogAPIClient::V2::GlobalVariableJsonPatchRequestData.new({
    attributes: DatadogAPIClient::V2::GlobalVariableJsonPatchRequestDataAttributes.new({
      json_patch: [
        DatadogAPIClient::V2::JsonPatchOperation.new({
          op: DatadogAPIClient::V2::JsonPatchOperationOp::ADD,
          path: "/name",
        }),
      ],
    }),
    type: DatadogAPIClient::V2::GlobalVariableJsonPatchType::GLOBAL_VARIABLES_JSON_PATCH,
  }),
})
p api_instance.patch_global_variable("variable_id", body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
##### 

```go
// Patch a global variable returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.GlobalVariableJsonPatchRequest{
		Data: datadogV2.GlobalVariableJsonPatchRequestData{
			Attributes: &datadogV2.GlobalVariableJsonPatchRequestDataAttributes{
				JsonPatch: []datadogV2.JsonPatchOperation{
					{
						Op:   datadogV2.JSONPATCHOPERATIONOP_ADD,
						Path: "/name",
					},
				},
			},
			Type: datadogV2.GLOBALVARIABLEJSONPATCHTYPE_GLOBAL_VARIABLES_JSON_PATCH.Ptr(),
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSyntheticsApi(apiClient)
	resp, r, err := api.PatchGlobalVariable(ctx, "variable_id", body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SyntheticsApi.PatchGlobalVariable`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SyntheticsApi.PatchGlobalVariable`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
##### 

```java
// Patch a global variable returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SyntheticsApi;
import com.datadog.api.client.v2.model.GlobalVariableJsonPatchRequest;
import com.datadog.api.client.v2.model.GlobalVariableJsonPatchRequestData;
import com.datadog.api.client.v2.model.GlobalVariableJsonPatchRequestDataAttributes;
import com.datadog.api.client.v2.model.GlobalVariableJsonPatchType;
import com.datadog.api.client.v2.model.GlobalVariableResponse;
import com.datadog.api.client.v2.model.JsonPatchOperation;
import com.datadog.api.client.v2.model.JsonPatchOperationOp;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    SyntheticsApi apiInstance = new SyntheticsApi(defaultClient);

    GlobalVariableJsonPatchRequest body =
        new GlobalVariableJsonPatchRequest()
            .data(
                new GlobalVariableJsonPatchRequestData()
                    .attributes(
                        new GlobalVariableJsonPatchRequestDataAttributes()
                            .jsonPatch(
                                Collections.singletonList(
                                    new JsonPatchOperation()
                                        .op(JsonPatchOperationOp.ADD)
                                        .path("/name"))))
                    .type(GlobalVariableJsonPatchType.GLOBAL_VARIABLES_JSON_PATCH));

    try {
      GlobalVariableResponse result = apiInstance.patchGlobalVariable("variable_id", body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SyntheticsApi#patchGlobalVariable");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
##### 

```rust
// Patch a global variable returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_synthetics::SyntheticsAPI;
use datadog_api_client::datadogV2::model::GlobalVariableJsonPatchRequest;
use datadog_api_client::datadogV2::model::GlobalVariableJsonPatchRequestData;
use datadog_api_client::datadogV2::model::GlobalVariableJsonPatchRequestDataAttributes;
use datadog_api_client::datadogV2::model::GlobalVariableJsonPatchType;
use datadog_api_client::datadogV2::model::JsonPatchOperation;
use datadog_api_client::datadogV2::model::JsonPatchOperationOp;

#[tokio::main]
async fn main() {
    let body = GlobalVariableJsonPatchRequest::new(
        GlobalVariableJsonPatchRequestData::new()
            .attributes(
                GlobalVariableJsonPatchRequestDataAttributes::new().json_patch(vec![
                    JsonPatchOperation::new(JsonPatchOperationOp::ADD, "/name".to_string()),
                ]),
            )
            .type_(GlobalVariableJsonPatchType::GLOBAL_VARIABLES_JSON_PATCH),
    );
    let configuration = datadog::Configuration::new();
    let api = SyntheticsAPI::with_config(configuration);
    let resp = api
        .patch_global_variable("variable_id".to_string(), body)
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
##### 

```typescript
/**
 * Patch a global variable returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.SyntheticsApi(configuration);

const params: v2.SyntheticsApiPatchGlobalVariableRequest = {
  body: {
    data: {
      attributes: {
        jsonPatch: [
          {
            op: "add",
            path: "/name",
          },
        ],
      },
      type: "global_variables_json_patch",
    },
  },
  variableId: "variable_id",
};

apiInstance
  .patchGlobalVariable(params)
  .then((data: v2.GlobalVariableResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"
{% /tab %}

## Get a fast test result{% #get-a-fast-test-result %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                        |
| ----------------- | ------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/tests/fast/{id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/tests/fast/{id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/tests/fast/{id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/tests/fast/{id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/tests/fast/{id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/tests/fast/{id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/tests/fast/{id} |

### Overview

This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                 | Type   | Description                                           |
| -------------------- | ------ | ----------------------------------------------------- |
| id [*required*] | string | The UUID of the fast test to retrieve the result for. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Fast test result response. Returns `null` if the result is not yet available (the test is still running or timed out before completing).

| Parent field         | Field                            | Type     | Description                                                                                                                                           |
| -------------------- | -------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | data                             | object   | Fast test result data object (JSON:API format).                                                                                                       |
| data                 | attributes                       | object   | Attributes of the fast test result.                                                                                                                   |
| attributes           | device                           | object   | Device information for the test result (browser and mobile tests).                                                                                    |
| device               | browser                          | object   | Browser information for the device used to run the test.                                                                                              |
| browser              | type                             | string   | Browser type (for example, `chrome`, `firefox`).                                                                                                      |
| browser              | user_agent                       | string   | User agent string reported by the browser.                                                                                                            |
| browser              | version                          | string   | Browser version.                                                                                                                                      |
| device               | id                               | string   | Device identifier.                                                                                                                                    |
| device               | name                             | string   | Device name.                                                                                                                                          |
| device               | platform                         | object   | Platform information for the device used to run the test.                                                                                             |
| platform             | name                             | string   | Platform name (for example, `linux`, `macos`).                                                                                                        |
| platform             | version                          | string   | Platform version.                                                                                                                                     |
| device               | resolution                       | object   | Screen resolution of the device used to run the test.                                                                                                 |
| resolution           | height                           | int64    | Viewport height in pixels.                                                                                                                            |
| resolution           | pixel_ratio                      | double   | Device pixel ratio.                                                                                                                                   |
| resolution           | width                            | int64    | Viewport width in pixels.                                                                                                                             |
| device               | type                             | string   | Device type.                                                                                                                                          |
| attributes           | location                         | object   | Location information for a Synthetic test result.                                                                                                     |
| location             | id                               | string   | Identifier of the location.                                                                                                                           |
| location             | name                             | string   | Human-readable name of the location.                                                                                                                  |
| location             | version                          | string   | Version of the worker that ran the test.                                                                                                              |
| location             | worker_id                        | string   | Identifier of the specific worker that ran the test.                                                                                                  |
| attributes           | result                           | object   | Detailed result data for the fast test run. The exact shape of nested fields (`request`, `response`, `assertions`, etc.) depends on the test subtype. |
| result               | assertions                       | [object] | Results of each assertion evaluated during the test.                                                                                                  |
| assertions           | actual                           |          | Actual value observed during the test. Its type depends on the assertion type.                                                                        |
| assertions           | error_message                    | string   | Error message if the assertion failed.                                                                                                                |
| assertions           | expected                         |          | Expected value for the assertion. Its type depends on the assertion type.                                                                             |
| assertions           | operator                         | string   | Operator used for the assertion (for example, `is`, `contains`).                                                                                      |
| assertions           | property                         | string   | Property targeted by the assertion, when applicable.                                                                                                  |
| assertions           | target                           |          | Target value for the assertion. Its type depends on the assertion type.                                                                               |
| assertions           | target_path                      | string   | JSON path or XPath evaluated for the assertion.                                                                                                       |
| assertions           | target_path_operator             | string   | Operator used for the target path assertion.                                                                                                          |
| assertions           | type                             | string   | Type of the assertion (for example, `responseTime`, `statusCode`, `body`).                                                                            |
| assertions           | valid                            | boolean  | Whether the assertion passed.                                                                                                                         |
| result               | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                                                |
| result               | cert                             | object   | SSL/TLS certificate information returned from an SSL test.                                                                                            |
| cert                 | cipher                           | string   | Cipher used for the TLS connection.                                                                                                                   |
| cert                 | exponent                         | int64    | RSA exponent of the certificate.                                                                                                                      |
| cert                 | ext_key_usage                    | [string] | Extended key usage extensions for the certificate.                                                                                                    |
| cert                 | fingerprint                      | string   | SHA-1 fingerprint of the certificate.                                                                                                                 |
| cert                 | fingerprint256                   | string   | SHA-256 fingerprint of the certificate.                                                                                                               |
| cert                 | issuer                           | object   | Certificate issuer details.                                                                                                                           |
| additionalProperties | <any-key>                        | string   |
| cert                 | modulus                          | string   | RSA modulus of the certificate.                                                                                                                       |
| cert                 | protocol                         | string   | TLS protocol used (for example, `TLSv1.2`).                                                                                                           |
| cert                 | serial_number                    | string   | Serial number of the certificate.                                                                                                                     |
| cert                 | subject                          | object   | Certificate subject details.                                                                                                                          |
| additionalProperties | <any-key>                        | string   |
| cert                 | tls_version                      | double   | TLS protocol version.                                                                                                                                 |
| cert                 | valid                            | object   | Validity window of a certificate.                                                                                                                     |
| valid                | from                             | int64    | Unix timestamp (ms) of when the certificate became valid.                                                                                             |
| valid                | to                               | int64    | Unix timestamp (ms) of when the certificate expires.                                                                                                  |
| result               | duration                         | double   | Total duration of the test in milliseconds.                                                                                                           |
| result               | failure                          | object   | Details about the failure of a Synthetic test.                                                                                                        |
| failure              | code                             | string   | Error code for the failure.                                                                                                                           |
| failure              | internal_code                    | string   | Internal error code used for debugging.                                                                                                               |
| failure              | internal_message                 | string   | Internal error message used for debugging.                                                                                                            |
| failure              | message                          | string   | Error message for the failure.                                                                                                                        |
| result               | finished_at                      | int64    | Unix timestamp (ms) of when the test finished.                                                                                                        |
| result               | id                               | string   | The result ID. Set to the fast test UUID because no persistent result ID exists for fast tests.                                                       |
| result               | is_fast_retry                    | boolean  | Whether this result is from an automatic fast retry.                                                                                                  |
| result               | request                          | object   | Details of the outgoing request made during the test execution.                                                                                       |
| request              | allow_insecure                   | boolean  | Whether insecure certificates are allowed for this request.                                                                                           |
| request              | body                             | string   | Body sent with the request.                                                                                                                           |
| request              | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                                                |
| request              | destination_service              | string   | Destination service for a Network Path test.                                                                                                          |
| request              | dns_server                       | string   | DNS server used to resolve the target host.                                                                                                           |
| request              | dns_server_port                  | int64    | Port of the DNS server used for resolution.                                                                                                           |
| request              | e2e_queries                      | int64    | Number of end-to-end probe queries issued.                                                                                                            |
| request              | files                            | [object] | Files attached to the request.                                                                                                                        |
| files                | bucket_key                       | string   | Storage bucket key where the file is stored.                                                                                                          |
| files                | encoding                         | string   | Encoding of the file contents.                                                                                                                        |
| files                | name                             | string   | File name.                                                                                                                                            |
| files                | size                             | int64    | File size in bytes.                                                                                                                                   |
| files                | type                             | string   | File MIME type.                                                                                                                                       |
| request              | headers                          | object   | Headers sent with the request.                                                                                                                        |
| request              | host                             | string   | Host targeted by the request.                                                                                                                         |
| request              | max_ttl                          | int64    | Maximum TTL for network probe packets.                                                                                                                |
| request              | message                          | string   | Message sent with the request (for WebSocket/TCP/UDP tests).                                                                                          |
| request              | method                           | string   | HTTP method used for the request.                                                                                                                     |
| request              | no_saving_response_body          | boolean  | Whether the response body was not saved.                                                                                                              |
| request              | port                             |          | Port targeted by the request. Can be a number or a string variable reference.                                                                         |
| request              | service                          | string   | Service name targeted by the request (for gRPC tests).                                                                                                |
| request              | source_service                   | string   | Source service for a Network Path test.                                                                                                               |
| request              | timeout                          | int64    | Request timeout in milliseconds.                                                                                                                      |
| request              | tool_name                        | string   | Name of the MCP tool called (MCP tests only).                                                                                                         |
| request              | traceroute_queries               | int64    | Number of traceroute probe queries issued.                                                                                                            |
| request              | url                              | string   | URL targeted by the request.                                                                                                                          |
| result               | resolved_ip                      | string   | IP address resolved for the target host.                                                                                                              |
| result               | response                         | object   | Details of the response received during the test execution.                                                                                           |
| response             | body                             | string   | Body of the response.                                                                                                                                 |
| response             | body_compressed                  | string   | Compressed representation of the response body.                                                                                                       |
| response             | body_hashes                      | string   | Hashes computed over the response body.                                                                                                               |
| response             | body_size                        | int64    | Size of the response body in bytes.                                                                                                                   |
| response             | cache_headers                    | object   | Cache-related response headers.                                                                                                                       |
| additionalProperties | <any-key>                        | string   |
| response             | cdn                              | object   | CDN provider details inferred from response headers.                                                                                                  |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                                    |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                                   |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                                          |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                                             |
| response             | close                            | object   | WebSocket close frame information for WebSocket test responses.                                                                                       |
| close                | reason                           | string   | Reason string received in the close frame.                                                                                                            |
| close                | status_code                      | int64    | Status code received in the close frame.                                                                                                              |
| response             | compressed_message               | string   | Compressed representation of the response message.                                                                                                    |
| response             | headers                          | object   | Response headers.                                                                                                                                     |
| response             | healthcheck                      | object   | Health check information returned from a gRPC health check call.                                                                                      |
| healthcheck          | message                          | object   | Raw health check message payload.                                                                                                                     |
| additionalProperties | <any-key>                        | string   |
| healthcheck          | status                           | int64    | Health check status code.                                                                                                                             |
| response             | http_version                     | string   | HTTP version of the response.                                                                                                                         |
| response             | is_body_truncated                | boolean  | Whether the response body was truncated.                                                                                                              |
| response             | is_message_truncated             | boolean  | Whether the response message was truncated.                                                                                                           |
| response             | message                          | string   | Message received in the response (for WebSocket/TCP/UDP tests).                                                                                       |
| response             | metadata                         | object   | Additional metadata returned with the response.                                                                                                       |
| additionalProperties | <any-key>                        | string   |
| response             | records                          | [object] | DNS records returned in the response (DNS tests only).                                                                                                |
| records              | type                             | string   | DNS record type (for example, `A`, `AAAA`, `CNAME`).                                                                                                  |
| records              | values                           | [string] | Values associated with the DNS record.                                                                                                                |
| response             | redirects                        | [object] | Redirect hops encountered while performing the request.                                                                                               |
| redirects            | location                         | string   | Target location of the redirect.                                                                                                                      |
| redirects            | status_code                      | int64    | HTTP status code of the redirect response.                                                                                                            |
| response             | status_code                      | int64    | HTTP status code of the response.                                                                                                                     |
| result               | run_type                         | enum     | The type of run for a Synthetic test result. Allowed enum values: `scheduled,fast,ci,triggered`                                                       |
| result               | started_at                       | int64    | Unix timestamp (ms) of when the test started.                                                                                                         |
| result               | status                           | string   | Status of the test result (`passed` or `failed`).                                                                                                     |
| result               | steps                            | [object] | Step results for multistep API tests.                                                                                                                 |
| steps                | allow_failure                    | boolean  | Whether the test continues when this step fails.                                                                                                      |
| steps                | api_test                         | object   | Inner API test definition for browser `runApiTest` steps.                                                                                             |
| steps                | assertion_result                 | object   | Assertion result for a browser or mobile step.                                                                                                        |
| assertion_result     | actual                           |          | Actual value observed during the step assertion. Its type depends on the check type.                                                                  |
| assertion_result     | check_type                       | string   | Type of the step assertion check.                                                                                                                     |
| assertion_result     | expected                         |          | Expected value for the step assertion. Its type depends on the check type.                                                                            |
| assertion_result     | has_secure_variables             | boolean  | Whether the assertion involves secure variables.                                                                                                      |
| steps                | assertions                       | [object] | Assertion results produced by the step.                                                                                                               |
| assertions           | actual                           |          | Actual value observed during the test. Its type depends on the assertion type.                                                                        |
| assertions           | error_message                    | string   | Error message if the assertion failed.                                                                                                                |
| assertions           | expected                         |          | Expected value for the assertion. Its type depends on the assertion type.                                                                             |
| assertions           | operator                         | string   | Operator used for the assertion (for example, `is`, `contains`).                                                                                      |
| assertions           | property                         | string   | Property targeted by the assertion, when applicable.                                                                                                  |
| assertions           | target                           |          | Target value for the assertion. Its type depends on the assertion type.                                                                               |
| assertions           | target_path                      | string   | JSON path or XPath evaluated for the assertion.                                                                                                       |
| assertions           | target_path_operator             | string   | Operator used for the target path assertion.                                                                                                          |
| assertions           | type                             | string   | Type of the assertion (for example, `responseTime`, `statusCode`, `body`).                                                                            |
| assertions           | valid                            | boolean  | Whether the assertion passed.                                                                                                                         |
| steps                | blocked_requests_urls            | [string] | URLs of requests blocked during the step.                                                                                                             |
| steps                | bounds                           | object   | Bounding box of an element on the page.                                                                                                               |
| bounds               | height                           | int64    | Height in pixels.                                                                                                                                     |
| bounds               | width                            | int64    | Width in pixels.                                                                                                                                      |
| bounds               | x                                | int64    | Horizontal position in pixels.                                                                                                                        |
| bounds               | y                                | int64    | Vertical position in pixels.                                                                                                                          |
| steps                | browser_errors                   | [object] | Browser errors captured during the step.                                                                                                              |
| browser_errors       | description                      | string   | Error description.                                                                                                                                    |
| browser_errors       | method                           | string   | HTTP method associated with the error (for network errors).                                                                                           |
| browser_errors       | name                             | string   | Error name.                                                                                                                                           |
| browser_errors       | status                           | int64    | HTTP status code associated with the error (for network errors).                                                                                      |
| browser_errors       | type                             | string   | Type of the browser error.                                                                                                                            |
| browser_errors       | url                              | object   | URL associated with the error.                                                                                                                        |
| steps                | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                                     |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                                    |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                                    |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                                      |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                                   |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                                   |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                                      |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                                         |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                                                 |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                                      |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                                    |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                                            |
| steps                | cdn_resources                    | [object] | CDN resources encountered during the step.                                                                                                            |
| cdn_resources        | cdn                              | object   | CDN provider details inferred from response headers.                                                                                                  |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                                    |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                                   |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                                          |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                                             |
| cdn_resources        | resolved_ip                      | string   | Resolved IP address for the CDN resource.                                                                                                             |
| cdn_resources        | timestamp                        | int64    | Unix timestamp (ms) of when the resource was fetched.                                                                                                 |
| cdn_resources        | timings                          | object   | Timing breakdown for fetching the CDN resource.                                                                                                       |
| steps                | click_type                       | string   | Click type performed in a browser step.                                                                                                               |
| steps                | compressed_json_descriptor       | string   | Compressed JSON descriptor for the step (internal format).                                                                                            |
| steps                | config                           | object   | Request configuration executed by this step (API test steps).                                                                                         |
| steps                | description                      | string   | Human-readable description of the step.                                                                                                               |
| steps                | duration                         | double   | Duration of the step in milliseconds.                                                                                                                 |
| steps                | element_description              | string   | Description of the element interacted with by the step.                                                                                               |
| steps                | element_updates                  | object   | Element locator updates produced during a step.                                                                                                       |
| element_updates      | multi_locator                    | object   | Updated multi-locator definition.                                                                                                                     |
| additionalProperties | <any-key>                        | string   |
| element_updates      | target_outer_html                | string   | Updated outer HTML of the targeted element.                                                                                                           |
| element_updates      | version                          | int64    | Version of the element locator definition.                                                                                                            |
| steps                | extracted_value                  | object   | A variable used or extracted during a test.                                                                                                           |
| extracted_value      | err                              | string   | Error encountered when evaluating the variable.                                                                                                       |
| extracted_value      | error_message                    | string   | Human-readable error message for variable evaluation.                                                                                                 |
| extracted_value      | example                          | string   | Example value for the variable.                                                                                                                       |
| extracted_value      | id                               | string   | Variable identifier.                                                                                                                                  |
| extracted_value      | name                             | string   | Variable name.                                                                                                                                        |
| extracted_value      | pattern                          | string   | Pattern used to extract the variable.                                                                                                                 |
| extracted_value      | secure                           | boolean  | Whether the variable holds a secure value.                                                                                                            |
| extracted_value      | type                             | string   | Variable type.                                                                                                                                        |
| extracted_value      | val                              | string   | Evaluated value of the variable.                                                                                                                      |
| extracted_value      | value                            | string   | Current value of the variable.                                                                                                                        |
| steps                | failure                          | object   | Details about the failure of a Synthetic test.                                                                                                        |
| failure              | code                             | string   | Error code for the failure.                                                                                                                           |
| failure              | internal_code                    | string   | Internal error code used for debugging.                                                                                                               |
| failure              | internal_message                 | string   | Internal error message used for debugging.                                                                                                            |
| failure              | message                          | string   | Error message for the failure.                                                                                                                        |
| steps                | http_results                     | [object] | HTTP results produced by an MCP step.                                                                                                                 |
| http_results         | actual                           |          | Actual value observed during the test. Its type depends on the assertion type.                                                                        |
| http_results         | error_message                    | string   | Error message if the assertion failed.                                                                                                                |
| http_results         | expected                         |          | Expected value for the assertion. Its type depends on the assertion type.                                                                             |
| http_results         | operator                         | string   | Operator used for the assertion (for example, `is`, `contains`).                                                                                      |
| http_results         | property                         | string   | Property targeted by the assertion, when applicable.                                                                                                  |
| http_results         | target                           |          | Target value for the assertion. Its type depends on the assertion type.                                                                               |
| http_results         | target_path                      | string   | JSON path or XPath evaluated for the assertion.                                                                                                       |
| http_results         | target_path_operator             | string   | Operator used for the target path assertion.                                                                                                          |
| http_results         | type                             | string   | Type of the assertion (for example, `responseTime`, `statusCode`, `body`).                                                                            |
| http_results         | valid                            | boolean  | Whether the assertion passed.                                                                                                                         |
| steps                | id                               | string   | Identifier of the step.                                                                                                                               |
| steps                | is_critical                      | boolean  | Whether this step is critical for the test outcome.                                                                                                   |
| steps                | javascript_custom_assertion_code | boolean  | Whether the step uses a custom JavaScript assertion.                                                                                                  |
| steps                | locate_element_duration          | double   | Time taken to locate the element in milliseconds.                                                                                                     |
| steps                | name                             | string   | Name of the step.                                                                                                                                     |
| steps                | request                          | object   | Details of the outgoing request made during the test execution.                                                                                       |
| request              | allow_insecure                   | boolean  | Whether insecure certificates are allowed for this request.                                                                                           |
| request              | body                             | string   | Body sent with the request.                                                                                                                           |
| request              | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                                                |
| request              | destination_service              | string   | Destination service for a Network Path test.                                                                                                          |
| request              | dns_server                       | string   | DNS server used to resolve the target host.                                                                                                           |
| request              | dns_server_port                  | int64    | Port of the DNS server used for resolution.                                                                                                           |
| request              | e2e_queries                      | int64    | Number of end-to-end probe queries issued.                                                                                                            |
| request              | files                            | [object] | Files attached to the request.                                                                                                                        |
| files                | bucket_key                       | string   | Storage bucket key where the file is stored.                                                                                                          |
| files                | encoding                         | string   | Encoding of the file contents.                                                                                                                        |
| files                | name                             | string   | File name.                                                                                                                                            |
| files                | size                             | int64    | File size in bytes.                                                                                                                                   |
| files                | type                             | string   | File MIME type.                                                                                                                                       |
| request              | headers                          | object   | Headers sent with the request.                                                                                                                        |
| request              | host                             | string   | Host targeted by the request.                                                                                                                         |
| request              | max_ttl                          | int64    | Maximum TTL for network probe packets.                                                                                                                |
| request              | message                          | string   | Message sent with the request (for WebSocket/TCP/UDP tests).                                                                                          |
| request              | method                           | string   | HTTP method used for the request.                                                                                                                     |
| request              | no_saving_response_body          | boolean  | Whether the response body was not saved.                                                                                                              |
| request              | port                             |          | Port targeted by the request. Can be a number or a string variable reference.                                                                         |
| request              | service                          | string   | Service name targeted by the request (for gRPC tests).                                                                                                |
| request              | source_service                   | string   | Source service for a Network Path test.                                                                                                               |
| request              | timeout                          | int64    | Request timeout in milliseconds.                                                                                                                      |
| request              | tool_name                        | string   | Name of the MCP tool called (MCP tests only).                                                                                                         |
| request              | traceroute_queries               | int64    | Number of traceroute probe queries issued.                                                                                                            |
| request              | url                              | string   | URL targeted by the request.                                                                                                                          |
| steps                | response                         | object   | Details of the response received during the test execution.                                                                                           |
| response             | body                             | string   | Body of the response.                                                                                                                                 |
| response             | body_compressed                  | string   | Compressed representation of the response body.                                                                                                       |
| response             | body_hashes                      | string   | Hashes computed over the response body.                                                                                                               |
| response             | body_size                        | int64    | Size of the response body in bytes.                                                                                                                   |
| response             | cache_headers                    | object   | Cache-related response headers.                                                                                                                       |
| additionalProperties | <any-key>                        | string   |
| response             | cdn                              | object   | CDN provider details inferred from response headers.                                                                                                  |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                                    |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                                   |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                                          |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                                             |
| response             | close                            | object   | WebSocket close frame information for WebSocket test responses.                                                                                       |
| close                | reason                           | string   | Reason string received in the close frame.                                                                                                            |
| close                | status_code                      | int64    | Status code received in the close frame.                                                                                                              |
| response             | compressed_message               | string   | Compressed representation of the response message.                                                                                                    |
| response             | headers                          | object   | Response headers.                                                                                                                                     |
| response             | healthcheck                      | object   | Health check information returned from a gRPC health check call.                                                                                      |
| healthcheck          | message                          | object   | Raw health check message payload.                                                                                                                     |
| additionalProperties | <any-key>                        | string   |
| healthcheck          | status                           | int64    | Health check status code.                                                                                                                             |
| response             | http_version                     | string   | HTTP version of the response.                                                                                                                         |
| response             | is_body_truncated                | boolean  | Whether the response body was truncated.                                                                                                              |
| response             | is_message_truncated             | boolean  | Whether the response message was truncated.                                                                                                           |
| response             | message                          | string   | Message received in the response (for WebSocket/TCP/UDP tests).                                                                                       |
| response             | metadata                         | object   | Additional metadata returned with the response.                                                                                                       |
| additionalProperties | <any-key>                        | string   |
| response             | records                          | [object] | DNS records returned in the response (DNS tests only).                                                                                                |
| records              | type                             | string   | DNS record type (for example, `A`, `AAAA`, `CNAME`).                                                                                                  |
| records              | values                           | [string] | Values associated with the DNS record.                                                                                                                |
| response             | redirects                        | [object] | Redirect hops encountered while performing the request.                                                                                               |
| redirects            | location                         | string   | Target location of the redirect.                                                                                                                      |
| redirects            | status_code                      | int64    | HTTP status code of the redirect response.                                                                                                            |
| response             | status_code                      | int64    | HTTP status code of the response.                                                                                                                     |
| steps                | retries                          | [object] | Retry results for the step.                                                                                                                           |
| steps                | retry_count                      | int64    | Number of times this step was retried.                                                                                                                |
| steps                | rum_context                      | object   | RUM application context associated with a step or sub-test.                                                                                           |
| rum_context          | application_id                   | string   | RUM application identifier.                                                                                                                           |
| rum_context          | session_id                       | string   | RUM session identifier.                                                                                                                               |
| rum_context          | view_id                          | string   | RUM view identifier.                                                                                                                                  |
| steps                | started_at                       | int64    | Unix timestamp (ms) of when the step started.                                                                                                         |
| steps                | status                           | string   | Status of the step (for example, `passed`, `failed`).                                                                                                 |
| steps                | sub_step                         | object   | Information about a sub-step in a nested test execution.                                                                                              |
| sub_step             | level                            | int64    | Depth of the sub-step in the execution tree.                                                                                                          |
| sub_step             | parent_step                      | object   | Reference to the parent step of a sub-step.                                                                                                           |
| parent_step          | id                               | string   | Identifier of the parent step.                                                                                                                        |
| sub_step             | parent_test                      | object   | Reference to the parent test of a sub-step.                                                                                                           |
| parent_test          | id                               | string   | Identifier of the parent test.                                                                                                                        |
| steps                | sub_test                         | object   | Information about a sub-test played from a parent browser test.                                                                                       |
| sub_test             | id                               | string   | Identifier of the sub-test.                                                                                                                           |
| sub_test             | playing_tab                      | int64    | Index of the browser tab playing the sub-test.                                                                                                        |
| sub_test             | rum_context                      | object   | RUM application context associated with a step or sub-test.                                                                                           |
| rum_context          | application_id                   | string   | RUM application identifier.                                                                                                                           |
| rum_context          | session_id                       | string   | RUM session identifier.                                                                                                                               |
| rum_context          | view_id                          | string   | RUM view identifier.                                                                                                                                  |
| steps                | subtype                          | string   | Subtype of the step.                                                                                                                                  |
| steps                | tabs                             | [object] | Browser tabs involved in the step.                                                                                                                    |
| tabs                 | focused                          | boolean  | Whether the tab was focused during the step.                                                                                                          |
| tabs                 | title                            | string   | Title of the tab.                                                                                                                                     |
| tabs                 | url                              | string   | URL loaded in the tab.                                                                                                                                |
| steps                | timings                          | object   | Timing breakdown of the step execution.                                                                                                               |
| steps                | tunnel                           | boolean  | Whether the step was executed through a Synthetics tunnel.                                                                                            |
| steps                | type                             | string   | Type of the step (for example, `click`, `assertElementContent`, `runApiTest`).                                                                        |
| steps                | url                              | string   | URL associated with the step (for navigation steps).                                                                                                  |
| steps                | value                            |          | Step value. Its type depends on the step type.                                                                                                        |
| steps                | variables                        | object   | Variables captured during a test step.                                                                                                                |
| variables            | config                           | [object] | Variables defined in the test configuration.                                                                                                          |
| config               | err                              | string   | Error encountered when evaluating the variable.                                                                                                       |
| config               | error_message                    | string   | Human-readable error message for variable evaluation.                                                                                                 |
| config               | example                          | string   | Example value for the variable.                                                                                                                       |
| config               | id                               | string   | Variable identifier.                                                                                                                                  |
| config               | name                             | string   | Variable name.                                                                                                                                        |
| config               | pattern                          | string   | Pattern used to extract the variable.                                                                                                                 |
| config               | secure                           | boolean  | Whether the variable holds a secure value.                                                                                                            |
| config               | type                             | string   | Variable type.                                                                                                                                        |
| config               | val                              | string   | Evaluated value of the variable.                                                                                                                      |
| config               | value                            | string   | Current value of the variable.                                                                                                                        |
| variables            | extracted                        | [object] | Variables extracted during the test execution.                                                                                                        |
| extracted            | err                              | string   | Error encountered when evaluating the variable.                                                                                                       |
| extracted            | error_message                    | string   | Human-readable error message for variable evaluation.                                                                                                 |
| extracted            | example                          | string   | Example value for the variable.                                                                                                                       |
| extracted            | id                               | string   | Variable identifier.                                                                                                                                  |
| extracted            | name                             | string   | Variable name.                                                                                                                                        |
| extracted            | pattern                          | string   | Pattern used to extract the variable.                                                                                                                 |
| extracted            | secure                           | boolean  | Whether the variable holds a secure value.                                                                                                            |
| extracted            | type                             | string   | Variable type.                                                                                                                                        |
| extracted            | val                              | string   | Evaluated value of the variable.                                                                                                                      |
| extracted            | value                            | string   | Current value of the variable.                                                                                                                        |
| steps                | vitals_metrics                   | [object] | Web vitals metrics captured during the step.                                                                                                          |
| vitals_metrics       | cls                              | double   | Cumulative Layout Shift score.                                                                                                                        |
| vitals_metrics       | fcp                              | double   | First Contentful Paint in milliseconds.                                                                                                               |
| vitals_metrics       | inp                              | double   | Interaction to Next Paint in milliseconds.                                                                                                            |
| vitals_metrics       | lcp                              | double   | Largest Contentful Paint in milliseconds.                                                                                                             |
| vitals_metrics       | ttfb                             | double   | Time To First Byte in milliseconds.                                                                                                                   |
| vitals_metrics       | url                              | string   | URL that produced the metrics.                                                                                                                        |
| steps                | warnings                         | [object] | Warnings emitted during the step.                                                                                                                     |
| warnings             | element_bounds                   | [object] | Bounds of elements related to the warning.                                                                                                            |
| element_bounds       | height                           | int64    | Height in pixels.                                                                                                                                     |
| element_bounds       | width                            | int64    | Width in pixels.                                                                                                                                      |
| element_bounds       | x                                | int64    | Horizontal position in pixels.                                                                                                                        |
| element_bounds       | y                                | int64    | Vertical position in pixels.                                                                                                                          |
| warnings             | message                          | string   | Warning message.                                                                                                                                      |
| warnings             | type                             | string   | Type of the warning.                                                                                                                                  |
| result               | timings                          | object   | Timing breakdown of the test request phases (for example, DNS, TCP, TLS, first byte).                                                                 |
| result               | traceroute                       | [object] | Traceroute hop results, present for ICMP and TCP tests.                                                                                               |
| traceroute           | host                             | string   | Target hostname.                                                                                                                                      |
| traceroute           | latency                          | object   | Latency statistics for a network probe.                                                                                                               |
| latency              | avg                              | double   | Average latency in milliseconds.                                                                                                                      |
| latency              | max                              | double   | Maximum latency in milliseconds.                                                                                                                      |
| latency              | min                              | double   | Minimum latency in milliseconds.                                                                                                                      |
| traceroute           | packet_loss_percentage           | double   | Percentage of probe packets lost.                                                                                                                     |
| traceroute           | packet_size                      | int64    | Size of each probe packet in bytes.                                                                                                                   |
| traceroute           | packets_received                 | int64    | Number of probe packets received.                                                                                                                     |
| traceroute           | packets_sent                     | int64    | Number of probe packets sent.                                                                                                                         |
| traceroute           | resolved_ip                      | string   | Resolved IP address for the target.                                                                                                                   |
| traceroute           | routers                          | [object] | List of intermediate routers for the traceroute.                                                                                                      |
| routers              | ip                               | string   | IP address of the router.                                                                                                                             |
| routers              | resolved_host                    | string   | Resolved hostname of the router.                                                                                                                      |
| result               | triggered_at                     | int64    | Unix timestamp (ms) of when the test was triggered.                                                                                                   |
| result               | tunnel                           | boolean  | Whether the test was run through a Synthetics tunnel.                                                                                                 |
| attributes           | test_sub_type                    | enum     | Subtype of the Synthetic test that produced this result. Allowed enum values: `dns,grpc,http,icmp,mcp,multi,ssl,tcp,udp,websocket`                    |
| attributes           | test_type                        | enum     | Type of the Synthetic fast test that produced this result. Allowed enum values: `fast-api,fast-browser`                                               |
| attributes           | test_version                     | int64    | Version of the test at the time the fast test was triggered.                                                                                          |
| data                 | id                               | string   | The UUID of the fast test, used as the result identifier.                                                                                             |
| data                 | type                             | enum     | JSON:API type for a fast test result. Allowed enum values: `result`                                                                                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "device": {
        "browser": {
          "type": "edge",
          "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 Edg/127.0.2651.105 DatadogSynthetics",
          "version": "127.0.2651.105"
        },
        "id": "chrome.laptop_large",
        "name": "Chrome - Laptop Large",
        "platform": {
          "name": "ios",
          "version": "14.8"
        },
        "resolution": {
          "height": 1100,
          "pixel_ratio": 2,
          "width": 1440
        },
        "type": "browser"
      },
      "location": {
        "id": "aws:us-east-1",
        "name": "N. Virginia (AWS)",
        "version": "1.0.0",
        "worker_id": "worker-abc-123"
      },
      "result": {
        "assertions": [
          {
            "actual": 200,
            "error_message": "Assertion failed: expected 200 but got 500",
            "expected": "200",
            "operator": "is",
            "property": "content-type",
            "target": 200,
            "target_path": "$.url",
            "target_path_operator": "contains",
            "type": "statusCode",
            "valid": true
          }
        ],
        "call_type": "unary",
        "cert": {
          "cipher": "TLS_AES_256_GCM_SHA384",
          "exponent": 65537,
          "ext_key_usage": [
            "1.3.6.1.5.5.7.3.1"
          ],
          "fingerprint": "D6:03:5A:9F:93:E1:B7:28:EC:90:C5:9F:72:30:55:7C:74:5F:53:92",
          "fingerprint256": "04:45:93:A9:4C:14:70:47:DB:3C:FC:05:F9:5A:50:4E:DA:DB:A1:C6:37:3D:15:C0:B2:7E:5D:93:5F:A2:02:C7",
          "issuer": {
            "<any-key>": "string"
          },
          "modulus": "C0FCE9F9...",
          "protocol": "TLSv1.3",
          "serial_number": "7B584A1A6670A1EB0941A9A121569D60",
          "subject": {
            "<any-key>": "string"
          },
          "tls_version": 1.3,
          "valid": {
            "from": 1742469686000,
            "to": 1749727285000
          }
        },
        "duration": 150.5,
        "failure": {
          "code": "TIMEOUT",
          "internal_code": "INCORRECT_ASSERTION",
          "internal_message": "Assertion failed on step 2",
          "message": "Connection timed out"
        },
        "finished_at": 1679328001000,
        "id": "abc12345-1234-1234-1234-abc123456789",
        "is_fast_retry": false,
        "request": {
          "allow_insecure": false,
          "body": "{\"key\":\"value\"}",
          "call_type": "unary",
          "destination_service": "my-service",
          "dns_server": "8.8.8.8",
          "dns_server_port": 53,
          "e2e_queries": 4,
          "files": [
            {
              "bucket_key": "api-upload-file/s3v-msw-tp3/2024-08-20T12:18:27.628081_f433c953-a58a-4296-834b-0669e32ba55f.json",
              "encoding": "base64",
              "name": "dd_logo_h_rgb.jpg",
              "size": 30294,
              "type": "image/jpeg"
            }
          ],
          "headers": {
            "content-type": "application/json"
          },
          "host": "grpcbin.test.k6.io",
          "max_ttl": 64,
          "message": "My message",
          "method": "GET",
          "no_saving_response_body": true,
          "port": 9000,
          "service": "addsvc.Add",
          "source_service": "synthetics",
          "timeout": 60,
          "tool_name": "search",
          "traceroute_queries": 2,
          "url": "https://httpbin.org/anything/lol valuehugo"
        },
        "resolved_ip": "1.2.3.4",
        "response": {
          "body": "{\"status\":\"ok\"}",
          "body_compressed": "eJzLSM3JyQcABiwCFQ==",
          "body_hashes": "9e107d9d372bb6826bd81d3542a419d6",
          "body_size": 793,
          "cache_headers": {
            "<any-key>": "string"
          },
          "cdn": {
            "cache": {
              "cached": true,
              "status": "HIT"
            },
            "provider": "google_cloud"
          },
          "close": {
            "reason": "Normal closure",
            "status_code": 1000
          },
          "compressed_message": "eJzLSM3JyQcABiwCFQ==",
          "headers": {
            "content-type": "application/json"
          },
          "healthcheck": {
            "message": {
              "<any-key>": "string"
            },
            "status": 1
          },
          "http_version": "2.0",
          "is_body_truncated": false,
          "is_message_truncated": false,
          "message": "{\"f_string\":\"concat-STATIC_HIDDEN_VALUE\"}",
          "metadata": {
            "<any-key>": "string"
          },
          "records": [
            {
              "type": "A",
              "values": [
                "213.186.33.19"
              ]
            }
          ],
          "redirects": [
            {
              "location": "https://example.com/new-location",
              "status_code": 301
            }
          ],
          "status_code": 200
        },
        "run_type": "scheduled",
        "started_at": 1679328000000,
        "status": "passed",
        "steps": [
          {
            "allow_failure": false,
            "api_test": {},
            "assertion_result": {
              "actual": "True\ngood\ngood\ngood\ngood\nTrue",
              "check_type": "contains",
              "expected": "True good good good good True",
              "has_secure_variables": false
            },
            "assertions": [
              {
                "actual": 200,
                "error_message": "Assertion failed: expected 200 but got 500",
                "expected": "200",
                "operator": "is",
                "property": "content-type",
                "target": 200,
                "target_path": "$.url",
                "target_path_operator": "contains",
                "type": "statusCode",
                "valid": true
              }
            ],
            "blocked_requests_urls": [],
            "bounds": {
              "height": 37,
              "width": 343,
              "x": 16,
              "y": 140
            },
            "browser_errors": [
              {
                "description": "Failed to fetch resource",
                "method": "GET",
                "name": "NetworkError",
                "status": 500,
                "type": "network",
                "url": {}
              }
            ],
            "bucket_keys": {
              "after_step_screenshot": "screenshots/after-step-1-1.png",
              "after_turn_screenshot": "screenshots/after-turn-1.png",
              "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
              "before_step_screenshot": "screenshots/before-step-1-1.png",
              "before_turn_screenshot": "screenshots/before-turn-1.png",
              "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
              "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
              "email_messages": [],
              "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
              "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
              "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
            },
            "cdn_resources": [
              {
                "cdn": {
                  "cache": {
                    "cached": true,
                    "status": "HIT"
                  },
                  "provider": "google_cloud"
                },
                "resolved_ip": "34.95.79.70",
                "timestamp": 1724521406576,
                "timings": {
                  "firstByte": 99.7,
                  "tcp": 0.9
                }
              }
            ],
            "click_type": "primary",
            "compressed_json_descriptor": "compressedJsonDescriptorValue",
            "config": {},
            "description": "Navigate to start URL",
            "duration": 1015,
            "element_description": "<XCUIElementTypeStaticText value=\"Scroll\" name=\"Scroll\" label=\"Scroll\">",
            "element_updates": {
              "multi_locator": {
                "<any-key>": "string"
              },
              "target_outer_html": "<h1>My website - v4</h1>",
              "version": 3
            },
            "extracted_value": {
              "err": "LOCAL_VARIABLE_UNKNOWN",
              "error_message": "Unknown variable name undefined.",
              "example": "lol value",
              "id": "c896702c-1e34-4e62-a67b-432e8092d062",
              "name": "HEADER_VALUE",
              "pattern": "lol value",
              "secure": false,
              "type": "text",
              "val": "value-to-extract",
              "value": "lol value"
            },
            "failure": {
              "code": "TIMEOUT",
              "internal_code": "INCORRECT_ASSERTION",
              "internal_message": "Assertion failed on step 2",
              "message": "Connection timed out"
            },
            "http_results": [
              {
                "actual": 200,
                "error_message": "Assertion failed: expected 200 but got 500",
                "expected": "200",
                "operator": "is",
                "property": "content-type",
                "target": 200,
                "target_path": "$.url",
                "target_path_operator": "contains",
                "type": "statusCode",
                "valid": true
              }
            ],
            "id": "fkk-j2a-gmw",
            "is_critical": true,
            "javascript_custom_assertion_code": false,
            "locate_element_duration": 845,
            "name": "Extract variable from body",
            "request": {
              "allow_insecure": false,
              "body": "{\"key\":\"value\"}",
              "call_type": "unary",
              "destination_service": "my-service",
              "dns_server": "8.8.8.8",
              "dns_server_port": 53,
              "e2e_queries": 4,
              "files": [
                {
                  "bucket_key": "api-upload-file/s3v-msw-tp3/2024-08-20T12:18:27.628081_f433c953-a58a-4296-834b-0669e32ba55f.json",
                  "encoding": "base64",
                  "name": "dd_logo_h_rgb.jpg",
                  "size": 30294,
                  "type": "image/jpeg"
                }
              ],
              "headers": {
                "content-type": "application/json"
              },
              "host": "grpcbin.test.k6.io",
              "max_ttl": 64,
              "message": "My message",
              "method": "GET",
              "no_saving_response_body": true,
              "port": 9000,
              "service": "addsvc.Add",
              "source_service": "synthetics",
              "timeout": 60,
              "tool_name": "search",
              "traceroute_queries": 2,
              "url": "https://httpbin.org/anything/lol valuehugo"
            },
            "response": {
              "body": "{\"status\":\"ok\"}",
              "body_compressed": "eJzLSM3JyQcABiwCFQ==",
              "body_hashes": "9e107d9d372bb6826bd81d3542a419d6",
              "body_size": 793,
              "cache_headers": {
                "<any-key>": "string"
              },
              "cdn": {
                "cache": {
                  "cached": true,
                  "status": "HIT"
                },
                "provider": "google_cloud"
              },
              "close": {
                "reason": "Normal closure",
                "status_code": 1000
              },
              "compressed_message": "eJzLSM3JyQcABiwCFQ==",
              "headers": {
                "content-type": "application/json"
              },
              "healthcheck": {
                "message": {
                  "<any-key>": "string"
                },
                "status": 1
              },
              "http_version": "2.0",
              "is_body_truncated": false,
              "is_message_truncated": false,
              "message": "{\"f_string\":\"concat-STATIC_HIDDEN_VALUE\"}",
              "metadata": {
                "<any-key>": "string"
              },
              "records": [
                {
                  "type": "A",
                  "values": [
                    "213.186.33.19"
                  ]
                }
              ],
              "redirects": [
                {
                  "location": "https://example.com/new-location",
                  "status_code": 301
                }
              ],
              "status_code": 200
            },
            "retries": [],
            "retry_count": 0,
            "rum_context": {
              "application_id": "00000000-0000-0000-0000-000000000000",
              "session_id": "11111111-1111-1111-1111-111111111111",
              "view_id": "22222222-2222-2222-2222-222222222222"
            },
            "started_at": 1724445283308,
            "status": "passed",
            "sub_step": {
              "level": 1,
              "parent_step": {
                "id": "fkk-j2a-gmw"
              },
              "parent_test": {
                "id": "abc-def-123"
              }
            },
            "sub_test": {
              "id": "abc-def-123",
              "playing_tab": 0,
              "rum_context": {
                "application_id": "00000000-0000-0000-0000-000000000000",
                "session_id": "11111111-1111-1111-1111-111111111111",
                "view_id": "22222222-2222-2222-2222-222222222222"
              }
            },
            "subtype": "http",
            "tabs": [
              {
                "focused": true,
                "title": "Team Browser mini-websites",
                "url": "http://34.95.79.70/prototype"
              }
            ],
            "timings": {},
            "tunnel": false,
            "type": "click",
            "url": "http://34.95.79.70/prototype",
            "value": "http://34.95.79.70/prototype",
            "variables": {
              "config": [
                {
                  "err": "LOCAL_VARIABLE_UNKNOWN",
                  "error_message": "Unknown variable name undefined.",
                  "example": "lol value",
                  "id": "c896702c-1e34-4e62-a67b-432e8092d062",
                  "name": "HEADER_VALUE",
                  "pattern": "lol value",
                  "secure": false,
                  "type": "text",
                  "val": "value-to-extract",
                  "value": "lol value"
                }
              ],
              "extracted": [
                {
                  "err": "LOCAL_VARIABLE_UNKNOWN",
                  "error_message": "Unknown variable name undefined.",
                  "example": "lol value",
                  "id": "c896702c-1e34-4e62-a67b-432e8092d062",
                  "name": "HEADER_VALUE",
                  "pattern": "lol value",
                  "secure": false,
                  "type": "text",
                  "val": "value-to-extract",
                  "value": "lol value"
                }
              ]
            },
            "vitals_metrics": [
              {
                "cls": 0,
                "fcp": 120.3,
                "inp": 85,
                "lcp": 210.5,
                "ttfb": 95.2,
                "url": "http://34.95.79.70/prototype"
              }
            ],
            "warnings": [
              {
                "element_bounds": [
                  {
                    "height": 37,
                    "width": 343,
                    "x": 16,
                    "y": 140
                  }
                ],
                "message": "Element is not visible in the viewport",
                "type": "visibility"
              }
            ]
          }
        ],
        "timings": {
          "dns": 2.9,
          "download": 2.1,
          "firstByte": 95.2,
          "ssl": 187.9,
          "tcp": 92.6,
          "total": 380.7
        },
        "traceroute": [
          {
            "host": "34.95.79.70",
            "latency": {
              "avg": 1.8805,
              "max": 1.97,
              "min": 1.76
            },
            "packet_loss_percentage": 0,
            "packet_size": 56,
            "packets_received": 4,
            "packets_sent": 4,
            "resolved_ip": "34.95.79.70",
            "routers": [
              {
                "ip": "34.95.79.70",
                "resolved_host": "70.79.95.34.bc.googleusercontent.com"
              }
            ]
          }
        ],
        "triggered_at": 1679327999000,
        "tunnel": false
      },
      "test_sub_type": "http",
      "test_type": "fast-api",
      "test_version": 1
    },
    "id": "abc12345-1234-1234-1234-abc123456789",
    "type": "result"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport id="abc12345-1234-1234-1234-abc123456789"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/fast/${id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Get a specific version of a test{% #get-a-specific-version-of-a-test %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/tests/{public_id}/version_history/{version_number} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/tests/{public_id}/version_history/{version_number} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/tests/{public_id}/version_history/{version_number}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/tests/{public_id}/version_history/{version_number}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/tests/{public_id}/version_history/{version_number}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/tests/{public_id}/version_history/{version_number} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/tests/{public_id}/version_history/{version_number} |

### Overview

Get a specific version of a Synthetic test by its version number. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                             | Type    | Description                          |
| -------------------------------- | ------- | ------------------------------------ |
| public_id [*required*]      | string  | The public ID of the Synthetic test. |
| version_number [*required*] | integer | The version number to retrieve.      |

#### Query Strings

| Name                    | Type    | Description                                                                                                                                        |
| ----------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| include_change_metadata | boolean | If `true`, include change metadata in the response.                                                                                                |
| only_check_existence    | boolean | If `true`, only check whether the version exists without returning its full payload. Returns an empty object if the version exists, or 404 if not. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a specific version of a Synthetic test.

| Parent field    | Field                      | Type      | Description                                                                                                                                 |
| --------------- | -------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|                 | data                       | object    | Data object for a specific Synthetic test version.                                                                                          |
| data            | attributes                 | object    | Attributes of a specific Synthetic test version.                                                                                            |
| attributes      | author                     | object    | Object describing the author of a test version.                                                                                             |
| author          | email                      | string    | Email address of the author.                                                                                                                |
| author          | handle                     | string    | The author's Datadog handle (login username).                                                                                               |
| author          | id                         | string    | UUID of the author.                                                                                                                         |
| author          | name                       | string    | Display name of the author.                                                                                                                 |
| attributes      | change_metadata            | [object]  | List of metadata describing individual changes in this version. Only returned when the `include_change_metadata` query parameter is `true`. |
| change_metadata | action                     | string    | The action that was performed (for example, `updated` or `created`).                                                                        |
| change_metadata | action_metadata            | object    | Object containing metadata about a change action.                                                                                           |
| action_metadata | after_value                |           | The value of the property after the change.                                                                                                 |
| action_metadata | before_value               |           | The value of the property before the change.                                                                                                |
| action_metadata | diff_patches               | [object]  | List of diff patches for text changes.                                                                                                      |
| diff_patches    | diffs                      | [object]  | List of individual diff operations.                                                                                                         |
| diffs           | change_text                | string    | The text that was changed.                                                                                                                  |
| diffs           | operation                  | string    | The diff operation applied.                                                                                                                 |
| diff_patches    | length1                    | int64     | Length of the original text segment.                                                                                                        |
| diff_patches    | length2                    | int64     | Length of the modified text segment.                                                                                                        |
| diff_patches    | start1                     | int64     | Start position in the original text.                                                                                                        |
| diff_patches    | start2                     | int64     | Start position in the modified text.                                                                                                        |
| action_metadata | property_path              | string    | The dot-separated path of the property that was changed.                                                                                    |
| attributes      | payload                    | object    | The full test configuration at this version.                                                                                                |
| attributes      | version_payload_created_at | date-time | Timestamp of when this version was created.                                                                                                 |
| data            | id                         | string    | UUID of the version record.                                                                                                                 |
| data            | type                       | enum      | Type of the version resource. Allowed enum values: `version`                                                                                |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "author": {
        "email": "john.doe@example.com",
        "handle": "john.doe",
        "id": "00000000-0000-0000-0000-000000000000",
        "name": "John Doe"
      },
      "change_metadata": [
        {
          "action": "string",
          "action_metadata": {
            "after_value": "undefined",
            "before_value": "undefined",
            "diff_patches": [
              {
                "diffs": [
                  {
                    "change_text": "string",
                    "operation": "string"
                  }
                ],
                "length1": "integer",
                "length2": "integer",
                "start1": "integer",
                "start2": "integer"
              }
            ],
            "property_path": "string"
          }
        }
      ],
      "payload": {},
      "version_payload_created_at": "2024-01-01T00:00:00+00:00"
    },
    "id": "00000000-0000-0000-0000-000000000000",
    "type": "version"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"export version_number="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/${public_id}/version_history/${version_number}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Get available subtests for a multistep test{% #get-available-subtests-for-a-multistep-test %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                           |
| ----------------- | -------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/api-multistep/subtests/{public_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/api-multistep/subtests/{public_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/api-multistep/subtests/{public_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/api-multistep/subtests/{public_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/api-multistep/subtests/{public_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/api-multistep/subtests/{public_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/api-multistep/subtests/{public_id} |

### Overview

Get the list of API tests that can be added as subtests to a given API multistep test. The current test is excluded from the list since a test cannot be a subtest of itself. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                              |
| --------------------------- | ------ | ---------------------------------------- |
| public_id [*required*] | string | The public ID of the API multistep test. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing the list of available subtests for an API multistep test.

| Parent field | Field      | Type     | Description                                                  |
| ------------ | ---------- | -------- | ------------------------------------------------------------ |
|              | data       | [object] | List of API tests that can be added as subtests.             |
| data         | attributes | object   | Attributes of a Synthetic API multistep subtest.             |
| attributes   | name       | string   | Name of the subtest.                                         |
| attributes   | public_id  | string   | The public ID of the subtest.                                |
| data         | id         | string   | The public ID of the subtest.                                |
| data         | type       | enum     | Type of the subtest resource. Allowed enum values: `subtest` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "name": "My API Test",
        "public_id": "abc-def-123"
      },
      "id": "abc-def-123",
      "type": "subtest"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/api-multistep/subtests/${public_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Get parent tests for a subtest{% #get-parent-tests-for-a-subtest %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                                   |
| ----------------- | ---------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/api-multistep/subtests/{public_id}/parents |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/api-multistep/subtests/{public_id}/parents |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/api-multistep/subtests/{public_id}/parents      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/api-multistep/subtests/{public_id}/parents      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/api-multistep/subtests/{public_id}/parents     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/api-multistep/subtests/{public_id}/parents |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/api-multistep/subtests/{public_id}/parents |

### Overview

Get the list of API multistep tests that include a given subtest, along with their monitor status. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                   |
| --------------------------- | ------ | ----------------------------- |
| public_id [*required*] | string | The public ID of the subtest. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing the list of parent tests for an API multistep subtest.

| Parent field | Field                  | Type     | Description                                                          |
| ------------ | ---------------------- | -------- | -------------------------------------------------------------------- |
|              | data                   | [object] | List of parent tests that include this subtest.                      |
| data         | attributes             | object   | Attributes of a parent API multistep test.                           |
| attributes   | child_name             | string   | The name of the child subtest.                                       |
| attributes   | child_public_id        | string   | The public ID of the child subtest.                                  |
| attributes   | monitor_id             | int64    | The associated monitor ID.                                           |
| attributes   | name                   | string   | Name of the parent test.                                             |
| attributes   | overall_state          | int64    | The overall state of the parent test.                                |
| attributes   | overall_state_modified | string   | Timestamp of when the overall state was last modified.               |
| attributes   | public_id              | string   | The public ID of the parent test.                                    |
| data         | id                     | string   | The public ID of the parent test.                                    |
| data         | type                   | enum     | Type of the parent test resource. Allowed enum values: `parent_test` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "child_name": "My API Subtest",
        "child_public_id": "xyz-uvw-789",
        "monitor_id": 12345678,
        "name": "My Multistep Test",
        "overall_state": 0,
        "overall_state_modified": "2024-01-01T00:00:00+00:00",
        "public_id": "abc-def-123"
      },
      "id": "abc-def-123",
      "type": "parent_test"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/api-multistep/subtests/${public_id}/parents" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Get parent suites for a test{% #get-parent-suites-for-a-test %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                        |
| ----------------- | ----------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/tests/{public_id}/parent-suites |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/tests/{public_id}/parent-suites |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/tests/{public_id}/parent-suites      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/tests/{public_id}/parent-suites      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/tests/{public_id}/parent-suites     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/tests/{public_id}/parent-suites |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/tests/{public_id}/parent-suites |

### Overview

Get the list of parent suites and their status for a given Synthetic test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                          |
| --------------------------- | ------ | ------------------------------------ |
| public_id [*required*] | string | The public ID of the Synthetic test. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing the list of parent suites for a Synthetic test.

| Parent field | Field                  | Type     | Description                                                            |
| ------------ | ---------------------- | -------- | ---------------------------------------------------------------------- |
|              | data                   | [object] | List of parent suites for the given test.                              |
| data         | attributes             | object   | Object containing details about a parent suite of a Synthetic test.    |
| attributes   | child_name             | string   | The name of the child test within the suite.                           |
| attributes   | child_public_id        | string   | The public ID of the child test within the suite.                      |
| attributes   | monitor_id             | int64    | The associated monitor ID.                                             |
| attributes   | name                   | string   | Name of the parent suite.                                              |
| attributes   | overall_state          | int64    | The overall state of the parent suite.                                 |
| attributes   | overall_state_modified | string   | Timestamp of when the overall state was last modified.                 |
| attributes   | public_id              | string   | The public ID of the parent suite.                                     |
| data         | id                     | string   | The public ID of the parent suite.                                     |
| data         | type                   | enum     | Type of the parent suite resource. Allowed enum values: `parent_suite` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "child_name": "My API Test",
        "child_public_id": "xyz-uvw-789",
        "monitor_id": 12345678,
        "name": "My Suite",
        "overall_state": 0,
        "overall_state_modified": "2024-01-01T00:00:00+00:00",
        "public_id": "abc-def-123"
      },
      "id": "abc-def-123",
      "type": "parent_suite"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/${public_id}/parent-suites" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Get version history of a test{% #get-version-history-of-a-test %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                          |
| ----------------- | ------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/tests/{public_id}/version_history |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/tests/{public_id}/version_history |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/tests/{public_id}/version_history      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/tests/{public_id}/version_history      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/tests/{public_id}/version_history     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/tests/{public_id}/version_history |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/tests/{public_id}/version_history |

### Overview

Get the paginated version history for a Synthetic test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                          |
| --------------------------- | ------ | ------------------------------------ |
| public_id [*required*] | string | The public ID of the Synthetic test. |

#### Query Strings

| Name                | Type    | Description                                                                             |
| ------------------- | ------- | --------------------------------------------------------------------------------------- |
| last_version_number | integer | The version number of the last item from the previous page. Omit to get the first page. |
| limit               | integer | Maximum number of version records to return per page.                                   |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing the paginated version history for a Synthetic test.

| Parent field    | Field                      | Type      | Description                                                                                                                              |
| --------------- | -------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|                 | data                       | [object]  | List of version change records.                                                                                                          |
| data            | attributes                 | object    | Attributes of a version change record.                                                                                                   |
| attributes      | author_uuid                | string    | UUID of the user who created this version.                                                                                               |
| attributes      | change_metadata            | [object]  | List of metadata describing individual changes in this version.                                                                          |
| change_metadata | action                     | string    | The action that was performed (for example, `updated` or `created`).                                                                     |
| change_metadata | action_metadata            | object    | Object containing metadata about a change action.                                                                                        |
| action_metadata | after_value                |           | The value of the property after the change.                                                                                              |
| action_metadata | before_value               |           | The value of the property before the change.                                                                                             |
| action_metadata | diff_patches               | [object]  | List of diff patches for text changes.                                                                                                   |
| diff_patches    | diffs                      | [object]  | List of individual diff operations.                                                                                                      |
| diffs           | change_text                | string    | The text that was changed.                                                                                                               |
| diffs           | operation                  | string    | The diff operation applied.                                                                                                              |
| diff_patches    | length1                    | int64     | Length of the original text segment.                                                                                                     |
| diff_patches    | length2                    | int64     | Length of the modified text segment.                                                                                                     |
| diff_patches    | start1                     | int64     | Start position in the original text.                                                                                                     |
| diff_patches    | start2                     | int64     | Start position in the modified text.                                                                                                     |
| action_metadata | property_path              | string    | The dot-separated path of the property that was changed.                                                                                 |
| attributes      | version_number             | int64     | The sequential version number.                                                                                                           |
| attributes      | version_payload_created_at | date-time | Timestamp of when this version was created.                                                                                              |
| data            | id                         | string    | UUID of the version change record.                                                                                                       |
| data            | type                       | enum      | Type of the version metadata resource. Allowed enum values: `version_metadata`                                                           |
|                 | meta                       | object    | Pagination metadata for a version history response.                                                                                      |
| meta            | next_last_version_number   | int64     | The version number to use as the `last_version_number` query parameter to fetch the next page. `null` indicates there are no more pages. |
| meta            | retention_period_in_days   | int64     | The number of days that version history is retained.                                                                                     |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "author_uuid": "00000000-0000-0000-0000-000000000000",
        "change_metadata": [
          {
            "action": "string",
            "action_metadata": {
              "after_value": "undefined",
              "before_value": "undefined",
              "diff_patches": [
                {
                  "diffs": [
                    {
                      "change_text": "string",
                      "operation": "string"
                    }
                  ],
                  "length1": "integer",
                  "length2": "integer",
                  "start1": "integer",
                  "start2": "integer"
                }
              ],
              "property_path": "string"
            }
          }
        ],
        "version_number": 5,
        "version_payload_created_at": "2024-01-01T00:00:00+00:00"
      },
      "id": "00000000-0000-0000-0000-000000000000",
      "type": "version_metadata"
    }
  ],
  "meta": {
    "next_last_version_number": 3,
    "retention_period_in_days": 30
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/${public_id}/version_history" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Patch a test suite{% #patch-a-test-suite %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                       |
| ----------------- | ---------------------------------------------------------------------------------- |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/synthetics/suites/{public_id}/jsonpatch |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/synthetics/suites/{public_id}/jsonpatch |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/synthetics/suites/{public_id}/jsonpatch      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/synthetics/suites/{public_id}/jsonpatch      |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/synthetics/suites/{public_id}/jsonpatch     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/synthetics/suites/{public_id}/jsonpatch |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/synthetics/suites/{public_id}/jsonpatch |

### Overview



Patch a Synthetic test suite using JSON Patch (RFC 6902). Use partial updates to modify only specific fields of a test suite.

Common operations include:

- Replace field values: `{"op": "replace", "path": "/name", "value": "new_name"}`
- Add/update tags: `{"op": "add", "path": "/tags/-", "value": "new_tag"}`
- Remove fields: `{"op": "remove", "path": "/message"}`
This endpoint requires any of the following permissions:`synthetics_write``synthetics_create_edit_trigger`
OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                         |
| --------------------------- | ------ | --------------------------------------------------- |
| public_id [*required*] | string | The public ID of the Synthetic test suite to patch. |

### Request

#### Body Data (required)

JSON Patch document with operations to apply.

{% tab title="Model" %}

| Parent field | Field                  | Type     | Description                                                                                                            |
| ------------ | ---------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*] | object   | Data object for a JSON Patch request on a Synthetic test suite.                                                        |
| data         | attributes             | object   | Attributes for a JSON Patch request on a Synthetic test suite.                                                         |
| attributes   | json_patch             | [object] | JSON Patch operations following RFC 6902.                                                                              |
| json_patch   | op [*required*]   | enum     | The operation to perform. Allowed enum values: `add,remove,replace,move,copy,test`                                     |
| json_patch   | path [*required*] | string   | A JSON Pointer path (e.g., "/name", "/value/secure").                                                                  |
| json_patch   | value                  |          | The value to use for the operation (not applicable for "remove" and "test" operations).                                |
| data         | type                   | enum     | Type for a JSON Patch request on a Synthetic test suite, `suites_json_patch`. Allowed enum values: `suites_json_patch` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name",
          "value": "undefined"
        }
      ]
    },
    "type": "suites_json_patch"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Synthetics suite response

| Parent field | Field                       | Type     | Description                                                                       |
| ------------ | --------------------------- | -------- | --------------------------------------------------------------------------------- |
|              | data                        | object   | Synthetics suite response data                                                    |
| data         | attributes                  | object   | Object containing details about a Synthetic suite.                                |
| attributes   | message                     | string   | Notification message associated with the suite.                                   |
| attributes   | monitor_id                  | int64    | The associated monitor ID.                                                        |
| attributes   | name [*required*]      | string   | Name of the suite.                                                                |
| attributes   | options [*required*]   | object   | Object describing the extra options for a Synthetic suite.                        |
| options      | alerting_threshold          | double   | Percentage of critical tests failure needed for a suite to fail.                  |
| attributes   | public_id                   | string   | The public ID for the test.                                                       |
| attributes   | tags                        | [string] | Array of tags attached to the suite.                                              |
| attributes   | tests [*required*]     | [object] | Array of Synthetic tests included in the suite.                                   |
| tests        | alerting_criticality        | enum     | Alerting criticality for each the test. Allowed enum values: `ignore,critical`    |
| tests        | public_id [*required*] | string   | The public ID of the Synthetic test included in the suite.                        |
| attributes   | type [*required*]      | enum     | Type of the Synthetic suite, `suite`. Allowed enum values: `suite`                |
| data         | id                          | string   | The public ID for the suite.                                                      |
| data         | type                        | enum     | Type for the Synthetics suites responses, `suites`. Allowed enum values: `suites` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "message": "Notification message",
      "monitor_id": 12345678,
      "name": "Example suite name",
      "options": {
        "alerting_threshold": "number"
      },
      "public_id": "123-abc-456",
      "tags": [
        "env:production"
      ],
      "tests": [
        {
          "alerting_criticality": "critical",
          "public_id": ""
        }
      ],
      "type": "suite"
    },
    "id": "123-abc-456",
    "type": "suites"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport public_id="123-abc-456"\# Curl commandcurl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/suites/${public_id}/jsonpatch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name"
        }
      ]
    },
    "type": "suites_json_patch"
  }
}
EOF
                
{% /tab %}

## Get a presigned URL for downloading a test file{% #get-a-presigned-url-for-downloading-a-test-file %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                          |
| ----------------- | ------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/download |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/download |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/synthetics/tests/{public_id}/files/download      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/synthetics/tests/{public_id}/files/download      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/download     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/download |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/download |

### Overview

Get a presigned URL to download a file attached to a Synthetic test. The returned URL is temporary and expires after a short period. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                          |
| --------------------------- | ------ | ------------------------------------ |
| public_id [*required*] | string | The public ID of the Synthetic test. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Field                       | Type   | Description                                      |
| --------------------------- | ------ | ------------------------------------------------ |
| bucketKey [*required*] | string | The bucket key referencing the file to download. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "bucketKey": "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a presigned URL for downloading a test file.

| Field | Type   | Description                                                                 |
| ----- | ------ | --------------------------------------------------------------------------- |
| url   | string | A presigned URL to download the file. The URL expires after a short period. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "url": "https://storage.example.com/presigned-download-url"
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport public_id="abc-def-123"\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/${public_id}/files/download" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "bucketKey": "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json"
}
EOF
                
{% /tab %}

## Get presigned URLs for uploading a test file{% #get-presigned-urls-for-uploading-a-test-file %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                                          |
| ----------------- | ----------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-presigned-urls |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-presigned-urls |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/synthetics/tests/{public_id}/files/multipart-presigned-urls      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/synthetics/tests/{public_id}/files/multipart-presigned-urls      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-presigned-urls     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-presigned-urls |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-presigned-urls |

### Overview

Get presigned URLs for uploading a file to a Synthetic test using multipart upload. Returns the presigned URLs for each part along with the bucket key that references the file. This endpoint requires any of the following permissions:
`synthetics_write``synthetics_create_edit_trigger`


OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                          |
| --------------------------- | ------ | ------------------------------------ |
| public_id [*required*] | string | The public ID of the Synthetic test. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                             | Type     | Description                                                                                                               |
| ------------ | --------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
|              | bucketKeyPrefix [*required*] | enum     | The bucket key prefix indicating the type of file upload. Allowed enum values: `api-upload-file,browser-upload-file-step` |
|              | parts [*required*]           | [object] | Array of part descriptors for the multipart upload.                                                                       |
| parts        | md5 [*required*]             | string   | Base64-encoded MD5 digest of the part content.                                                                            |
| parts        | partNumber [*required*]      | int64    | The 1-indexed part number for the multipart upload.                                                                       |

{% /tab %}

{% tab title="Example" %}

```json
{
  "bucketKeyPrefix": "api-upload-file",
  "parts": [
    {
      "md5": "1B2M2Y8AsgTpgAmY7PhCfg==",
      "partNumber": 1
    }
  ]
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing presigned URLs for multipart file upload and the bucket key.

| Parent field                    | Field                           | Type   | Description                                                               |
| ------------------------------- | ------------------------------- | ------ | ------------------------------------------------------------------------- |
|                                 | bucketKey                       | string | The bucket key that references the uploaded file after completion.        |
|                                 | multipart_presigned_urls_params | object | Presigned URL parameters returned for a multipart upload.                 |
| multipart_presigned_urls_params | key                             | string | The full storage path for the file being uploaded.                        |
| multipart_presigned_urls_params | upload_id                       | string | The upload ID assigned by the storage provider for this multipart upload. |
| multipart_presigned_urls_params | urls                            | object | A map of part numbers to presigned upload URLs.                           |
| additionalProperties            | <any-key>                       | string |

{% /tab %}

{% tab title="Example" %}

```json
{
  "bucketKey": "api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "multipart_presigned_urls_params": {
    "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
    "upload_id": "upload-id-abc123",
    "urls": {
      "<any-key>": "string"
    }
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport public_id="abc-def-123"\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/${public_id}/files/multipart-presigned-urls" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "bucketKeyPrefix": "api-upload-file",
  "parts": [
    {
      "md5": "1B2M2Y8AsgTpgAmY7PhCfg==",
      "partNumber": 1
    }
  ]
}
EOF
                
{% /tab %}

## Complete a multipart upload of a test file{% #complete-a-multipart-upload-of-a-test-file %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-upload-complete |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-upload-complete |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/synthetics/tests/{public_id}/files/multipart-upload-complete      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/synthetics/tests/{public_id}/files/multipart-upload-complete      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-upload-complete     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-upload-complete |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-upload-complete |

### Overview

Complete a multipart file upload for a Synthetic test. Call this endpoint after all parts have been uploaded using the presigned URLs obtained from the multipart presigned URLs endpoint. This endpoint requires any of the following permissions:
`synthetics_write``synthetics_create_edit_trigger`


OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                          |
| --------------------------- | ------ | ------------------------------------ |
| public_id [*required*] | string | The public ID of the Synthetic test. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                        | Type     | Description                                                         |
| ------------ | ---------------------------- | -------- | ------------------------------------------------------------------- |
|              | key [*required*]        | string   | The full storage path for the uploaded file.                        |
|              | parts [*required*]      | [object] | Array of completed parts with their ETags.                          |
| parts        | ETag [*required*]       | string   | The ETag returned by the storage provider after uploading the part. |
| parts        | PartNumber [*required*] | int64    | The 1-indexed part number for the multipart upload.                 |
|              | uploadId [*required*]   | string   | The upload ID returned when the multipart upload was initiated.     |

{% /tab %}

{% tab title="Example" %}

```json
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "parts": [
    {
      "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
      "PartNumber": 1
    }
  ],
  "uploadId": "upload-id-abc123"
}
```

{% /tab %}

### Response

{% tab title="204" %}
No Content
{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport public_id="abc-def-123"\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/${public_id}/files/multipart-upload-complete" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "parts": [
    {
      "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
      "PartNumber": 1
    }
  ],
  "uploadId": "upload-id-abc123"
}
EOF
                
{% /tab %}

## Abort a multipart upload of a test file{% #abort-a-multipart-upload-of-a-test-file %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                                        |
| ----------------- | --------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-upload-abort |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-upload-abort |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/synthetics/tests/{public_id}/files/multipart-upload-abort      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/synthetics/tests/{public_id}/files/multipart-upload-abort      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-upload-abort     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-upload-abort |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/synthetics/tests/{public_id}/files/multipart-upload-abort |

### Overview

Abort an in-progress multipart file upload for a Synthetic test. This cancels the upload and releases any storage used by already-uploaded parts. This endpoint requires any of the following permissions:
`synthetics_write``synthetics_create_edit_trigger`


OAuth apps require the `synthetics_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                          |
| --------------------------- | ------ | ------------------------------------ |
| public_id [*required*] | string | The public ID of the Synthetic test. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Field                      | Type   | Description                                                       |
| -------------------------- | ------ | ----------------------------------------------------------------- |
| key [*required*]      | string | The full storage path of the file whose upload should be aborted. |
| uploadId [*required*] | string | The upload ID of the multipart upload to abort.                   |

{% /tab %}

{% tab title="Example" %}

```json
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "uploadId": "upload-id-abc123"
}
```

{% /tab %}

### Response

{% tab title="204" %}
No Content
{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
\# Path parametersexport public_id="abc-def-123"\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/${public_id}/files/multipart-upload-abort" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "key": "org-123/api-upload-file/abc-def-123/2024-01-01T00:00:00_uuid.json",
  "uploadId": "upload-id-abc123"
}
EOF
                
{% /tab %}

## Get a test result{% #get-a-test-result %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                              |
| ----------------- | ----------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/tests/{public_id}/results/{result_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/tests/{public_id}/results/{result_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/tests/{public_id}/results/{result_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/tests/{public_id}/results/{result_id}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/tests/{public_id}/results/{result_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/tests/{public_id}/results/{result_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/tests/{public_id}/results/{result_id} |

### Overview

Get a specific full result from a given Synthetic test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                                             |
| --------------------------- | ------ | ----------------------------------------------------------------------- |
| public_id [*required*] | string | The public ID of the Synthetic test to which the target result belongs. |
| result_id [*required*] | string | The ID of the result to get.                                            |

#### Query Strings

| Name      | Type    | Description                                                 |
| --------- | ------- | ----------------------------------------------------------- |
| event_id  | string  | The event ID used to look up the result in the event store. |
| timestamp | integer | Timestamp in seconds to look up the result.                 |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response object for a Synthetic test result.

| Parent field         | Field                            | Type     | Description                                                                                                                        |
| -------------------- | -------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|                      | data                             | object   | Wrapper object for a Synthetic test result.                                                                                        |
| data                 | attributes                       | object   | Attributes of a Synthetic test result.                                                                                             |
| attributes           | batch                            | object   | Batch information for the test result.                                                                                             |
| batch                | id                               | string   | Batch identifier.                                                                                                                  |
| attributes           | ci                               | object   | CI information associated with the test result.                                                                                    |
| ci                   | pipeline                         | object   | Details of the CI pipeline.                                                                                                        |
| pipeline             | id                               | string   | Pipeline identifier.                                                                                                               |
| pipeline             | name                             | string   | Pipeline name.                                                                                                                     |
| pipeline             | number                           | int64    | Pipeline number.                                                                                                                   |
| pipeline             | url                              | string   | Pipeline URL.                                                                                                                      |
| ci                   | provider                         | object   | Details of the CI provider.                                                                                                        |
| provider             | name                             | string   | Provider name.                                                                                                                     |
| ci                   | stage                            | object   | Details of the CI stage.                                                                                                           |
| stage                | name                             | string   | Stage name.                                                                                                                        |
| ci                   | workspace_path                   | string   | Path of the workspace that ran the CI job.                                                                                         |
| attributes           | device                           | object   | Device information for the test result (browser and mobile tests).                                                                 |
| device               | browser                          | object   | Browser information for the device used to run the test.                                                                           |
| browser              | type                             | string   | Browser type (for example, `chrome`, `firefox`).                                                                                   |
| browser              | user_agent                       | string   | User agent string reported by the browser.                                                                                         |
| browser              | version                          | string   | Browser version.                                                                                                                   |
| device               | id                               | string   | Device identifier.                                                                                                                 |
| device               | name                             | string   | Device name.                                                                                                                       |
| device               | platform                         | object   | Platform information for the device used to run the test.                                                                          |
| platform             | name                             | string   | Platform name (for example, `linux`, `macos`).                                                                                     |
| platform             | version                          | string   | Platform version.                                                                                                                  |
| device               | resolution                       | object   | Screen resolution of the device used to run the test.                                                                              |
| resolution           | height                           | int64    | Viewport height in pixels.                                                                                                         |
| resolution           | pixel_ratio                      | double   | Device pixel ratio.                                                                                                                |
| resolution           | width                            | int64    | Viewport width in pixels.                                                                                                          |
| device               | type                             | string   | Device type.                                                                                                                       |
| attributes           | git                              | object   | Git information associated with the test result.                                                                                   |
| git                  | branch                           | string   | Git branch name.                                                                                                                   |
| git                  | commit                           | object   | Details of the Git commit associated with the test result.                                                                         |
| commit               | author                           | object   | A Git user (author or committer).                                                                                                  |
| author               | date                             | string   | Timestamp of the commit action for this user.                                                                                      |
| author               | email                            | string   | Email address of the Git user.                                                                                                     |
| author               | name                             | string   | Name of the Git user.                                                                                                              |
| commit               | committer                        | object   | A Git user (author or committer).                                                                                                  |
| committer            | date                             | string   | Timestamp of the commit action for this user.                                                                                      |
| committer            | email                            | string   | Email address of the Git user.                                                                                                     |
| committer            | name                             | string   | Name of the Git user.                                                                                                              |
| commit               | message                          | string   | Commit message.                                                                                                                    |
| commit               | sha                              | string   | Commit SHA.                                                                                                                        |
| commit               | url                              | string   | URL of the commit.                                                                                                                 |
| git                  | repository_url                   | string   | Git repository URL.                                                                                                                |
| attributes           | location                         | object   | Location information for a Synthetic test result.                                                                                  |
| location             | id                               | string   | Identifier of the location.                                                                                                        |
| location             | name                             | string   | Human-readable name of the location.                                                                                               |
| location             | version                          | string   | Version of the worker that ran the test.                                                                                           |
| location             | worker_id                        | string   | Identifier of the specific worker that ran the test.                                                                               |
| attributes           | result                           | object   | Full result details for a Synthetic test execution.                                                                                |
| result               | assertions                       | [object] | Assertion results produced by the test.                                                                                            |
| assertions           | actual                           |          | Actual value observed during the test. Its type depends on the assertion type.                                                     |
| assertions           | error_message                    | string   | Error message if the assertion failed.                                                                                             |
| assertions           | expected                         |          | Expected value for the assertion. Its type depends on the assertion type.                                                          |
| assertions           | operator                         | string   | Operator used for the assertion (for example, `is`, `contains`).                                                                   |
| assertions           | property                         | string   | Property targeted by the assertion, when applicable.                                                                               |
| assertions           | target                           |          | Target value for the assertion. Its type depends on the assertion type.                                                            |
| assertions           | target_path                      | string   | JSON path or XPath evaluated for the assertion.                                                                                    |
| assertions           | target_path_operator             | string   | Operator used for the target path assertion.                                                                                       |
| assertions           | type                             | string   | Type of the assertion (for example, `responseTime`, `statusCode`, `body`).                                                         |
| assertions           | valid                            | boolean  | Whether the assertion passed.                                                                                                      |
| result               | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                  |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                 |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                 |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                   |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                   |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                      |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                              |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                   |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                 |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                         |
| result               | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                             |
| result               | cert                             | object   | SSL/TLS certificate information returned from an SSL test.                                                                         |
| cert                 | cipher                           | string   | Cipher used for the TLS connection.                                                                                                |
| cert                 | exponent                         | int64    | RSA exponent of the certificate.                                                                                                   |
| cert                 | ext_key_usage                    | [string] | Extended key usage extensions for the certificate.                                                                                 |
| cert                 | fingerprint                      | string   | SHA-1 fingerprint of the certificate.                                                                                              |
| cert                 | fingerprint256                   | string   | SHA-256 fingerprint of the certificate.                                                                                            |
| cert                 | issuer                           | object   | Certificate issuer details.                                                                                                        |
| additionalProperties | <any-key>                        | string   |
| cert                 | modulus                          | string   | RSA modulus of the certificate.                                                                                                    |
| cert                 | protocol                         | string   | TLS protocol used (for example, `TLSv1.2`).                                                                                        |
| cert                 | serial_number                    | string   | Serial number of the certificate.                                                                                                  |
| cert                 | subject                          | object   | Certificate subject details.                                                                                                       |
| additionalProperties | <any-key>                        | string   |
| cert                 | tls_version                      | double   | TLS protocol version.                                                                                                              |
| cert                 | valid                            | object   | Validity window of a certificate.                                                                                                  |
| valid                | from                             | int64    | Unix timestamp (ms) of when the certificate became valid.                                                                          |
| valid                | to                               | int64    | Unix timestamp (ms) of when the certificate expires.                                                                               |
| result               | compressed_json_descriptor       | string   | Compressed JSON descriptor for the test (internal format).                                                                         |
| result               | compressed_steps                 | string   | Compressed representation of the test steps (internal format).                                                                     |
| result               | connection_outcome               | string   | Outcome of the connection attempt (for example, `established`, `refused`).                                                         |
| result               | dns_resolution                   | object   | DNS resolution details recorded during the test execution.                                                                         |
| dns_resolution       | attempts                         | [object] | DNS resolution attempts made during the test.                                                                                      |
| dns_resolution       | resolved_ip                      | string   | Resolved IP address for the target host.                                                                                           |
| dns_resolution       | resolved_port                    | string   | Resolved port for the target service.                                                                                              |
| dns_resolution       | server                           | string   | DNS server used for the resolution.                                                                                                |
| result               | duration                         | double   | Duration of the test execution (in milliseconds).                                                                                  |
| result               | exited_on_step_success           | boolean  | Whether the test exited early because a step marked with `exitIfSucceed` passed.                                                   |
| result               | failure                          | object   | Details about the failure of a Synthetic test.                                                                                     |
| failure              | code                             | string   | Error code for the failure.                                                                                                        |
| failure              | internal_code                    | string   | Internal error code used for debugging.                                                                                            |
| failure              | internal_message                 | string   | Internal error message used for debugging.                                                                                         |
| failure              | message                          | string   | Error message for the failure.                                                                                                     |
| result               | finished_at                      | int64    | Timestamp of when the test finished (in milliseconds).                                                                             |
| result               | handshake                        | object   | Handshake request and response for protocol-level tests.                                                                           |
| handshake            | request                          | object   | Details of the outgoing request made during the test execution.                                                                    |
| request              | allow_insecure                   | boolean  | Whether insecure certificates are allowed for this request.                                                                        |
| request              | body                             | string   | Body sent with the request.                                                                                                        |
| request              | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                             |
| request              | destination_service              | string   | Destination service for a Network Path test.                                                                                       |
| request              | dns_server                       | string   | DNS server used to resolve the target host.                                                                                        |
| request              | dns_server_port                  | int64    | Port of the DNS server used for resolution.                                                                                        |
| request              | e2e_queries                      | int64    | Number of end-to-end probe queries issued.                                                                                         |
| request              | files                            | [object] | Files attached to the request.                                                                                                     |
| files                | bucket_key                       | string   | Storage bucket key where the file is stored.                                                                                       |
| files                | encoding                         | string   | Encoding of the file contents.                                                                                                     |
| files                | name                             | string   | File name.                                                                                                                         |
| files                | size                             | int64    | File size in bytes.                                                                                                                |
| files                | type                             | string   | File MIME type.                                                                                                                    |
| request              | headers                          | object   | Headers sent with the request.                                                                                                     |
| request              | host                             | string   | Host targeted by the request.                                                                                                      |
| request              | max_ttl                          | int64    | Maximum TTL for network probe packets.                                                                                             |
| request              | message                          | string   | Message sent with the request (for WebSocket/TCP/UDP tests).                                                                       |
| request              | method                           | string   | HTTP method used for the request.                                                                                                  |
| request              | no_saving_response_body          | boolean  | Whether the response body was not saved.                                                                                           |
| request              | port                             |          | Port targeted by the request. Can be a number or a string variable reference.                                                      |
| request              | service                          | string   | Service name targeted by the request (for gRPC tests).                                                                             |
| request              | source_service                   | string   | Source service for a Network Path test.                                                                                            |
| request              | timeout                          | int64    | Request timeout in milliseconds.                                                                                                   |
| request              | tool_name                        | string   | Name of the MCP tool called (MCP tests only).                                                                                      |
| request              | traceroute_queries               | int64    | Number of traceroute probe queries issued.                                                                                         |
| request              | url                              | string   | URL targeted by the request.                                                                                                       |
| handshake            | response                         | object   | Details of the response received during the test execution.                                                                        |
| response             | body                             | string   | Body of the response.                                                                                                              |
| response             | body_compressed                  | string   | Compressed representation of the response body.                                                                                    |
| response             | body_hashes                      | string   | Hashes computed over the response body.                                                                                            |
| response             | body_size                        | int64    | Size of the response body in bytes.                                                                                                |
| response             | cache_headers                    | object   | Cache-related response headers.                                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | cdn                              | object   | CDN provider details inferred from response headers.                                                                               |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                 |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                       |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                          |
| response             | close                            | object   | WebSocket close frame information for WebSocket test responses.                                                                    |
| close                | reason                           | string   | Reason string received in the close frame.                                                                                         |
| close                | status_code                      | int64    | Status code received in the close frame.                                                                                           |
| response             | compressed_message               | string   | Compressed representation of the response message.                                                                                 |
| response             | headers                          | object   | Response headers.                                                                                                                  |
| response             | healthcheck                      | object   | Health check information returned from a gRPC health check call.                                                                   |
| healthcheck          | message                          | object   | Raw health check message payload.                                                                                                  |
| additionalProperties | <any-key>                        | string   |
| healthcheck          | status                           | int64    | Health check status code.                                                                                                          |
| response             | http_version                     | string   | HTTP version of the response.                                                                                                      |
| response             | is_body_truncated                | boolean  | Whether the response body was truncated.                                                                                           |
| response             | is_message_truncated             | boolean  | Whether the response message was truncated.                                                                                        |
| response             | message                          | string   | Message received in the response (for WebSocket/TCP/UDP tests).                                                                    |
| response             | metadata                         | object   | Additional metadata returned with the response.                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | records                          | [object] | DNS records returned in the response (DNS tests only).                                                                             |
| records              | type                             | string   | DNS record type (for example, `A`, `AAAA`, `CNAME`).                                                                               |
| records              | values                           | [string] | Values associated with the DNS record.                                                                                             |
| response             | redirects                        | [object] | Redirect hops encountered while performing the request.                                                                            |
| redirects            | location                         | string   | Target location of the redirect.                                                                                                   |
| redirects            | status_code                      | int64    | HTTP status code of the redirect response.                                                                                         |
| response             | status_code                      | int64    | HTTP status code of the response.                                                                                                  |
| result               | id                               | string   | The unique identifier for this result.                                                                                             |
| result               | initial_id                       | string   | The initial result ID before any retries.                                                                                          |
| result               | is_fast_retry                    | boolean  | Whether this result is from a fast retry.                                                                                          |
| result               | is_last_retry                    | boolean  | Whether this result is from the last retry.                                                                                        |
| result               | netpath                          | object   | Network Path test result capturing the path between source and destination.                                                        |
| netpath              | destination                      | object   | Destination endpoint of a network path measurement.                                                                                |
| destination          | hostname                         | string   | Hostname of the destination.                                                                                                       |
| destination          | ip_address                       | string   | IP address of the destination.                                                                                                     |
| destination          | port                             | int64    | Port of the destination service.                                                                                                   |
| netpath              | hops                             | [object] | Hops along the network path.                                                                                                       |
| hops                 | hostname                         | string   | Resolved hostname of the hop.                                                                                                      |
| hops                 | ip_address                       | string   | IP address of the hop.                                                                                                             |
| hops                 | reachable                        | boolean  | Whether this hop was reachable.                                                                                                    |
| hops                 | rtt                              | double   | Round-trip time to this hop in milliseconds.                                                                                       |
| hops                 | ttl                              | int64    | Time-to-live value of the probe packet at this hop.                                                                                |
| netpath              | origin                           | string   | Origin of the network path (for example, probe source).                                                                            |
| netpath              | pathtrace_id                     | string   | Identifier of the path trace.                                                                                                      |
| netpath              | protocol                         | string   | Protocol used for the path trace (for example, `tcp`, `udp`, `icmp`).                                                              |
| netpath              | source                           | object   | Source endpoint of a network path measurement.                                                                                     |
| source               | hostname                         | string   | Hostname of the endpoint.                                                                                                          |
| netpath              | tags                             | [string] | Tags associated with the network path measurement.                                                                                 |
| netpath              | timestamp                        | int64    | Unix timestamp (ms) of the network path measurement.                                                                               |
| result               | netstats                         | object   | Aggregated network statistics from the test execution.                                                                             |
| netstats             | hops                             | object   | Statistics about the number of hops for a network test.                                                                            |
| hops                 | avg                              | double   | Average number of hops.                                                                                                            |
| hops                 | max                              | int64    | Maximum number of hops.                                                                                                            |
| hops                 | min                              | int64    | Minimum number of hops.                                                                                                            |
| netstats             | jitter                           | double   | Network jitter in milliseconds.                                                                                                    |
| netstats             | latency                          | object   | Latency statistics for a network probe.                                                                                            |
| latency              | avg                              | double   | Average latency in milliseconds.                                                                                                   |
| latency              | max                              | double   | Maximum latency in milliseconds.                                                                                                   |
| latency              | min                              | double   | Minimum latency in milliseconds.                                                                                                   |
| netstats             | packet_loss_percentage           | double   | Percentage of probe packets lost.                                                                                                  |
| netstats             | packets_received                 | int64    | Number of probe packets received.                                                                                                  |
| netstats             | packets_sent                     | int64    | Number of probe packets sent.                                                                                                      |
| result               | ocsp                             | object   | OCSP response received while validating a certificate.                                                                             |
| ocsp                 | certificate                      | object   | Certificate details returned in an OCSP response.                                                                                  |
| certificate          | revocation_reason                | string   | Reason code for the revocation, when applicable.                                                                                   |
| certificate          | revocation_time                  | int64    | Unix timestamp (ms) of the revocation.                                                                                             |
| certificate          | serial_number                    | string   | Serial number of the certificate.                                                                                                  |
| ocsp                 | status                           | string   | OCSP response status (for example, `good`, `revoked`, `unknown`).                                                                  |
| ocsp                 | updates                          | object   | OCSP response update timestamps.                                                                                                   |
| updates              | next_update                      | int64    | Unix timestamp (ms) of the next expected OCSP update.                                                                              |
| updates              | produced_at                      | int64    | Unix timestamp (ms) of when the OCSP response was produced.                                                                        |
| updates              | this_update                      | int64    | Unix timestamp (ms) of this OCSP update.                                                                                           |
| result               | ping                             | object   | A network probe result, used for traceroute hops and ping summaries.                                                               |
| ping                 | host                             | string   | Target hostname.                                                                                                                   |
| ping                 | latency                          | object   | Latency statistics for a network probe.                                                                                            |
| latency              | avg                              | double   | Average latency in milliseconds.                                                                                                   |
| latency              | max                              | double   | Maximum latency in milliseconds.                                                                                                   |
| latency              | min                              | double   | Minimum latency in milliseconds.                                                                                                   |
| ping                 | packet_loss_percentage           | double   | Percentage of probe packets lost.                                                                                                  |
| ping                 | packet_size                      | int64    | Size of each probe packet in bytes.                                                                                                |
| ping                 | packets_received                 | int64    | Number of probe packets received.                                                                                                  |
| ping                 | packets_sent                     | int64    | Number of probe packets sent.                                                                                                      |
| ping                 | resolved_ip                      | string   | Resolved IP address for the target.                                                                                                |
| ping                 | routers                          | [object] | List of intermediate routers for the traceroute.                                                                                   |
| routers              | ip                               | string   | IP address of the router.                                                                                                          |
| routers              | resolved_host                    | string   | Resolved hostname of the router.                                                                                                   |
| result               | received_email_count             | int64    | Number of emails received during the test (email tests).                                                                           |
| result               | received_message                 | string   | Message received from the target (for WebSocket/TCP/UDP tests).                                                                    |
| result               | request                          | object   | Details of the outgoing request made during the test execution.                                                                    |
| request              | allow_insecure                   | boolean  | Whether insecure certificates are allowed for this request.                                                                        |
| request              | body                             | string   | Body sent with the request.                                                                                                        |
| request              | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                             |
| request              | destination_service              | string   | Destination service for a Network Path test.                                                                                       |
| request              | dns_server                       | string   | DNS server used to resolve the target host.                                                                                        |
| request              | dns_server_port                  | int64    | Port of the DNS server used for resolution.                                                                                        |
| request              | e2e_queries                      | int64    | Number of end-to-end probe queries issued.                                                                                         |
| request              | files                            | [object] | Files attached to the request.                                                                                                     |
| files                | bucket_key                       | string   | Storage bucket key where the file is stored.                                                                                       |
| files                | encoding                         | string   | Encoding of the file contents.                                                                                                     |
| files                | name                             | string   | File name.                                                                                                                         |
| files                | size                             | int64    | File size in bytes.                                                                                                                |
| files                | type                             | string   | File MIME type.                                                                                                                    |
| request              | headers                          | object   | Headers sent with the request.                                                                                                     |
| request              | host                             | string   | Host targeted by the request.                                                                                                      |
| request              | max_ttl                          | int64    | Maximum TTL for network probe packets.                                                                                             |
| request              | message                          | string   | Message sent with the request (for WebSocket/TCP/UDP tests).                                                                       |
| request              | method                           | string   | HTTP method used for the request.                                                                                                  |
| request              | no_saving_response_body          | boolean  | Whether the response body was not saved.                                                                                           |
| request              | port                             |          | Port targeted by the request. Can be a number or a string variable reference.                                                      |
| request              | service                          | string   | Service name targeted by the request (for gRPC tests).                                                                             |
| request              | source_service                   | string   | Source service for a Network Path test.                                                                                            |
| request              | timeout                          | int64    | Request timeout in milliseconds.                                                                                                   |
| request              | tool_name                        | string   | Name of the MCP tool called (MCP tests only).                                                                                      |
| request              | traceroute_queries               | int64    | Number of traceroute probe queries issued.                                                                                         |
| request              | url                              | string   | URL targeted by the request.                                                                                                       |
| result               | resolved_ip                      | string   | IP address resolved for the target host.                                                                                           |
| result               | response                         | object   | Details of the response received during the test execution.                                                                        |
| response             | body                             | string   | Body of the response.                                                                                                              |
| response             | body_compressed                  | string   | Compressed representation of the response body.                                                                                    |
| response             | body_hashes                      | string   | Hashes computed over the response body.                                                                                            |
| response             | body_size                        | int64    | Size of the response body in bytes.                                                                                                |
| response             | cache_headers                    | object   | Cache-related response headers.                                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | cdn                              | object   | CDN provider details inferred from response headers.                                                                               |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                 |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                       |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                          |
| response             | close                            | object   | WebSocket close frame information for WebSocket test responses.                                                                    |
| close                | reason                           | string   | Reason string received in the close frame.                                                                                         |
| close                | status_code                      | int64    | Status code received in the close frame.                                                                                           |
| response             | compressed_message               | string   | Compressed representation of the response message.                                                                                 |
| response             | headers                          | object   | Response headers.                                                                                                                  |
| response             | healthcheck                      | object   | Health check information returned from a gRPC health check call.                                                                   |
| healthcheck          | message                          | object   | Raw health check message payload.                                                                                                  |
| additionalProperties | <any-key>                        | string   |
| healthcheck          | status                           | int64    | Health check status code.                                                                                                          |
| response             | http_version                     | string   | HTTP version of the response.                                                                                                      |
| response             | is_body_truncated                | boolean  | Whether the response body was truncated.                                                                                           |
| response             | is_message_truncated             | boolean  | Whether the response message was truncated.                                                                                        |
| response             | message                          | string   | Message received in the response (for WebSocket/TCP/UDP tests).                                                                    |
| response             | metadata                         | object   | Additional metadata returned with the response.                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | records                          | [object] | DNS records returned in the response (DNS tests only).                                                                             |
| records              | type                             | string   | DNS record type (for example, `A`, `AAAA`, `CNAME`).                                                                               |
| records              | values                           | [string] | Values associated with the DNS record.                                                                                             |
| response             | redirects                        | [object] | Redirect hops encountered while performing the request.                                                                            |
| redirects            | location                         | string   | Target location of the redirect.                                                                                                   |
| redirects            | status_code                      | int64    | HTTP status code of the redirect response.                                                                                         |
| response             | status_code                      | int64    | HTTP status code of the response.                                                                                                  |
| result               | run_type                         | enum     | The type of run for a Synthetic test result. Allowed enum values: `scheduled,fast,ci,triggered`                                    |
| result               | sent_message                     | string   | Message sent to the target (for WebSocket/TCP/UDP tests).                                                                          |
| result               | start_url                        | string   | Start URL for the test (browser tests).                                                                                            |
| result               | started_at                       | int64    | Timestamp of when the test started (in milliseconds).                                                                              |
| result               | status                           | enum     | Status of a Synthetic test result. Allowed enum values: `passed,failed,no_data`                                                    |
| result               | steps                            | [object] | Step results (for browser, mobile, and multistep API tests).                                                                       |
| steps                | allow_failure                    | boolean  | Whether the test continues when this step fails.                                                                                   |
| steps                | api_test                         | object   | Inner API test definition for browser `runApiTest` steps.                                                                          |
| steps                | assertion_result                 | object   | Assertion result for a browser or mobile step.                                                                                     |
| assertion_result     | actual                           |          | Actual value observed during the step assertion. Its type depends on the check type.                                               |
| assertion_result     | check_type                       | string   | Type of the step assertion check.                                                                                                  |
| assertion_result     | expected                         |          | Expected value for the step assertion. Its type depends on the check type.                                                         |
| assertion_result     | has_secure_variables             | boolean  | Whether the assertion involves secure variables.                                                                                   |
| steps                | assertions                       | [object] | Assertion results produced by the step.                                                                                            |
| assertions           | actual                           |          | Actual value observed during the test. Its type depends on the assertion type.                                                     |
| assertions           | error_message                    | string   | Error message if the assertion failed.                                                                                             |
| assertions           | expected                         |          | Expected value for the assertion. Its type depends on the assertion type.                                                          |
| assertions           | operator                         | string   | Operator used for the assertion (for example, `is`, `contains`).                                                                   |
| assertions           | property                         | string   | Property targeted by the assertion, when applicable.                                                                               |
| assertions           | target                           |          | Target value for the assertion. Its type depends on the assertion type.                                                            |
| assertions           | target_path                      | string   | JSON path or XPath evaluated for the assertion.                                                                                    |
| assertions           | target_path_operator             | string   | Operator used for the target path assertion.                                                                                       |
| assertions           | type                             | string   | Type of the assertion (for example, `responseTime`, `statusCode`, `body`).                                                         |
| assertions           | valid                            | boolean  | Whether the assertion passed.                                                                                                      |
| steps                | blocked_requests_urls            | [string] | URLs of requests blocked during the step.                                                                                          |
| steps                | bounds                           | object   | Bounding box of an element on the page.                                                                                            |
| bounds               | height                           | int64    | Height in pixels.                                                                                                                  |
| bounds               | width                            | int64    | Width in pixels.                                                                                                                   |
| bounds               | x                                | int64    | Horizontal position in pixels.                                                                                                     |
| bounds               | y                                | int64    | Vertical position in pixels.                                                                                                       |
| steps                | browser_errors                   | [object] | Browser errors captured during the step.                                                                                           |
| browser_errors       | description                      | string   | Error description.                                                                                                                 |
| browser_errors       | method                           | string   | HTTP method associated with the error (for network errors).                                                                        |
| browser_errors       | name                             | string   | Error name.                                                                                                                        |
| browser_errors       | status                           | int64    | HTTP status code associated with the error (for network errors).                                                                   |
| browser_errors       | type                             | string   | Type of the browser error.                                                                                                         |
| browser_errors       | url                              | object   | URL associated with the error.                                                                                                     |
| steps                | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                  |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                 |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                 |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                   |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                   |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                      |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                              |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                   |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                 |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                         |
| steps                | cdn_resources                    | [object] | CDN resources encountered during the step.                                                                                         |
| cdn_resources        | cdn                              | object   | CDN provider details inferred from response headers.                                                                               |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                 |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                       |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                          |
| cdn_resources        | resolved_ip                      | string   | Resolved IP address for the CDN resource.                                                                                          |
| cdn_resources        | timestamp                        | int64    | Unix timestamp (ms) of when the resource was fetched.                                                                              |
| cdn_resources        | timings                          | object   | Timing breakdown for fetching the CDN resource.                                                                                    |
| steps                | click_type                       | string   | Click type performed in a browser step.                                                                                            |
| steps                | compressed_json_descriptor       | string   | Compressed JSON descriptor for the step (internal format).                                                                         |
| steps                | config                           | object   | Request configuration executed by this step (API test steps).                                                                      |
| steps                | description                      | string   | Human-readable description of the step.                                                                                            |
| steps                | duration                         | double   | Duration of the step in milliseconds.                                                                                              |
| steps                | element_description              | string   | Description of the element interacted with by the step.                                                                            |
| steps                | element_updates                  | object   | Element locator updates produced during a step.                                                                                    |
| element_updates      | multi_locator                    | object   | Updated multi-locator definition.                                                                                                  |
| additionalProperties | <any-key>                        | string   |
| element_updates      | target_outer_html                | string   | Updated outer HTML of the targeted element.                                                                                        |
| element_updates      | version                          | int64    | Version of the element locator definition.                                                                                         |
| steps                | extracted_value                  | object   | A variable used or extracted during a test.                                                                                        |
| extracted_value      | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| extracted_value      | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| extracted_value      | example                          | string   | Example value for the variable.                                                                                                    |
| extracted_value      | id                               | string   | Variable identifier.                                                                                                               |
| extracted_value      | name                             | string   | Variable name.                                                                                                                     |
| extracted_value      | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| extracted_value      | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| extracted_value      | type                             | string   | Variable type.                                                                                                                     |
| extracted_value      | val                              | string   | Evaluated value of the variable.                                                                                                   |
| extracted_value      | value                            | string   | Current value of the variable.                                                                                                     |
| steps                | failure                          | object   | Details about the failure of a Synthetic test.                                                                                     |
| failure              | code                             | string   | Error code for the failure.                                                                                                        |
| failure              | internal_code                    | string   | Internal error code used for debugging.                                                                                            |
| failure              | internal_message                 | string   | Internal error message used for debugging.                                                                                         |
| failure              | message                          | string   | Error message for the failure.                                                                                                     |
| steps                | http_results                     | [object] | HTTP results produced by an MCP step.                                                                                              |
| http_results         | actual                           |          | Actual value observed during the test. Its type depends on the assertion type.                                                     |
| http_results         | error_message                    | string   | Error message if the assertion failed.                                                                                             |
| http_results         | expected                         |          | Expected value for the assertion. Its type depends on the assertion type.                                                          |
| http_results         | operator                         | string   | Operator used for the assertion (for example, `is`, `contains`).                                                                   |
| http_results         | property                         | string   | Property targeted by the assertion, when applicable.                                                                               |
| http_results         | target                           |          | Target value for the assertion. Its type depends on the assertion type.                                                            |
| http_results         | target_path                      | string   | JSON path or XPath evaluated for the assertion.                                                                                    |
| http_results         | target_path_operator             | string   | Operator used for the target path assertion.                                                                                       |
| http_results         | type                             | string   | Type of the assertion (for example, `responseTime`, `statusCode`, `body`).                                                         |
| http_results         | valid                            | boolean  | Whether the assertion passed.                                                                                                      |
| steps                | id                               | string   | Identifier of the step.                                                                                                            |
| steps                | is_critical                      | boolean  | Whether this step is critical for the test outcome.                                                                                |
| steps                | javascript_custom_assertion_code | boolean  | Whether the step uses a custom JavaScript assertion.                                                                               |
| steps                | locate_element_duration          | double   | Time taken to locate the element in milliseconds.                                                                                  |
| steps                | name                             | string   | Name of the step.                                                                                                                  |
| steps                | request                          | object   | Details of the outgoing request made during the test execution.                                                                    |
| request              | allow_insecure                   | boolean  | Whether insecure certificates are allowed for this request.                                                                        |
| request              | body                             | string   | Body sent with the request.                                                                                                        |
| request              | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                             |
| request              | destination_service              | string   | Destination service for a Network Path test.                                                                                       |
| request              | dns_server                       | string   | DNS server used to resolve the target host.                                                                                        |
| request              | dns_server_port                  | int64    | Port of the DNS server used for resolution.                                                                                        |
| request              | e2e_queries                      | int64    | Number of end-to-end probe queries issued.                                                                                         |
| request              | files                            | [object] | Files attached to the request.                                                                                                     |
| files                | bucket_key                       | string   | Storage bucket key where the file is stored.                                                                                       |
| files                | encoding                         | string   | Encoding of the file contents.                                                                                                     |
| files                | name                             | string   | File name.                                                                                                                         |
| files                | size                             | int64    | File size in bytes.                                                                                                                |
| files                | type                             | string   | File MIME type.                                                                                                                    |
| request              | headers                          | object   | Headers sent with the request.                                                                                                     |
| request              | host                             | string   | Host targeted by the request.                                                                                                      |
| request              | max_ttl                          | int64    | Maximum TTL for network probe packets.                                                                                             |
| request              | message                          | string   | Message sent with the request (for WebSocket/TCP/UDP tests).                                                                       |
| request              | method                           | string   | HTTP method used for the request.                                                                                                  |
| request              | no_saving_response_body          | boolean  | Whether the response body was not saved.                                                                                           |
| request              | port                             |          | Port targeted by the request. Can be a number or a string variable reference.                                                      |
| request              | service                          | string   | Service name targeted by the request (for gRPC tests).                                                                             |
| request              | source_service                   | string   | Source service for a Network Path test.                                                                                            |
| request              | timeout                          | int64    | Request timeout in milliseconds.                                                                                                   |
| request              | tool_name                        | string   | Name of the MCP tool called (MCP tests only).                                                                                      |
| request              | traceroute_queries               | int64    | Number of traceroute probe queries issued.                                                                                         |
| request              | url                              | string   | URL targeted by the request.                                                                                                       |
| steps                | response                         | object   | Details of the response received during the test execution.                                                                        |
| response             | body                             | string   | Body of the response.                                                                                                              |
| response             | body_compressed                  | string   | Compressed representation of the response body.                                                                                    |
| response             | body_hashes                      | string   | Hashes computed over the response body.                                                                                            |
| response             | body_size                        | int64    | Size of the response body in bytes.                                                                                                |
| response             | cache_headers                    | object   | Cache-related response headers.                                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | cdn                              | object   | CDN provider details inferred from response headers.                                                                               |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                 |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                       |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                          |
| response             | close                            | object   | WebSocket close frame information for WebSocket test responses.                                                                    |
| close                | reason                           | string   | Reason string received in the close frame.                                                                                         |
| close                | status_code                      | int64    | Status code received in the close frame.                                                                                           |
| response             | compressed_message               | string   | Compressed representation of the response message.                                                                                 |
| response             | headers                          | object   | Response headers.                                                                                                                  |
| response             | healthcheck                      | object   | Health check information returned from a gRPC health check call.                                                                   |
| healthcheck          | message                          | object   | Raw health check message payload.                                                                                                  |
| additionalProperties | <any-key>                        | string   |
| healthcheck          | status                           | int64    | Health check status code.                                                                                                          |
| response             | http_version                     | string   | HTTP version of the response.                                                                                                      |
| response             | is_body_truncated                | boolean  | Whether the response body was truncated.                                                                                           |
| response             | is_message_truncated             | boolean  | Whether the response message was truncated.                                                                                        |
| response             | message                          | string   | Message received in the response (for WebSocket/TCP/UDP tests).                                                                    |
| response             | metadata                         | object   | Additional metadata returned with the response.                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | records                          | [object] | DNS records returned in the response (DNS tests only).                                                                             |
| records              | type                             | string   | DNS record type (for example, `A`, `AAAA`, `CNAME`).                                                                               |
| records              | values                           | [string] | Values associated with the DNS record.                                                                                             |
| response             | redirects                        | [object] | Redirect hops encountered while performing the request.                                                                            |
| redirects            | location                         | string   | Target location of the redirect.                                                                                                   |
| redirects            | status_code                      | int64    | HTTP status code of the redirect response.                                                                                         |
| response             | status_code                      | int64    | HTTP status code of the response.                                                                                                  |
| steps                | retries                          | [object] | Retry results for the step.                                                                                                        |
| steps                | retry_count                      | int64    | Number of times this step was retried.                                                                                             |
| steps                | rum_context                      | object   | RUM application context associated with a step or sub-test.                                                                        |
| rum_context          | application_id                   | string   | RUM application identifier.                                                                                                        |
| rum_context          | session_id                       | string   | RUM session identifier.                                                                                                            |
| rum_context          | view_id                          | string   | RUM view identifier.                                                                                                               |
| steps                | started_at                       | int64    | Unix timestamp (ms) of when the step started.                                                                                      |
| steps                | status                           | string   | Status of the step (for example, `passed`, `failed`).                                                                              |
| steps                | sub_step                         | object   | Information about a sub-step in a nested test execution.                                                                           |
| sub_step             | level                            | int64    | Depth of the sub-step in the execution tree.                                                                                       |
| sub_step             | parent_step                      | object   | Reference to the parent step of a sub-step.                                                                                        |
| parent_step          | id                               | string   | Identifier of the parent step.                                                                                                     |
| sub_step             | parent_test                      | object   | Reference to the parent test of a sub-step.                                                                                        |
| parent_test          | id                               | string   | Identifier of the parent test.                                                                                                     |
| steps                | sub_test                         | object   | Information about a sub-test played from a parent browser test.                                                                    |
| sub_test             | id                               | string   | Identifier of the sub-test.                                                                                                        |
| sub_test             | playing_tab                      | int64    | Index of the browser tab playing the sub-test.                                                                                     |
| sub_test             | rum_context                      | object   | RUM application context associated with a step or sub-test.                                                                        |
| rum_context          | application_id                   | string   | RUM application identifier.                                                                                                        |
| rum_context          | session_id                       | string   | RUM session identifier.                                                                                                            |
| rum_context          | view_id                          | string   | RUM view identifier.                                                                                                               |
| steps                | subtype                          | string   | Subtype of the step.                                                                                                               |
| steps                | tabs                             | [object] | Browser tabs involved in the step.                                                                                                 |
| tabs                 | focused                          | boolean  | Whether the tab was focused during the step.                                                                                       |
| tabs                 | title                            | string   | Title of the tab.                                                                                                                  |
| tabs                 | url                              | string   | URL loaded in the tab.                                                                                                             |
| steps                | timings                          | object   | Timing breakdown of the step execution.                                                                                            |
| steps                | tunnel                           | boolean  | Whether the step was executed through a Synthetics tunnel.                                                                         |
| steps                | type                             | string   | Type of the step (for example, `click`, `assertElementContent`, `runApiTest`).                                                     |
| steps                | url                              | string   | URL associated with the step (for navigation steps).                                                                               |
| steps                | value                            |          | Step value. Its type depends on the step type.                                                                                     |
| steps                | variables                        | object   | Variables captured during a test step.                                                                                             |
| variables            | config                           | [object] | Variables defined in the test configuration.                                                                                       |
| config               | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| config               | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| config               | example                          | string   | Example value for the variable.                                                                                                    |
| config               | id                               | string   | Variable identifier.                                                                                                               |
| config               | name                             | string   | Variable name.                                                                                                                     |
| config               | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| config               | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| config               | type                             | string   | Variable type.                                                                                                                     |
| config               | val                              | string   | Evaluated value of the variable.                                                                                                   |
| config               | value                            | string   | Current value of the variable.                                                                                                     |
| variables            | extracted                        | [object] | Variables extracted during the test execution.                                                                                     |
| extracted            | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| extracted            | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| extracted            | example                          | string   | Example value for the variable.                                                                                                    |
| extracted            | id                               | string   | Variable identifier.                                                                                                               |
| extracted            | name                             | string   | Variable name.                                                                                                                     |
| extracted            | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| extracted            | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| extracted            | type                             | string   | Variable type.                                                                                                                     |
| extracted            | val                              | string   | Evaluated value of the variable.                                                                                                   |
| extracted            | value                            | string   | Current value of the variable.                                                                                                     |
| steps                | vitals_metrics                   | [object] | Web vitals metrics captured during the step.                                                                                       |
| vitals_metrics       | cls                              | double   | Cumulative Layout Shift score.                                                                                                     |
| vitals_metrics       | fcp                              | double   | First Contentful Paint in milliseconds.                                                                                            |
| vitals_metrics       | inp                              | double   | Interaction to Next Paint in milliseconds.                                                                                         |
| vitals_metrics       | lcp                              | double   | Largest Contentful Paint in milliseconds.                                                                                          |
| vitals_metrics       | ttfb                             | double   | Time To First Byte in milliseconds.                                                                                                |
| vitals_metrics       | url                              | string   | URL that produced the metrics.                                                                                                     |
| steps                | warnings                         | [object] | Warnings emitted during the step.                                                                                                  |
| warnings             | element_bounds                   | [object] | Bounds of elements related to the warning.                                                                                         |
| element_bounds       | height                           | int64    | Height in pixels.                                                                                                                  |
| element_bounds       | width                            | int64    | Width in pixels.                                                                                                                   |
| element_bounds       | x                                | int64    | Horizontal position in pixels.                                                                                                     |
| element_bounds       | y                                | int64    | Vertical position in pixels.                                                                                                       |
| warnings             | message                          | string   | Warning message.                                                                                                                   |
| warnings             | type                             | string   | Type of the warning.                                                                                                               |
| result               | time_to_interactive              | int64    | Time to interactive in milliseconds (browser tests).                                                                               |
| result               | timings                          | object   | Timing breakdown of the test request phases (for example, DNS, TCP, TLS, first byte).                                              |
| result               | trace                            | object   | Trace identifiers associated with a Synthetic test result.                                                                         |
| trace                | id                               | string   | Datadog APM trace identifier.                                                                                                      |
| trace                | otel_id                          | string   | OpenTelemetry trace identifier.                                                                                                    |
| result               | traceroute                       | [object] | Traceroute hop results (for network tests).                                                                                        |
| traceroute           | host                             | string   | Target hostname.                                                                                                                   |
| traceroute           | latency                          | object   | Latency statistics for a network probe.                                                                                            |
| latency              | avg                              | double   | Average latency in milliseconds.                                                                                                   |
| latency              | max                              | double   | Maximum latency in milliseconds.                                                                                                   |
| latency              | min                              | double   | Minimum latency in milliseconds.                                                                                                   |
| traceroute           | packet_loss_percentage           | double   | Percentage of probe packets lost.                                                                                                  |
| traceroute           | packet_size                      | int64    | Size of each probe packet in bytes.                                                                                                |
| traceroute           | packets_received                 | int64    | Number of probe packets received.                                                                                                  |
| traceroute           | packets_sent                     | int64    | Number of probe packets sent.                                                                                                      |
| traceroute           | resolved_ip                      | string   | Resolved IP address for the target.                                                                                                |
| traceroute           | routers                          | [object] | List of intermediate routers for the traceroute.                                                                                   |
| routers              | ip                               | string   | IP address of the router.                                                                                                          |
| routers              | resolved_host                    | string   | Resolved hostname of the router.                                                                                                   |
| result               | triggered_at                     | int64    | Timestamp of when the test was triggered (in milliseconds).                                                                        |
| result               | tunnel                           | boolean  | Whether the test was executed through a tunnel.                                                                                    |
| result               | turns                            | [object] | Turns executed by a goal-based browser test.                                                                                       |
| turns                | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                  |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                 |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                 |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                   |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                   |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                      |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                              |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                   |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                 |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                         |
| turns                | name                             | string   | Name of the turn.                                                                                                                  |
| turns                | reasoning                        | string   | Agent reasoning produced for this turn.                                                                                            |
| turns                | status                           | string   | Status of the turn (for example, `passed`, `failed`).                                                                              |
| turns                | steps                            | [object] | Steps executed during the turn.                                                                                                    |
| steps                | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                  |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                 |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                 |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                   |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                   |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                      |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                              |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                   |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                 |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                         |
| steps                | config                           | object   | Browser step configuration for this turn step.                                                                                     |
| turns                | turn_finished_at                 | int64    | Unix timestamp (ms) of when the turn finished.                                                                                     |
| turns                | turn_started_at                  | int64    | Unix timestamp (ms) of when the turn started.                                                                                      |
| result               | unhealthy                        | boolean  | Whether the test runner was unhealthy at the time of execution.                                                                    |
| result               | variables                        | object   | Variables captured during a test step.                                                                                             |
| variables            | config                           | [object] | Variables defined in the test configuration.                                                                                       |
| config               | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| config               | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| config               | example                          | string   | Example value for the variable.                                                                                                    |
| config               | id                               | string   | Variable identifier.                                                                                                               |
| config               | name                             | string   | Variable name.                                                                                                                     |
| config               | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| config               | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| config               | type                             | string   | Variable type.                                                                                                                     |
| config               | val                              | string   | Evaluated value of the variable.                                                                                                   |
| config               | value                            | string   | Current value of the variable.                                                                                                     |
| variables            | extracted                        | [object] | Variables extracted during the test execution.                                                                                     |
| extracted            | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| extracted            | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| extracted            | example                          | string   | Example value for the variable.                                                                                                    |
| extracted            | id                               | string   | Variable identifier.                                                                                                               |
| extracted            | name                             | string   | Variable name.                                                                                                                     |
| extracted            | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| extracted            | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| extracted            | type                             | string   | Variable type.                                                                                                                     |
| extracted            | val                              | string   | Evaluated value of the variable.                                                                                                   |
| extracted            | value                            | string   | Current value of the variable.                                                                                                     |
| attributes           | test_sub_type                    | enum     | Subtype of the Synthetic test that produced this result. Allowed enum values: `dns,grpc,http,icmp,mcp,multi,ssl,tcp,udp,websocket` |
| attributes           | test_type                        | enum     | Type of the Synthetic test that produced this result. Allowed enum values: `api,browser,mobile,network`                            |
| data                 | id                               | string   | The result ID.                                                                                                                     |
| data                 | relationships                    | object   | Relationships for a Synthetic test result.                                                                                         |
| relationships        | test                             | object   | Relationship to the Synthetic test.                                                                                                |
| test                 | data                             | object   | Data for the test relationship.                                                                                                    |
| data                 | id                               | string   | The public ID of the test.                                                                                                         |
| data                 | type                             | string   | Type of the related resource.                                                                                                      |
| data                 | type                             | enum     | Type of the Synthetic test result resource, `result`. Allowed enum values: `result`                                                |
|                      | included                         | [object] | Array of included related resources, such as the test definition.                                                                  |
| included             | attributes                       | object   | Attributes of the included resource.                                                                                               |
| included             | id                               | string   | ID of the included resource.                                                                                                       |
| included             | type                             | string   | Type of the included resource.                                                                                                     |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "batch": {
        "id": "batch-abc-123"
      },
      "ci": {
        "pipeline": {
          "id": "pipeline-abc-123",
          "name": "build-and-test",
          "number": 42,
          "url": "https://github.com/DataDog/example/actions/runs/42"
        },
        "provider": {
          "name": "github"
        },
        "stage": {
          "name": "test"
        },
        "workspace_path": "/home/runner/work/example"
      },
      "device": {
        "browser": {
          "type": "edge",
          "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 Edg/127.0.2651.105 DatadogSynthetics",
          "version": "127.0.2651.105"
        },
        "id": "chrome.laptop_large",
        "name": "Chrome - Laptop Large",
        "platform": {
          "name": "ios",
          "version": "14.8"
        },
        "resolution": {
          "height": 1100,
          "pixel_ratio": 2,
          "width": 1440
        },
        "type": "browser"
      },
      "git": {
        "branch": "main",
        "commit": {
          "author": {
            "date": "2024-08-15T14:23:00Z",
            "email": "jane.doe@example.com",
            "name": "Jane Doe"
          },
          "committer": {
            "date": "2024-08-15T14:23:00Z",
            "email": "jane.doe@example.com",
            "name": "Jane Doe"
          },
          "message": "Fix bug in login flow",
          "sha": "9e107d9d372bb6826bd81d3542a419d6f0e1de56",
          "url": "https://github.com/DataDog/example/commit/9e107d9d372bb6826bd81d3542a419d6f0e1de56"
        },
        "repository_url": "https://github.com/DataDog/example"
      },
      "location": {
        "id": "aws:us-east-1",
        "name": "N. Virginia (AWS)",
        "version": "1.0.0",
        "worker_id": "worker-abc-123"
      },
      "result": {
        "assertions": [
          {
            "actual": 200,
            "error_message": "Assertion failed: expected 200 but got 500",
            "expected": "200",
            "operator": "is",
            "property": "content-type",
            "target": 200,
            "target_path": "$.url",
            "target_path_operator": "contains",
            "type": "statusCode",
            "valid": true
          }
        ],
        "bucket_keys": {
          "after_step_screenshot": "screenshots/after-step-1-1.png",
          "after_turn_screenshot": "screenshots/after-turn-1.png",
          "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
          "before_step_screenshot": "screenshots/before-step-1-1.png",
          "before_turn_screenshot": "screenshots/before-turn-1.png",
          "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
          "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
          "email_messages": [],
          "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
          "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
          "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
        },
        "call_type": "unary",
        "cert": {
          "cipher": "TLS_AES_256_GCM_SHA384",
          "exponent": 65537,
          "ext_key_usage": [
            "1.3.6.1.5.5.7.3.1"
          ],
          "fingerprint": "D6:03:5A:9F:93:E1:B7:28:EC:90:C5:9F:72:30:55:7C:74:5F:53:92",
          "fingerprint256": "04:45:93:A9:4C:14:70:47:DB:3C:FC:05:F9:5A:50:4E:DA:DB:A1:C6:37:3D:15:C0:B2:7E:5D:93:5F:A2:02:C7",
          "issuer": {
            "<any-key>": "string"
          },
          "modulus": "C0FCE9F9...",
          "protocol": "TLSv1.3",
          "serial_number": "7B584A1A6670A1EB0941A9A121569D60",
          "subject": {
            "<any-key>": "string"
          },
          "tls_version": 1.3,
          "valid": {
            "from": 1742469686000,
            "to": 1749727285000
          }
        },
        "compressed_json_descriptor": "compressedJsonDescriptorValue",
        "compressed_steps": "eJzLSM3JyQcABiwCFQ==",
        "connection_outcome": "established",
        "dns_resolution": {
          "attempts": [],
          "resolved_ip": "54.243.255.141",
          "resolved_port": "443",
          "server": "8.8.4.4"
        },
        "duration": 380.7,
        "exited_on_step_success": false,
        "failure": {
          "code": "TIMEOUT",
          "internal_code": "INCORRECT_ASSERTION",
          "internal_message": "Assertion failed on step 2",
          "message": "Connection timed out"
        },
        "finished_at": 1723782422760,
        "handshake": {
          "request": {
            "allow_insecure": false,
            "body": "{\"key\":\"value\"}",
            "call_type": "unary",
            "destination_service": "my-service",
            "dns_server": "8.8.8.8",
            "dns_server_port": 53,
            "e2e_queries": 4,
            "files": [
              {
                "bucket_key": "api-upload-file/s3v-msw-tp3/2024-08-20T12:18:27.628081_f433c953-a58a-4296-834b-0669e32ba55f.json",
                "encoding": "base64",
                "name": "dd_logo_h_rgb.jpg",
                "size": 30294,
                "type": "image/jpeg"
              }
            ],
            "headers": {
              "content-type": "application/json"
            },
            "host": "grpcbin.test.k6.io",
            "max_ttl": 64,
            "message": "My message",
            "method": "GET",
            "no_saving_response_body": true,
            "port": 9000,
            "service": "addsvc.Add",
            "source_service": "synthetics",
            "timeout": 60,
            "tool_name": "search",
            "traceroute_queries": 2,
            "url": "https://httpbin.org/anything/lol valuehugo"
          },
          "response": {
            "body": "{\"status\":\"ok\"}",
            "body_compressed": "eJzLSM3JyQcABiwCFQ==",
            "body_hashes": "9e107d9d372bb6826bd81d3542a419d6",
            "body_size": 793,
            "cache_headers": {
              "<any-key>": "string"
            },
            "cdn": {
              "cache": {
                "cached": true,
                "status": "HIT"
              },
              "provider": "google_cloud"
            },
            "close": {
              "reason": "Normal closure",
              "status_code": 1000
            },
            "compressed_message": "eJzLSM3JyQcABiwCFQ==",
            "headers": {
              "content-type": "application/json"
            },
            "healthcheck": {
              "message": {
                "<any-key>": "string"
              },
              "status": 1
            },
            "http_version": "2.0",
            "is_body_truncated": false,
            "is_message_truncated": false,
            "message": "{\"f_string\":\"concat-STATIC_HIDDEN_VALUE\"}",
            "metadata": {
              "<any-key>": "string"
            },
            "records": [
              {
                "type": "A",
                "values": [
                  "213.186.33.19"
                ]
              }
            ],
            "redirects": [
              {
                "location": "https://example.com/new-location",
                "status_code": 301
              }
            ],
            "status_code": 200
          }
        },
        "id": "5158904793181869365",
        "initial_id": "5158904793181869365",
        "is_fast_retry": true,
        "is_last_retry": true,
        "netpath": {
          "destination": {
            "hostname": "34.95.79.70",
            "ip_address": "34.95.79.70",
            "port": 80
          },
          "hops": [
            {
              "hostname": "70.79.95.34.bc.googleusercontent.com",
              "ip_address": "10.240.134.15",
              "reachable": true,
              "rtt": 0.000346599,
              "ttl": 2
            }
          ],
          "origin": "synthetics",
          "pathtrace_id": "5d3cb978-533b-41ce-85a4-3661c8dd6a0b",
          "protocol": "TCP",
          "source": {
            "hostname": "edge-eu1.staging.dog"
          },
          "tags": [
            "synthetics.test_id:nja-epx-mg8"
          ],
          "timestamp": 1744117822266
        },
        "netstats": {
          "hops": {
            "avg": 11,
            "max": 11,
            "min": 11
          },
          "jitter": 0.08,
          "latency": {
            "avg": 1.8805,
            "max": 1.97,
            "min": 1.76
          },
          "packet_loss_percentage": 0,
          "packets_received": 4,
          "packets_sent": 4
        },
        "ocsp": {
          "certificate": {
            "revocation_reason": "unspecified",
            "revocation_time": 1749727285000,
            "serial_number": "7B584A1A6670A1EB0941A9A121569D60"
          },
          "status": "good",
          "updates": {
            "next_update": 1743074486000,
            "produced_at": 1742469686000,
            "this_update": 1742469686000
          }
        },
        "ping": {
          "host": "34.95.79.70",
          "latency": {
            "avg": 1.8805,
            "max": 1.97,
            "min": 1.76
          },
          "packet_loss_percentage": 0,
          "packet_size": 56,
          "packets_received": 4,
          "packets_sent": 4,
          "resolved_ip": "34.95.79.70",
          "routers": [
            {
              "ip": "34.95.79.70",
              "resolved_host": "70.79.95.34.bc.googleusercontent.com"
            }
          ]
        },
        "received_email_count": 1,
        "received_message": "UDP echo: b'Test message'",
        "request": {
          "allow_insecure": false,
          "body": "{\"key\":\"value\"}",
          "call_type": "unary",
          "destination_service": "my-service",
          "dns_server": "8.8.8.8",
          "dns_server_port": 53,
          "e2e_queries": 4,
          "files": [
            {
              "bucket_key": "api-upload-file/s3v-msw-tp3/2024-08-20T12:18:27.628081_f433c953-a58a-4296-834b-0669e32ba55f.json",
              "encoding": "base64",
              "name": "dd_logo_h_rgb.jpg",
              "size": 30294,
              "type": "image/jpeg"
            }
          ],
          "headers": {
            "content-type": "application/json"
          },
          "host": "grpcbin.test.k6.io",
          "max_ttl": 64,
          "message": "My message",
          "method": "GET",
          "no_saving_response_body": true,
          "port": 9000,
          "service": "addsvc.Add",
          "source_service": "synthetics",
          "timeout": 60,
          "tool_name": "search",
          "traceroute_queries": 2,
          "url": "https://httpbin.org/anything/lol valuehugo"
        },
        "resolved_ip": "54.243.255.141",
        "response": {
          "body": "{\"status\":\"ok\"}",
          "body_compressed": "eJzLSM3JyQcABiwCFQ==",
          "body_hashes": "9e107d9d372bb6826bd81d3542a419d6",
          "body_size": 793,
          "cache_headers": {
            "<any-key>": "string"
          },
          "cdn": {
            "cache": {
              "cached": true,
              "status": "HIT"
            },
            "provider": "google_cloud"
          },
          "close": {
            "reason": "Normal closure",
            "status_code": 1000
          },
          "compressed_message": "eJzLSM3JyQcABiwCFQ==",
          "headers": {
            "content-type": "application/json"
          },
          "healthcheck": {
            "message": {
              "<any-key>": "string"
            },
            "status": 1
          },
          "http_version": "2.0",
          "is_body_truncated": false,
          "is_message_truncated": false,
          "message": "{\"f_string\":\"concat-STATIC_HIDDEN_VALUE\"}",
          "metadata": {
            "<any-key>": "string"
          },
          "records": [
            {
              "type": "A",
              "values": [
                "213.186.33.19"
              ]
            }
          ],
          "redirects": [
            {
              "location": "https://example.com/new-location",
              "status_code": 301
            }
          ],
          "status_code": 200
        },
        "run_type": "scheduled",
        "sent_message": "udp mess",
        "start_url": "http://34.95.79.70/prototype",
        "started_at": 1723782422750,
        "status": "passed",
        "steps": [
          {
            "allow_failure": false,
            "api_test": {},
            "assertion_result": {
              "actual": "True\ngood\ngood\ngood\ngood\nTrue",
              "check_type": "contains",
              "expected": "True good good good good True",
              "has_secure_variables": false
            },
            "assertions": [
              {
                "actual": 200,
                "error_message": "Assertion failed: expected 200 but got 500",
                "expected": "200",
                "operator": "is",
                "property": "content-type",
                "target": 200,
                "target_path": "$.url",
                "target_path_operator": "contains",
                "type": "statusCode",
                "valid": true
              }
            ],
            "blocked_requests_urls": [],
            "bounds": {
              "height": 37,
              "width": 343,
              "x": 16,
              "y": 140
            },
            "browser_errors": [
              {
                "description": "Failed to fetch resource",
                "method": "GET",
                "name": "NetworkError",
                "status": 500,
                "type": "network",
                "url": {}
              }
            ],
            "bucket_keys": {
              "after_step_screenshot": "screenshots/after-step-1-1.png",
              "after_turn_screenshot": "screenshots/after-turn-1.png",
              "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
              "before_step_screenshot": "screenshots/before-step-1-1.png",
              "before_turn_screenshot": "screenshots/before-turn-1.png",
              "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
              "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
              "email_messages": [],
              "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
              "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
              "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
            },
            "cdn_resources": [
              {
                "cdn": {
                  "cache": {
                    "cached": true,
                    "status": "HIT"
                  },
                  "provider": "google_cloud"
                },
                "resolved_ip": "34.95.79.70",
                "timestamp": 1724521406576,
                "timings": {
                  "firstByte": 99.7,
                  "tcp": 0.9
                }
              }
            ],
            "click_type": "primary",
            "compressed_json_descriptor": "compressedJsonDescriptorValue",
            "config": {},
            "description": "Navigate to start URL",
            "duration": 1015,
            "element_description": "<XCUIElementTypeStaticText value=\"Scroll\" name=\"Scroll\" label=\"Scroll\">",
            "element_updates": {
              "multi_locator": {
                "<any-key>": "string"
              },
              "target_outer_html": "<h1>My website - v4</h1>",
              "version": 3
            },
            "extracted_value": {
              "err": "LOCAL_VARIABLE_UNKNOWN",
              "error_message": "Unknown variable name undefined.",
              "example": "lol value",
              "id": "c896702c-1e34-4e62-a67b-432e8092d062",
              "name": "HEADER_VALUE",
              "pattern": "lol value",
              "secure": false,
              "type": "text",
              "val": "value-to-extract",
              "value": "lol value"
            },
            "failure": {
              "code": "TIMEOUT",
              "internal_code": "INCORRECT_ASSERTION",
              "internal_message": "Assertion failed on step 2",
              "message": "Connection timed out"
            },
            "http_results": [
              {
                "actual": 200,
                "error_message": "Assertion failed: expected 200 but got 500",
                "expected": "200",
                "operator": "is",
                "property": "content-type",
                "target": 200,
                "target_path": "$.url",
                "target_path_operator": "contains",
                "type": "statusCode",
                "valid": true
              }
            ],
            "id": "fkk-j2a-gmw",
            "is_critical": true,
            "javascript_custom_assertion_code": false,
            "locate_element_duration": 845,
            "name": "Extract variable from body",
            "request": {
              "allow_insecure": false,
              "body": "{\"key\":\"value\"}",
              "call_type": "unary",
              "destination_service": "my-service",
              "dns_server": "8.8.8.8",
              "dns_server_port": 53,
              "e2e_queries": 4,
              "files": [
                {
                  "bucket_key": "api-upload-file/s3v-msw-tp3/2024-08-20T12:18:27.628081_f433c953-a58a-4296-834b-0669e32ba55f.json",
                  "encoding": "base64",
                  "name": "dd_logo_h_rgb.jpg",
                  "size": 30294,
                  "type": "image/jpeg"
                }
              ],
              "headers": {
                "content-type": "application/json"
              },
              "host": "grpcbin.test.k6.io",
              "max_ttl": 64,
              "message": "My message",
              "method": "GET",
              "no_saving_response_body": true,
              "port": 9000,
              "service": "addsvc.Add",
              "source_service": "synthetics",
              "timeout": 60,
              "tool_name": "search",
              "traceroute_queries": 2,
              "url": "https://httpbin.org/anything/lol valuehugo"
            },
            "response": {
              "body": "{\"status\":\"ok\"}",
              "body_compressed": "eJzLSM3JyQcABiwCFQ==",
              "body_hashes": "9e107d9d372bb6826bd81d3542a419d6",
              "body_size": 793,
              "cache_headers": {
                "<any-key>": "string"
              },
              "cdn": {
                "cache": {
                  "cached": true,
                  "status": "HIT"
                },
                "provider": "google_cloud"
              },
              "close": {
                "reason": "Normal closure",
                "status_code": 1000
              },
              "compressed_message": "eJzLSM3JyQcABiwCFQ==",
              "headers": {
                "content-type": "application/json"
              },
              "healthcheck": {
                "message": {
                  "<any-key>": "string"
                },
                "status": 1
              },
              "http_version": "2.0",
              "is_body_truncated": false,
              "is_message_truncated": false,
              "message": "{\"f_string\":\"concat-STATIC_HIDDEN_VALUE\"}",
              "metadata": {
                "<any-key>": "string"
              },
              "records": [
                {
                  "type": "A",
                  "values": [
                    "213.186.33.19"
                  ]
                }
              ],
              "redirects": [
                {
                  "location": "https://example.com/new-location",
                  "status_code": 301
                }
              ],
              "status_code": 200
            },
            "retries": [],
            "retry_count": 0,
            "rum_context": {
              "application_id": "00000000-0000-0000-0000-000000000000",
              "session_id": "11111111-1111-1111-1111-111111111111",
              "view_id": "22222222-2222-2222-2222-222222222222"
            },
            "started_at": 1724445283308,
            "status": "passed",
            "sub_step": {
              "level": 1,
              "parent_step": {
                "id": "fkk-j2a-gmw"
              },
              "parent_test": {
                "id": "abc-def-123"
              }
            },
            "sub_test": {
              "id": "abc-def-123",
              "playing_tab": 0,
              "rum_context": {
                "application_id": "00000000-0000-0000-0000-000000000000",
                "session_id": "11111111-1111-1111-1111-111111111111",
                "view_id": "22222222-2222-2222-2222-222222222222"
              }
            },
            "subtype": "http",
            "tabs": [
              {
                "focused": true,
                "title": "Team Browser mini-websites",
                "url": "http://34.95.79.70/prototype"
              }
            ],
            "timings": {},
            "tunnel": false,
            "type": "click",
            "url": "http://34.95.79.70/prototype",
            "value": "http://34.95.79.70/prototype",
            "variables": {
              "config": [
                {
                  "err": "LOCAL_VARIABLE_UNKNOWN",
                  "error_message": "Unknown variable name undefined.",
                  "example": "lol value",
                  "id": "c896702c-1e34-4e62-a67b-432e8092d062",
                  "name": "HEADER_VALUE",
                  "pattern": "lol value",
                  "secure": false,
                  "type": "text",
                  "val": "value-to-extract",
                  "value": "lol value"
                }
              ],
              "extracted": [
                {
                  "err": "LOCAL_VARIABLE_UNKNOWN",
                  "error_message": "Unknown variable name undefined.",
                  "example": "lol value",
                  "id": "c896702c-1e34-4e62-a67b-432e8092d062",
                  "name": "HEADER_VALUE",
                  "pattern": "lol value",
                  "secure": false,
                  "type": "text",
                  "val": "value-to-extract",
                  "value": "lol value"
                }
              ]
            },
            "vitals_metrics": [
              {
                "cls": 0,
                "fcp": 120.3,
                "inp": 85,
                "lcp": 210.5,
                "ttfb": 95.2,
                "url": "http://34.95.79.70/prototype"
              }
            ],
            "warnings": [
              {
                "element_bounds": [
                  {
                    "height": 37,
                    "width": 343,
                    "x": 16,
                    "y": 140
                  }
                ],
                "message": "Element is not visible in the viewport",
                "type": "visibility"
              }
            ]
          }
        ],
        "time_to_interactive": 183,
        "timings": {
          "dns": 2.9,
          "download": 2.1,
          "firstByte": 95.2,
          "ssl": 187.9,
          "tcp": 92.6,
          "total": 380.7
        },
        "trace": {
          "id": "5513046492231128177",
          "otel_id": "d8ba00eb1507bdba8643ba8e7a1c022c"
        },
        "traceroute": [
          {
            "host": "34.95.79.70",
            "latency": {
              "avg": 1.8805,
              "max": 1.97,
              "min": 1.76
            },
            "packet_loss_percentage": 0,
            "packet_size": 56,
            "packets_received": 4,
            "packets_sent": 4,
            "resolved_ip": "34.95.79.70",
            "routers": [
              {
                "ip": "34.95.79.70",
                "resolved_host": "70.79.95.34.bc.googleusercontent.com"
              }
            ]
          }
        ],
        "triggered_at": 1723782422715,
        "tunnel": false,
        "turns": [
          {
            "bucket_keys": {
              "after_step_screenshot": "screenshots/after-step-1-1.png",
              "after_turn_screenshot": "screenshots/after-turn-1.png",
              "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
              "before_step_screenshot": "screenshots/before-step-1-1.png",
              "before_turn_screenshot": "screenshots/before-turn-1.png",
              "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
              "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
              "email_messages": [],
              "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
              "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
              "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
            },
            "name": "Turn 1",
            "reasoning": "I need to navigate to the chairs section",
            "status": "passed",
            "steps": [
              {
                "bucket_keys": {
                  "after_step_screenshot": "screenshots/after-step-1-1.png",
                  "after_turn_screenshot": "screenshots/after-turn-1.png",
                  "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
                  "before_step_screenshot": "screenshots/before-step-1-1.png",
                  "before_turn_screenshot": "screenshots/before-turn-1.png",
                  "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
                  "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
                  "email_messages": [],
                  "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
                  "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
                  "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
                },
                "config": {
                  "id": "step-1",
                  "name": "Click on div \"Chairs\"",
                  "type": "click"
                }
              }
            ],
            "turn_finished_at": 1724521438800,
            "turn_started_at": 1724521436800
          }
        ],
        "unhealthy": false,
        "variables": {
          "config": [
            {
              "err": "LOCAL_VARIABLE_UNKNOWN",
              "error_message": "Unknown variable name undefined.",
              "example": "lol value",
              "id": "c896702c-1e34-4e62-a67b-432e8092d062",
              "name": "HEADER_VALUE",
              "pattern": "lol value",
              "secure": false,
              "type": "text",
              "val": "value-to-extract",
              "value": "lol value"
            }
          ],
          "extracted": [
            {
              "err": "LOCAL_VARIABLE_UNKNOWN",
              "error_message": "Unknown variable name undefined.",
              "example": "lol value",
              "id": "c896702c-1e34-4e62-a67b-432e8092d062",
              "name": "HEADER_VALUE",
              "pattern": "lol value",
              "secure": false,
              "type": "text",
              "val": "value-to-extract",
              "value": "lol value"
            }
          ]
        }
      },
      "test_sub_type": "http",
      "test_type": "api"
    },
    "id": "5158904793181869365",
    "relationships": {
      "test": {
        "data": {
          "id": "abc-def-123",
          "type": "test"
        }
      }
    },
    "type": "result"
  },
  "included": [
    {
      "attributes": {},
      "id": "abc-def-123",
      "type": "test"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"export result_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/${public_id}/results/${result_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Get a test's latest results{% #get-a-tests-latest-results %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                  |
| ----------------- | ----------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/tests/{public_id}/results |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/tests/{public_id}/results |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/tests/{public_id}/results      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/tests/{public_id}/results      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/tests/{public_id}/results     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/tests/{public_id}/results |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/tests/{public_id}/results |

### Overview

Get the latest result summaries for a given Synthetic test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                                      |
| --------------------------- | ------ | ---------------------------------------------------------------- |
| public_id [*required*] | string | The public ID of the Synthetic test for which to search results. |

#### Query Strings

| Name      | Type    | Description                                                                      |
| --------- | ------- | -------------------------------------------------------------------------------- |
| from_ts   | integer | Timestamp in milliseconds from which to start querying results.                  |
| to_ts     | integer | Timestamp in milliseconds up to which to query results.                          |
| status    | enum    | Filter results by status.Allowed enum values: `passed, failed, no_data`          |
| runType   | enum    | Filter results by run type.Allowed enum values: `scheduled, fast, ci, triggered` |
| probe_dc  | array   | Locations for which to query results.                                            |
| device_id | array   | Device IDs for which to query results.                                           |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response object for a Synthetic test's latest result summaries.

| Parent field   | Field          | Type     | Description                                                                                                                        |
| -------------- | -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|                | data           | [object] | Array of Synthetic test result summaries.                                                                                          |
| data           | attributes     | object   | Attributes of a Synthetic test result summary.                                                                                     |
| attributes     | device         | object   | Device information for the test result (browser and mobile tests).                                                                 |
| device         | browser        | object   | Browser information for the device used to run the test.                                                                           |
| browser        | type           | string   | Browser type (for example, `chrome`, `firefox`).                                                                                   |
| browser        | user_agent     | string   | User agent string reported by the browser.                                                                                         |
| browser        | version        | string   | Browser version.                                                                                                                   |
| device         | id             | string   | Device identifier.                                                                                                                 |
| device         | name           | string   | Device name.                                                                                                                       |
| device         | platform       | object   | Platform information for the device used to run the test.                                                                          |
| platform       | name           | string   | Platform name (for example, `linux`, `macos`).                                                                                     |
| platform       | version        | string   | Platform version.                                                                                                                  |
| device         | resolution     | object   | Screen resolution of the device used to run the test.                                                                              |
| resolution     | height         | int64    | Viewport height in pixels.                                                                                                         |
| resolution     | pixel_ratio    | double   | Device pixel ratio.                                                                                                                |
| resolution     | width          | int64    | Viewport width in pixels.                                                                                                          |
| device         | type           | string   | Device type.                                                                                                                       |
| attributes     | execution_info | object   | Execution details for a Synthetic test result.                                                                                     |
| execution_info | duration       | object   | Total duration of a Synthetic test execution.                                                                                      |
| duration       | has_duration   | boolean  | Whether a duration was recorded for this execution.                                                                                |
| duration       | value          | int64    | Duration value in milliseconds.                                                                                                    |
| execution_info | error_message  | string   | Error message if the execution encountered an issue.                                                                               |
| execution_info | is_fast_retry  | boolean  | Whether this result is from a fast retry.                                                                                          |
| execution_info | timings        | object   | Timing breakdown of the test execution in milliseconds.                                                                            |
| execution_info | tunnel         | boolean  | Whether the test was executed through a tunnel.                                                                                    |
| execution_info | unhealthy      | boolean  | Whether the location was unhealthy during execution.                                                                               |
| attributes     | finished_at    | int64    | Timestamp of when the test finished (in milliseconds).                                                                             |
| attributes     | location       | object   | Location information for a Synthetic test result.                                                                                  |
| location       | id             | string   | Identifier of the location.                                                                                                        |
| location       | name           | string   | Human-readable name of the location.                                                                                               |
| location       | version        | string   | Version of the worker that ran the test.                                                                                           |
| location       | worker_id      | string   | Identifier of the specific worker that ran the test.                                                                               |
| attributes     | run_type       | enum     | The type of run for a Synthetic test result. Allowed enum values: `scheduled,fast,ci,triggered`                                    |
| attributes     | started_at     | int64    | Timestamp of when the test started (in milliseconds).                                                                              |
| attributes     | status         | enum     | Status of a Synthetic test result. Allowed enum values: `passed,failed,no_data`                                                    |
| attributes     | steps_info     | object   | Step execution summary for a Synthetic test result.                                                                                |
| steps_info     | completed      | int64    | Number of completed steps.                                                                                                         |
| steps_info     | errors         | int64    | Number of steps with errors.                                                                                                       |
| steps_info     | total          | int64    | Total number of steps.                                                                                                             |
| attributes     | test_sub_type  | enum     | Subtype of the Synthetic test that produced this result. Allowed enum values: `dns,grpc,http,icmp,mcp,multi,ssl,tcp,udp,websocket` |
| attributes     | test_type      | enum     | Type of the Synthetic test that produced this result. Allowed enum values: `api,browser,mobile,network`                            |
| data           | id             | string   | The result ID.                                                                                                                     |
| data           | relationships  | object   | Relationships for a Synthetic test result.                                                                                         |
| relationships  | test           | object   | Relationship to the Synthetic test.                                                                                                |
| test           | data           | object   | Data for the test relationship.                                                                                                    |
| data           | id             | string   | The public ID of the test.                                                                                                         |
| data           | type           | string   | Type of the related resource.                                                                                                      |
| data           | type           | enum     | Type of the Synthetic test result summary resource, `result_summary`. Allowed enum values: `result_summary`                        |
|                | included       | [object] | Array of included related resources, such as the test definition.                                                                  |
| included       | attributes     | object   | Attributes of the included resource.                                                                                               |
| included       | id             | string   | ID of the included resource.                                                                                                       |
| included       | type           | string   | Type of the included resource.                                                                                                     |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "device": {
          "browser": {
            "type": "edge",
            "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 Edg/127.0.2651.105 DatadogSynthetics",
            "version": "127.0.2651.105"
          },
          "id": "chrome.laptop_large",
          "name": "Chrome - Laptop Large",
          "platform": {
            "name": "ios",
            "version": "14.8"
          },
          "resolution": {
            "height": 1100,
            "pixel_ratio": 2,
            "width": 1440
          },
          "type": "browser"
        },
        "execution_info": {
          "duration": {
            "has_duration": true,
            "value": 380
          },
          "error_message": "Connection timed out",
          "is_fast_retry": true,
          "timings": {
            "dns": 2.9,
            "download": 2.1,
            "firstByte": 95.2,
            "ssl": 187.9,
            "tcp": 92.6,
            "total": 380.7
          },
          "tunnel": false,
          "unhealthy": false
        },
        "finished_at": "integer",
        "location": {
          "id": "aws:us-east-1",
          "name": "N. Virginia (AWS)",
          "version": "1.0.0",
          "worker_id": "worker-abc-123"
        },
        "run_type": "scheduled",
        "started_at": "integer",
        "status": "passed",
        "steps_info": {
          "completed": 6,
          "errors": 0,
          "total": 6
        },
        "test_sub_type": "http",
        "test_type": "api"
      },
      "id": "5158904793181869365",
      "relationships": {
        "test": {
          "data": {
            "id": "abc-def-123",
            "type": "test"
          }
        }
      },
      "type": "result_summary"
    }
  ],
  "included": [
    {
      "attributes": {},
      "id": "abc-def-123",
      "type": "test"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/${public_id}/results" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Get a browser test's latest results{% #get-a-browser-tests-latest-results %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                          |
| ----------------- | ------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/tests/browser/{public_id}/results |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/tests/browser/{public_id}/results |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/tests/browser/{public_id}/results      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/tests/browser/{public_id}/results      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/tests/browser/{public_id}/results     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/tests/browser/{public_id}/results |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/tests/browser/{public_id}/results |

### Overview

Get the latest result summaries for a given Synthetic browser test. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Path Parameters

| Name                        | Type   | Description                                                              |
| --------------------------- | ------ | ------------------------------------------------------------------------ |
| public_id [*required*] | string | The public ID of the Synthetic browser test for which to search results. |

#### Query Strings

| Name      | Type    | Description                                                                      |
| --------- | ------- | -------------------------------------------------------------------------------- |
| from_ts   | integer | Timestamp in milliseconds from which to start querying results.                  |
| to_ts     | integer | Timestamp in milliseconds up to which to query results.                          |
| status    | enum    | Filter results by status.Allowed enum values: `passed, failed, no_data`          |
| runType   | enum    | Filter results by run type.Allowed enum values: `scheduled, fast, ci, triggered` |
| probe_dc  | array   | Locations for which to query results.                                            |
| device_id | array   | Device IDs for which to query results.                                           |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response object for a Synthetic test's latest result summaries.

| Parent field   | Field          | Type     | Description                                                                                                                        |
| -------------- | -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|                | data           | [object] | Array of Synthetic test result summaries.                                                                                          |
| data           | attributes     | object   | Attributes of a Synthetic test result summary.                                                                                     |
| attributes     | device         | object   | Device information for the test result (browser and mobile tests).                                                                 |
| device         | browser        | object   | Browser information for the device used to run the test.                                                                           |
| browser        | type           | string   | Browser type (for example, `chrome`, `firefox`).                                                                                   |
| browser        | user_agent     | string   | User agent string reported by the browser.                                                                                         |
| browser        | version        | string   | Browser version.                                                                                                                   |
| device         | id             | string   | Device identifier.                                                                                                                 |
| device         | name           | string   | Device name.                                                                                                                       |
| device         | platform       | object   | Platform information for the device used to run the test.                                                                          |
| platform       | name           | string   | Platform name (for example, `linux`, `macos`).                                                                                     |
| platform       | version        | string   | Platform version.                                                                                                                  |
| device         | resolution     | object   | Screen resolution of the device used to run the test.                                                                              |
| resolution     | height         | int64    | Viewport height in pixels.                                                                                                         |
| resolution     | pixel_ratio    | double   | Device pixel ratio.                                                                                                                |
| resolution     | width          | int64    | Viewport width in pixels.                                                                                                          |
| device         | type           | string   | Device type.                                                                                                                       |
| attributes     | execution_info | object   | Execution details for a Synthetic test result.                                                                                     |
| execution_info | duration       | object   | Total duration of a Synthetic test execution.                                                                                      |
| duration       | has_duration   | boolean  | Whether a duration was recorded for this execution.                                                                                |
| duration       | value          | int64    | Duration value in milliseconds.                                                                                                    |
| execution_info | error_message  | string   | Error message if the execution encountered an issue.                                                                               |
| execution_info | is_fast_retry  | boolean  | Whether this result is from a fast retry.                                                                                          |
| execution_info | timings        | object   | Timing breakdown of the test execution in milliseconds.                                                                            |
| execution_info | tunnel         | boolean  | Whether the test was executed through a tunnel.                                                                                    |
| execution_info | unhealthy      | boolean  | Whether the location was unhealthy during execution.                                                                               |
| attributes     | finished_at    | int64    | Timestamp of when the test finished (in milliseconds).                                                                             |
| attributes     | location       | object   | Location information for a Synthetic test result.                                                                                  |
| location       | id             | string   | Identifier of the location.                                                                                                        |
| location       | name           | string   | Human-readable name of the location.                                                                                               |
| location       | version        | string   | Version of the worker that ran the test.                                                                                           |
| location       | worker_id      | string   | Identifier of the specific worker that ran the test.                                                                               |
| attributes     | run_type       | enum     | The type of run for a Synthetic test result. Allowed enum values: `scheduled,fast,ci,triggered`                                    |
| attributes     | started_at     | int64    | Timestamp of when the test started (in milliseconds).                                                                              |
| attributes     | status         | enum     | Status of a Synthetic test result. Allowed enum values: `passed,failed,no_data`                                                    |
| attributes     | steps_info     | object   | Step execution summary for a Synthetic test result.                                                                                |
| steps_info     | completed      | int64    | Number of completed steps.                                                                                                         |
| steps_info     | errors         | int64    | Number of steps with errors.                                                                                                       |
| steps_info     | total          | int64    | Total number of steps.                                                                                                             |
| attributes     | test_sub_type  | enum     | Subtype of the Synthetic test that produced this result. Allowed enum values: `dns,grpc,http,icmp,mcp,multi,ssl,tcp,udp,websocket` |
| attributes     | test_type      | enum     | Type of the Synthetic test that produced this result. Allowed enum values: `api,browser,mobile,network`                            |
| data           | id             | string   | The result ID.                                                                                                                     |
| data           | relationships  | object   | Relationships for a Synthetic test result.                                                                                         |
| relationships  | test           | object   | Relationship to the Synthetic test.                                                                                                |
| test           | data           | object   | Data for the test relationship.                                                                                                    |
| data           | id             | string   | The public ID of the test.                                                                                                         |
| data           | type           | string   | Type of the related resource.                                                                                                      |
| data           | type           | enum     | Type of the Synthetic test result summary resource, `result_summary`. Allowed enum values: `result_summary`                        |
|                | included       | [object] | Array of included related resources, such as the test definition.                                                                  |
| included       | attributes     | object   | Attributes of the included resource.                                                                                               |
| included       | id             | string   | ID of the included resource.                                                                                                       |
| included       | type           | string   | Type of the included resource.                                                                                                     |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "device": {
          "browser": {
            "type": "edge",
            "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 Edg/127.0.2651.105 DatadogSynthetics",
            "version": "127.0.2651.105"
          },
          "id": "chrome.laptop_large",
          "name": "Chrome - Laptop Large",
          "platform": {
            "name": "ios",
            "version": "14.8"
          },
          "resolution": {
            "height": 1100,
            "pixel_ratio": 2,
            "width": 1440
          },
          "type": "browser"
        },
        "execution_info": {
          "duration": {
            "has_duration": true,
            "value": 380
          },
          "error_message": "Connection timed out",
          "is_fast_retry": true,
          "timings": {
            "dns": 2.9,
            "download": 2.1,
            "firstByte": 95.2,
            "ssl": 187.9,
            "tcp": 92.6,
            "total": 380.7
          },
          "tunnel": false,
          "unhealthy": false
        },
        "finished_at": "integer",
        "location": {
          "id": "aws:us-east-1",
          "name": "N. Virginia (AWS)",
          "version": "1.0.0",
          "worker_id": "worker-abc-123"
        },
        "run_type": "scheduled",
        "started_at": "integer",
        "status": "passed",
        "steps_info": {
          "completed": 6,
          "errors": 0,
          "total": 6
        },
        "test_sub_type": "http",
        "test_type": "api"
      },
      "id": "5158904793181869365",
      "relationships": {
        "test": {
          "data": {
            "id": "abc-def-123",
            "type": "test"
          }
        }
      },
      "type": "result_summary"
    }
  ],
  "included": [
    {
      "attributes": {},
      "id": "abc-def-123",
      "type": "test"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport public_id="CHANGE_ME"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/browser/${public_id}/results" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Poll for test results{% #poll-for-test-results %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                           |
| ----------------- | ---------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/synthetics/tests/poll_results |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/synthetics/tests/poll_results |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/synthetics/tests/poll_results      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/synthetics/tests/poll_results      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/synthetics/tests/poll_results     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/synthetics/tests/poll_results |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/synthetics/tests/poll_results |

### Overview

Poll for test results given a list of result IDs. This is typically used after triggering tests with CI/CD to retrieve results once they are available. This endpoint requires the `synthetics_read` permission.

OAuth apps require the `synthetics_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#synthetics) to access this endpoint.



### Arguments

#### Query Strings

| Name                         | Type   | Description                                     |
| ---------------------------- | ------ | ----------------------------------------------- |
| result_ids [*required*] | string | A JSON-encoded array of result IDs to poll for. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response object for polling Synthetic test results.

| Parent field         | Field                            | Type     | Description                                                                                                                        |
| -------------------- | -------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|                      | data                             | [object] | Array of Synthetic test results.                                                                                                   |
| data                 | attributes                       | object   | Attributes of a Synthetic test result.                                                                                             |
| attributes           | batch                            | object   | Batch information for the test result.                                                                                             |
| batch                | id                               | string   | Batch identifier.                                                                                                                  |
| attributes           | ci                               | object   | CI information associated with the test result.                                                                                    |
| ci                   | pipeline                         | object   | Details of the CI pipeline.                                                                                                        |
| pipeline             | id                               | string   | Pipeline identifier.                                                                                                               |
| pipeline             | name                             | string   | Pipeline name.                                                                                                                     |
| pipeline             | number                           | int64    | Pipeline number.                                                                                                                   |
| pipeline             | url                              | string   | Pipeline URL.                                                                                                                      |
| ci                   | provider                         | object   | Details of the CI provider.                                                                                                        |
| provider             | name                             | string   | Provider name.                                                                                                                     |
| ci                   | stage                            | object   | Details of the CI stage.                                                                                                           |
| stage                | name                             | string   | Stage name.                                                                                                                        |
| ci                   | workspace_path                   | string   | Path of the workspace that ran the CI job.                                                                                         |
| attributes           | device                           | object   | Device information for the test result (browser and mobile tests).                                                                 |
| device               | browser                          | object   | Browser information for the device used to run the test.                                                                           |
| browser              | type                             | string   | Browser type (for example, `chrome`, `firefox`).                                                                                   |
| browser              | user_agent                       | string   | User agent string reported by the browser.                                                                                         |
| browser              | version                          | string   | Browser version.                                                                                                                   |
| device               | id                               | string   | Device identifier.                                                                                                                 |
| device               | name                             | string   | Device name.                                                                                                                       |
| device               | platform                         | object   | Platform information for the device used to run the test.                                                                          |
| platform             | name                             | string   | Platform name (for example, `linux`, `macos`).                                                                                     |
| platform             | version                          | string   | Platform version.                                                                                                                  |
| device               | resolution                       | object   | Screen resolution of the device used to run the test.                                                                              |
| resolution           | height                           | int64    | Viewport height in pixels.                                                                                                         |
| resolution           | pixel_ratio                      | double   | Device pixel ratio.                                                                                                                |
| resolution           | width                            | int64    | Viewport width in pixels.                                                                                                          |
| device               | type                             | string   | Device type.                                                                                                                       |
| attributes           | git                              | object   | Git information associated with the test result.                                                                                   |
| git                  | branch                           | string   | Git branch name.                                                                                                                   |
| git                  | commit                           | object   | Details of the Git commit associated with the test result.                                                                         |
| commit               | author                           | object   | A Git user (author or committer).                                                                                                  |
| author               | date                             | string   | Timestamp of the commit action for this user.                                                                                      |
| author               | email                            | string   | Email address of the Git user.                                                                                                     |
| author               | name                             | string   | Name of the Git user.                                                                                                              |
| commit               | committer                        | object   | A Git user (author or committer).                                                                                                  |
| committer            | date                             | string   | Timestamp of the commit action for this user.                                                                                      |
| committer            | email                            | string   | Email address of the Git user.                                                                                                     |
| committer            | name                             | string   | Name of the Git user.                                                                                                              |
| commit               | message                          | string   | Commit message.                                                                                                                    |
| commit               | sha                              | string   | Commit SHA.                                                                                                                        |
| commit               | url                              | string   | URL of the commit.                                                                                                                 |
| git                  | repository_url                   | string   | Git repository URL.                                                                                                                |
| attributes           | location                         | object   | Location information for a Synthetic test result.                                                                                  |
| location             | id                               | string   | Identifier of the location.                                                                                                        |
| location             | name                             | string   | Human-readable name of the location.                                                                                               |
| location             | version                          | string   | Version of the worker that ran the test.                                                                                           |
| location             | worker_id                        | string   | Identifier of the specific worker that ran the test.                                                                               |
| attributes           | result                           | object   | Full result details for a Synthetic test execution.                                                                                |
| result               | assertions                       | [object] | Assertion results produced by the test.                                                                                            |
| assertions           | actual                           |          | Actual value observed during the test. Its type depends on the assertion type.                                                     |
| assertions           | error_message                    | string   | Error message if the assertion failed.                                                                                             |
| assertions           | expected                         |          | Expected value for the assertion. Its type depends on the assertion type.                                                          |
| assertions           | operator                         | string   | Operator used for the assertion (for example, `is`, `contains`).                                                                   |
| assertions           | property                         | string   | Property targeted by the assertion, when applicable.                                                                               |
| assertions           | target                           |          | Target value for the assertion. Its type depends on the assertion type.                                                            |
| assertions           | target_path                      | string   | JSON path or XPath evaluated for the assertion.                                                                                    |
| assertions           | target_path_operator             | string   | Operator used for the target path assertion.                                                                                       |
| assertions           | type                             | string   | Type of the assertion (for example, `responseTime`, `statusCode`, `body`).                                                         |
| assertions           | valid                            | boolean  | Whether the assertion passed.                                                                                                      |
| result               | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                  |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                 |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                 |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                   |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                   |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                      |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                              |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                   |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                 |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                         |
| result               | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                             |
| result               | cert                             | object   | SSL/TLS certificate information returned from an SSL test.                                                                         |
| cert                 | cipher                           | string   | Cipher used for the TLS connection.                                                                                                |
| cert                 | exponent                         | int64    | RSA exponent of the certificate.                                                                                                   |
| cert                 | ext_key_usage                    | [string] | Extended key usage extensions for the certificate.                                                                                 |
| cert                 | fingerprint                      | string   | SHA-1 fingerprint of the certificate.                                                                                              |
| cert                 | fingerprint256                   | string   | SHA-256 fingerprint of the certificate.                                                                                            |
| cert                 | issuer                           | object   | Certificate issuer details.                                                                                                        |
| additionalProperties | <any-key>                        | string   |
| cert                 | modulus                          | string   | RSA modulus of the certificate.                                                                                                    |
| cert                 | protocol                         | string   | TLS protocol used (for example, `TLSv1.2`).                                                                                        |
| cert                 | serial_number                    | string   | Serial number of the certificate.                                                                                                  |
| cert                 | subject                          | object   | Certificate subject details.                                                                                                       |
| additionalProperties | <any-key>                        | string   |
| cert                 | tls_version                      | double   | TLS protocol version.                                                                                                              |
| cert                 | valid                            | object   | Validity window of a certificate.                                                                                                  |
| valid                | from                             | int64    | Unix timestamp (ms) of when the certificate became valid.                                                                          |
| valid                | to                               | int64    | Unix timestamp (ms) of when the certificate expires.                                                                               |
| result               | compressed_json_descriptor       | string   | Compressed JSON descriptor for the test (internal format).                                                                         |
| result               | compressed_steps                 | string   | Compressed representation of the test steps (internal format).                                                                     |
| result               | connection_outcome               | string   | Outcome of the connection attempt (for example, `established`, `refused`).                                                         |
| result               | dns_resolution                   | object   | DNS resolution details recorded during the test execution.                                                                         |
| dns_resolution       | attempts                         | [object] | DNS resolution attempts made during the test.                                                                                      |
| dns_resolution       | resolved_ip                      | string   | Resolved IP address for the target host.                                                                                           |
| dns_resolution       | resolved_port                    | string   | Resolved port for the target service.                                                                                              |
| dns_resolution       | server                           | string   | DNS server used for the resolution.                                                                                                |
| result               | duration                         | double   | Duration of the test execution (in milliseconds).                                                                                  |
| result               | exited_on_step_success           | boolean  | Whether the test exited early because a step marked with `exitIfSucceed` passed.                                                   |
| result               | failure                          | object   | Details about the failure of a Synthetic test.                                                                                     |
| failure              | code                             | string   | Error code for the failure.                                                                                                        |
| failure              | internal_code                    | string   | Internal error code used for debugging.                                                                                            |
| failure              | internal_message                 | string   | Internal error message used for debugging.                                                                                         |
| failure              | message                          | string   | Error message for the failure.                                                                                                     |
| result               | finished_at                      | int64    | Timestamp of when the test finished (in milliseconds).                                                                             |
| result               | handshake                        | object   | Handshake request and response for protocol-level tests.                                                                           |
| handshake            | request                          | object   | Details of the outgoing request made during the test execution.                                                                    |
| request              | allow_insecure                   | boolean  | Whether insecure certificates are allowed for this request.                                                                        |
| request              | body                             | string   | Body sent with the request.                                                                                                        |
| request              | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                             |
| request              | destination_service              | string   | Destination service for a Network Path test.                                                                                       |
| request              | dns_server                       | string   | DNS server used to resolve the target host.                                                                                        |
| request              | dns_server_port                  | int64    | Port of the DNS server used for resolution.                                                                                        |
| request              | e2e_queries                      | int64    | Number of end-to-end probe queries issued.                                                                                         |
| request              | files                            | [object] | Files attached to the request.                                                                                                     |
| files                | bucket_key                       | string   | Storage bucket key where the file is stored.                                                                                       |
| files                | encoding                         | string   | Encoding of the file contents.                                                                                                     |
| files                | name                             | string   | File name.                                                                                                                         |
| files                | size                             | int64    | File size in bytes.                                                                                                                |
| files                | type                             | string   | File MIME type.                                                                                                                    |
| request              | headers                          | object   | Headers sent with the request.                                                                                                     |
| request              | host                             | string   | Host targeted by the request.                                                                                                      |
| request              | max_ttl                          | int64    | Maximum TTL for network probe packets.                                                                                             |
| request              | message                          | string   | Message sent with the request (for WebSocket/TCP/UDP tests).                                                                       |
| request              | method                           | string   | HTTP method used for the request.                                                                                                  |
| request              | no_saving_response_body          | boolean  | Whether the response body was not saved.                                                                                           |
| request              | port                             |          | Port targeted by the request. Can be a number or a string variable reference.                                                      |
| request              | service                          | string   | Service name targeted by the request (for gRPC tests).                                                                             |
| request              | source_service                   | string   | Source service for a Network Path test.                                                                                            |
| request              | timeout                          | int64    | Request timeout in milliseconds.                                                                                                   |
| request              | tool_name                        | string   | Name of the MCP tool called (MCP tests only).                                                                                      |
| request              | traceroute_queries               | int64    | Number of traceroute probe queries issued.                                                                                         |
| request              | url                              | string   | URL targeted by the request.                                                                                                       |
| handshake            | response                         | object   | Details of the response received during the test execution.                                                                        |
| response             | body                             | string   | Body of the response.                                                                                                              |
| response             | body_compressed                  | string   | Compressed representation of the response body.                                                                                    |
| response             | body_hashes                      | string   | Hashes computed over the response body.                                                                                            |
| response             | body_size                        | int64    | Size of the response body in bytes.                                                                                                |
| response             | cache_headers                    | object   | Cache-related response headers.                                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | cdn                              | object   | CDN provider details inferred from response headers.                                                                               |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                 |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                       |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                          |
| response             | close                            | object   | WebSocket close frame information for WebSocket test responses.                                                                    |
| close                | reason                           | string   | Reason string received in the close frame.                                                                                         |
| close                | status_code                      | int64    | Status code received in the close frame.                                                                                           |
| response             | compressed_message               | string   | Compressed representation of the response message.                                                                                 |
| response             | headers                          | object   | Response headers.                                                                                                                  |
| response             | healthcheck                      | object   | Health check information returned from a gRPC health check call.                                                                   |
| healthcheck          | message                          | object   | Raw health check message payload.                                                                                                  |
| additionalProperties | <any-key>                        | string   |
| healthcheck          | status                           | int64    | Health check status code.                                                                                                          |
| response             | http_version                     | string   | HTTP version of the response.                                                                                                      |
| response             | is_body_truncated                | boolean  | Whether the response body was truncated.                                                                                           |
| response             | is_message_truncated             | boolean  | Whether the response message was truncated.                                                                                        |
| response             | message                          | string   | Message received in the response (for WebSocket/TCP/UDP tests).                                                                    |
| response             | metadata                         | object   | Additional metadata returned with the response.                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | records                          | [object] | DNS records returned in the response (DNS tests only).                                                                             |
| records              | type                             | string   | DNS record type (for example, `A`, `AAAA`, `CNAME`).                                                                               |
| records              | values                           | [string] | Values associated with the DNS record.                                                                                             |
| response             | redirects                        | [object] | Redirect hops encountered while performing the request.                                                                            |
| redirects            | location                         | string   | Target location of the redirect.                                                                                                   |
| redirects            | status_code                      | int64    | HTTP status code of the redirect response.                                                                                         |
| response             | status_code                      | int64    | HTTP status code of the response.                                                                                                  |
| result               | id                               | string   | The unique identifier for this result.                                                                                             |
| result               | initial_id                       | string   | The initial result ID before any retries.                                                                                          |
| result               | is_fast_retry                    | boolean  | Whether this result is from a fast retry.                                                                                          |
| result               | is_last_retry                    | boolean  | Whether this result is from the last retry.                                                                                        |
| result               | netpath                          | object   | Network Path test result capturing the path between source and destination.                                                        |
| netpath              | destination                      | object   | Destination endpoint of a network path measurement.                                                                                |
| destination          | hostname                         | string   | Hostname of the destination.                                                                                                       |
| destination          | ip_address                       | string   | IP address of the destination.                                                                                                     |
| destination          | port                             | int64    | Port of the destination service.                                                                                                   |
| netpath              | hops                             | [object] | Hops along the network path.                                                                                                       |
| hops                 | hostname                         | string   | Resolved hostname of the hop.                                                                                                      |
| hops                 | ip_address                       | string   | IP address of the hop.                                                                                                             |
| hops                 | reachable                        | boolean  | Whether this hop was reachable.                                                                                                    |
| hops                 | rtt                              | double   | Round-trip time to this hop in milliseconds.                                                                                       |
| hops                 | ttl                              | int64    | Time-to-live value of the probe packet at this hop.                                                                                |
| netpath              | origin                           | string   | Origin of the network path (for example, probe source).                                                                            |
| netpath              | pathtrace_id                     | string   | Identifier of the path trace.                                                                                                      |
| netpath              | protocol                         | string   | Protocol used for the path trace (for example, `tcp`, `udp`, `icmp`).                                                              |
| netpath              | source                           | object   | Source endpoint of a network path measurement.                                                                                     |
| source               | hostname                         | string   | Hostname of the endpoint.                                                                                                          |
| netpath              | tags                             | [string] | Tags associated with the network path measurement.                                                                                 |
| netpath              | timestamp                        | int64    | Unix timestamp (ms) of the network path measurement.                                                                               |
| result               | netstats                         | object   | Aggregated network statistics from the test execution.                                                                             |
| netstats             | hops                             | object   | Statistics about the number of hops for a network test.                                                                            |
| hops                 | avg                              | double   | Average number of hops.                                                                                                            |
| hops                 | max                              | int64    | Maximum number of hops.                                                                                                            |
| hops                 | min                              | int64    | Minimum number of hops.                                                                                                            |
| netstats             | jitter                           | double   | Network jitter in milliseconds.                                                                                                    |
| netstats             | latency                          | object   | Latency statistics for a network probe.                                                                                            |
| latency              | avg                              | double   | Average latency in milliseconds.                                                                                                   |
| latency              | max                              | double   | Maximum latency in milliseconds.                                                                                                   |
| latency              | min                              | double   | Minimum latency in milliseconds.                                                                                                   |
| netstats             | packet_loss_percentage           | double   | Percentage of probe packets lost.                                                                                                  |
| netstats             | packets_received                 | int64    | Number of probe packets received.                                                                                                  |
| netstats             | packets_sent                     | int64    | Number of probe packets sent.                                                                                                      |
| result               | ocsp                             | object   | OCSP response received while validating a certificate.                                                                             |
| ocsp                 | certificate                      | object   | Certificate details returned in an OCSP response.                                                                                  |
| certificate          | revocation_reason                | string   | Reason code for the revocation, when applicable.                                                                                   |
| certificate          | revocation_time                  | int64    | Unix timestamp (ms) of the revocation.                                                                                             |
| certificate          | serial_number                    | string   | Serial number of the certificate.                                                                                                  |
| ocsp                 | status                           | string   | OCSP response status (for example, `good`, `revoked`, `unknown`).                                                                  |
| ocsp                 | updates                          | object   | OCSP response update timestamps.                                                                                                   |
| updates              | next_update                      | int64    | Unix timestamp (ms) of the next expected OCSP update.                                                                              |
| updates              | produced_at                      | int64    | Unix timestamp (ms) of when the OCSP response was produced.                                                                        |
| updates              | this_update                      | int64    | Unix timestamp (ms) of this OCSP update.                                                                                           |
| result               | ping                             | object   | A network probe result, used for traceroute hops and ping summaries.                                                               |
| ping                 | host                             | string   | Target hostname.                                                                                                                   |
| ping                 | latency                          | object   | Latency statistics for a network probe.                                                                                            |
| latency              | avg                              | double   | Average latency in milliseconds.                                                                                                   |
| latency              | max                              | double   | Maximum latency in milliseconds.                                                                                                   |
| latency              | min                              | double   | Minimum latency in milliseconds.                                                                                                   |
| ping                 | packet_loss_percentage           | double   | Percentage of probe packets lost.                                                                                                  |
| ping                 | packet_size                      | int64    | Size of each probe packet in bytes.                                                                                                |
| ping                 | packets_received                 | int64    | Number of probe packets received.                                                                                                  |
| ping                 | packets_sent                     | int64    | Number of probe packets sent.                                                                                                      |
| ping                 | resolved_ip                      | string   | Resolved IP address for the target.                                                                                                |
| ping                 | routers                          | [object] | List of intermediate routers for the traceroute.                                                                                   |
| routers              | ip                               | string   | IP address of the router.                                                                                                          |
| routers              | resolved_host                    | string   | Resolved hostname of the router.                                                                                                   |
| result               | received_email_count             | int64    | Number of emails received during the test (email tests).                                                                           |
| result               | received_message                 | string   | Message received from the target (for WebSocket/TCP/UDP tests).                                                                    |
| result               | request                          | object   | Details of the outgoing request made during the test execution.                                                                    |
| request              | allow_insecure                   | boolean  | Whether insecure certificates are allowed for this request.                                                                        |
| request              | body                             | string   | Body sent with the request.                                                                                                        |
| request              | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                             |
| request              | destination_service              | string   | Destination service for a Network Path test.                                                                                       |
| request              | dns_server                       | string   | DNS server used to resolve the target host.                                                                                        |
| request              | dns_server_port                  | int64    | Port of the DNS server used for resolution.                                                                                        |
| request              | e2e_queries                      | int64    | Number of end-to-end probe queries issued.                                                                                         |
| request              | files                            | [object] | Files attached to the request.                                                                                                     |
| files                | bucket_key                       | string   | Storage bucket key where the file is stored.                                                                                       |
| files                | encoding                         | string   | Encoding of the file contents.                                                                                                     |
| files                | name                             | string   | File name.                                                                                                                         |
| files                | size                             | int64    | File size in bytes.                                                                                                                |
| files                | type                             | string   | File MIME type.                                                                                                                    |
| request              | headers                          | object   | Headers sent with the request.                                                                                                     |
| request              | host                             | string   | Host targeted by the request.                                                                                                      |
| request              | max_ttl                          | int64    | Maximum TTL for network probe packets.                                                                                             |
| request              | message                          | string   | Message sent with the request (for WebSocket/TCP/UDP tests).                                                                       |
| request              | method                           | string   | HTTP method used for the request.                                                                                                  |
| request              | no_saving_response_body          | boolean  | Whether the response body was not saved.                                                                                           |
| request              | port                             |          | Port targeted by the request. Can be a number or a string variable reference.                                                      |
| request              | service                          | string   | Service name targeted by the request (for gRPC tests).                                                                             |
| request              | source_service                   | string   | Source service for a Network Path test.                                                                                            |
| request              | timeout                          | int64    | Request timeout in milliseconds.                                                                                                   |
| request              | tool_name                        | string   | Name of the MCP tool called (MCP tests only).                                                                                      |
| request              | traceroute_queries               | int64    | Number of traceroute probe queries issued.                                                                                         |
| request              | url                              | string   | URL targeted by the request.                                                                                                       |
| result               | resolved_ip                      | string   | IP address resolved for the target host.                                                                                           |
| result               | response                         | object   | Details of the response received during the test execution.                                                                        |
| response             | body                             | string   | Body of the response.                                                                                                              |
| response             | body_compressed                  | string   | Compressed representation of the response body.                                                                                    |
| response             | body_hashes                      | string   | Hashes computed over the response body.                                                                                            |
| response             | body_size                        | int64    | Size of the response body in bytes.                                                                                                |
| response             | cache_headers                    | object   | Cache-related response headers.                                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | cdn                              | object   | CDN provider details inferred from response headers.                                                                               |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                 |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                       |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                          |
| response             | close                            | object   | WebSocket close frame information for WebSocket test responses.                                                                    |
| close                | reason                           | string   | Reason string received in the close frame.                                                                                         |
| close                | status_code                      | int64    | Status code received in the close frame.                                                                                           |
| response             | compressed_message               | string   | Compressed representation of the response message.                                                                                 |
| response             | headers                          | object   | Response headers.                                                                                                                  |
| response             | healthcheck                      | object   | Health check information returned from a gRPC health check call.                                                                   |
| healthcheck          | message                          | object   | Raw health check message payload.                                                                                                  |
| additionalProperties | <any-key>                        | string   |
| healthcheck          | status                           | int64    | Health check status code.                                                                                                          |
| response             | http_version                     | string   | HTTP version of the response.                                                                                                      |
| response             | is_body_truncated                | boolean  | Whether the response body was truncated.                                                                                           |
| response             | is_message_truncated             | boolean  | Whether the response message was truncated.                                                                                        |
| response             | message                          | string   | Message received in the response (for WebSocket/TCP/UDP tests).                                                                    |
| response             | metadata                         | object   | Additional metadata returned with the response.                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | records                          | [object] | DNS records returned in the response (DNS tests only).                                                                             |
| records              | type                             | string   | DNS record type (for example, `A`, `AAAA`, `CNAME`).                                                                               |
| records              | values                           | [string] | Values associated with the DNS record.                                                                                             |
| response             | redirects                        | [object] | Redirect hops encountered while performing the request.                                                                            |
| redirects            | location                         | string   | Target location of the redirect.                                                                                                   |
| redirects            | status_code                      | int64    | HTTP status code of the redirect response.                                                                                         |
| response             | status_code                      | int64    | HTTP status code of the response.                                                                                                  |
| result               | run_type                         | enum     | The type of run for a Synthetic test result. Allowed enum values: `scheduled,fast,ci,triggered`                                    |
| result               | sent_message                     | string   | Message sent to the target (for WebSocket/TCP/UDP tests).                                                                          |
| result               | start_url                        | string   | Start URL for the test (browser tests).                                                                                            |
| result               | started_at                       | int64    | Timestamp of when the test started (in milliseconds).                                                                              |
| result               | status                           | enum     | Status of a Synthetic test result. Allowed enum values: `passed,failed,no_data`                                                    |
| result               | steps                            | [object] | Step results (for browser, mobile, and multistep API tests).                                                                       |
| steps                | allow_failure                    | boolean  | Whether the test continues when this step fails.                                                                                   |
| steps                | api_test                         | object   | Inner API test definition for browser `runApiTest` steps.                                                                          |
| steps                | assertion_result                 | object   | Assertion result for a browser or mobile step.                                                                                     |
| assertion_result     | actual                           |          | Actual value observed during the step assertion. Its type depends on the check type.                                               |
| assertion_result     | check_type                       | string   | Type of the step assertion check.                                                                                                  |
| assertion_result     | expected                         |          | Expected value for the step assertion. Its type depends on the check type.                                                         |
| assertion_result     | has_secure_variables             | boolean  | Whether the assertion involves secure variables.                                                                                   |
| steps                | assertions                       | [object] | Assertion results produced by the step.                                                                                            |
| assertions           | actual                           |          | Actual value observed during the test. Its type depends on the assertion type.                                                     |
| assertions           | error_message                    | string   | Error message if the assertion failed.                                                                                             |
| assertions           | expected                         |          | Expected value for the assertion. Its type depends on the assertion type.                                                          |
| assertions           | operator                         | string   | Operator used for the assertion (for example, `is`, `contains`).                                                                   |
| assertions           | property                         | string   | Property targeted by the assertion, when applicable.                                                                               |
| assertions           | target                           |          | Target value for the assertion. Its type depends on the assertion type.                                                            |
| assertions           | target_path                      | string   | JSON path or XPath evaluated for the assertion.                                                                                    |
| assertions           | target_path_operator             | string   | Operator used for the target path assertion.                                                                                       |
| assertions           | type                             | string   | Type of the assertion (for example, `responseTime`, `statusCode`, `body`).                                                         |
| assertions           | valid                            | boolean  | Whether the assertion passed.                                                                                                      |
| steps                | blocked_requests_urls            | [string] | URLs of requests blocked during the step.                                                                                          |
| steps                | bounds                           | object   | Bounding box of an element on the page.                                                                                            |
| bounds               | height                           | int64    | Height in pixels.                                                                                                                  |
| bounds               | width                            | int64    | Width in pixels.                                                                                                                   |
| bounds               | x                                | int64    | Horizontal position in pixels.                                                                                                     |
| bounds               | y                                | int64    | Vertical position in pixels.                                                                                                       |
| steps                | browser_errors                   | [object] | Browser errors captured during the step.                                                                                           |
| browser_errors       | description                      | string   | Error description.                                                                                                                 |
| browser_errors       | method                           | string   | HTTP method associated with the error (for network errors).                                                                        |
| browser_errors       | name                             | string   | Error name.                                                                                                                        |
| browser_errors       | status                           | int64    | HTTP status code associated with the error (for network errors).                                                                   |
| browser_errors       | type                             | string   | Type of the browser error.                                                                                                         |
| browser_errors       | url                              | object   | URL associated with the error.                                                                                                     |
| steps                | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                  |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                 |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                 |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                   |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                   |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                      |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                              |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                   |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                 |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                         |
| steps                | cdn_resources                    | [object] | CDN resources encountered during the step.                                                                                         |
| cdn_resources        | cdn                              | object   | CDN provider details inferred from response headers.                                                                               |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                 |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                       |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                          |
| cdn_resources        | resolved_ip                      | string   | Resolved IP address for the CDN resource.                                                                                          |
| cdn_resources        | timestamp                        | int64    | Unix timestamp (ms) of when the resource was fetched.                                                                              |
| cdn_resources        | timings                          | object   | Timing breakdown for fetching the CDN resource.                                                                                    |
| steps                | click_type                       | string   | Click type performed in a browser step.                                                                                            |
| steps                | compressed_json_descriptor       | string   | Compressed JSON descriptor for the step (internal format).                                                                         |
| steps                | config                           | object   | Request configuration executed by this step (API test steps).                                                                      |
| steps                | description                      | string   | Human-readable description of the step.                                                                                            |
| steps                | duration                         | double   | Duration of the step in milliseconds.                                                                                              |
| steps                | element_description              | string   | Description of the element interacted with by the step.                                                                            |
| steps                | element_updates                  | object   | Element locator updates produced during a step.                                                                                    |
| element_updates      | multi_locator                    | object   | Updated multi-locator definition.                                                                                                  |
| additionalProperties | <any-key>                        | string   |
| element_updates      | target_outer_html                | string   | Updated outer HTML of the targeted element.                                                                                        |
| element_updates      | version                          | int64    | Version of the element locator definition.                                                                                         |
| steps                | extracted_value                  | object   | A variable used or extracted during a test.                                                                                        |
| extracted_value      | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| extracted_value      | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| extracted_value      | example                          | string   | Example value for the variable.                                                                                                    |
| extracted_value      | id                               | string   | Variable identifier.                                                                                                               |
| extracted_value      | name                             | string   | Variable name.                                                                                                                     |
| extracted_value      | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| extracted_value      | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| extracted_value      | type                             | string   | Variable type.                                                                                                                     |
| extracted_value      | val                              | string   | Evaluated value of the variable.                                                                                                   |
| extracted_value      | value                            | string   | Current value of the variable.                                                                                                     |
| steps                | failure                          | object   | Details about the failure of a Synthetic test.                                                                                     |
| failure              | code                             | string   | Error code for the failure.                                                                                                        |
| failure              | internal_code                    | string   | Internal error code used for debugging.                                                                                            |
| failure              | internal_message                 | string   | Internal error message used for debugging.                                                                                         |
| failure              | message                          | string   | Error message for the failure.                                                                                                     |
| steps                | http_results                     | [object] | HTTP results produced by an MCP step.                                                                                              |
| http_results         | actual                           |          | Actual value observed during the test. Its type depends on the assertion type.                                                     |
| http_results         | error_message                    | string   | Error message if the assertion failed.                                                                                             |
| http_results         | expected                         |          | Expected value for the assertion. Its type depends on the assertion type.                                                          |
| http_results         | operator                         | string   | Operator used for the assertion (for example, `is`, `contains`).                                                                   |
| http_results         | property                         | string   | Property targeted by the assertion, when applicable.                                                                               |
| http_results         | target                           |          | Target value for the assertion. Its type depends on the assertion type.                                                            |
| http_results         | target_path                      | string   | JSON path or XPath evaluated for the assertion.                                                                                    |
| http_results         | target_path_operator             | string   | Operator used for the target path assertion.                                                                                       |
| http_results         | type                             | string   | Type of the assertion (for example, `responseTime`, `statusCode`, `body`).                                                         |
| http_results         | valid                            | boolean  | Whether the assertion passed.                                                                                                      |
| steps                | id                               | string   | Identifier of the step.                                                                                                            |
| steps                | is_critical                      | boolean  | Whether this step is critical for the test outcome.                                                                                |
| steps                | javascript_custom_assertion_code | boolean  | Whether the step uses a custom JavaScript assertion.                                                                               |
| steps                | locate_element_duration          | double   | Time taken to locate the element in milliseconds.                                                                                  |
| steps                | name                             | string   | Name of the step.                                                                                                                  |
| steps                | request                          | object   | Details of the outgoing request made during the test execution.                                                                    |
| request              | allow_insecure                   | boolean  | Whether insecure certificates are allowed for this request.                                                                        |
| request              | body                             | string   | Body sent with the request.                                                                                                        |
| request              | call_type                        | string   | gRPC call type (for example, `unary`, `healthCheck`, or `reflection`).                                                             |
| request              | destination_service              | string   | Destination service for a Network Path test.                                                                                       |
| request              | dns_server                       | string   | DNS server used to resolve the target host.                                                                                        |
| request              | dns_server_port                  | int64    | Port of the DNS server used for resolution.                                                                                        |
| request              | e2e_queries                      | int64    | Number of end-to-end probe queries issued.                                                                                         |
| request              | files                            | [object] | Files attached to the request.                                                                                                     |
| files                | bucket_key                       | string   | Storage bucket key where the file is stored.                                                                                       |
| files                | encoding                         | string   | Encoding of the file contents.                                                                                                     |
| files                | name                             | string   | File name.                                                                                                                         |
| files                | size                             | int64    | File size in bytes.                                                                                                                |
| files                | type                             | string   | File MIME type.                                                                                                                    |
| request              | headers                          | object   | Headers sent with the request.                                                                                                     |
| request              | host                             | string   | Host targeted by the request.                                                                                                      |
| request              | max_ttl                          | int64    | Maximum TTL for network probe packets.                                                                                             |
| request              | message                          | string   | Message sent with the request (for WebSocket/TCP/UDP tests).                                                                       |
| request              | method                           | string   | HTTP method used for the request.                                                                                                  |
| request              | no_saving_response_body          | boolean  | Whether the response body was not saved.                                                                                           |
| request              | port                             |          | Port targeted by the request. Can be a number or a string variable reference.                                                      |
| request              | service                          | string   | Service name targeted by the request (for gRPC tests).                                                                             |
| request              | source_service                   | string   | Source service for a Network Path test.                                                                                            |
| request              | timeout                          | int64    | Request timeout in milliseconds.                                                                                                   |
| request              | tool_name                        | string   | Name of the MCP tool called (MCP tests only).                                                                                      |
| request              | traceroute_queries               | int64    | Number of traceroute probe queries issued.                                                                                         |
| request              | url                              | string   | URL targeted by the request.                                                                                                       |
| steps                | response                         | object   | Details of the response received during the test execution.                                                                        |
| response             | body                             | string   | Body of the response.                                                                                                              |
| response             | body_compressed                  | string   | Compressed representation of the response body.                                                                                    |
| response             | body_hashes                      | string   | Hashes computed over the response body.                                                                                            |
| response             | body_size                        | int64    | Size of the response body in bytes.                                                                                                |
| response             | cache_headers                    | object   | Cache-related response headers.                                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | cdn                              | object   | CDN provider details inferred from response headers.                                                                               |
| cdn                  | cache                            | object   | Cache status reported by the CDN for the response.                                                                                 |
| cache                | cached                           | boolean  | Whether the response was served from the CDN cache.                                                                                |
| cache                | status                           | string   | Raw cache status string reported by the CDN.                                                                                       |
| cdn                  | provider                         | string   | Name of the CDN provider.                                                                                                          |
| response             | close                            | object   | WebSocket close frame information for WebSocket test responses.                                                                    |
| close                | reason                           | string   | Reason string received in the close frame.                                                                                         |
| close                | status_code                      | int64    | Status code received in the close frame.                                                                                           |
| response             | compressed_message               | string   | Compressed representation of the response message.                                                                                 |
| response             | headers                          | object   | Response headers.                                                                                                                  |
| response             | healthcheck                      | object   | Health check information returned from a gRPC health check call.                                                                   |
| healthcheck          | message                          | object   | Raw health check message payload.                                                                                                  |
| additionalProperties | <any-key>                        | string   |
| healthcheck          | status                           | int64    | Health check status code.                                                                                                          |
| response             | http_version                     | string   | HTTP version of the response.                                                                                                      |
| response             | is_body_truncated                | boolean  | Whether the response body was truncated.                                                                                           |
| response             | is_message_truncated             | boolean  | Whether the response message was truncated.                                                                                        |
| response             | message                          | string   | Message received in the response (for WebSocket/TCP/UDP tests).                                                                    |
| response             | metadata                         | object   | Additional metadata returned with the response.                                                                                    |
| additionalProperties | <any-key>                        | string   |
| response             | records                          | [object] | DNS records returned in the response (DNS tests only).                                                                             |
| records              | type                             | string   | DNS record type (for example, `A`, `AAAA`, `CNAME`).                                                                               |
| records              | values                           | [string] | Values associated with the DNS record.                                                                                             |
| response             | redirects                        | [object] | Redirect hops encountered while performing the request.                                                                            |
| redirects            | location                         | string   | Target location of the redirect.                                                                                                   |
| redirects            | status_code                      | int64    | HTTP status code of the redirect response.                                                                                         |
| response             | status_code                      | int64    | HTTP status code of the response.                                                                                                  |
| steps                | retries                          | [object] | Retry results for the step.                                                                                                        |
| steps                | retry_count                      | int64    | Number of times this step was retried.                                                                                             |
| steps                | rum_context                      | object   | RUM application context associated with a step or sub-test.                                                                        |
| rum_context          | application_id                   | string   | RUM application identifier.                                                                                                        |
| rum_context          | session_id                       | string   | RUM session identifier.                                                                                                            |
| rum_context          | view_id                          | string   | RUM view identifier.                                                                                                               |
| steps                | started_at                       | int64    | Unix timestamp (ms) of when the step started.                                                                                      |
| steps                | status                           | string   | Status of the step (for example, `passed`, `failed`).                                                                              |
| steps                | sub_step                         | object   | Information about a sub-step in a nested test execution.                                                                           |
| sub_step             | level                            | int64    | Depth of the sub-step in the execution tree.                                                                                       |
| sub_step             | parent_step                      | object   | Reference to the parent step of a sub-step.                                                                                        |
| parent_step          | id                               | string   | Identifier of the parent step.                                                                                                     |
| sub_step             | parent_test                      | object   | Reference to the parent test of a sub-step.                                                                                        |
| parent_test          | id                               | string   | Identifier of the parent test.                                                                                                     |
| steps                | sub_test                         | object   | Information about a sub-test played from a parent browser test.                                                                    |
| sub_test             | id                               | string   | Identifier of the sub-test.                                                                                                        |
| sub_test             | playing_tab                      | int64    | Index of the browser tab playing the sub-test.                                                                                     |
| sub_test             | rum_context                      | object   | RUM application context associated with a step or sub-test.                                                                        |
| rum_context          | application_id                   | string   | RUM application identifier.                                                                                                        |
| rum_context          | session_id                       | string   | RUM session identifier.                                                                                                            |
| rum_context          | view_id                          | string   | RUM view identifier.                                                                                                               |
| steps                | subtype                          | string   | Subtype of the step.                                                                                                               |
| steps                | tabs                             | [object] | Browser tabs involved in the step.                                                                                                 |
| tabs                 | focused                          | boolean  | Whether the tab was focused during the step.                                                                                       |
| tabs                 | title                            | string   | Title of the tab.                                                                                                                  |
| tabs                 | url                              | string   | URL loaded in the tab.                                                                                                             |
| steps                | timings                          | object   | Timing breakdown of the step execution.                                                                                            |
| steps                | tunnel                           | boolean  | Whether the step was executed through a Synthetics tunnel.                                                                         |
| steps                | type                             | string   | Type of the step (for example, `click`, `assertElementContent`, `runApiTest`).                                                     |
| steps                | url                              | string   | URL associated with the step (for navigation steps).                                                                               |
| steps                | value                            |          | Step value. Its type depends on the step type.                                                                                     |
| steps                | variables                        | object   | Variables captured during a test step.                                                                                             |
| variables            | config                           | [object] | Variables defined in the test configuration.                                                                                       |
| config               | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| config               | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| config               | example                          | string   | Example value for the variable.                                                                                                    |
| config               | id                               | string   | Variable identifier.                                                                                                               |
| config               | name                             | string   | Variable name.                                                                                                                     |
| config               | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| config               | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| config               | type                             | string   | Variable type.                                                                                                                     |
| config               | val                              | string   | Evaluated value of the variable.                                                                                                   |
| config               | value                            | string   | Current value of the variable.                                                                                                     |
| variables            | extracted                        | [object] | Variables extracted during the test execution.                                                                                     |
| extracted            | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| extracted            | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| extracted            | example                          | string   | Example value for the variable.                                                                                                    |
| extracted            | id                               | string   | Variable identifier.                                                                                                               |
| extracted            | name                             | string   | Variable name.                                                                                                                     |
| extracted            | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| extracted            | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| extracted            | type                             | string   | Variable type.                                                                                                                     |
| extracted            | val                              | string   | Evaluated value of the variable.                                                                                                   |
| extracted            | value                            | string   | Current value of the variable.                                                                                                     |
| steps                | vitals_metrics                   | [object] | Web vitals metrics captured during the step.                                                                                       |
| vitals_metrics       | cls                              | double   | Cumulative Layout Shift score.                                                                                                     |
| vitals_metrics       | fcp                              | double   | First Contentful Paint in milliseconds.                                                                                            |
| vitals_metrics       | inp                              | double   | Interaction to Next Paint in milliseconds.                                                                                         |
| vitals_metrics       | lcp                              | double   | Largest Contentful Paint in milliseconds.                                                                                          |
| vitals_metrics       | ttfb                             | double   | Time To First Byte in milliseconds.                                                                                                |
| vitals_metrics       | url                              | string   | URL that produced the metrics.                                                                                                     |
| steps                | warnings                         | [object] | Warnings emitted during the step.                                                                                                  |
| warnings             | element_bounds                   | [object] | Bounds of elements related to the warning.                                                                                         |
| element_bounds       | height                           | int64    | Height in pixels.                                                                                                                  |
| element_bounds       | width                            | int64    | Width in pixels.                                                                                                                   |
| element_bounds       | x                                | int64    | Horizontal position in pixels.                                                                                                     |
| element_bounds       | y                                | int64    | Vertical position in pixels.                                                                                                       |
| warnings             | message                          | string   | Warning message.                                                                                                                   |
| warnings             | type                             | string   | Type of the warning.                                                                                                               |
| result               | time_to_interactive              | int64    | Time to interactive in milliseconds (browser tests).                                                                               |
| result               | timings                          | object   | Timing breakdown of the test request phases (for example, DNS, TCP, TLS, first byte).                                              |
| result               | trace                            | object   | Trace identifiers associated with a Synthetic test result.                                                                         |
| trace                | id                               | string   | Datadog APM trace identifier.                                                                                                      |
| trace                | otel_id                          | string   | OpenTelemetry trace identifier.                                                                                                    |
| result               | traceroute                       | [object] | Traceroute hop results (for network tests).                                                                                        |
| traceroute           | host                             | string   | Target hostname.                                                                                                                   |
| traceroute           | latency                          | object   | Latency statistics for a network probe.                                                                                            |
| latency              | avg                              | double   | Average latency in milliseconds.                                                                                                   |
| latency              | max                              | double   | Maximum latency in milliseconds.                                                                                                   |
| latency              | min                              | double   | Minimum latency in milliseconds.                                                                                                   |
| traceroute           | packet_loss_percentage           | double   | Percentage of probe packets lost.                                                                                                  |
| traceroute           | packet_size                      | int64    | Size of each probe packet in bytes.                                                                                                |
| traceroute           | packets_received                 | int64    | Number of probe packets received.                                                                                                  |
| traceroute           | packets_sent                     | int64    | Number of probe packets sent.                                                                                                      |
| traceroute           | resolved_ip                      | string   | Resolved IP address for the target.                                                                                                |
| traceroute           | routers                          | [object] | List of intermediate routers for the traceroute.                                                                                   |
| routers              | ip                               | string   | IP address of the router.                                                                                                          |
| routers              | resolved_host                    | string   | Resolved hostname of the router.                                                                                                   |
| result               | triggered_at                     | int64    | Timestamp of when the test was triggered (in milliseconds).                                                                        |
| result               | tunnel                           | boolean  | Whether the test was executed through a tunnel.                                                                                    |
| result               | turns                            | [object] | Turns executed by a goal-based browser test.                                                                                       |
| turns                | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                  |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                 |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                 |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                   |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                   |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                      |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                              |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                   |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                 |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                         |
| turns                | name                             | string   | Name of the turn.                                                                                                                  |
| turns                | reasoning                        | string   | Agent reasoning produced for this turn.                                                                                            |
| turns                | status                           | string   | Status of the turn (for example, `passed`, `failed`).                                                                              |
| turns                | steps                            | [object] | Steps executed during the turn.                                                                                                    |
| steps                | bucket_keys                      | object   | Storage bucket keys for artifacts produced during a step or test.                                                                  |
| bucket_keys          | after_step_screenshot            | string   | Key for the screenshot captured after the step (goal-based tests).                                                                 |
| bucket_keys          | after_turn_screenshot            | string   | Key for the screenshot captured after the turn (goal-based tests).                                                                 |
| bucket_keys          | artifacts                        | string   | Key for miscellaneous artifacts.                                                                                                   |
| bucket_keys          | before_step_screenshot           | string   | Key for the screenshot captured before the step (goal-based tests).                                                                |
| bucket_keys          | before_turn_screenshot           | string   | Key for the screenshot captured before the turn (goal-based tests).                                                                |
| bucket_keys          | crash_report                     | string   | Key for a captured crash report.                                                                                                   |
| bucket_keys          | device_logs                      | string   | Key for captured device logs.                                                                                                      |
| bucket_keys          | email_messages                   | [string] | Keys for email message payloads captured by the step.                                                                              |
| bucket_keys          | screenshot                       | string   | Key for the captured screenshot.                                                                                                   |
| bucket_keys          | snapshot                         | string   | Key for the captured DOM snapshot.                                                                                                 |
| bucket_keys          | source                           | string   | Key for the page source or element source.                                                                                         |
| steps                | config                           | object   | Browser step configuration for this turn step.                                                                                     |
| turns                | turn_finished_at                 | int64    | Unix timestamp (ms) of when the turn finished.                                                                                     |
| turns                | turn_started_at                  | int64    | Unix timestamp (ms) of when the turn started.                                                                                      |
| result               | unhealthy                        | boolean  | Whether the test runner was unhealthy at the time of execution.                                                                    |
| result               | variables                        | object   | Variables captured during a test step.                                                                                             |
| variables            | config                           | [object] | Variables defined in the test configuration.                                                                                       |
| config               | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| config               | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| config               | example                          | string   | Example value for the variable.                                                                                                    |
| config               | id                               | string   | Variable identifier.                                                                                                               |
| config               | name                             | string   | Variable name.                                                                                                                     |
| config               | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| config               | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| config               | type                             | string   | Variable type.                                                                                                                     |
| config               | val                              | string   | Evaluated value of the variable.                                                                                                   |
| config               | value                            | string   | Current value of the variable.                                                                                                     |
| variables            | extracted                        | [object] | Variables extracted during the test execution.                                                                                     |
| extracted            | err                              | string   | Error encountered when evaluating the variable.                                                                                    |
| extracted            | error_message                    | string   | Human-readable error message for variable evaluation.                                                                              |
| extracted            | example                          | string   | Example value for the variable.                                                                                                    |
| extracted            | id                               | string   | Variable identifier.                                                                                                               |
| extracted            | name                             | string   | Variable name.                                                                                                                     |
| extracted            | pattern                          | string   | Pattern used to extract the variable.                                                                                              |
| extracted            | secure                           | boolean  | Whether the variable holds a secure value.                                                                                         |
| extracted            | type                             | string   | Variable type.                                                                                                                     |
| extracted            | val                              | string   | Evaluated value of the variable.                                                                                                   |
| extracted            | value                            | string   | Current value of the variable.                                                                                                     |
| attributes           | test_sub_type                    | enum     | Subtype of the Synthetic test that produced this result. Allowed enum values: `dns,grpc,http,icmp,mcp,multi,ssl,tcp,udp,websocket` |
| attributes           | test_type                        | enum     | Type of the Synthetic test that produced this result. Allowed enum values: `api,browser,mobile,network`                            |
| data                 | id                               | string   | The result ID.                                                                                                                     |
| data                 | relationships                    | object   | Relationships for a Synthetic test result.                                                                                         |
| relationships        | test                             | object   | Relationship to the Synthetic test.                                                                                                |
| test                 | data                             | object   | Data for the test relationship.                                                                                                    |
| data                 | id                               | string   | The public ID of the test.                                                                                                         |
| data                 | type                             | string   | Type of the related resource.                                                                                                      |
| data                 | type                             | enum     | Type of the Synthetic test result resource, `result`. Allowed enum values: `result`                                                |
|                      | included                         | [object] | Array of included related resources, such as the test definition.                                                                  |
| included             | attributes                       | object   | Attributes of the included resource.                                                                                               |
| included             | id                               | string   | ID of the included resource.                                                                                                       |
| included             | type                             | string   | Type of the included resource.                                                                                                     |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "batch": {
          "id": "batch-abc-123"
        },
        "ci": {
          "pipeline": {
            "id": "pipeline-abc-123",
            "name": "build-and-test",
            "number": 42,
            "url": "https://github.com/DataDog/example/actions/runs/42"
          },
          "provider": {
            "name": "github"
          },
          "stage": {
            "name": "test"
          },
          "workspace_path": "/home/runner/work/example"
        },
        "device": {
          "browser": {
            "type": "edge",
            "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 Edg/127.0.2651.105 DatadogSynthetics",
            "version": "127.0.2651.105"
          },
          "id": "chrome.laptop_large",
          "name": "Chrome - Laptop Large",
          "platform": {
            "name": "ios",
            "version": "14.8"
          },
          "resolution": {
            "height": 1100,
            "pixel_ratio": 2,
            "width": 1440
          },
          "type": "browser"
        },
        "git": {
          "branch": "main",
          "commit": {
            "author": {
              "date": "2024-08-15T14:23:00Z",
              "email": "jane.doe@example.com",
              "name": "Jane Doe"
            },
            "committer": {
              "date": "2024-08-15T14:23:00Z",
              "email": "jane.doe@example.com",
              "name": "Jane Doe"
            },
            "message": "Fix bug in login flow",
            "sha": "9e107d9d372bb6826bd81d3542a419d6f0e1de56",
            "url": "https://github.com/DataDog/example/commit/9e107d9d372bb6826bd81d3542a419d6f0e1de56"
          },
          "repository_url": "https://github.com/DataDog/example"
        },
        "location": {
          "id": "aws:us-east-1",
          "name": "N. Virginia (AWS)",
          "version": "1.0.0",
          "worker_id": "worker-abc-123"
        },
        "result": {
          "assertions": [
            {
              "actual": 200,
              "error_message": "Assertion failed: expected 200 but got 500",
              "expected": "200",
              "operator": "is",
              "property": "content-type",
              "target": 200,
              "target_path": "$.url",
              "target_path_operator": "contains",
              "type": "statusCode",
              "valid": true
            }
          ],
          "bucket_keys": {
            "after_step_screenshot": "screenshots/after-step-1-1.png",
            "after_turn_screenshot": "screenshots/after-turn-1.png",
            "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
            "before_step_screenshot": "screenshots/before-step-1-1.png",
            "before_turn_screenshot": "screenshots/before-turn-1.png",
            "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
            "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
            "email_messages": [],
            "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
            "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
            "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
          },
          "call_type": "unary",
          "cert": {
            "cipher": "TLS_AES_256_GCM_SHA384",
            "exponent": 65537,
            "ext_key_usage": [
              "1.3.6.1.5.5.7.3.1"
            ],
            "fingerprint": "D6:03:5A:9F:93:E1:B7:28:EC:90:C5:9F:72:30:55:7C:74:5F:53:92",
            "fingerprint256": "04:45:93:A9:4C:14:70:47:DB:3C:FC:05:F9:5A:50:4E:DA:DB:A1:C6:37:3D:15:C0:B2:7E:5D:93:5F:A2:02:C7",
            "issuer": {
              "<any-key>": "string"
            },
            "modulus": "C0FCE9F9...",
            "protocol": "TLSv1.3",
            "serial_number": "7B584A1A6670A1EB0941A9A121569D60",
            "subject": {
              "<any-key>": "string"
            },
            "tls_version": 1.3,
            "valid": {
              "from": 1742469686000,
              "to": 1749727285000
            }
          },
          "compressed_json_descriptor": "compressedJsonDescriptorValue",
          "compressed_steps": "eJzLSM3JyQcABiwCFQ==",
          "connection_outcome": "established",
          "dns_resolution": {
            "attempts": [],
            "resolved_ip": "54.243.255.141",
            "resolved_port": "443",
            "server": "8.8.4.4"
          },
          "duration": 380.7,
          "exited_on_step_success": false,
          "failure": {
            "code": "TIMEOUT",
            "internal_code": "INCORRECT_ASSERTION",
            "internal_message": "Assertion failed on step 2",
            "message": "Connection timed out"
          },
          "finished_at": 1723782422760,
          "handshake": {
            "request": {
              "allow_insecure": false,
              "body": "{\"key\":\"value\"}",
              "call_type": "unary",
              "destination_service": "my-service",
              "dns_server": "8.8.8.8",
              "dns_server_port": 53,
              "e2e_queries": 4,
              "files": [
                {
                  "bucket_key": "api-upload-file/s3v-msw-tp3/2024-08-20T12:18:27.628081_f433c953-a58a-4296-834b-0669e32ba55f.json",
                  "encoding": "base64",
                  "name": "dd_logo_h_rgb.jpg",
                  "size": 30294,
                  "type": "image/jpeg"
                }
              ],
              "headers": {
                "content-type": "application/json"
              },
              "host": "grpcbin.test.k6.io",
              "max_ttl": 64,
              "message": "My message",
              "method": "GET",
              "no_saving_response_body": true,
              "port": 9000,
              "service": "addsvc.Add",
              "source_service": "synthetics",
              "timeout": 60,
              "tool_name": "search",
              "traceroute_queries": 2,
              "url": "https://httpbin.org/anything/lol valuehugo"
            },
            "response": {
              "body": "{\"status\":\"ok\"}",
              "body_compressed": "eJzLSM3JyQcABiwCFQ==",
              "body_hashes": "9e107d9d372bb6826bd81d3542a419d6",
              "body_size": 793,
              "cache_headers": {
                "<any-key>": "string"
              },
              "cdn": {
                "cache": {
                  "cached": true,
                  "status": "HIT"
                },
                "provider": "google_cloud"
              },
              "close": {
                "reason": "Normal closure",
                "status_code": 1000
              },
              "compressed_message": "eJzLSM3JyQcABiwCFQ==",
              "headers": {
                "content-type": "application/json"
              },
              "healthcheck": {
                "message": {
                  "<any-key>": "string"
                },
                "status": 1
              },
              "http_version": "2.0",
              "is_body_truncated": false,
              "is_message_truncated": false,
              "message": "{\"f_string\":\"concat-STATIC_HIDDEN_VALUE\"}",
              "metadata": {
                "<any-key>": "string"
              },
              "records": [
                {
                  "type": "A",
                  "values": [
                    "213.186.33.19"
                  ]
                }
              ],
              "redirects": [
                {
                  "location": "https://example.com/new-location",
                  "status_code": 301
                }
              ],
              "status_code": 200
            }
          },
          "id": "5158904793181869365",
          "initial_id": "5158904793181869365",
          "is_fast_retry": true,
          "is_last_retry": true,
          "netpath": {
            "destination": {
              "hostname": "34.95.79.70",
              "ip_address": "34.95.79.70",
              "port": 80
            },
            "hops": [
              {
                "hostname": "70.79.95.34.bc.googleusercontent.com",
                "ip_address": "10.240.134.15",
                "reachable": true,
                "rtt": 0.000346599,
                "ttl": 2
              }
            ],
            "origin": "synthetics",
            "pathtrace_id": "5d3cb978-533b-41ce-85a4-3661c8dd6a0b",
            "protocol": "TCP",
            "source": {
              "hostname": "edge-eu1.staging.dog"
            },
            "tags": [
              "synthetics.test_id:nja-epx-mg8"
            ],
            "timestamp": 1744117822266
          },
          "netstats": {
            "hops": {
              "avg": 11,
              "max": 11,
              "min": 11
            },
            "jitter": 0.08,
            "latency": {
              "avg": 1.8805,
              "max": 1.97,
              "min": 1.76
            },
            "packet_loss_percentage": 0,
            "packets_received": 4,
            "packets_sent": 4
          },
          "ocsp": {
            "certificate": {
              "revocation_reason": "unspecified",
              "revocation_time": 1749727285000,
              "serial_number": "7B584A1A6670A1EB0941A9A121569D60"
            },
            "status": "good",
            "updates": {
              "next_update": 1743074486000,
              "produced_at": 1742469686000,
              "this_update": 1742469686000
            }
          },
          "ping": {
            "host": "34.95.79.70",
            "latency": {
              "avg": 1.8805,
              "max": 1.97,
              "min": 1.76
            },
            "packet_loss_percentage": 0,
            "packet_size": 56,
            "packets_received": 4,
            "packets_sent": 4,
            "resolved_ip": "34.95.79.70",
            "routers": [
              {
                "ip": "34.95.79.70",
                "resolved_host": "70.79.95.34.bc.googleusercontent.com"
              }
            ]
          },
          "received_email_count": 1,
          "received_message": "UDP echo: b'Test message'",
          "request": {
            "allow_insecure": false,
            "body": "{\"key\":\"value\"}",
            "call_type": "unary",
            "destination_service": "my-service",
            "dns_server": "8.8.8.8",
            "dns_server_port": 53,
            "e2e_queries": 4,
            "files": [
              {
                "bucket_key": "api-upload-file/s3v-msw-tp3/2024-08-20T12:18:27.628081_f433c953-a58a-4296-834b-0669e32ba55f.json",
                "encoding": "base64",
                "name": "dd_logo_h_rgb.jpg",
                "size": 30294,
                "type": "image/jpeg"
              }
            ],
            "headers": {
              "content-type": "application/json"
            },
            "host": "grpcbin.test.k6.io",
            "max_ttl": 64,
            "message": "My message",
            "method": "GET",
            "no_saving_response_body": true,
            "port": 9000,
            "service": "addsvc.Add",
            "source_service": "synthetics",
            "timeout": 60,
            "tool_name": "search",
            "traceroute_queries": 2,
            "url": "https://httpbin.org/anything/lol valuehugo"
          },
          "resolved_ip": "54.243.255.141",
          "response": {
            "body": "{\"status\":\"ok\"}",
            "body_compressed": "eJzLSM3JyQcABiwCFQ==",
            "body_hashes": "9e107d9d372bb6826bd81d3542a419d6",
            "body_size": 793,
            "cache_headers": {
              "<any-key>": "string"
            },
            "cdn": {
              "cache": {
                "cached": true,
                "status": "HIT"
              },
              "provider": "google_cloud"
            },
            "close": {
              "reason": "Normal closure",
              "status_code": 1000
            },
            "compressed_message": "eJzLSM3JyQcABiwCFQ==",
            "headers": {
              "content-type": "application/json"
            },
            "healthcheck": {
              "message": {
                "<any-key>": "string"
              },
              "status": 1
            },
            "http_version": "2.0",
            "is_body_truncated": false,
            "is_message_truncated": false,
            "message": "{\"f_string\":\"concat-STATIC_HIDDEN_VALUE\"}",
            "metadata": {
              "<any-key>": "string"
            },
            "records": [
              {
                "type": "A",
                "values": [
                  "213.186.33.19"
                ]
              }
            ],
            "redirects": [
              {
                "location": "https://example.com/new-location",
                "status_code": 301
              }
            ],
            "status_code": 200
          },
          "run_type": "scheduled",
          "sent_message": "udp mess",
          "start_url": "http://34.95.79.70/prototype",
          "started_at": 1723782422750,
          "status": "passed",
          "steps": [
            {
              "allow_failure": false,
              "api_test": {},
              "assertion_result": {
                "actual": "True\ngood\ngood\ngood\ngood\nTrue",
                "check_type": "contains",
                "expected": "True good good good good True",
                "has_secure_variables": false
              },
              "assertions": [
                {
                  "actual": 200,
                  "error_message": "Assertion failed: expected 200 but got 500",
                  "expected": "200",
                  "operator": "is",
                  "property": "content-type",
                  "target": 200,
                  "target_path": "$.url",
                  "target_path_operator": "contains",
                  "type": "statusCode",
                  "valid": true
                }
              ],
              "blocked_requests_urls": [],
              "bounds": {
                "height": 37,
                "width": 343,
                "x": 16,
                "y": 140
              },
              "browser_errors": [
                {
                  "description": "Failed to fetch resource",
                  "method": "GET",
                  "name": "NetworkError",
                  "status": 500,
                  "type": "network",
                  "url": {}
                }
              ],
              "bucket_keys": {
                "after_step_screenshot": "screenshots/after-step-1-1.png",
                "after_turn_screenshot": "screenshots/after-turn-1.png",
                "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
                "before_step_screenshot": "screenshots/before-step-1-1.png",
                "before_turn_screenshot": "screenshots/before-turn-1.png",
                "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
                "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
                "email_messages": [],
                "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
                "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
                "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
              },
              "cdn_resources": [
                {
                  "cdn": {
                    "cache": {
                      "cached": true,
                      "status": "HIT"
                    },
                    "provider": "google_cloud"
                  },
                  "resolved_ip": "34.95.79.70",
                  "timestamp": 1724521406576,
                  "timings": {
                    "firstByte": 99.7,
                    "tcp": 0.9
                  }
                }
              ],
              "click_type": "primary",
              "compressed_json_descriptor": "compressedJsonDescriptorValue",
              "config": {},
              "description": "Navigate to start URL",
              "duration": 1015,
              "element_description": "<XCUIElementTypeStaticText value=\"Scroll\" name=\"Scroll\" label=\"Scroll\">",
              "element_updates": {
                "multi_locator": {
                  "<any-key>": "string"
                },
                "target_outer_html": "<h1>My website - v4</h1>",
                "version": 3
              },
              "extracted_value": {
                "err": "LOCAL_VARIABLE_UNKNOWN",
                "error_message": "Unknown variable name undefined.",
                "example": "lol value",
                "id": "c896702c-1e34-4e62-a67b-432e8092d062",
                "name": "HEADER_VALUE",
                "pattern": "lol value",
                "secure": false,
                "type": "text",
                "val": "value-to-extract",
                "value": "lol value"
              },
              "failure": {
                "code": "TIMEOUT",
                "internal_code": "INCORRECT_ASSERTION",
                "internal_message": "Assertion failed on step 2",
                "message": "Connection timed out"
              },
              "http_results": [
                {
                  "actual": 200,
                  "error_message": "Assertion failed: expected 200 but got 500",
                  "expected": "200",
                  "operator": "is",
                  "property": "content-type",
                  "target": 200,
                  "target_path": "$.url",
                  "target_path_operator": "contains",
                  "type": "statusCode",
                  "valid": true
                }
              ],
              "id": "fkk-j2a-gmw",
              "is_critical": true,
              "javascript_custom_assertion_code": false,
              "locate_element_duration": 845,
              "name": "Extract variable from body",
              "request": {
                "allow_insecure": false,
                "body": "{\"key\":\"value\"}",
                "call_type": "unary",
                "destination_service": "my-service",
                "dns_server": "8.8.8.8",
                "dns_server_port": 53,
                "e2e_queries": 4,
                "files": [
                  {
                    "bucket_key": "api-upload-file/s3v-msw-tp3/2024-08-20T12:18:27.628081_f433c953-a58a-4296-834b-0669e32ba55f.json",
                    "encoding": "base64",
                    "name": "dd_logo_h_rgb.jpg",
                    "size": 30294,
                    "type": "image/jpeg"
                  }
                ],
                "headers": {
                  "content-type": "application/json"
                },
                "host": "grpcbin.test.k6.io",
                "max_ttl": 64,
                "message": "My message",
                "method": "GET",
                "no_saving_response_body": true,
                "port": 9000,
                "service": "addsvc.Add",
                "source_service": "synthetics",
                "timeout": 60,
                "tool_name": "search",
                "traceroute_queries": 2,
                "url": "https://httpbin.org/anything/lol valuehugo"
              },
              "response": {
                "body": "{\"status\":\"ok\"}",
                "body_compressed": "eJzLSM3JyQcABiwCFQ==",
                "body_hashes": "9e107d9d372bb6826bd81d3542a419d6",
                "body_size": 793,
                "cache_headers": {
                  "<any-key>": "string"
                },
                "cdn": {
                  "cache": {
                    "cached": true,
                    "status": "HIT"
                  },
                  "provider": "google_cloud"
                },
                "close": {
                  "reason": "Normal closure",
                  "status_code": 1000
                },
                "compressed_message": "eJzLSM3JyQcABiwCFQ==",
                "headers": {
                  "content-type": "application/json"
                },
                "healthcheck": {
                  "message": {
                    "<any-key>": "string"
                  },
                  "status": 1
                },
                "http_version": "2.0",
                "is_body_truncated": false,
                "is_message_truncated": false,
                "message": "{\"f_string\":\"concat-STATIC_HIDDEN_VALUE\"}",
                "metadata": {
                  "<any-key>": "string"
                },
                "records": [
                  {
                    "type": "A",
                    "values": [
                      "213.186.33.19"
                    ]
                  }
                ],
                "redirects": [
                  {
                    "location": "https://example.com/new-location",
                    "status_code": 301
                  }
                ],
                "status_code": 200
              },
              "retries": [],
              "retry_count": 0,
              "rum_context": {
                "application_id": "00000000-0000-0000-0000-000000000000",
                "session_id": "11111111-1111-1111-1111-111111111111",
                "view_id": "22222222-2222-2222-2222-222222222222"
              },
              "started_at": 1724445283308,
              "status": "passed",
              "sub_step": {
                "level": 1,
                "parent_step": {
                  "id": "fkk-j2a-gmw"
                },
                "parent_test": {
                  "id": "abc-def-123"
                }
              },
              "sub_test": {
                "id": "abc-def-123",
                "playing_tab": 0,
                "rum_context": {
                  "application_id": "00000000-0000-0000-0000-000000000000",
                  "session_id": "11111111-1111-1111-1111-111111111111",
                  "view_id": "22222222-2222-2222-2222-222222222222"
                }
              },
              "subtype": "http",
              "tabs": [
                {
                  "focused": true,
                  "title": "Team Browser mini-websites",
                  "url": "http://34.95.79.70/prototype"
                }
              ],
              "timings": {},
              "tunnel": false,
              "type": "click",
              "url": "http://34.95.79.70/prototype",
              "value": "http://34.95.79.70/prototype",
              "variables": {
                "config": [
                  {
                    "err": "LOCAL_VARIABLE_UNKNOWN",
                    "error_message": "Unknown variable name undefined.",
                    "example": "lol value",
                    "id": "c896702c-1e34-4e62-a67b-432e8092d062",
                    "name": "HEADER_VALUE",
                    "pattern": "lol value",
                    "secure": false,
                    "type": "text",
                    "val": "value-to-extract",
                    "value": "lol value"
                  }
                ],
                "extracted": [
                  {
                    "err": "LOCAL_VARIABLE_UNKNOWN",
                    "error_message": "Unknown variable name undefined.",
                    "example": "lol value",
                    "id": "c896702c-1e34-4e62-a67b-432e8092d062",
                    "name": "HEADER_VALUE",
                    "pattern": "lol value",
                    "secure": false,
                    "type": "text",
                    "val": "value-to-extract",
                    "value": "lol value"
                  }
                ]
              },
              "vitals_metrics": [
                {
                  "cls": 0,
                  "fcp": 120.3,
                  "inp": 85,
                  "lcp": 210.5,
                  "ttfb": 95.2,
                  "url": "http://34.95.79.70/prototype"
                }
              ],
              "warnings": [
                {
                  "element_bounds": [
                    {
                      "height": 37,
                      "width": 343,
                      "x": 16,
                      "y": 140
                    }
                  ],
                  "message": "Element is not visible in the viewport",
                  "type": "visibility"
                }
              ]
            }
          ],
          "time_to_interactive": 183,
          "timings": {
            "dns": 2.9,
            "download": 2.1,
            "firstByte": 95.2,
            "ssl": 187.9,
            "tcp": 92.6,
            "total": 380.7
          },
          "trace": {
            "id": "5513046492231128177",
            "otel_id": "d8ba00eb1507bdba8643ba8e7a1c022c"
          },
          "traceroute": [
            {
              "host": "34.95.79.70",
              "latency": {
                "avg": 1.8805,
                "max": 1.97,
                "min": 1.76
              },
              "packet_loss_percentage": 0,
              "packet_size": 56,
              "packets_received": 4,
              "packets_sent": 4,
              "resolved_ip": "34.95.79.70",
              "routers": [
                {
                  "ip": "34.95.79.70",
                  "resolved_host": "70.79.95.34.bc.googleusercontent.com"
                }
              ]
            }
          ],
          "triggered_at": 1723782422715,
          "tunnel": false,
          "turns": [
            {
              "bucket_keys": {
                "after_step_screenshot": "screenshots/after-step-1-1.png",
                "after_turn_screenshot": "screenshots/after-turn-1.png",
                "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
                "before_step_screenshot": "screenshots/before-step-1-1.png",
                "before_turn_screenshot": "screenshots/before-turn-1.png",
                "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
                "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
                "email_messages": [],
                "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
                "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
                "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
              },
              "name": "Turn 1",
              "reasoning": "I need to navigate to the chairs section",
              "status": "passed",
              "steps": [
                {
                  "bucket_keys": {
                    "after_step_screenshot": "screenshots/after-step-1-1.png",
                    "after_turn_screenshot": "screenshots/after-turn-1.png",
                    "artifacts": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json",
                    "before_step_screenshot": "screenshots/before-step-1-1.png",
                    "before_turn_screenshot": "screenshots/before-turn-1.png",
                    "crash_report": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log",
                    "device_logs": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log",
                    "email_messages": [],
                    "screenshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg",
                    "snapshot": "2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html",
                    "source": "2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml"
                  },
                  "config": {
                    "id": "step-1",
                    "name": "Click on div \"Chairs\"",
                    "type": "click"
                  }
                }
              ],
              "turn_finished_at": 1724521438800,
              "turn_started_at": 1724521436800
            }
          ],
          "unhealthy": false,
          "variables": {
            "config": [
              {
                "err": "LOCAL_VARIABLE_UNKNOWN",
                "error_message": "Unknown variable name undefined.",
                "example": "lol value",
                "id": "c896702c-1e34-4e62-a67b-432e8092d062",
                "name": "HEADER_VALUE",
                "pattern": "lol value",
                "secure": false,
                "type": "text",
                "val": "value-to-extract",
                "value": "lol value"
              }
            ],
            "extracted": [
              {
                "err": "LOCAL_VARIABLE_UNKNOWN",
                "error_message": "Unknown variable name undefined.",
                "example": "lol value",
                "id": "c896702c-1e34-4e62-a67b-432e8092d062",
                "name": "HEADER_VALUE",
                "pattern": "lol value",
                "secure": false,
                "type": "text",
                "val": "value-to-extract",
                "value": "lol value"
              }
            ]
          }
        },
        "test_sub_type": "http",
        "test_type": "api"
      },
      "id": "5158904793181869365",
      "relationships": {
        "test": {
          "data": {
            "id": "abc-def-123",
            "type": "test"
          }
        }
      },
      "type": "result"
    }
  ],
  "included": [
    {
      "attributes": {},
      "id": "abc-def-123",
      "type": "test"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
API error response.
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Required query argumentsexport result_ids="["id1","id2","id3"]"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/synthetics/tests/poll_results?result_ids=${result_ids}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}
