Get experiment results
https://api.datadoghq.com/api/v2/experiments/{experiment_id}/resultshttps://api.us3.datadoghq.com/api/v2/experiments/{experiment_id}/resultshttps://api.us5.datadoghq.com/api/v2/experiments/{experiment_id}/resultshttps://api.datadoghq.eu/api/v2/experiments/{experiment_id}/resultshttps://api.ap1.datadoghq.com/api/v2/experiments/{experiment_id}/resultshttps://api.ap2.datadoghq.com/api/v2/experiments/{experiment_id}/resultshttps://api.uk1.datadoghq.com/api/v2/experiments/{experiment_id}/resultshttps://api.ddog-gov.com/api/v2/experiments/{experiment_id}/resultshttps://api.us2.ddog-gov.com/api/v2/experiments/{experiment_id}/resultsOverview
Get an experiment's computed results: per-variant statistical analysis for the latest successful run. A historical run cannot be selected. Unavailable analysis statistics, including p_value and confidence_interval, are omitted. The numerator, denominator, and variant_metric_value fields can be null when their values are unavailable. Do not treat an omitted or null value as zero. The response includes the selected run ID and, when recorded, EVSI forecast context and unavailable reasons for Bayesian analyses.
OAuth apps require the product_analytics_experiments_read authorization scope to access this endpoint.
Arguments
Path Parameters
experiment_id [required]The UUID of the experiment.
Response
OK
List of variant result resources.
data [required]Resources returned in this response.
attributesDetails of the variant result.
assignment_countNumber of subjects assigned to this variant.
experiment_idID of the experiment associated with this result.
is_controlWhether this variant is the experiment's control.
metricsMetrics reported for this variant.
analysesStatistical analyses calculated for this metric and variant.
confidence_intervalLower and upper bounds of the reported statistical interval.
lowerLower bound of the reported interval.
upperUpper bound of the reported interval.
confidence_levelConfigured nominal confidence level. Interval bounds can use an adjusted level for multiple testing or hybrid methods.
evsiExpected value of sample information: expected reduction in minimum expected regret from additional data over the recorded horizon. Uses the analysis estimand units; relative lift is a fraction, not a percentage. Zero is a valid estimate. Omitted when unavailable or unrecorded.
evsi_future_seStandard error of the hypothetical additional-data estimate used for EVSI, in the same estimand units and CUPED setting. May be present when EVSI computation failed. Omitted when unavailable or unrecorded.
evsi_unavailable_reasonRecorded reason this analysis has no EVSI estimate. Omitted when unrecorded; absence does not establish availability for historical or imported results. Controls and non-Bayesian analyses omit this field.
traffic_unavailable, insufficient_complete_days, no_total_exposures, no_lookback_exposures, invalid_traffic, invalid_standard_error, computation_failed, analysis_unavailableexpectation_above_zeroExpected effect when the effect is positive.
expectation_below_zeroExpected effect when the effect is negative.
global_liftEstimated lift across the population. Calculated as metric coverage multiplied by the experiment lift.
global_lift_lower_boundLower bound of the estimated lift across the population.
global_lift_upper_boundUpper bound of the estimated lift across the population.
is_cuped_adjustedWhether CUPED used pre-experiment data to reduce variance in this result.
is_unreliableWhether the statistical result is marked as unreliable.
lift_typeWhether the reported lift is relative or absolute.
RELATIVE, ABSOLUTE, UNKNOWNmethodStatistical method used to calculate this result.
FIXED_SAMPLE, BAYESIAN, SEQUENTIAL, SEQUENTIAL_FIXED_HYBRID, UNKNOWNminimum_expected_regretThe smaller expected opportunity cost of choosing treatment or control.
p_valueProbability, under the no-effect hypothesis, of a result at least as extreme as the observed result.
point_estimateEstimated difference between the variant and control for this metric.
probability_above_zeroEstimated probability that the effect is greater than zero.
probability_below_zeroEstimated probability that the effect is less than zero.
standard_errorEstimated uncertainty in the effect estimate.
unreliable_reasonReason that the statistical result is marked as unreliable.
CONTROL_DENOMINATOR_NEAR_ZERO, TREATMENT_DENOMINATOR_NEAR_ZERO, CONTROL_AND_TREATMENT_DENOMINATORS_NEAR_ZERO, CONTROL_MEAN_NEAR_ZERO, ZERO_VARIANCE, UNKNOWNvariant_metric_valueMetric value calculated for this variant.
z_scoreStandardized statistic used to compare the observed effect with zero.
assignment_countNumber of subjects assigned to this variant.
coverageEstimated share of the global metric total from the eligible population if that population received control. The estimate can exceed 1.
coverage_summaryPopulation totals and allocation used to calculate metric coverage.
control_totalTotal metric value for the control population in the coverage calculation.
coverageEstimated share of the global metric total from the eligible population if that population received control. The estimate can exceed 1.
coverage_unavailable_reasonReason that metric coverage could not be calculated.
eligible_population_totalEstimated metric total for the eligible population if that population received control.
experiment_totalTotal metric value for the experiment population in the coverage calculation.
global_metric_totalObserved metric total across subjects inside and outside the experiment.
traffic_allocationFraction of eligible traffic allocated to the experiment, weighted by time.
coverage_unavailable_reasonReason that metric coverage could not be calculated.
denominatorAggregated denominator value for this metric and variant.
desired_changeDirection of metric change considered desirable.
METRIC_INCREASES, METRIC_DECREASES, UNKNOWNmetric_idID of the metric represented by this entry.
metric_nameDisplay name of the metric represented by this entry.
numeratorAggregated numerator value for this metric and variant.
sub_metric_property_nameName of the property used to split this metric result.
sub_metric_property_valueProperty value represented by this split metric result.
variant_keyKey that identifies the experiment variant.
variant_nameDisplay name of the experiment variant.
id [required]ID of the variant result.
type [required]Experiment variant results resource type.
experiment-variant-resultsexperiment-variant-resultsmetaSelected experiment result run, its recorded EVSI forecast, and results freshness.
evsi_contextForecast horizon and traffic counts used to calculate expected value of sample information (EVSI) for result_run_id. Assumes traffic continues at the rate observed during the lookback window. Omitted if the forecast was not recorded or could not be loaded.
elapsed_days [required]Exact assignment-window duration in days, including fractional days.
horizon_days [required]Forecast horizon in days from the original assignment window.
horizon_exposures [required]Projected additional exposures over the horizon, assuming constant traffic.
lookback_days [required]Selected lookback length in complete days.
lookback_exposures [required]Exposures across all variants in the eligible lookback buckets.
total_exposures [required]Experiment-wide exposures across the assignment window, including boundary buckets.
unavailable_reason [required]Recorded traffic forecast unavailability reason. Per-analysis reasons are reported separately.
traffic_unavailable, insufficient_complete_days, no_total_exposures, no_lookback_exposures, invalid_trafficusable_traffic_days [required]Interior UTC daily buckets excluding both boundary days. Includes zero-traffic days and does not certify ingestion completeness.
is_staleWhether the saved results require a refresh or their freshness cannot be confirmed. See stale_reasons for details.
result_run_id [required]ID of the successful experiment run that produced these results.
results_last_updatedTime when the experiment results were last updated.
stale_reasonsReasons the saved experiment results are stale.
{
"data": [
{
"attributes": {
"assignment_count": "integer",
"experiment_id": "string",
"is_control": false,
"metrics": [
{
"analyses": [
{
"confidence_interval": {
"lower": "number",
"upper": "number"
},
"confidence_level": "number",
"evsi": 0,
"evsi_future_se": 0.0061306,
"evsi_unavailable_reason": "computation_failed",
"expectation_above_zero": "number",
"expectation_below_zero": "number",
"global_lift": "number",
"global_lift_lower_bound": "number",
"global_lift_upper_bound": "number",
"is_cuped_adjusted": false,
"is_unreliable": false,
"lift_type": "string",
"method": "string",
"minimum_expected_regret": "number",
"p_value": "number",
"point_estimate": "number",
"probability_above_zero": "number",
"probability_below_zero": "number",
"standard_error": "number",
"unreliable_reason": "string",
"variant_metric_value": "number",
"z_score": "number"
}
],
"assignment_count": "integer",
"coverage": "number",
"coverage_summary": {
"control_total": "number",
"coverage": "number",
"coverage_unavailable_reason": "string",
"eligible_population_total": "number",
"experiment_total": "number",
"global_metric_total": "number",
"traffic_allocation": "number"
},
"coverage_unavailable_reason": "string",
"denominator": "number",
"desired_change": "METRIC_INCREASES",
"metric_id": "string",
"metric_name": "string",
"numerator": "number",
"sub_metric_property_name": "string",
"sub_metric_property_value": "string"
}
],
"variant_key": "string",
"variant_name": "string"
},
"id": "550e8400-e29b-41d4-a716-446655440000:treatment",
"type": "experiment-variant-results"
}
],
"meta": {
"evsi_context": {
"elapsed_days": 14.5,
"horizon_days": 7,
"horizon_exposures": 10000,
"lookback_days": 7,
"lookback_exposures": 10000,
"total_exposures": 20000,
"unavailable_reason": "traffic_unavailable",
"usable_traffic_days": 13
},
"is_stale": true,
"result_run_id": "550e8400-e29b-41d4-a716-446655440004",
"results_last_updated": "2026-08-05T09:25:00Z",
"stale_reasons": [
"ANALYSIS_PLAN_CHANGED"
]
}
}Malformed experiment ID (not a valid UUID), or the experiment is not configured for analysis.
API error response.
errors [required]A list of errors.
codeAn application-specific error code.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"code": "invalid_request",
"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.
errors [required]A list of errors.
codeAn application-specific error code.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"code": "invalid_request",
"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_read permission.
API error response.
errors [required]A list of errors.
codeAn application-specific error code.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"code": "invalid_request",
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}No experiment with this ID exists, or results are not available for it yet.
API error response.
errors [required]A list of errors.
codeAn application-specific error code.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"code": "invalid_request",
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}The experiment's metrics are incompatible with analysis.
API error response.
errors [required]A list of errors.
codeAn application-specific error code.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"code": "invalid_request",
"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.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Code Example
# Path parameters
export experiment_id="550e8400-e29b-41d4-a716-446655440000"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/experiments/${experiment_id}/results" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export experiment_id="550e8400-e29b-41d4-a716-446655440000"
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/experiments/${experiment_id}/results" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export experiment_id="550e8400-e29b-41d4-a716-446655440000"
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/experiments/${experiment_id}/results" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export experiment_id="550e8400-e29b-41d4-a716-446655440000"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/experiments/${experiment_id}/results" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export experiment_id="550e8400-e29b-41d4-a716-446655440000"
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/experiments/${experiment_id}/results" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export experiment_id="550e8400-e29b-41d4-a716-446655440000"
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/experiments/${experiment_id}/results" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export experiment_id="550e8400-e29b-41d4-a716-446655440000"
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/experiments/${experiment_id}/results" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export experiment_id="550e8400-e29b-41d4-a716-446655440000"
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/experiments/${experiment_id}/results" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export experiment_id="550e8400-e29b-41d4-a716-446655440000"
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/experiments/${experiment_id}/results" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"// Get experiment results returns "OK" response
package main
import (
"context"
"encoding/json"
"fmt"
"os"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
"github.com/google/uuid"
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewExperimentsApi(apiClient)
resp, r, err := api.GetExperimentResults(ctx, uuid.MustParse("550e8400-e29b-41d4-a716-446655440000"))
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ExperimentsApi.GetExperimentResults`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `ExperimentsApi.GetExperimentResults`:\n%s\n", responseContent)
}
Instructions
First install the library and its dependencies and then save the example to main.go and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"// Get experiment results returns "OK" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.ExperimentsApi;
import com.datadog.api.client.v2.model.ExperimentsVariantResultsV2DTOArray;
import java.util.UUID;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
ExperimentsApi apiInstance = new ExperimentsApi(defaultClient);
try {
ExperimentsVariantResultsV2DTOArray result =
apiInstance.getExperimentResults(UUID.fromString("550e8400-e29b-41d4-a716-446655440000"));
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ExperimentsApi#getExperimentResults");
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 and then save the example to Example.java and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java""""
Get experiment results returns "OK" response
"""
from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.experiments_api import ExperimentsApi
from uuid import UUID
configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
with ApiClient(configuration) as api_client:
api_instance = ExperimentsApi(api_client)
response = api_instance.get_experiment_results(
experiment_id=UUID("550e8400-e29b-41d4-a716-446655440000"),
)
print(response)
Instructions
First install the library and its dependencies and then save the example to example.py and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"# Get experiment results returns "OK" response
require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
end
api_instance = DatadogAPIClient::V2::ExperimentsAPI.new
p api_instance.get_experiment_results("550e8400-e29b-41d4-a716-446655440000")
Instructions
First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" ruby "example.rb"// Get experiment results returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_experiments::ExperimentsAPI;
use uuid::Uuid;
#[tokio::main]
async fn main() {
let configuration = datadog::Configuration::new();
let api = ExperimentsAPI::with_config(configuration);
let resp = api
.get_experiment_results(
Uuid::parse_str("550e8400-e29b-41d4-a716-446655440000").expect("invalid UUID"),
)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Instructions
First install the library and its dependencies 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 runDD_SITE="us3.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us5.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="datadoghq.eu" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ap1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ap2.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="uk1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo runDD_SITE="us2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run