Skip to content

Commit 5f78a43

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3935ca0 of spec repo
1 parent c2193b9 commit 5f78a43

52 files changed

Lines changed: 7269 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.generator/schemas/v2/openapi.yaml

Lines changed: 1224 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-04-01T20:36:45.896Z

cassettes/features/v2/feature_flags/Create-allocation-for-a-flag-in-an-environment-returns-Created-response.yml

Lines changed: 134 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-04-01T20:36:50.944Z

cassettes/features/v2/feature_flags/Update-targeting-rules-for-a-flag-in-an-environment-returns-OK-response.yml

Lines changed: 134 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Create targeting rules for a flag env returns "Created" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new
5+
6+
body = DatadogAPIClient::V2::CreateAllocationsRequest.new({
7+
data: DatadogAPIClient::V2::AllocationDataRequest.new({
8+
attributes: DatadogAPIClient::V2::UpsertAllocationRequest.new({
9+
experiment_id: "550e8400-e29b-41d4-a716-446655440030",
10+
exposure_schedule: DatadogAPIClient::V2::ExposureScheduleRequest.new({
11+
absolute_start_time: "2025-06-13T12:00:00Z",
12+
control_variant_id: "550e8400-e29b-41d4-a716-446655440012",
13+
control_variant_key: "control",
14+
id: "550e8400-e29b-41d4-a716-446655440010",
15+
rollout_options: DatadogAPIClient::V2::RolloutOptionsRequest.new({
16+
autostart: false,
17+
selection_interval_ms: 3600000,
18+
strategy: DatadogAPIClient::V2::RolloutStrategy::UNIFORM_INTERVALS,
19+
}),
20+
rollout_steps: [
21+
DatadogAPIClient::V2::ExposureRolloutStepRequest.new({
22+
exposure_ratio: 0.5,
23+
grouped_step_index: 1,
24+
id: "550e8400-e29b-41d4-a716-446655440040",
25+
interval_ms: 3600000,
26+
is_pause_record: false,
27+
}),
28+
],
29+
}),
30+
guardrail_metrics: [
31+
DatadogAPIClient::V2::GuardrailMetricRequest.new({
32+
metric_id: "metric-error-rate",
33+
trigger_action: DatadogAPIClient::V2::GuardrailTriggerAction::PAUSE,
34+
}),
35+
],
36+
id: "550e8400-e29b-41d4-a716-446655440020",
37+
key: "prod-rollout",
38+
name: "Production Rollout",
39+
targeting_rules: [
40+
DatadogAPIClient::V2::TargetingRuleRequest.new({
41+
conditions: [
42+
DatadogAPIClient::V2::ConditionRequest.new({
43+
attribute: "user_tier",
44+
operator: DatadogAPIClient::V2::ConditionOperator::ONE_OF,
45+
value: [
46+
"premium",
47+
"enterprise",
48+
],
49+
}),
50+
],
51+
}),
52+
],
53+
type: DatadogAPIClient::V2::AllocationType::FEATURE_GATE,
54+
variant_weights: [
55+
DatadogAPIClient::V2::VariantWeightRequest.new({
56+
value: 50,
57+
variant_id: "550e8400-e29b-41d4-a716-446655440001",
58+
variant_key: "control",
59+
}),
60+
],
61+
}),
62+
type: DatadogAPIClient::V2::AllocationDataType::ALLOCATIONS,
63+
}),
64+
})
65+
p api_instance.create_allocations_for_feature_flag_in_environment("550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001", body)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Create allocation for a flag in an environment returns "Created" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new
5+
6+
# there is a valid "feature_flag" in the system
7+
FEATURE_FLAG_DATA_ATTRIBUTES_VARIANTS_0_ID = ENV["FEATURE_FLAG_DATA_ATTRIBUTES_VARIANTS_0_ID"]
8+
FEATURE_FLAG_DATA_ID = ENV["FEATURE_FLAG_DATA_ID"]
9+
10+
# there is a valid "environment" in the system
11+
ENVIRONMENT_DATA_ID = ENV["ENVIRONMENT_DATA_ID"]
12+
13+
body = DatadogAPIClient::V2::CreateAllocationsRequest.new({
14+
data: DatadogAPIClient::V2::AllocationDataRequest.new({
15+
type: DatadogAPIClient::V2::AllocationDataType::ALLOCATIONS,
16+
attributes: DatadogAPIClient::V2::UpsertAllocationRequest.new({
17+
name: "New targeting rule Example-Feature-Flag",
18+
key: "new-targeting-rule-example-feature-flag",
19+
targeting_rules: [],
20+
variant_weights: [
21+
DatadogAPIClient::V2::VariantWeightRequest.new({
22+
variant_id: FEATURE_FLAG_DATA_ATTRIBUTES_VARIANTS_0_ID,
23+
value: 100,
24+
}),
25+
],
26+
guardrail_metrics: [],
27+
type: DatadogAPIClient::V2::AllocationType::CANARY,
28+
}),
29+
}),
30+
})
31+
p api_instance.create_allocations_for_feature_flag_in_environment(FEATURE_FLAG_DATA_ID, ENVIRONMENT_DATA_ID, body)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Pause a progressive rollout returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new
5+
p api_instance.pause_exposure_schedule("550e8400-e29b-41d4-a716-446655440010")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Resume a progressive rollout returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new
5+
p api_instance.resume_exposure_schedule("550e8400-e29b-41d4-a716-446655440010")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Start a progressive rollout returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::FeatureFlagsAPI.new
5+
p api_instance.start_exposure_schedule("550e8400-e29b-41d4-a716-446655440010")

0 commit comments

Comments
 (0)