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

Update metric

PATCH https://api.ap1.datadoghq.com/api/v2/experiments/metrics/{metric_id}https://api.ap2.datadoghq.com/api/v2/experiments/metrics/{metric_id}https://api.datadoghq.eu/api/v2/experiments/metrics/{metric_id}https://api.ddog-gov.com/api/v2/experiments/metrics/{metric_id}https://api.us2.ddog-gov.com/api/v2/experiments/metrics/{metric_id}https://api.uk1.datadoghq.com/api/v2/experiments/metrics/{metric_id}https://api.datadoghq.com/api/v2/experiments/metrics/{metric_id}https://api.us3.datadoghq.com/api/v2/experiments/metrics/{metric_id}https://api.us5.datadoghq.com/api/v2/experiments/metrics/{metric_id}

Overview

Update a metric. Certified metrics are read-only through this endpoint. This is a partial update: every attribute is optional and an omitted attribute keeps its stored value, so a body carrying only the fields being changed is enough. guardrail_cutoff_threshold is nullable – send null to clear it, omit it to leave it alone. Omitting the aggregation leaves the metric’s definition untouched; supplying one replaces it wholesale, and the metric’s type is re-derived from the shape supplied. Property filters use property_id or measure_id UUIDs from the aggregation’s data source. Attributes that are computed rather than stored (short_id, metric_type, certified_at, experiment_count, created_at, updated_at) are rejected rather than ignored, so a body copied from GET must have them removed. The is_certified attribute is rejected. Certification cannot be changed through this endpoint. This endpoint requires the product_analytics_metrics_write permission.

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

Arguments

Path Parameters

Name

Type

Description

metric_id [required]

string

The UUID of the metric.

Request

Body Data (required)

Expand All

Field

Type

Description

data [required]

object

JSON:API resource containing the metric identity and fields.

attributes

object

Fields supplied to update the metric. Every attribute is optional; omit an attribute to leave it unchanged.

data_source_type

enum

Source of the data backing this metric. Allowed enum values: DATADOG,DATADOG_REFERENCE_TABLE,CUSTOMER_WAREHOUSE

denominator_aggregation

 <oneOf>

Measure and calculation settings for a numerator or denominator aggregation. Supply exactly one non-null measure.

Object 1

object

Settings for a metric aggregation that uses a Warehouse measure. The other measure must be omitted or null.

aging_threshold_days

int64

Stored aging threshold in days. The subject aging filter uses the aggregation window end and unit.

datadog_metric_measure

object

Optional Datadog measure. Use null when the other measure is selected.

column_name

string

Name of the Datadog event field used by this measure.

column_type [required]

string

Data type of the source column.

filters

Conditions used to select the metric's source data.

name [required]

string

Display name of the Datadog measure.

query

string

Query used to retrieve the Datadog measure.

source_definition_filter

Filter applied to the Datadog source definition.

source_subtype [required]

string

Subtype of the Datadog data source.

source_type [required]

string

Type of Datadog data source used for the measure.

enable_aging_subject_filter

boolean

Whether to exclude subjects whose observation time is shorter than the aggregation window.

operation [required]

string

Calculation applied to the measure values, such as sum.

property_filters

[array]

Property filters that select data for this aggregation.

threshold_aggregation_type

string

Calculation used to evaluate the threshold.

threshold_breach_value

double

Value used to determine whether the threshold is breached.

threshold_comparison_operator

string

Operator used to compare the calculated value with the threshold.

threshold_timeframe_dimension

string

Time unit for the threshold evaluation window. Supports seconds, minutes, hours, days, calendar_days, and weeks. Calendar days start at midnight on the assignment day. Other units start at the assignment time.

threshold_timeframe_value

double

End of the threshold evaluation window, measured from assignment in the configured time unit.

timeframe_end_value

double

End offset of the aggregation window from assignment, in timeframe_unit.

timeframe_start_value

double

Start offset of the aggregation window from assignment, in timeframe_unit.

timeframe_unit

string

Time unit for the aggregation window. Calendar days are measured from midnight on the assignment day. Other units are measured from the assignment time.

warehouse_metric_measure [required]

object

Reference to a measure defined in a warehouse metric SQL model.

id [required]

uuid

Identifier of the warehouse metric measure.

winsor_lower_fixed_value

double

Fixed lower bound used to cap extreme measure values.

winsor_lower_percentile

double

Percentile used to determine the lower bound for extreme measure values.

winsor_upper_fixed_value

double

Fixed upper bound used to cap extreme measure values.

winsor_upper_percentile

double

Percentile used to determine the upper bound for extreme measure values.

winsorization_strategy

string

Method used to cap extreme measure values before aggregation.

Object 2

object

Settings for a metric aggregation that uses a Datadog measure. The other measure must be omitted or null.

aging_threshold_days

int64

Stored aging threshold in days. The subject aging filter uses the aggregation window end and unit.

datadog_metric_measure [required]

object

Datadog source and query that supply values for the metric.

column_name

string

Name of the Datadog event field used by this measure.

column_type [required]

string

Data type of the source column.

filters

Conditions used to select the metric's source data.

name [required]

string

Display name of the Datadog measure.

query

string

Query used to retrieve the Datadog measure.

source_definition_filter

Filter applied to the Datadog source definition.

source_subtype [required]

string

Subtype of the Datadog data source.

source_type [required]

string

Type of Datadog data source used for the measure.

enable_aging_subject_filter

boolean

Whether to exclude subjects whose observation time is shorter than the aggregation window.

operation [required]

string

Calculation applied to the measure values, such as sum.

property_filters

[array]

Property filters that select data for this aggregation.

threshold_aggregation_type

string

Calculation used to evaluate the threshold.

threshold_breach_value

double

Value used to determine whether the threshold is breached.

threshold_comparison_operator

string

Operator used to compare the calculated value with the threshold.

threshold_timeframe_dimension

string

Time unit for the threshold evaluation window. Supports seconds, minutes, hours, days, calendar_days, and weeks. Calendar days start at midnight on the assignment day. Other units start at the assignment time.

threshold_timeframe_value

double

End of the threshold evaluation window, measured from assignment in the configured time unit.

timeframe_end_value

double

End offset of the aggregation window from assignment, in timeframe_unit.

timeframe_start_value

double

Start offset of the aggregation window from assignment, in timeframe_unit.

timeframe_unit

string

Time unit for the aggregation window. Calendar days are measured from midnight on the assignment day. Other units are measured from the assignment time.

warehouse_metric_measure

object

Optional warehouse measure. Use null when the other measure is selected.

id [required]

uuid

Identifier of the warehouse metric measure.

winsor_lower_fixed_value

double

Fixed lower bound used to cap extreme measure values.

winsor_lower_percentile

double

Percentile used to determine the lower bound for extreme measure values.

winsor_upper_fixed_value

double

Fixed upper bound used to cap extreme measure values.

winsor_upper_percentile

double

Percentile used to determine the upper bound for extreme measure values.

winsorization_strategy

string

Method used to cap extreme measure values before aggregation.

description

string

Send null to clear the description. Omit to leave it unchanged.

desired_change

enum

Direction of change that represents an improvement for this metric. Allowed enum values: METRIC_INCREASES,METRIC_DECREASES

format_as_percent

boolean

Whether results render as a percentage. Omit to leave it unchanged.

guardrail_cutoff_threshold

double

Send null to clear a stored threshold. Omit to leave it unchanged.

migration_metadata

Metadata retained for resources imported from another system.

name

string

Name of the metric. Omit to leave it unchanged.

numerator_aggregation

 <oneOf>

Measure and calculation settings for a numerator or denominator aggregation. Supply exactly one non-null measure.

Object 1

object

Settings for a metric aggregation that uses a Warehouse measure. The other measure must be omitted or null.

aging_threshold_days

int64

Stored aging threshold in days. The subject aging filter uses the aggregation window end and unit.

datadog_metric_measure

object

Optional Datadog measure. Use null when the other measure is selected.

column_name

string

Name of the Datadog event field used by this measure.

column_type [required]

string

Data type of the source column.

filters

Conditions used to select the metric's source data.

name [required]

string

Display name of the Datadog measure.

query

string

Query used to retrieve the Datadog measure.

source_definition_filter

Filter applied to the Datadog source definition.

source_subtype [required]

string

Subtype of the Datadog data source.

source_type [required]

string

Type of Datadog data source used for the measure.

enable_aging_subject_filter

boolean

Whether to exclude subjects whose observation time is shorter than the aggregation window.

operation [required]

string

Calculation applied to the measure values, such as sum.

property_filters

[array]

Property filters that select data for this aggregation.

threshold_aggregation_type

string

Calculation used to evaluate the threshold.

threshold_breach_value

double

Value used to determine whether the threshold is breached.

threshold_comparison_operator

string

Operator used to compare the calculated value with the threshold.

threshold_timeframe_dimension

string

Time unit for the threshold evaluation window. Supports seconds, minutes, hours, days, calendar_days, and weeks. Calendar days start at midnight on the assignment day. Other units start at the assignment time.

threshold_timeframe_value

double

End of the threshold evaluation window, measured from assignment in the configured time unit.

timeframe_end_value

double

End offset of the aggregation window from assignment, in timeframe_unit.

timeframe_start_value

double

Start offset of the aggregation window from assignment, in timeframe_unit.

timeframe_unit

string

Time unit for the aggregation window. Calendar days are measured from midnight on the assignment day. Other units are measured from the assignment time.

warehouse_metric_measure [required]

object

Reference to a measure defined in a warehouse metric SQL model.

id [required]

uuid

Identifier of the warehouse metric measure.

winsor_lower_fixed_value

double

Fixed lower bound used to cap extreme measure values.

winsor_lower_percentile

double

Percentile used to determine the lower bound for extreme measure values.

winsor_upper_fixed_value

double

Fixed upper bound used to cap extreme measure values.

winsor_upper_percentile

double

Percentile used to determine the upper bound for extreme measure values.

winsorization_strategy

string

Method used to cap extreme measure values before aggregation.

Object 2

object

Settings for a metric aggregation that uses a Datadog measure. The other measure must be omitted or null.

aging_threshold_days

int64

Stored aging threshold in days. The subject aging filter uses the aggregation window end and unit.

datadog_metric_measure [required]

object

Datadog source and query that supply values for the metric.

column_name

string

Name of the Datadog event field used by this measure.

column_type [required]

string

Data type of the source column.

filters

Conditions used to select the metric's source data.

name [required]

string

Display name of the Datadog measure.

query

string

Query used to retrieve the Datadog measure.

source_definition_filter

Filter applied to the Datadog source definition.

source_subtype [required]

string

Subtype of the Datadog data source.

source_type [required]

string

Type of Datadog data source used for the measure.

enable_aging_subject_filter

boolean

Whether to exclude subjects whose observation time is shorter than the aggregation window.

operation [required]

string

Calculation applied to the measure values, such as sum.

property_filters

[array]

Property filters that select data for this aggregation.

threshold_aggregation_type

string

Calculation used to evaluate the threshold.

threshold_breach_value

double

Value used to determine whether the threshold is breached.

threshold_comparison_operator

string

Operator used to compare the calculated value with the threshold.

threshold_timeframe_dimension

string

Time unit for the threshold evaluation window. Supports seconds, minutes, hours, days, calendar_days, and weeks. Calendar days start at midnight on the assignment day. Other units start at the assignment time.

threshold_timeframe_value

double

End of the threshold evaluation window, measured from assignment in the configured time unit.

timeframe_end_value

double

End offset of the aggregation window from assignment, in timeframe_unit.

timeframe_start_value

double

Start offset of the aggregation window from assignment, in timeframe_unit.

timeframe_unit

string

Time unit for the aggregation window. Calendar days are measured from midnight on the assignment day. Other units are measured from the assignment time.

warehouse_metric_measure

object

Optional warehouse measure. Use null when the other measure is selected.

id [required]

uuid

Identifier of the warehouse metric measure.

winsor_lower_fixed_value

double

Fixed lower bound used to cap extreme measure values.

winsor_lower_percentile

double

Percentile used to determine the lower bound for extreme measure values.

winsor_upper_fixed_value

double

Fixed upper bound used to cap extreme measure values.

winsor_upper_percentile

double

Percentile used to determine the upper bound for extreme measure values.

winsorization_strategy

string

Method used to cap extreme measure values before aggregation.

percentile_aggregation

 <oneOf>

Measure and percentile to calculate for the metric. Supply exactly one non-null measure.

Object 1

object

Settings for a percentile aggregation that uses a Warehouse measure. The other measure must be omitted or null.

datadog_metric_measure

object

Optional Datadog percentile measure. Use null when the warehouse measure is selected.

column_name [required]

string

Name of the Datadog event field used by this measure.

column_type [required]

string

Data type of the source column.

filters

Conditions used to select the metric's source data.

name [required]

string

Display name of the Datadog measure.

query

string

Query used to retrieve the Datadog measure.

source_definition_filter

Filter applied to the Datadog source definition.

source_subtype [required]

string

Subtype of the Datadog data source.

source_type [required]

string

Type of Datadog data source used for the measure.

percentile [required]

double

Percentile to calculate from the measure values.

property_filters

[array]

Property filters that select data for the percentile calculation.

warehouse_metric_measure [required]

object

Reference to a measure defined in a warehouse metric SQL model.

id [required]

uuid

Identifier of the warehouse metric measure.

Object 2

object

Settings for a percentile aggregation that uses a Datadog measure. The other measure must be omitted or null.

datadog_metric_measure [required]

object

Datadog measure used to calculate a percentile.

column_name [required]

string

Name of the Datadog event field used by this measure.

column_type [required]

string

Data type of the source column.

filters

Conditions used to select the metric's source data.

name [required]

string

Display name of the Datadog measure.

query

string

Query used to retrieve the Datadog measure.

source_definition_filter

Filter applied to the Datadog source definition.

source_subtype [required]

string

Subtype of the Datadog data source.

source_type [required]

string

Type of Datadog data source used for the measure.

percentile [required]

double

Percentile to calculate from the measure values.

property_filters

[array]

Property filters that select data for the percentile calculation.

warehouse_metric_measure

object

Optional warehouse measure. Use null when the other measure is selected.

id [required]

uuid

Identifier of the warehouse metric measure.

id

uuid

ID of the metric.

type [required]

enum

The metric resource type. Allowed enum values: metrics

default: metrics

{
  "data": {
    "type": "metrics",
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "attributes": {
      "name": "ex-14bb9543f523edde updated"
    }
  }
}

Response

OK

Response containing the metric.

Expand All

Field

Type

Description

data [required]

object

JSON:API resource containing the metric identity and fields.

attributes

object

Details of the metric.

certified_at

date-time

Time when this resource was certified.

created_at

date-time

Time when this resource was created.

data_source_type

enum

Source of the data used to calculate the metric. Allowed enum values: DATADOG,DATADOG_REFERENCE_TABLE,CUSTOMER_WAREHOUSE,IMPORTED,UNKNOWN

denominator_aggregation

object

Source measure and aggregation settings for a metric value.

aging_threshold_days

int64

Stored aging threshold in days. The subject aging filter uses the aggregation window end and unit.

datadog_metric_measure

object

Datadog source and query that supply values for the metric.

column_name

string

Name of the Datadog event field used by this measure.

column_type

string

Data type of the source column.

filters

Conditions used to select the metric's source data.

name

string

Display name of the Datadog measure.

query

string

Query used to retrieve the Datadog measure.

source_definition_filter

Filter applied to the Datadog source definition.

source_subtype

string

Subtype of the Datadog data source.

source_type

string

Type of Datadog data source used for the measure.

enable_aging_subject_filter

boolean

Whether to exclude subjects whose observation time is shorter than the aggregation window.

operation

string

Aggregation applied to the selected measure.

pipeline_column_suffix

string

Suffix used to identify this value in pipeline output columns.

property_filters

[array]

Filters applied to the metric aggregation.

threshold_aggregation_type

string

Aggregation used to evaluate the threshold.

threshold_breach_value

double

Value used to determine whether the threshold is breached.

threshold_comparison_operator

string

Comparison applied between the aggregated value and the threshold.

threshold_timeframe_dimension

string

Time unit used for the threshold evaluation window.

threshold_timeframe_value

double

Size of the threshold evaluation window.

timeframe_end_value

double

End of the aggregation window in the specified time unit.

timeframe_start_value

double

Start of the aggregation window in the specified time unit.

timeframe_unit

string

Time unit used for the aggregation window.

warehouse_metric_measure

object

Warehouse measure that supplies values for the metric.

id

string

ID of the measure.

pipeline_column_suffix

string

Suffix used to identify this value in pipeline output columns.

winsor_lower_fixed_value

double

Fixed lower bound used to cap metric values.

winsor_lower_percentile

double

Percentile used to determine the lower bound for capped metric values.

winsor_upper_fixed_value

double

Fixed upper bound used to cap metric values.

winsor_upper_percentile

double

Percentile used to determine the upper bound for capped metric values.

winsorization_strategy

string

Method used to cap extreme metric values.

description

string

Text that explains the metric.

desired_change

enum

Direction of metric change considered desirable. Allowed enum values: METRIC_INCREASES,METRIC_DECREASES,UNKNOWN

experiment_count

int64

Number of experiments that reference this resource.

format_as_percent

boolean

Whether to display the metric value as a percentage.

guardrail_cutoff_threshold

double

Threshold used when evaluating this metric as a guardrail.

metric_type

enum

Type of metric calculation. Allowed enum values: SIMPLE,RATIO,PERCENTILE,UNKNOWN

migration_metadata

Metadata retained for resources imported from another system.

name

string

Display name of the metric.

numerator_aggregation

object

Source measure and aggregation settings for a metric value.

aging_threshold_days

int64

Stored aging threshold in days. The subject aging filter uses the aggregation window end and unit.

datadog_metric_measure

object

Datadog source and query that supply values for the metric.

column_name

string

Name of the Datadog event field used by this measure.

column_type

string

Data type of the source column.

filters

Conditions used to select the metric's source data.

name

string

Display name of the Datadog measure.

query

string

Query used to retrieve the Datadog measure.

source_definition_filter

Filter applied to the Datadog source definition.

source_subtype

string

Subtype of the Datadog data source.

source_type

string

Type of Datadog data source used for the measure.

enable_aging_subject_filter

boolean

Whether to exclude subjects whose observation time is shorter than the aggregation window.

operation

string

Aggregation applied to the selected measure.

pipeline_column_suffix

string

Suffix used to identify this value in pipeline output columns.

property_filters

[array]

Filters applied to the metric aggregation.

threshold_aggregation_type

string

Aggregation used to evaluate the threshold.

threshold_breach_value

double

Value used to determine whether the threshold is breached.

threshold_comparison_operator

string

Comparison applied between the aggregated value and the threshold.

threshold_timeframe_dimension

string

Time unit used for the threshold evaluation window.

threshold_timeframe_value

double

Size of the threshold evaluation window.

timeframe_end_value

double

End of the aggregation window in the specified time unit.

timeframe_start_value

double

Start of the aggregation window in the specified time unit.

timeframe_unit

string

Time unit used for the aggregation window.

warehouse_metric_measure

object

Warehouse measure that supplies values for the metric.

id

string

ID of the measure.

pipeline_column_suffix

string

Suffix used to identify this value in pipeline output columns.

winsor_lower_fixed_value

double

Fixed lower bound used to cap metric values.

winsor_lower_percentile

double

Percentile used to determine the lower bound for capped metric values.

winsor_upper_fixed_value

double

Fixed upper bound used to cap metric values.

winsor_upper_percentile

double

Percentile used to determine the upper bound for capped metric values.

winsorization_strategy

string

Method used to cap extreme metric values.

percentile_aggregation

object

Source measure and settings for a percentile metric.

datadog_metric_measure

object

Datadog source and query that supply values for the metric.

column_name

string

Name of the Datadog event field used by this measure.

column_type

string

Data type of the source column.

filters

Conditions used to select the metric's source data.

name

string

Display name of the Datadog measure.

query

string

Query used to retrieve the Datadog measure.

source_definition_filter

Filter applied to the Datadog source definition.

source_subtype

string

Subtype of the Datadog data source.

source_type

string

Type of Datadog data source used for the measure.

percentile

double

Percentile calculated from the selected measure.

pipeline_column_suffix

string

Suffix used to identify this value in pipeline output columns.

property_filters

[array]

Filters applied to the metric aggregation.

warehouse_metric_measure

object

Warehouse measure that supplies values for the metric.

id

string

ID of the measure.

pipeline_column_suffix

string

Suffix used to identify this value in pipeline output columns.

reference_url

string

URL with supporting information about the metric.

updated_at

date-time

Time when this resource was last updated.

id [required]

uuid

ID of the metric.

type [required]

enum

The metric resource type. Allowed enum values: metrics

default: metrics

{
  "data": {
    "attributes": {
      "created_at": "2024-01-01T12:00:00Z",
      "data_source_type": "CUSTOMER_WAREHOUSE",
      "description": "Share of sessions that reach the order confirmation page",
      "desired_change": "METRIC_INCREASES",
      "format_as_percent": true,
      "metric_type": "SIMPLE",
      "name": "Checkout conversion",
      "numerator_aggregation": {
        "operation": "sum",
        "pipeline_column_suffix": "agg001",
        "timeframe_start_value": 0,
        "warehouse_metric_measure": {
          "id": "550e8400-e29b-41d4-a716-446655440021",
          "pipeline_column_suffix": "rev001"
        }
      },
      "reference_url": "",
      "updated_at": "2024-01-01T12:00:00Z"
    },
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "type": "metrics"
  }
}

Malformed ID or body, or validation failure.

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"
    }
  ]
}

Caller lacks product_analytics_metrics_write or edit access to this specific metric.

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"
    }
  ]
}

No metric with this ID exists for the organization.

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"
    }
  ]
}

The metric is imported, certified, or managed by metric sync, or another metric in this organization already uses one of these values.

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"
    }
  ]
}

Request body sent with a media type other than application/json or application/vnd.api+json.

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

                          ## default
# 

# Path parameters
export metric_id="550e8400-e29b-41d4-a716-446655440000"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

# Curl command
curl -X PATCH "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/metrics/${metric_id}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ -d @- << EOF { "data": { "attributes": { "name": "Checkout conversion" }, "id": "550e8400-e29b-41d4-a716-446655440020", "type": "metrics" } } EOF