This product is not supported for your selected Datadog site. ().

Refresh experiment results for org

POST https://api.ap1.datadoghq.com/api/v2/experiments/results/refreshhttps://api.ap2.datadoghq.com/api/v2/experiments/results/refreshhttps://api.datadoghq.eu/api/v2/experiments/results/refreshhttps://api.ddog-gov.com/api/v2/experiments/results/refreshhttps://api.us2.ddog-gov.com/api/v2/experiments/results/refreshhttps://api.uk1.datadoghq.com/api/v2/experiments/results/refreshhttps://api.datadoghq.com/api/v2/experiments/results/refreshhttps://api.us3.datadoghq.com/api/v2/experiments/results/refreshhttps://api.us5.datadoghq.com/api/v2/experiments/results/refresh

Overview

Trigger a results refresh across the organization’s active experiments. Returns the count of experiments whose refresh was triggered (meta.experiments_updated) plus a per-experiment breakdown of what happened to each (meta.results). This endpoint requires the product_analytics_experiments_write permission.

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

Arguments

Query Strings

Name

Type

Description

full_refresh

boolean

Force a full warehouse rebuild. Defaults to false when omitted.

Response

Accepted

List of experiment refresh result resources.

Expand All

Field

Type

Description

data [required]

[object]

Resources returned in this response.

attributes

object

Details of the experiment refresh result.

success

boolean

Whether the refresh request succeeded.

id [required]

uuid

ID of the experiment whose results were refreshed.

type [required]

enum

Experiment results refresh resource type. Allowed enum values: experiment-results-refresh

default: experiment-results-refresh

meta

object

Summary of refresh outcomes across the organization's experiments.

experiments_updated

int64

Number of experiments updated by the refresh request.

results

[object]

Refresh outcome reported for each experiment.

experiment_id

string

ID of the experiment associated with this result.

outcome

enum

Outcome of attempting to refresh one experiment. Allowed enum values: TRIGGERED,SKIPPED_ALREADY_RUNNING,SKIPPED_NOT_EDITABLE,SKIPPED_ORG_AT_CAPACITY,FAILED

{
  "data": [
    {
      "attributes": {
        "success": false
      },
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "type": "experiment-results-refresh"
    }
  ],
  "meta": {
    "experiments_updated": "integer",
    "results": [
      {
        "experiment_id": "string",
        "outcome": "string"
      }
    ]
  }
}

The full_refresh query parameter is not a valid boolean.

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Missing or invalid authentication.

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Authenticated caller lacks the product_analytics_experiments_write permission.

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

                  # Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

# Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.uk1.datadoghq.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/experiments/results/refresh" \ -H "Accept: application/json" \ -H "Authorization: Bearer ${DD_BEARER_TOKEN}"