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

# 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}      |
| us2.ddog-gov.com  | GET https://api.us2.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`                                                                                                                                                                                                                                        |
| assertions           | Option 7                                 | object          | An assertion that checks that an MCP server advertises the expected capabilities.                                                                                                                                                                                                               |
| Option 7             | operator [*required*]               | enum            | Assertion operator to apply. Allowed enum values: `contains,doesNotContain,is,isNot,lessThan,lessThanOrEqual,moreThan,moreThanOrEqual,matches,doesNotMatch`                                                                                                                                     |
| Option 7             | target [*required*]                 | [string]        | List of MCP server capabilities to assert against.                                                                                                                                                                                                                                              |
| Option 7             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `mcpServerCapabilities`                                                                                                                                                                                                                             |
| assertions           | Option 8                                 | object          | An assertion that verifies the MCP server response respects the MCP specification.                                                                                                                                                                                                              |
| Option 8             | type [*required*]                   | enum            | Type of the assertion. Allowed enum values: `mcpRespectsSpecification`                                                                                                                                                                                                                          |
| 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 call to perform. Used by gRPC steps (`healthcheck`, `unary`) and MCP steps (`init`, `tool_list`, `tool_call`). Valid values depend on the parent step's `subtype`. Allowed enum values: `healthcheck,unary,init,tool_list,tool_call`                                                |
| 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              | mcpProtocolVersion                       | enum            | The MCP protocol version used by the step. See [https://modelcontextprotocol.io/specification](https://modelcontextprotocol.io/specification). Allowed enum values: `2025-06-18`                                                                                                                |
| 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              | toolArgs                                 | object          | Arguments to pass to the MCP tool. Free-form object whose shape depends on the tool. Used when `callType` is `tool_call`.                                                                                                                                                                       |
| request              | toolName                                 | string          | The name of the MCP tool to call. Required when `callType` is `tool_call`.                                                                                                                                                                                                                      |
| 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,
        "mcpProtocolVersion": "2025-06-18",
        "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",
        "toolArgs": {},
        "toolName": "search",
        "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 parameters export public_id="CHANGE_ME" export result_id="CHANGE_ME" \# Curl command curl -X GET "https://api.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.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.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.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.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.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.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.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.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}
