For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ko/api/latest/feature-flags/update-a-variant.md. A documentation index is available at /llms.txt.
Language
Datadog site

변형 업데이트

PUThttps://api.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/variants/{variant_id}https://api.us3.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/variants/{variant_id}https://api.us5.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/variants/{variant_id}https://api.datadoghq.eu/api/v2/feature-flags/{feature_flag_id}/variants/{variant_id}https://api.ap1.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/variants/{variant_id}https://api.ap2.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/variants/{variant_id}https://api.uk1.datadoghq.com/api/v2/feature-flags/{feature_flag_id}/variants/{variant_id}https://api.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/variants/{variant_id}https://api.us2.ddog-gov.com/api/v2/feature-flags/{feature_flag_id}/variants/{variant_id}

개요

Feature Flag에 있는 기존 변형의 이름과 값을 업데이트합니다.

백엔드 승인이 활성화되어 있고 플래그에 승인이 필요한 경우 이 엔드포인트는 변경 사항을 즉시 적용하는 대신 FlagSuggestion을 생성하여 201 Created와 함께 반환합니다. 반환된 제안 id를 사용하여 변경 사항을 승인하거나 거부할 수 있습니다. 이 플래그의 변형 속성에 대해 보류 중인 제안이 이미 존재하는 경우 엔드포인트는 409 Conflict를 반환합니다.

This endpoint requires the feature_flag_config_write permission.

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

인수

경로 파라미터

이름
유형
설명
feature_flag_id [required]
string

The ID of the feature flag.

variant_id [required]
string

The ID of the variant.

요청

Body Data (required)

항목
유형
설명
name
string

기존 변형의 이름과 값을 업데이트하도록 요청합니다.

value
string

The value of the variant as a string.

응답

OK

A variant of a feature flag.

항목
유형
설명
created_at
date-time

The timestamp when the variant was created.

id [required]
uuid

The unique identifier of the variant.

key [required]
string

The unique key of the variant.

name [required]
string

The name of the variant.

updated_at
date-time

The timestamp when the variant was last updated.

value [required]
string

The value of the variant as a string.

코드 예시

변형 업데이트
# Path parameters
export feature_flag_id="550e8400-e29b-41d4-a716-446655440000"
export variant_id="550e8400-e29b-41d4-a716-446655440002"

# 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 PUT "https://api.${DD_SITE}/api/v2/feature-flags/${feature_flag_id}/variants/${variant_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Dark Theme Updated",
      "value": "dark_v2"
    },
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "type": "variants"
  }
}
EOF
# Path parameters
export feature_flag_id="550e8400-e29b-41d4-a716-446655440000"
export variant_id="550e8400-e29b-41d4-a716-446655440002"

# 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 PUT "https://api.${DD_SITE}/api/v2/feature-flags/${feature_flag_id}/variants/${variant_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Dark Theme Updated",
      "value": "dark_v2"
    },
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "type": "variants"
  }
}
EOF
# Path parameters
export feature_flag_id="550e8400-e29b-41d4-a716-446655440000"
export variant_id="550e8400-e29b-41d4-a716-446655440002"

# 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 PUT "https://api.${DD_SITE}/api/v2/feature-flags/${feature_flag_id}/variants/${variant_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Dark Theme Updated",
      "value": "dark_v2"
    },
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "type": "variants"
  }
}
EOF
# Path parameters
export feature_flag_id="550e8400-e29b-41d4-a716-446655440000"
export variant_id="550e8400-e29b-41d4-a716-446655440002"

# 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 PUT "https://api.${DD_SITE}/api/v2/feature-flags/${feature_flag_id}/variants/${variant_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Dark Theme Updated",
      "value": "dark_v2"
    },
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "type": "variants"
  }
}
EOF
# Path parameters
export feature_flag_id="550e8400-e29b-41d4-a716-446655440000"
export variant_id="550e8400-e29b-41d4-a716-446655440002"

# 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 PUT "https://api.${DD_SITE}/api/v2/feature-flags/${feature_flag_id}/variants/${variant_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Dark Theme Updated",
      "value": "dark_v2"
    },
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "type": "variants"
  }
}
EOF
# Path parameters
export feature_flag_id="550e8400-e29b-41d4-a716-446655440000"
export variant_id="550e8400-e29b-41d4-a716-446655440002"

# 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 PUT "https://api.${DD_SITE}/api/v2/feature-flags/${feature_flag_id}/variants/${variant_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Dark Theme Updated",
      "value": "dark_v2"
    },
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "type": "variants"
  }
}
EOF
# Path parameters
export feature_flag_id="550e8400-e29b-41d4-a716-446655440000"
export variant_id="550e8400-e29b-41d4-a716-446655440002"

# 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 PUT "https://api.${DD_SITE}/api/v2/feature-flags/${feature_flag_id}/variants/${variant_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Dark Theme Updated",
      "value": "dark_v2"
    },
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "type": "variants"
  }
}
EOF
# Path parameters
export feature_flag_id="550e8400-e29b-41d4-a716-446655440000"
export variant_id="550e8400-e29b-41d4-a716-446655440002"

# 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 PUT "https://api.${DD_SITE}/api/v2/feature-flags/${feature_flag_id}/variants/${variant_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Dark Theme Updated",
      "value": "dark_v2"
    },
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "type": "variants"
  }
}
EOF
# Path parameters
export feature_flag_id="550e8400-e29b-41d4-a716-446655440000"
export variant_id="550e8400-e29b-41d4-a716-446655440002"

# 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 PUT "https://api.${DD_SITE}/api/v2/feature-flags/${feature_flag_id}/variants/${variant_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Dark Theme Updated",
      "value": "dark_v2"
    },
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "type": "variants"
  }
}
EOF