Skip to content

Commit 98e2fee

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 281891e of spec repo (#37692)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent bce99c8 commit 98e2fee

7 files changed

Lines changed: 476 additions & 0 deletions

File tree

config/_default/menus/api.en.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11743,6 +11743,42 @@ menu:
1174311743
url: /api/latest/feature-flags/
1174411744
identifier: feature-flags
1174511745
generated: true
11746+
- name: Update a variant
11747+
url: /api/latest/feature-flags/update-a-variant/
11748+
identifier: feature-flags-update-a-variant
11749+
parent: feature-flags
11750+
generated: true
11751+
params:
11752+
versions:
11753+
- v2
11754+
operationids:
11755+
- UpdateVariantForFeatureFlag
11756+
unstable: []
11757+
order: 21
11758+
- name: Delete a variant
11759+
url: /api/latest/feature-flags/delete-a-variant/
11760+
identifier: feature-flags-delete-a-variant
11761+
parent: feature-flags
11762+
generated: true
11763+
params:
11764+
versions:
11765+
- v2
11766+
operationids:
11767+
- DeleteVariantFromFeatureFlag
11768+
unstable: []
11769+
order: 20
11770+
- name: Add a variant to a feature flag
11771+
url: /api/latest/feature-flags/add-a-variant-to-a-feature-flag/
11772+
identifier: feature-flags-add-a-variant-to-a-feature-flag
11773+
parent: feature-flags
11774+
generated: true
11775+
params:
11776+
versions:
11777+
- v2
11778+
operationids:
11779+
- CreateVariantForFeatureFlag
11780+
unstable: []
11781+
order: 22
1174611782
- name: Unarchive a feature flag
1174711783
url: /api/latest/feature-flags/unarchive-a-feature-flag/
1174811784
identifier: feature-flags-unarchive-a-feature-flag
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
title: Add a variant to a feature flag
3+
---
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
title: Delete a variant
3+
---
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
title: Update a variant
3+
---

content/en/api/v2/feature-flags/examples.json

Lines changed: 180 additions & 0 deletions
Large diffs are not rendered by default.

data/api/v2/full_spec.yaml

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,6 +1952,15 @@ components:
19521952
example: "550e8400-e29b-41d4-a716-446655440000"
19531953
format: uuid
19541954
type: string
1955+
variant_id:
1956+
description: The ID of the variant.
1957+
in: path
1958+
name: variant_id
1959+
required: true
1960+
schema:
1961+
example: "550e8400-e29b-41d4-a716-446655440002"
1962+
format: uuid
1963+
type: string
19551964
requestBodies: {}
19561965
responses:
19571966
BadRequestResponse:
@@ -106837,6 +106846,18 @@ components:
106837106846
required:
106838106847
- data
106839106848
type: object
106849+
UpdateVariantRequest:
106850+
description: Request to update an existing variant's name and value.
106851+
properties:
106852+
name:
106853+
description: The display name of the variant.
106854+
example: "Variant ABC123 Updated"
106855+
type: string
106856+
value:
106857+
description: The value of the variant as a string.
106858+
example: "new_value"
106859+
type: string
106860+
type: object
106840106861
UpdateWorkflowRequest:
106841106862
description: A request object for updating an existing workflow.
106842106863
example:
@@ -134152,6 +134173,220 @@ paths:
134152134173
permissions:
134153134174
- feature_flag_config_write
134154134175
- feature_flag_environment_config_read
134176+
/api/v2/feature-flags/{feature_flag_id}/variants:
134177+
post:
134178+
description: |-
134179+
Adds a single new variant to an existing feature flag. This endpoint is
134180+
additive-only: it never modifies existing variants. A request whose `key`
134181+
already exists on the flag is rejected with `409 Conflict`; a `value`
134182+
whose type does not match the flag's `value_type` is rejected with `400`.
134183+
The server generates the variant UUID and returns it in the response body;
134184+
callers (for example, the flag-migration tool) need this UUID to reference
134185+
the new variant in subsequent allocation syncs.
134186+
operationId: CreateVariantForFeatureFlag
134187+
parameters:
134188+
- $ref: "#/components/parameters/feature_flag_id"
134189+
requestBody:
134190+
content:
134191+
application/json:
134192+
examples:
134193+
default:
134194+
value:
134195+
data:
134196+
attributes:
134197+
key: dark
134198+
name: Dark Theme
134199+
value: dark
134200+
type: variants
134201+
schema:
134202+
$ref: "#/components/schemas/CreateVariant"
134203+
required: true
134204+
responses:
134205+
"201":
134206+
content:
134207+
application/json:
134208+
examples:
134209+
default:
134210+
value:
134211+
data:
134212+
attributes:
134213+
created_at: "2024-01-01T00:00:00+00:00"
134214+
key: dark
134215+
name: Dark Theme
134216+
updated_at: "2024-01-01T00:00:00+00:00"
134217+
value: dark
134218+
id: "550e8400-e29b-41d4-a716-446655440002"
134219+
type: variants
134220+
schema:
134221+
$ref: "#/components/schemas/Variant"
134222+
description: Created
134223+
"400":
134224+
content:
134225+
application/json:
134226+
schema:
134227+
$ref: "#/components/schemas/APIErrorResponse"
134228+
description: Bad Request
134229+
"403":
134230+
content:
134231+
application/json:
134232+
schema:
134233+
$ref: "#/components/schemas/APIErrorResponse"
134234+
description: Forbidden
134235+
"404":
134236+
content:
134237+
application/json:
134238+
schema:
134239+
$ref: "#/components/schemas/APIErrorResponse"
134240+
description: Not Found
134241+
"409":
134242+
content:
134243+
application/json:
134244+
schema:
134245+
$ref: "#/components/schemas/APIErrorResponse"
134246+
description: Conflict - A variant with this key already exists on the flag.
134247+
"429":
134248+
$ref: "#/components/responses/TooManyRequestsResponse"
134249+
security:
134250+
- apiKeyAuth: []
134251+
appKeyAuth: []
134252+
summary: Add a variant to a feature flag
134253+
tags:
134254+
- Feature Flags
134255+
x-menu-order: 22
134256+
x-permission:
134257+
operator: AND
134258+
permissions:
134259+
- feature_flag_config_write
134260+
/api/v2/feature-flags/{feature_flag_id}/variants/{variant_id}:
134261+
delete:
134262+
description: |-
134263+
Deletes a variant from a feature flag.
134264+
134265+
When backend approvals are enabled and the flag requires approval, this endpoint creates and returns a `FlagSuggestion` with `201 Created` instead of deleting the variant immediately. If a pending suggestion already exists for this flag's variant property, the endpoint returns `409 Conflict`.
134266+
operationId: DeleteVariantFromFeatureFlag
134267+
parameters:
134268+
- $ref: "#/components/parameters/feature_flag_id"
134269+
- $ref: "#/components/parameters/variant_id"
134270+
responses:
134271+
"204":
134272+
description: No Content
134273+
"400":
134274+
content:
134275+
application/json:
134276+
schema:
134277+
$ref: "#/components/schemas/APIErrorResponse"
134278+
description: Bad Request
134279+
"403":
134280+
content:
134281+
application/json:
134282+
schema:
134283+
$ref: "#/components/schemas/APIErrorResponse"
134284+
description: Forbidden
134285+
"404":
134286+
content:
134287+
application/json:
134288+
schema:
134289+
$ref: "#/components/schemas/APIErrorResponse"
134290+
description: Not Found
134291+
"409":
134292+
content:
134293+
application/json:
134294+
schema:
134295+
$ref: "#/components/schemas/APIErrorResponse"
134296+
description: Conflict - A pending suggestion already exists for this property.
134297+
"429":
134298+
$ref: "#/components/responses/TooManyRequestsResponse"
134299+
security:
134300+
- apiKeyAuth: []
134301+
appKeyAuth: []
134302+
summary: Delete a variant
134303+
tags:
134304+
- Feature Flags
134305+
x-menu-order: 20
134306+
x-permission:
134307+
operator: AND
134308+
permissions:
134309+
- feature_flag_config_write
134310+
put:
134311+
description: |-
134312+
Updates the name and value of an existing variant on a feature flag.
134313+
134314+
When backend approvals are enabled and the flag requires approval, this endpoint creates and returns a `FlagSuggestion` with `201 Created` instead of applying the change immediately. Use the returned suggestion `id` to approve or reject the change. If a pending suggestion already exists for this flag's variant property, the endpoint returns `409 Conflict`.
134315+
operationId: UpdateVariantForFeatureFlag
134316+
parameters:
134317+
- $ref: "#/components/parameters/feature_flag_id"
134318+
- $ref: "#/components/parameters/variant_id"
134319+
requestBody:
134320+
content:
134321+
application/json:
134322+
examples:
134323+
default:
134324+
value:
134325+
data:
134326+
attributes:
134327+
name: Dark Theme Updated
134328+
value: dark_v2
134329+
id: "550e8400-e29b-41d4-a716-446655440002"
134330+
type: variants
134331+
schema:
134332+
$ref: "#/components/schemas/UpdateVariantRequest"
134333+
required: true
134334+
responses:
134335+
"200":
134336+
content:
134337+
application/json:
134338+
examples:
134339+
default:
134340+
value:
134341+
data:
134342+
attributes:
134343+
created_at: "2024-01-01T00:00:00+00:00"
134344+
key: dark
134345+
name: Dark Theme Updated
134346+
updated_at: "2024-06-01T00:00:00+00:00"
134347+
value: dark_v2
134348+
id: "550e8400-e29b-41d4-a716-446655440002"
134349+
type: variants
134350+
schema:
134351+
$ref: "#/components/schemas/Variant"
134352+
description: OK
134353+
"400":
134354+
content:
134355+
application/json:
134356+
schema:
134357+
$ref: "#/components/schemas/APIErrorResponse"
134358+
description: Bad Request
134359+
"403":
134360+
content:
134361+
application/json:
134362+
schema:
134363+
$ref: "#/components/schemas/APIErrorResponse"
134364+
description: Forbidden
134365+
"404":
134366+
content:
134367+
application/json:
134368+
schema:
134369+
$ref: "#/components/schemas/APIErrorResponse"
134370+
description: Not Found
134371+
"409":
134372+
content:
134373+
application/json:
134374+
schema:
134375+
$ref: "#/components/schemas/APIErrorResponse"
134376+
description: Conflict - A pending suggestion already exists for this property.
134377+
"429":
134378+
$ref: "#/components/responses/TooManyRequestsResponse"
134379+
security:
134380+
- apiKeyAuth: []
134381+
appKeyAuth: []
134382+
summary: Update a variant
134383+
tags:
134384+
- Feature Flags
134385+
x-menu-order: 21
134386+
x-permission:
134387+
operator: AND
134388+
permissions:
134389+
- feature_flag_config_write
134155134390
/api/v2/forms:
134156134391
get:
134157134392
description: Get all forms for the authenticated user's organization.

data/api/v2/translate_actions.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,6 +1874,22 @@
18741874
"description": "Unarchives a previously archived feature flag,\nmaking it visible in the main list again.",
18751875
"summary": "Unarchive a feature flag"
18761876
},
1877+
"CreateVariantForFeatureFlag": {
1878+
"description": "Adds a single new variant to an existing feature flag. This endpoint is\nadditive-only: it never modifies existing variants. A request whose `key`\nalready exists on the flag is rejected with `409 Conflict`; a `value`\nwhose type does not match the flag's `value_type` is rejected with `400`.\nThe server generates the variant UUID and returns it in the response body;\ncallers (for example, the flag-migration tool) need this UUID to reference\nthe new variant in subsequent allocation syncs.",
1879+
"summary": "Add a variant to a feature flag",
1880+
"request_description": "",
1881+
"request_schema_description": "Request to create a variant."
1882+
},
1883+
"DeleteVariantFromFeatureFlag": {
1884+
"description": "Deletes a variant from a feature flag.\n\nWhen backend approvals are enabled and the flag requires approval, this endpoint creates and returns a `FlagSuggestion` with `201 Created` instead of deleting the variant immediately. If a pending suggestion already exists for this flag's variant property, the endpoint returns `409 Conflict`.",
1885+
"summary": "Delete a variant"
1886+
},
1887+
"UpdateVariantForFeatureFlag": {
1888+
"description": "Updates the name and value of an existing variant on a feature flag.\n\nWhen backend approvals are enabled and the flag requires approval, this endpoint creates and returns a `FlagSuggestion` with `201 Created` instead of applying the change immediately. Use the returned suggestion `id` to approve or reject the change. If a pending suggestion already exists for this flag's variant property, the endpoint returns `409 Conflict`.",
1889+
"summary": "Update a variant",
1890+
"request_description": "",
1891+
"request_schema_description": "Request to update an existing variant's name and value."
1892+
},
18771893
"ListForms": {
18781894
"description": "Get all forms for the authenticated user's organization.",
18791895
"summary": "List forms"

0 commit comments

Comments
 (0)