Skip to content

Commit f225950

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 239ea7f of spec repo
1 parent 79e5798 commit f225950

20 files changed

Lines changed: 1128 additions & 0 deletions

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 278 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108468,6 +108468,181 @@ components:
108468108468
required:
108469108469
- data
108470108470
type: object
108471+
SavedFilterAttributes:
108472+
description: Saved filter details, including the full targeting rules and conditions.
108473+
properties:
108474+
archived_at:
108475+
description: The time the saved filter was archived. Omitted when the filter is not archived.
108476+
example: "2026-01-03T12:00:00Z"
108477+
format: date-time
108478+
type: string
108479+
created_at:
108480+
description: The time the saved filter was created.
108481+
example: "2026-01-01T12:00:00Z"
108482+
format: date-time
108483+
type: string
108484+
created_by:
108485+
description: The ID of the user who created the saved filter.
108486+
example: "550e8400-e29b-41d4-a716-446655440091"
108487+
type: string
108488+
creation_type:
108489+
$ref: "#/components/schemas/SavedFilterCreationType"
108490+
description:
108491+
description: A description of the saved filter. Omitted when no description is set.
108492+
example: Users selected by email address or organization ID.
108493+
type: string
108494+
migration_metadata:
108495+
description: Optional JSON metadata supplied by migration tools for tracking the source of a saved filter.
108496+
example:
108497+
provider: launchdarkly
108498+
segment_key: early-access-users
108499+
name:
108500+
description: The name of the saved filter.
108501+
example: Early access users
108502+
type: string
108503+
targeting_rules:
108504+
description: Targeting rules combined with OR. Conditions within each rule are combined with AND. Both saved lists and saved rules use this structure.
108505+
items:
108506+
$ref: "#/components/schemas/SavedFilterTargetingRule"
108507+
type: array
108508+
updated_at:
108509+
description: The time the saved filter was last updated.
108510+
example: "2026-01-02T12:00:00Z"
108511+
format: date-time
108512+
type: string
108513+
required:
108514+
- name
108515+
- creation_type
108516+
- targeting_rules
108517+
- created_by
108518+
- created_at
108519+
- updated_at
108520+
type: object
108521+
SavedFilterCondition:
108522+
description: An inline condition in a saved filter targeting rule.
108523+
properties:
108524+
attribute:
108525+
description: The attribute evaluated by the condition.
108526+
example: email
108527+
type: string
108528+
id:
108529+
description: The ID of the condition.
108530+
example: "550e8400-e29b-41d4-a716-446655440093"
108531+
format: uuid
108532+
type: string
108533+
operator:
108534+
$ref: "#/components/schemas/SavedFilterConditionOperator"
108535+
value:
108536+
description: Values used by the condition operator.
108537+
example:
108538+
- user@example.com
108539+
items:
108540+
type: string
108541+
type: array
108542+
required:
108543+
- id
108544+
- operator
108545+
- attribute
108546+
- value
108547+
type: object
108548+
SavedFilterConditionOperator:
108549+
description: The comparison operator used by a saved filter condition.
108550+
enum:
108551+
- LT
108552+
- LTE
108553+
- GT
108554+
- GTE
108555+
- MATCHES
108556+
- NOT_MATCHES
108557+
- ONE_OF
108558+
- NOT_ONE_OF
108559+
- IS_NULL
108560+
- EQUALS
108561+
- SEMVER_EQ
108562+
- SEMVER_NEQ
108563+
- SEMVER_LT
108564+
- SEMVER_LTE
108565+
- SEMVER_GT
108566+
- SEMVER_GTE
108567+
example: ONE_OF
108568+
type: string
108569+
x-enum-varnames:
108570+
- LT
108571+
- LTE
108572+
- GT
108573+
- GTE
108574+
- MATCHES
108575+
- NOT_MATCHES
108576+
- ONE_OF
108577+
- NOT_ONE_OF
108578+
- IS_NULL
108579+
- EQUALS
108580+
- SEMVER_EQ
108581+
- SEMVER_NEQ
108582+
- SEMVER_LT
108583+
- SEMVER_LTE
108584+
- SEMVER_GT
108585+
- SEMVER_GTE
108586+
SavedFilterCreationType:
108587+
description: How the saved filter was authored. RULES indicates rule-based authoring and LIST indicates list import. Both types return targeting rules and conditions.
108588+
enum:
108589+
- RULES
108590+
- LIST
108591+
example: RULES
108592+
type: string
108593+
x-enum-varnames:
108594+
- RULES
108595+
- LIST
108596+
SavedFilterData:
108597+
description: A saved filter resource.
108598+
properties:
108599+
attributes:
108600+
$ref: "#/components/schemas/SavedFilterAttributes"
108601+
id:
108602+
description: The ID of the saved filter.
108603+
example: "550e8400-e29b-41d4-a716-446655440090"
108604+
format: uuid
108605+
type: string
108606+
type:
108607+
$ref: "#/components/schemas/SavedFilterDataType"
108608+
required:
108609+
- id
108610+
- type
108611+
- attributes
108612+
type: object
108613+
SavedFilterDataType:
108614+
description: The saved filter resource type.
108615+
enum:
108616+
- saved-filters
108617+
example: saved-filters
108618+
type: string
108619+
x-enum-varnames:
108620+
- SAVED_FILTERS
108621+
SavedFilterResponse:
108622+
description: Response containing a saved filter and its targeting rules.
108623+
properties:
108624+
data:
108625+
$ref: "#/components/schemas/SavedFilterData"
108626+
required:
108627+
- data
108628+
type: object
108629+
SavedFilterTargetingRule:
108630+
description: A targeting rule in a saved filter. A rule matches when all its conditions match.
108631+
properties:
108632+
conditions:
108633+
description: Conditions combined with AND within this targeting rule.
108634+
items:
108635+
$ref: "#/components/schemas/SavedFilterCondition"
108636+
type: array
108637+
id:
108638+
description: The ID of the targeting rule.
108639+
example: "550e8400-e29b-41d4-a716-446655440092"
108640+
format: uuid
108641+
type: string
108642+
required:
108643+
- id
108644+
- conditions
108645+
type: object
108471108646
ScaRequest:
108472108647
description: The top-level request object for submitting a Software Composition Analysis (SCA) scan result.
108473108648
properties:
@@ -171648,6 +171823,109 @@ paths:
171648171823
operator: AND
171649171824
permissions:
171650171825
- feature_flag_config_write
171826+
/api/v2/feature-flags/saved-filters/{saved_filter_id}:
171827+
get:
171828+
description: |-
171829+
Returns a saved filter by ID, including its full targeting rules, conditions, and values.
171830+
Supports both saved lists and saved rules. Targeting rules are combined with OR,
171831+
and conditions within each rule are combined with AND.
171832+
Returns the stored filter definition rather than evaluating it against users or organizations.
171833+
Archived filters can be retrieved. Filters that are deleted or belong to another organization return a not found error.
171834+
operationId: GetSavedFilter
171835+
parameters:
171836+
- description: The ID of the saved filter.
171837+
example: "550e8400-e29b-41d4-a716-446655440090"
171838+
in: path
171839+
name: saved_filter_id
171840+
required: true
171841+
schema:
171842+
format: uuid
171843+
type: string
171844+
responses:
171845+
"200":
171846+
content:
171847+
application/json:
171848+
examples:
171849+
default:
171850+
summary: A saved rule matching an email address OR an organization ID
171851+
value:
171852+
data:
171853+
attributes:
171854+
created_at: "2026-01-01T12:00:00Z"
171855+
created_by: "550e8400-e29b-41d4-a716-446655440091"
171856+
creation_type: RULES
171857+
description: Users selected by email address or organization ID.
171858+
name: Early access users
171859+
targeting_rules:
171860+
- conditions:
171861+
- attribute: email
171862+
id: "550e8400-e29b-41d4-a716-446655440093"
171863+
operator: ONE_OF
171864+
value: ["user@example.com"]
171865+
id: "550e8400-e29b-41d4-a716-446655440092"
171866+
- conditions:
171867+
- attribute: org_id
171868+
id: "550e8400-e29b-41d4-a716-446655440095"
171869+
operator: ONE_OF
171870+
value: ["12345", "67890"]
171871+
id: "550e8400-e29b-41d4-a716-446655440094"
171872+
updated_at: "2026-01-02T12:00:00Z"
171873+
id: "550e8400-e29b-41d4-a716-446655440090"
171874+
type: saved-filters
171875+
saved_list:
171876+
summary: A saved list containing user IDs
171877+
value:
171878+
data:
171879+
attributes:
171880+
created_at: "2026-01-01T12:00:00Z"
171881+
created_by: "550e8400-e29b-41d4-a716-446655440091"
171882+
creation_type: LIST
171883+
name: Early access user list
171884+
targeting_rules:
171885+
- conditions:
171886+
- attribute: user_id
171887+
id: "550e8400-e29b-41d4-a716-446655440098"
171888+
operator: ONE_OF
171889+
value: ["user-123", "user-456"]
171890+
id: "550e8400-e29b-41d4-a716-446655440097"
171891+
updated_at: "2026-01-02T12:00:00Z"
171892+
id: "550e8400-e29b-41d4-a716-446655440096"
171893+
type: saved-filters
171894+
schema:
171895+
$ref: "#/components/schemas/SavedFilterResponse"
171896+
description: OK
171897+
"400":
171898+
content:
171899+
application/json:
171900+
schema:
171901+
$ref: "#/components/schemas/JSONAPIErrorResponse"
171902+
description: Bad Request
171903+
"403":
171904+
content:
171905+
application/json:
171906+
schema:
171907+
$ref: "#/components/schemas/APIErrorResponse"
171908+
description: Forbidden
171909+
"404":
171910+
content:
171911+
application/json:
171912+
schema:
171913+
$ref: "#/components/schemas/JSONAPIErrorResponse"
171914+
description: Not Found
171915+
"429":
171916+
$ref: "#/components/responses/TooManyRequestsResponse"
171917+
security:
171918+
- apiKeyAuth: []
171919+
appKeyAuth: []
171920+
- AuthZ:
171921+
- feature_flag_config_read
171922+
summary: Get a saved filter
171923+
tags:
171924+
- Feature Flags
171925+
x-permission:
171926+
operator: AND
171927+
permissions:
171928+
- feature_flag_config_read
171651171929
/api/v2/feature-flags/{feature_flag_id}:
171652171930
get:
171653171931
description: |-
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"""
2+
Get a saved filter returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v2.api.feature_flags_api import FeatureFlagsApi
8+
from uuid import UUID
9+
10+
configuration = Configuration()
11+
configuration.access_token = environ["DD_BEARER_TOKEN"]
12+
with ApiClient(configuration) as api_client:
13+
api_instance = FeatureFlagsApi(api_client)
14+
response = api_instance.get_saved_filter(
15+
saved_filter_id=UUID("8c051ac8-df7a-496e-b5c0-de691a411100"),
16+
)
17+
18+
print(response)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"""
2+
Get a saved filter returns a saved list
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v2.api.feature_flags_api import FeatureFlagsApi
8+
from uuid import UUID
9+
10+
configuration = Configuration()
11+
configuration.access_token = environ["DD_BEARER_TOKEN"]
12+
with ApiClient(configuration) as api_client:
13+
api_instance = FeatureFlagsApi(api_client)
14+
response = api_instance.get_saved_filter(
15+
saved_filter_id=UUID("fb44ff15-fe17-4bab-afe8-9a8eb0cf586c"),
16+
)
17+
18+
print(response)

‎src/datadog_api_client/v2/api/feature_flags_api.py‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from datadog_api_client.v2.model.create_environment_request import CreateEnvironmentRequest
2525
from datadog_api_client.v2.model.update_environment_request import UpdateEnvironmentRequest
2626
from datadog_api_client.v2.model.allocation_exposure_schedule_response import AllocationExposureScheduleResponse
27+
from datadog_api_client.v2.model.saved_filter_response import SavedFilterResponse
2728
from datadog_api_client.v2.model.update_feature_flag_request import UpdateFeatureFlagRequest
2829
from datadog_api_client.v2.model.allocation_response import AllocationResponse
2930
from datadog_api_client.v2.model.create_allocations_request import CreateAllocationsRequest
@@ -321,6 +322,29 @@ def __init__(self, api_client=None):
321322
api_client=api_client,
322323
)
323324

325+
self._get_saved_filter_endpoint = _Endpoint(
326+
settings={
327+
"response_type": (SavedFilterResponse,),
328+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
329+
"endpoint_path": "/api/v2/feature-flags/saved-filters/{saved_filter_id}",
330+
"operation_id": "get_saved_filter",
331+
"http_method": "GET",
332+
"version": "v2",
333+
},
334+
params_map={
335+
"saved_filter_id": {
336+
"required": True,
337+
"openapi_types": (UUID,),
338+
"attribute": "saved_filter_id",
339+
"location": "path",
340+
},
341+
},
342+
headers_map={
343+
"accept": ["application/json"],
344+
},
345+
api_client=api_client,
346+
)
347+
324348
self._list_feature_flags_endpoint = _Endpoint(
325349
settings={
326350
"response_type": (ListFeatureFlagsResponse,),
@@ -946,6 +970,27 @@ def get_feature_flags_environment(
946970

947971
return self._get_feature_flags_environment_endpoint.call_with_http_info(**kwargs)
948972

973+
def get_saved_filter(
974+
self,
975+
saved_filter_id: UUID,
976+
) -> SavedFilterResponse:
977+
"""Get a saved filter.
978+
979+
Returns a saved filter by ID, including its full targeting rules, conditions, and values.
980+
Supports both saved lists and saved rules. Targeting rules are combined with OR,
981+
and conditions within each rule are combined with AND.
982+
Returns the stored filter definition rather than evaluating it against users or organizations.
983+
Archived filters can be retrieved. Filters that are deleted or belong to another organization return a not found error.
984+
985+
:param saved_filter_id: The ID of the saved filter.
986+
:type saved_filter_id: UUID
987+
:rtype: SavedFilterResponse
988+
"""
989+
kwargs: Dict[str, Any] = {}
990+
kwargs["saved_filter_id"] = saved_filter_id
991+
992+
return self._get_saved_filter_endpoint.call_with_http_info(**kwargs)
993+
949994
def list_feature_flags(
950995
self,
951996
*,

0 commit comments

Comments
 (0)