launchdarkly_api 25.2.0 → 25.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +64 -39
- data/docs/AIConfig.md +7 -5
- data/docs/AIConfigPatch.md +8 -4
- data/docs/AIConfigPost.md +8 -6
- data/docs/AIConfigTargeting.md +3 -3
- data/docs/AIConfigTargetingEnvironmentRule.md +8 -0
- data/docs/AIConfigTargetingEnvironmentRuleClause.md +2 -0
- data/docs/AIConfigVariation.md +1 -1
- data/docs/AIConfigVariationPatch.md +1 -1
- data/docs/AgentControlApi.md +110 -110
- data/docs/AgentOptimization.md +1 -1
- data/docs/AgentOptimizationJudge.md +1 -1
- data/docs/AgentOptimizationPost.md +1 -1
- data/docs/AgentSkill.md +3 -1
- data/docs/AgentSkillPatch.md +3 -1
- data/docs/AgentSkillPost.md +3 -1
- data/docs/AiConfigsMetricListingRep.md +2 -0
- data/docs/ApprovalsApi.md +1 -1
- data/docs/CreateFlagReleasePlanRequest.md +32 -0
- data/docs/EnvironmentReleasePlan.md +38 -0
- data/docs/EnvironmentReleasePlanClause.md +28 -0
- data/docs/EnvironmentReleasePlanMetric.md +20 -0
- data/docs/EnvironmentReleasePlanPhase.md +24 -0
- data/docs/EnvironmentReleasePlanProgressiveRelease.md +26 -0
- data/docs/EnvironmentReleasePlanProgressiveReleaseRep.md +26 -0
- data/docs/EnvironmentReleasePlanStep.md +22 -0
- data/docs/EnvironmentReleasePlans.md +22 -0
- data/docs/EnvironmentReleasePlansBetaApi.md +633 -0
- data/docs/EnvironmentReleasePlansLink.md +20 -0
- data/docs/EnvironmentReleasePlansPaginatedLinks.md +26 -0
- data/docs/EnvironmentReleasesMetricListingRep.md +2 -0
- data/docs/{ReleaseMethod.md → ExecutionMode.md} +2 -2
- data/docs/FeatureFlagsApi.md +1 -1
- data/docs/FlagReleasePlan.md +36 -0
- data/docs/FlagReleasePlanEnvironment.md +24 -0
- data/docs/FlagReleasePlanRequest.md +30 -0
- data/docs/FlagReleasePlansBetaApi.md +392 -0
- data/docs/FlagReleasePlansError.md +20 -0
- data/docs/FlagReleasePlansLink.md +20 -0
- data/docs/FlagReleasePlansPaginatedLinks.md +26 -0
- data/docs/ListFlagReleasePlansResponse.md +22 -0
- data/docs/MaintainerIdentifier.md +79 -0
- data/docs/MaintainerIdentifierMember.md +20 -0
- data/docs/MaintainerIdentifierTeam.md +20 -0
- data/docs/MaintainerResponse.md +79 -0
- data/docs/MaintainerResponseMember.md +26 -0
- data/docs/MaintainerResponseTeam.md +22 -0
- data/docs/PinnedSkillToolRef.md +20 -0
- data/docs/PostEnvironmentReleasePlanRequest.md +26 -0
- data/docs/PutDefaultEnvironmentReleasePlanRequest.md +18 -0
- data/docs/PutEnvironmentReleasePlanRequest.md +26 -0
- data/docs/PutFlagReleasePlanRequest.md +32 -0
- data/docs/QuickStats.md +2 -2
- data/docs/SkillToolRef.md +20 -0
- data/docs/ToolReferences.md +5 -1
- data/docs/ToolSkillReference.md +22 -0
- data/docs/TriggerType.md +15 -0
- data/lib/launchdarkly_api/api/agent_control_api.rb +98 -98
- data/lib/launchdarkly_api/api/approvals_api.rb +2 -2
- data/lib/launchdarkly_api/api/environment_release_plans_beta_api.rb +730 -0
- data/lib/launchdarkly_api/api/feature_flags_api.rb +2 -2
- data/lib/launchdarkly_api/api/{release_policies_beta_api.rb → flag_release_plans_beta_api.rb} +173 -212
- data/lib/launchdarkly_api/models/agent_optimization.rb +1 -1
- data/lib/launchdarkly_api/models/agent_optimization_judge.rb +1 -1
- data/lib/launchdarkly_api/models/agent_optimization_post.rb +1 -1
- data/lib/launchdarkly_api/models/agent_skill.rb +14 -2
- data/lib/launchdarkly_api/models/agent_skill_patch.rb +16 -4
- data/lib/launchdarkly_api/models/agent_skill_post.rb +16 -4
- data/lib/launchdarkly_api/models/ai_config.rb +16 -6
- data/lib/launchdarkly_api/models/ai_config_patch.rb +27 -7
- data/lib/launchdarkly_api/models/ai_config_post.rb +19 -9
- data/lib/launchdarkly_api/models/ai_config_targeting.rb +3 -3
- data/lib/launchdarkly_api/models/ai_config_targeting_environment_rule.rb +40 -1
- data/lib/launchdarkly_api/models/ai_config_targeting_environment_rule_clause.rb +11 -1
- data/lib/launchdarkly_api/models/ai_config_variation.rb +1 -1
- data/lib/launchdarkly_api/models/ai_config_variation_patch.rb +1 -1
- data/lib/launchdarkly_api/models/ai_configs_metric_listing_rep.rb +11 -1
- data/lib/launchdarkly_api/models/create_flag_release_plan_request.rb +335 -0
- data/lib/launchdarkly_api/models/environment_release_plan.rb +426 -0
- data/lib/launchdarkly_api/models/{release_policies_access_allowed_reason.rb → environment_release_plan_clause.rb} +98 -65
- data/lib/launchdarkly_api/models/{release_policies_access_allowed_rep.rb → environment_release_plan_metric.rb} +28 -41
- data/lib/launchdarkly_api/models/environment_release_plan_phase.rb +208 -0
- data/lib/launchdarkly_api/models/environment_release_plan_progressive_release.rb +285 -0
- data/lib/launchdarkly_api/models/{release_policies_access_denied_reason.rb → environment_release_plan_progressive_release_rep.rb} +85 -67
- data/lib/launchdarkly_api/models/{release_policy_stage.rb → environment_release_plan_step.rb} +43 -4
- data/lib/launchdarkly_api/models/{release_policies_response.rb → environment_release_plans.rb} +16 -7
- data/lib/launchdarkly_api/models/{release_policies_access_denied.rb → environment_release_plans_link.rb} +16 -50
- data/lib/launchdarkly_api/models/environment_release_plans_paginated_links.rb +200 -0
- data/lib/launchdarkly_api/models/environment_releases_metric_listing_rep.rb +11 -1
- data/lib/launchdarkly_api/models/{release_method.rb → execution_mode.rb} +6 -7
- data/lib/launchdarkly_api/models/expanded_ai_config.rb +1 -1
- data/lib/launchdarkly_api/models/flag_release_plan.rb +359 -0
- data/lib/launchdarkly_api/models/{put_release_policy_request.rb → flag_release_plan_environment.rb} +47 -65
- data/lib/launchdarkly_api/models/{post_release_policy_request.rb → flag_release_plan_request.rb} +64 -67
- data/lib/launchdarkly_api/models/flag_release_plans_error.rb +208 -0
- data/lib/launchdarkly_api/models/flag_release_plans_link.rb +156 -0
- data/lib/launchdarkly_api/models/flag_release_plans_paginated_links.rb +200 -0
- data/lib/launchdarkly_api/models/list_flag_release_plans_response.rb +202 -0
- data/lib/launchdarkly_api/models/maintainer_identifier.rb +56 -0
- data/lib/launchdarkly_api/models/maintainer_identifier_member.rb +214 -0
- data/lib/launchdarkly_api/models/{progressive_release_config.rb → maintainer_identifier_team.rb} +66 -32
- data/lib/launchdarkly_api/models/maintainer_response.rb +56 -0
- data/lib/launchdarkly_api/models/maintainer_response_member.rb +225 -0
- data/lib/launchdarkly_api/models/maintainer_response_team.rb +206 -0
- data/lib/launchdarkly_api/models/{release_policies_access_rep.rb → pinned_skill_tool_ref.rb} +46 -45
- data/lib/launchdarkly_api/models/{release_policy.rb → post_environment_release_plan_request.rb} +93 -120
- data/lib/launchdarkly_api/models/{release_policies_access.rb → put_default_environment_release_plan_request.rb} +33 -44
- data/lib/launchdarkly_api/models/put_environment_release_plan_request.rb +285 -0
- data/lib/launchdarkly_api/models/put_flag_release_plan_request.rb +309 -0
- data/lib/launchdarkly_api/models/quick_stats.rb +2 -2
- data/lib/launchdarkly_api/models/skill_tool_ref.rb +195 -0
- data/lib/launchdarkly_api/models/tool_references.rb +26 -4
- data/lib/launchdarkly_api/models/tool_skill_reference.rb +220 -0
- data/lib/launchdarkly_api/models/trigger_type.rb +42 -0
- data/lib/launchdarkly_api/version.rb +1 -1
- data/lib/launchdarkly_api.rb +35 -16
- data/spec/api/agent_control_api_spec.rb +49 -49
- data/spec/api/approvals_api_spec.rb +1 -1
- data/spec/api/environment_release_plans_beta_api_spec.rb +156 -0
- data/spec/api/feature_flags_api_spec.rb +1 -1
- data/spec/api/{release_policies_beta_api_spec.rb → flag_release_plans_beta_api_spec.rb} +43 -56
- data/spec/models/agent_skill_patch_spec.rb +6 -0
- data/spec/models/agent_skill_post_spec.rb +6 -0
- data/spec/models/agent_skill_spec.rb +6 -0
- data/spec/models/ai_config_patch_spec.rb +12 -0
- data/spec/models/ai_config_post_spec.rb +6 -0
- data/spec/models/ai_config_spec.rb +6 -0
- data/spec/models/ai_config_targeting_environment_rule_clause_spec.rb +6 -0
- data/spec/models/ai_config_targeting_environment_rule_spec.rb +24 -0
- data/spec/models/ai_configs_metric_listing_rep_spec.rb +6 -0
- data/spec/models/{release_policy_spec.rb → create_flag_release_plan_request_spec.rb} +13 -19
- data/spec/models/{release_policies_access_allowed_reason_spec.rb → environment_release_plan_clause_spec.rb} +16 -16
- data/spec/models/{release_policies_access_rep_spec.rb → environment_release_plan_metric_spec.rb} +8 -8
- data/spec/models/environment_release_plan_phase_spec.rb +54 -0
- data/spec/models/environment_release_plan_progressive_release_rep_spec.rb +68 -0
- data/spec/models/environment_release_plan_progressive_release_spec.rb +68 -0
- data/spec/models/environment_release_plan_spec.rb +100 -0
- data/spec/models/{release_policies_access_allowed_rep_spec.rb → environment_release_plan_step_spec.rb} +14 -8
- data/spec/models/{release_policies_access_denied_spec.rb → environment_release_plans_link_spec.rb} +8 -8
- data/spec/models/{guarded_release_config_spec.rb → environment_release_plans_paginated_links_spec.rb} +11 -17
- data/spec/models/environment_release_plans_spec.rb +48 -0
- data/spec/models/environment_releases_metric_listing_rep_spec.rb +6 -0
- data/spec/models/{release_method_spec.rb → execution_mode_spec.rb} +6 -6
- data/spec/models/flag_release_plan_environment_spec.rb +54 -0
- data/spec/models/{release_policies_access_denied_reason_spec.rb → flag_release_plan_request_spec.rb} +18 -16
- data/spec/models/flag_release_plan_spec.rb +90 -0
- data/spec/models/{release_policy_scope_spec.rb → flag_release_plans_error_spec.rb} +8 -8
- data/spec/models/{release_policy_stage_spec.rb → flag_release_plans_link_spec.rb} +8 -8
- data/spec/models/{put_release_policy_request_spec.rb → flag_release_plans_paginated_links_spec.rb} +11 -11
- data/spec/models/list_flag_release_plans_response_spec.rb +48 -0
- data/spec/models/maintainer_identifier_member_spec.rb +46 -0
- data/spec/models/maintainer_identifier_spec.rb +44 -0
- data/spec/models/{progressive_release_config_spec.rb → maintainer_identifier_team_spec.rb} +12 -8
- data/spec/models/maintainer_response_member_spec.rb +64 -0
- data/spec/models/maintainer_response_spec.rb +44 -0
- data/spec/models/maintainer_response_team_spec.rb +52 -0
- data/spec/models/{release_policies_access_spec.rb → pinned_skill_tool_ref_spec.rb} +8 -8
- data/spec/models/{post_release_policy_request_spec.rb → post_environment_release_plan_request_spec.rb} +15 -17
- data/spec/models/put_default_environment_release_plan_request_spec.rb +36 -0
- data/spec/models/put_environment_release_plan_request_spec.rb +64 -0
- data/spec/models/put_flag_release_plan_request_spec.rb +78 -0
- data/spec/models/{release_policies_response_spec.rb → skill_tool_ref_spec.rb} +8 -8
- data/spec/models/tool_references_spec.rb +12 -0
- data/spec/models/tool_skill_reference_spec.rb +48 -0
- data/spec/models/trigger_type_spec.rb +30 -0
- metadata +141 -65
- data/docs/GuardedReleaseConfig.md +0 -28
- data/docs/PostReleasePolicyRequest.md +0 -28
- data/docs/ProgressiveReleaseConfig.md +0 -20
- data/docs/PutReleasePolicyRequest.md +0 -26
- data/docs/ReleasePoliciesAccess.md +0 -20
- data/docs/ReleasePoliciesAccessAllowedReason.md +0 -28
- data/docs/ReleasePoliciesAccessAllowedRep.md +0 -20
- data/docs/ReleasePoliciesAccessDenied.md +0 -20
- data/docs/ReleasePoliciesAccessDeniedReason.md +0 -28
- data/docs/ReleasePoliciesAccessRep.md +0 -20
- data/docs/ReleasePoliciesBetaApi.md +0 -466
- data/docs/ReleasePoliciesResponse.md +0 -20
- data/docs/ReleasePolicy.md +0 -34
- data/docs/ReleasePolicyScope.md +0 -20
- data/docs/ReleasePolicyStage.md +0 -20
- data/lib/launchdarkly_api/models/guarded_release_config.rb +0 -224
- data/lib/launchdarkly_api/models/release_policy_scope.rb +0 -181
|
@@ -325,10 +325,10 @@ module LaunchDarklyApi
|
|
|
325
325
|
return data, status_code, headers
|
|
326
326
|
end
|
|
327
327
|
|
|
328
|
-
# Delete
|
|
329
|
-
# Delete an existing
|
|
328
|
+
# Delete agent config
|
|
329
|
+
# Delete an existing agent config.
|
|
330
330
|
# @param project_key [String] The project key
|
|
331
|
-
# @param config_key [String] The
|
|
331
|
+
# @param config_key [String] The agent config key
|
|
332
332
|
# @param [Hash] opts the optional parameters
|
|
333
333
|
# @return [nil]
|
|
334
334
|
def delete_ai_config(project_key, config_key, opts = {})
|
|
@@ -336,10 +336,10 @@ module LaunchDarklyApi
|
|
|
336
336
|
nil
|
|
337
337
|
end
|
|
338
338
|
|
|
339
|
-
# Delete
|
|
340
|
-
# Delete an existing
|
|
339
|
+
# Delete agent config
|
|
340
|
+
# Delete an existing agent config.
|
|
341
341
|
# @param project_key [String] The project key
|
|
342
|
-
# @param config_key [String] The
|
|
342
|
+
# @param config_key [String] The agent config key
|
|
343
343
|
# @param [Hash] opts the optional parameters
|
|
344
344
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
345
345
|
def delete_ai_config_with_http_info(project_key, config_key, opts = {})
|
|
@@ -394,11 +394,11 @@ module LaunchDarklyApi
|
|
|
394
394
|
return data, status_code, headers
|
|
395
395
|
end
|
|
396
396
|
|
|
397
|
-
# Delete
|
|
398
|
-
# Delete a specific variation of an
|
|
397
|
+
# Delete agent config variation
|
|
398
|
+
# Delete a specific variation of an agent config by config key and variation key.
|
|
399
399
|
# @param project_key [String] The project key
|
|
400
|
-
# @param config_key [String] The
|
|
401
|
-
# @param variation_key [String] The
|
|
400
|
+
# @param config_key [String] The agent config key
|
|
401
|
+
# @param variation_key [String] The agent config variation key
|
|
402
402
|
# @param [Hash] opts the optional parameters
|
|
403
403
|
# @return [nil]
|
|
404
404
|
def delete_ai_config_variation(project_key, config_key, variation_key, opts = {})
|
|
@@ -406,11 +406,11 @@ module LaunchDarklyApi
|
|
|
406
406
|
nil
|
|
407
407
|
end
|
|
408
408
|
|
|
409
|
-
# Delete
|
|
410
|
-
# Delete a specific variation of an
|
|
409
|
+
# Delete agent config variation
|
|
410
|
+
# Delete a specific variation of an agent config by config key and variation key.
|
|
411
411
|
# @param project_key [String] The project key
|
|
412
|
-
# @param config_key [String] The
|
|
413
|
-
# @param variation_key [String] The
|
|
412
|
+
# @param config_key [String] The agent config key
|
|
413
|
+
# @param variation_key [String] The agent config variation key
|
|
414
414
|
# @param [Hash] opts the optional parameters
|
|
415
415
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
416
416
|
def delete_ai_config_variation_with_http_info(project_key, config_key, variation_key, opts = {})
|
|
@@ -969,10 +969,10 @@ module LaunchDarklyApi
|
|
|
969
969
|
return data, status_code, headers
|
|
970
970
|
end
|
|
971
971
|
|
|
972
|
-
# Get
|
|
973
|
-
# Retrieve a specific
|
|
972
|
+
# Get agent config
|
|
973
|
+
# Retrieve a specific agent config by its key.
|
|
974
974
|
# @param project_key [String] The project key
|
|
975
|
-
# @param config_key [String] The
|
|
975
|
+
# @param config_key [String] The agent config key
|
|
976
976
|
# @param [Hash] opts the optional parameters
|
|
977
977
|
# @return [AIConfig]
|
|
978
978
|
def get_ai_config(project_key, config_key, opts = {})
|
|
@@ -980,10 +980,10 @@ module LaunchDarklyApi
|
|
|
980
980
|
data
|
|
981
981
|
end
|
|
982
982
|
|
|
983
|
-
# Get
|
|
984
|
-
# Retrieve a specific
|
|
983
|
+
# Get agent config
|
|
984
|
+
# Retrieve a specific agent config by its key.
|
|
985
985
|
# @param project_key [String] The project key
|
|
986
|
-
# @param config_key [String] The
|
|
986
|
+
# @param config_key [String] The agent config key
|
|
987
987
|
# @param [Hash] opts the optional parameters
|
|
988
988
|
# @return [Array<(AIConfig, Integer, Hash)>] AIConfig data, response status code and response headers
|
|
989
989
|
def get_ai_config_with_http_info(project_key, config_key, opts = {})
|
|
@@ -1038,10 +1038,10 @@ module LaunchDarklyApi
|
|
|
1038
1038
|
return data, status_code, headers
|
|
1039
1039
|
end
|
|
1040
1040
|
|
|
1041
|
-
# Get
|
|
1042
|
-
# Retrieve usage metrics for an
|
|
1041
|
+
# Get agent config metrics
|
|
1042
|
+
# Retrieve usage metrics for an agent config by config key.
|
|
1043
1043
|
# @param project_key [String] The project key
|
|
1044
|
-
# @param config_key [String] The
|
|
1044
|
+
# @param config_key [String] The agent config key
|
|
1045
1045
|
# @param from [Integer] The starting time, as milliseconds since epoch (inclusive).
|
|
1046
1046
|
# @param to [Integer] The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`.
|
|
1047
1047
|
# @param env [String] An environment key. Only metrics from this environment will be included.
|
|
@@ -1054,10 +1054,10 @@ module LaunchDarklyApi
|
|
|
1054
1054
|
data
|
|
1055
1055
|
end
|
|
1056
1056
|
|
|
1057
|
-
# Get
|
|
1058
|
-
# Retrieve usage metrics for an
|
|
1057
|
+
# Get agent config metrics
|
|
1058
|
+
# Retrieve usage metrics for an agent config by config key.
|
|
1059
1059
|
# @param project_key [String] The project key
|
|
1060
|
-
# @param config_key [String] The
|
|
1060
|
+
# @param config_key [String] The agent config key
|
|
1061
1061
|
# @param from [Integer] The starting time, as milliseconds since epoch (inclusive).
|
|
1062
1062
|
# @param to [Integer] The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`.
|
|
1063
1063
|
# @param env [String] An environment key. Only metrics from this environment will be included.
|
|
@@ -1134,10 +1134,10 @@ module LaunchDarklyApi
|
|
|
1134
1134
|
return data, status_code, headers
|
|
1135
1135
|
end
|
|
1136
1136
|
|
|
1137
|
-
# Get
|
|
1138
|
-
# Retrieve usage metrics for an
|
|
1137
|
+
# Get agent config metrics by variation
|
|
1138
|
+
# Retrieve usage metrics for an agent config by config key, with results split by variation.
|
|
1139
1139
|
# @param project_key [String] The project key
|
|
1140
|
-
# @param config_key [String] The
|
|
1140
|
+
# @param config_key [String] The agent config key
|
|
1141
1141
|
# @param from [Integer] The starting time, as milliseconds since epoch (inclusive).
|
|
1142
1142
|
# @param to [Integer] The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`.
|
|
1143
1143
|
# @param env [String] An environment key. Only metrics from this environment will be included.
|
|
@@ -1150,10 +1150,10 @@ module LaunchDarklyApi
|
|
|
1150
1150
|
data
|
|
1151
1151
|
end
|
|
1152
1152
|
|
|
1153
|
-
# Get
|
|
1154
|
-
# Retrieve usage metrics for an
|
|
1153
|
+
# Get agent config metrics by variation
|
|
1154
|
+
# Retrieve usage metrics for an agent config by config key, with results split by variation.
|
|
1155
1155
|
# @param project_key [String] The project key
|
|
1156
|
-
# @param config_key [String] The
|
|
1156
|
+
# @param config_key [String] The agent config key
|
|
1157
1157
|
# @param from [Integer] The starting time, as milliseconds since epoch (inclusive).
|
|
1158
1158
|
# @param to [Integer] The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`.
|
|
1159
1159
|
# @param env [String] An environment key. Only metrics from this environment will be included.
|
|
@@ -1230,8 +1230,8 @@ module LaunchDarklyApi
|
|
|
1230
1230
|
return data, status_code, headers
|
|
1231
1231
|
end
|
|
1232
1232
|
|
|
1233
|
-
# Get
|
|
1234
|
-
# Retrieve aggregate quick stats for
|
|
1233
|
+
# Get agent config quick stats
|
|
1234
|
+
# Retrieve aggregate quick stats for agent configs in a project.
|
|
1235
1235
|
# @param project_key [String] The project key
|
|
1236
1236
|
# @param env [String] An environment key. Only metrics from this environment will be included.
|
|
1237
1237
|
# @param [Hash] opts the optional parameters
|
|
@@ -1241,8 +1241,8 @@ module LaunchDarklyApi
|
|
|
1241
1241
|
data
|
|
1242
1242
|
end
|
|
1243
1243
|
|
|
1244
|
-
# Get
|
|
1245
|
-
# Retrieve aggregate quick stats for
|
|
1244
|
+
# Get agent config quick stats
|
|
1245
|
+
# Retrieve aggregate quick stats for agent configs in a project.
|
|
1246
1246
|
# @param project_key [String] The project key
|
|
1247
1247
|
# @param env [String] An environment key. Only metrics from this environment will be included.
|
|
1248
1248
|
# @param [Hash] opts the optional parameters
|
|
@@ -1300,10 +1300,10 @@ module LaunchDarklyApi
|
|
|
1300
1300
|
return data, status_code, headers
|
|
1301
1301
|
end
|
|
1302
1302
|
|
|
1303
|
-
# Show an
|
|
1304
|
-
# Retrieves a specific
|
|
1303
|
+
# Show an agent config's targeting
|
|
1304
|
+
# Retrieves a specific agent config's targeting by its key
|
|
1305
1305
|
# @param project_key [String] The project key
|
|
1306
|
-
# @param config_key [String] The
|
|
1306
|
+
# @param config_key [String] The agent config key
|
|
1307
1307
|
# @param [Hash] opts the optional parameters
|
|
1308
1308
|
# @return [AIConfigTargeting]
|
|
1309
1309
|
def get_ai_config_targeting(project_key, config_key, opts = {})
|
|
@@ -1311,10 +1311,10 @@ module LaunchDarklyApi
|
|
|
1311
1311
|
data
|
|
1312
1312
|
end
|
|
1313
1313
|
|
|
1314
|
-
# Show an
|
|
1315
|
-
# Retrieves a specific
|
|
1314
|
+
# Show an agent config's targeting
|
|
1315
|
+
# Retrieves a specific agent config's targeting by its key
|
|
1316
1316
|
# @param project_key [String] The project key
|
|
1317
|
-
# @param config_key [String] The
|
|
1317
|
+
# @param config_key [String] The agent config key
|
|
1318
1318
|
# @param [Hash] opts the optional parameters
|
|
1319
1319
|
# @return [Array<(AIConfigTargeting, Integer, Hash)>] AIConfigTargeting data, response status code and response headers
|
|
1320
1320
|
def get_ai_config_targeting_with_http_info(project_key, config_key, opts = {})
|
|
@@ -1369,11 +1369,11 @@ module LaunchDarklyApi
|
|
|
1369
1369
|
return data, status_code, headers
|
|
1370
1370
|
end
|
|
1371
1371
|
|
|
1372
|
-
# Get
|
|
1373
|
-
# Get an
|
|
1372
|
+
# Get agent config variation
|
|
1373
|
+
# Get an agent config variation by key. The response includes all variation versions for the given variation key.
|
|
1374
1374
|
# @param project_key [String] The project key
|
|
1375
|
-
# @param config_key [String] The
|
|
1376
|
-
# @param variation_key [String] The
|
|
1375
|
+
# @param config_key [String] The agent config key
|
|
1376
|
+
# @param variation_key [String] The agent config variation key
|
|
1377
1377
|
# @param [Hash] opts the optional parameters
|
|
1378
1378
|
# @return [AIConfigVariationsResponse]
|
|
1379
1379
|
def get_ai_config_variation(project_key, config_key, variation_key, opts = {})
|
|
@@ -1381,11 +1381,11 @@ module LaunchDarklyApi
|
|
|
1381
1381
|
data
|
|
1382
1382
|
end
|
|
1383
1383
|
|
|
1384
|
-
# Get
|
|
1385
|
-
# Get an
|
|
1384
|
+
# Get agent config variation
|
|
1385
|
+
# Get an agent config variation by key. The response includes all variation versions for the given variation key.
|
|
1386
1386
|
# @param project_key [String] The project key
|
|
1387
|
-
# @param config_key [String] The
|
|
1388
|
-
# @param variation_key [String] The
|
|
1387
|
+
# @param config_key [String] The agent config key
|
|
1388
|
+
# @param variation_key [String] The agent config variation key
|
|
1389
1389
|
# @param [Hash] opts the optional parameters
|
|
1390
1390
|
# @return [Array<(AIConfigVariationsResponse, Integer, Hash)>] AIConfigVariationsResponse data, response status code and response headers
|
|
1391
1391
|
def get_ai_config_variation_with_http_info(project_key, config_key, variation_key, opts = {})
|
|
@@ -1444,8 +1444,8 @@ module LaunchDarklyApi
|
|
|
1444
1444
|
return data, status_code, headers
|
|
1445
1445
|
end
|
|
1446
1446
|
|
|
1447
|
-
# List
|
|
1448
|
-
# Get a list of all
|
|
1447
|
+
# List agent configs
|
|
1448
|
+
# Get a list of all agent configs in the given project.
|
|
1449
1449
|
# @param project_key [String] The project key
|
|
1450
1450
|
# @param [Hash] opts the optional parameters
|
|
1451
1451
|
# @option opts [String] :sort A sort to apply to the list of AgentControl configs.
|
|
@@ -1458,8 +1458,8 @@ module LaunchDarklyApi
|
|
|
1458
1458
|
data
|
|
1459
1459
|
end
|
|
1460
1460
|
|
|
1461
|
-
# List
|
|
1462
|
-
# Get a list of all
|
|
1461
|
+
# List agent configs
|
|
1462
|
+
# Get a list of all agent configs in the given project.
|
|
1463
1463
|
# @param project_key [String] The project key
|
|
1464
1464
|
# @param [Hash] opts the optional parameters
|
|
1465
1465
|
# @option opts [String] :sort A sort to apply to the list of AgentControl configs.
|
|
@@ -2043,7 +2043,7 @@ module LaunchDarklyApi
|
|
|
2043
2043
|
end
|
|
2044
2044
|
|
|
2045
2045
|
# List agent optimizations
|
|
2046
|
-
# Get a list of all agent optimizations in the given project.
|
|
2046
|
+
# Get a list of all agent optimizations in the given project. ### Filtering optimizations The `filter` parameter supports the following fields and operators: - `query` with the `equals` operator: case-insensitive substring match on the optimization key, label, or AgentControl config key. - `aiConfigKey` with the `equals` operator: exact match on the key of the AgentControl config being optimized. Separate multiple fields with a comma, for example `filter=aiConfigKey equals \"my-agent\",query equals \"tone\"`.
|
|
2047
2047
|
# @param project_key [String] The project key
|
|
2048
2048
|
# @param [Hash] opts the optional parameters
|
|
2049
2049
|
# @option opts [Integer] :limit The number of resources to return.
|
|
@@ -2056,7 +2056,7 @@ module LaunchDarklyApi
|
|
|
2056
2056
|
end
|
|
2057
2057
|
|
|
2058
2058
|
# List agent optimizations
|
|
2059
|
-
# Get a list of all agent optimizations in the given project.
|
|
2059
|
+
# Get a list of all agent optimizations in the given project. ### Filtering optimizations The `filter` parameter supports the following fields and operators: - `query` with the `equals` operator: case-insensitive substring match on the optimization key, label, or AgentControl config key. - `aiConfigKey` with the `equals` operator: exact match on the key of the AgentControl config being optimized. Separate multiple fields with a comma, for example `filter=aiConfigKey equals \"my-agent\",query equals \"tone\"`.
|
|
2060
2060
|
# @param project_key [String] The project key
|
|
2061
2061
|
# @param [Hash] opts the optional parameters
|
|
2062
2062
|
# @option opts [Integer] :limit The number of resources to return.
|
|
@@ -2340,7 +2340,7 @@ module LaunchDarklyApi
|
|
|
2340
2340
|
end
|
|
2341
2341
|
|
|
2342
2342
|
# List AI tool references
|
|
2343
|
-
# Get all AgentControl config variations that currently reference this tool.
|
|
2343
|
+
# Get all AgentControl config variations that currently reference this tool, and every agent skill version that pins it. The same `limit` and `offset` apply to `items` and to `skills`, and each list is paged on its own. The pagination links follow whichever list has more entries, so keep requesting `next` until both lists are complete, or use `totalCount` and `skillsTotalCount`.
|
|
2344
2344
|
# @param project_key [String] The project key
|
|
2345
2345
|
# @param tool_key [String] The AI tool key
|
|
2346
2346
|
# @param [Hash] opts the optional parameters
|
|
@@ -2353,7 +2353,7 @@ module LaunchDarklyApi
|
|
|
2353
2353
|
end
|
|
2354
2354
|
|
|
2355
2355
|
# List AI tool references
|
|
2356
|
-
# Get all AgentControl config variations that currently reference this tool.
|
|
2356
|
+
# Get all AgentControl config variations that currently reference this tool, and every agent skill version that pins it. The same `limit` and `offset` apply to `items` and to `skills`, and each list is paged on its own. The pagination links follow whichever list has more entries, so keep requesting `next` until both lists are complete, or use `totalCount` and `skillsTotalCount`.
|
|
2357
2357
|
# @param project_key [String] The project key
|
|
2358
2358
|
# @param tool_key [String] The AI tool key
|
|
2359
2359
|
# @param [Hash] opts the optional parameters
|
|
@@ -3345,24 +3345,24 @@ module LaunchDarklyApi
|
|
|
3345
3345
|
return data, status_code, headers
|
|
3346
3346
|
end
|
|
3347
3347
|
|
|
3348
|
-
# Update
|
|
3349
|
-
# Edit an existing
|
|
3348
|
+
# Update agent config
|
|
3349
|
+
# Edit an existing agent config. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here's an example: ``` { \"description\": \"Example updated description\", \"tags\": [\"new-tag\"] } ```
|
|
3350
3350
|
# @param project_key [String] The project key
|
|
3351
|
-
# @param config_key [String] The
|
|
3351
|
+
# @param config_key [String] The agent config key
|
|
3352
3352
|
# @param [Hash] opts the optional parameters
|
|
3353
|
-
# @option opts [AIConfigPatch] :ai_config_patch
|
|
3353
|
+
# @option opts [AIConfigPatch] :ai_config_patch Agent config object to update
|
|
3354
3354
|
# @return [AIConfig]
|
|
3355
3355
|
def patch_ai_config(project_key, config_key, opts = {})
|
|
3356
3356
|
data, _status_code, _headers = patch_ai_config_with_http_info(project_key, config_key, opts)
|
|
3357
3357
|
data
|
|
3358
3358
|
end
|
|
3359
3359
|
|
|
3360
|
-
# Update
|
|
3361
|
-
# Edit an existing
|
|
3360
|
+
# Update agent config
|
|
3361
|
+
# Edit an existing agent config. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here's an example: ``` { \"description\": \"Example updated description\", \"tags\": [\"new-tag\"] } ```
|
|
3362
3362
|
# @param project_key [String] The project key
|
|
3363
|
-
# @param config_key [String] The
|
|
3363
|
+
# @param config_key [String] The agent config key
|
|
3364
3364
|
# @param [Hash] opts the optional parameters
|
|
3365
|
-
# @option opts [AIConfigPatch] :ai_config_patch
|
|
3365
|
+
# @option opts [AIConfigPatch] :ai_config_patch Agent config object to update
|
|
3366
3366
|
# @return [Array<(AIConfig, Integer, Hash)>] AIConfig data, response status code and response headers
|
|
3367
3367
|
def patch_ai_config_with_http_info(project_key, config_key, opts = {})
|
|
3368
3368
|
if @api_client.config.debugging
|
|
@@ -3421,24 +3421,24 @@ module LaunchDarklyApi
|
|
|
3421
3421
|
return data, status_code, headers
|
|
3422
3422
|
end
|
|
3423
3423
|
|
|
3424
|
-
# Update
|
|
3425
|
-
# Perform a partial update to an AI Config's targeting. The request body must be a valid semantic patch. ### Using semantic patches on an AI Config To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating an AI Config's targeting takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating AI Configs. <details> <summary>Click to expand instructions for <strong>working with targeting and variations</strong> for AI Configs</summary> #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the AI Config. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addRule Adds a new targeting rule to the AI Config. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a rule. - Either - `variationId`: ID of a variation. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here's an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the AI Config to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the AI Config. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule. - `clauseIds`: Array of IDs of clauses in the rule. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the AI Config. ##### Parameters - `ruleIds`: Array of IDs of all rules. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replaceRules Removes all targeting rules for the AI Config and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ] } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the AI Config. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here's an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the AI Config, which the AI Config serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here's an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The AI Config serves the default off variation when the AI Config's targeting is **Off**. ##### Parameters - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updateRuleDescription Updates the description of the targeting rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config associated with this rule. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config. - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule. - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config, for all rules. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether or not LaunchDarkly tracks events for the AI Config, for the default rule. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ``` </details>
|
|
3424
|
+
# Update agent config targeting
|
|
3425
|
+
# Perform a partial update to an agent config's targeting. The request body must be a valid semantic patch. ### Using semantic patches on an agent config To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating an agent config's targeting takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating agent configs. <details> <summary>Click to expand instructions for <strong>working with targeting and variations</strong> for agent configs</summary> #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the agent config. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addRule Adds a new targeting rule to the agent config. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a rule. - Either - `variationId`: ID of a variation. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here's an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the agent config to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the agent config. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule. - `clauseIds`: Array of IDs of clauses in the rule. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the agent config. ##### Parameters - `ruleIds`: Array of IDs of all rules. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replaceRules Removes all targeting rules for the agent config and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ] } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the agent config. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here's an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the agent config, which the agent config serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here's an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The agent config serves the default off variation when the agent config's targeting is **Off**. ##### Parameters - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updateRuleDescription Updates the description of the targeting rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the agent config. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether or not LaunchDarkly tracks events for the agent config associated with this rule. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the agent config. - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule. - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether or not LaunchDarkly tracks events for the agent config, for all rules. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether or not LaunchDarkly tracks events for the agent config, for the default rule. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ``` </details>
|
|
3426
3426
|
# @param project_key [String] The project key
|
|
3427
|
-
# @param config_key [String] The
|
|
3427
|
+
# @param config_key [String] The agent config key
|
|
3428
3428
|
# @param [Hash] opts the optional parameters
|
|
3429
|
-
# @option opts [AIConfigTargetingPatch] :ai_config_targeting_patch
|
|
3429
|
+
# @option opts [AIConfigTargetingPatch] :ai_config_targeting_patch Agent config targeting semantic patch instructions
|
|
3430
3430
|
# @return [AIConfigTargeting]
|
|
3431
3431
|
def patch_ai_config_targeting(project_key, config_key, opts = {})
|
|
3432
3432
|
data, _status_code, _headers = patch_ai_config_targeting_with_http_info(project_key, config_key, opts)
|
|
3433
3433
|
data
|
|
3434
3434
|
end
|
|
3435
3435
|
|
|
3436
|
-
# Update
|
|
3437
|
-
# Perform a partial update to an AI Config's targeting. The request body must be a valid semantic patch. ### Using semantic patches on an AI Config To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating an AI Config's targeting takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating AI Configs. <details> <summary>Click to expand instructions for <strong>working with targeting and variations</strong> for AI Configs</summary> #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the AI Config. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addRule Adds a new targeting rule to the AI Config. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a rule. - Either - `variationId`: ID of a variation. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here's an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the AI Config to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the AI Config. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule. - `clauseIds`: Array of IDs of clauses in the rule. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the AI Config. ##### Parameters - `ruleIds`: Array of IDs of all rules. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replaceRules Removes all targeting rules for the AI Config and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ] } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the AI Config. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here's an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the AI Config, which the AI Config serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here's an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The AI Config serves the default off variation when the AI Config's targeting is **Off**. ##### Parameters - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updateRuleDescription Updates the description of the targeting rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config associated with this rule. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config. - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule. - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config, for all rules. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether or not LaunchDarkly tracks events for the AI Config, for the default rule. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ``` </details>
|
|
3436
|
+
# Update agent config targeting
|
|
3437
|
+
# Perform a partial update to an agent config's targeting. The request body must be a valid semantic patch. ### Using semantic patches on an agent config To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating an agent config's targeting takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating agent configs. <details> <summary>Click to expand instructions for <strong>working with targeting and variations</strong> for agent configs</summary> #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the agent config. - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"USA\", \"Canada\"] }] }] } ``` #### addRule Adds a new targeting rule to the agent config. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a rule. - Either - `variationId`: ID of a variation. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }] }] } ``` Here's an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [{ \"contextKind\": \"organization\", \"attribute\": \"located_in\", \"op\": \"in\", \"negate\": false, \"values\": [\"Sweden\", \"Norway\"] }], \"rolloutContextKind\": \"organization\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the agent config to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the agent config. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule. - `clauseIds`: Array of IDs of clauses in the rule. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeTargets\", \"values\": [\"context-key-123abc\", \"context-key-456def\"], \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the agent config. ##### Parameters - `ruleIds`: Array of IDs of all rules. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### replaceRules Removes all targeting rules for the agent config and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"description\": \"My new rule\", \"clauses\": [ { \"contextKind\": \"user\", \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ] } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"replaceTargets\", \"targets\": [ { \"contextKind\": \"user\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"values\": [\"user-key-123abc\"] }, { \"contextKind\": \"device\", \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\", \"values\": [\"device-key-456def\"] } ] } ] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the agent config. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here's an example: ```json { \"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or \"fallthrough\" rule for the agent config, which the agent config serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example that uses a `variationId`: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` Here's an example that uses a percentage rollout: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutContextKind\": \"user\", \"rolloutWeights\": { \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The agent config serves the default off variation when the agent config's targeting is **Off**. ##### Parameters - `variationId`: ID of a variation. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ] } ``` #### updateRuleDescription Updates the description of the targeting rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the agent config. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleTrackEvents Updates whether or not LaunchDarkly tracks events for the agent config associated with this rule. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the agent config. - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleTrackEvents\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"trackEvents\": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### Parameters - `ruleId`: ID of a rule. - `variationId`: ID of a variation. or - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [{ \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" }] } ``` #### updateTrackEvents Updates whether or not LaunchDarkly tracks events for the agent config, for all rules. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ] } ``` #### updateTrackEventsFallthrough Updates whether or not LaunchDarkly tracks events for the agent config, for the default rule. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { \"environmentKey\": \"environment-key-123abc\", \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ] } ``` </details>
|
|
3438
3438
|
# @param project_key [String] The project key
|
|
3439
|
-
# @param config_key [String] The
|
|
3439
|
+
# @param config_key [String] The agent config key
|
|
3440
3440
|
# @param [Hash] opts the optional parameters
|
|
3441
|
-
# @option opts [AIConfigTargetingPatch] :ai_config_targeting_patch
|
|
3441
|
+
# @option opts [AIConfigTargetingPatch] :ai_config_targeting_patch Agent config targeting semantic patch instructions
|
|
3442
3442
|
# @return [Array<(AIConfigTargeting, Integer, Hash)>] AIConfigTargeting data, response status code and response headers
|
|
3443
3443
|
def patch_ai_config_targeting_with_http_info(project_key, config_key, opts = {})
|
|
3444
3444
|
if @api_client.config.debugging
|
|
@@ -3497,26 +3497,26 @@ module LaunchDarklyApi
|
|
|
3497
3497
|
return data, status_code, headers
|
|
3498
3498
|
end
|
|
3499
3499
|
|
|
3500
|
-
# Update
|
|
3501
|
-
# Edit an existing variation of an
|
|
3500
|
+
# Update agent config variation
|
|
3501
|
+
# Edit an existing variation of an agent config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. If the variation is in use in a project environment where approval settings require review for this agent config, this endpoint returns 403 and the change must be submitted through an approval request. Here's an example: ``` { \"messages\": [ { \"role\": \"system\", \"content\": \"The new message\" } ] } ```
|
|
3502
3502
|
# @param project_key [String] The project key
|
|
3503
|
-
# @param config_key [String] The
|
|
3504
|
-
# @param variation_key [String] The
|
|
3503
|
+
# @param config_key [String] The agent config key
|
|
3504
|
+
# @param variation_key [String] The agent config variation key
|
|
3505
3505
|
# @param [Hash] opts the optional parameters
|
|
3506
|
-
# @option opts [AIConfigVariationPatch] :ai_config_variation_patch
|
|
3506
|
+
# @option opts [AIConfigVariationPatch] :ai_config_variation_patch Agent config variation object to update
|
|
3507
3507
|
# @return [AIConfigVariation]
|
|
3508
3508
|
def patch_ai_config_variation(project_key, config_key, variation_key, opts = {})
|
|
3509
3509
|
data, _status_code, _headers = patch_ai_config_variation_with_http_info(project_key, config_key, variation_key, opts)
|
|
3510
3510
|
data
|
|
3511
3511
|
end
|
|
3512
3512
|
|
|
3513
|
-
# Update
|
|
3514
|
-
# Edit an existing variation of an
|
|
3513
|
+
# Update agent config variation
|
|
3514
|
+
# Edit an existing variation of an agent config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. If the variation is in use in a project environment where approval settings require review for this agent config, this endpoint returns 403 and the change must be submitted through an approval request. Here's an example: ``` { \"messages\": [ { \"role\": \"system\", \"content\": \"The new message\" } ] } ```
|
|
3515
3515
|
# @param project_key [String] The project key
|
|
3516
|
-
# @param config_key [String] The
|
|
3517
|
-
# @param variation_key [String] The
|
|
3516
|
+
# @param config_key [String] The agent config key
|
|
3517
|
+
# @param variation_key [String] The agent config variation key
|
|
3518
3518
|
# @param [Hash] opts the optional parameters
|
|
3519
|
-
# @option opts [AIConfigVariationPatch] :ai_config_variation_patch
|
|
3519
|
+
# @option opts [AIConfigVariationPatch] :ai_config_variation_patch Agent config variation object to update
|
|
3520
3520
|
# @return [Array<(AIConfigVariation, Integer, Hash)>] AIConfigVariation data, response status code and response headers
|
|
3521
3521
|
def patch_ai_config_variation_with_http_info(project_key, config_key, variation_key, opts = {})
|
|
3522
3522
|
if @api_client.config.debugging
|
|
@@ -4129,10 +4129,10 @@ module LaunchDarklyApi
|
|
|
4129
4129
|
return data, status_code, headers
|
|
4130
4130
|
end
|
|
4131
4131
|
|
|
4132
|
-
# Create new
|
|
4133
|
-
# Create a new
|
|
4132
|
+
# Create new agent config
|
|
4133
|
+
# Create a new agent config within the given project.
|
|
4134
4134
|
# @param project_key [String] The project key
|
|
4135
|
-
# @param ai_config_post [AIConfigPost]
|
|
4135
|
+
# @param ai_config_post [AIConfigPost] Agent config object to create
|
|
4136
4136
|
# @param [Hash] opts the optional parameters
|
|
4137
4137
|
# @return [AIConfig]
|
|
4138
4138
|
def post_ai_config(project_key, ai_config_post, opts = {})
|
|
@@ -4140,10 +4140,10 @@ module LaunchDarklyApi
|
|
|
4140
4140
|
data
|
|
4141
4141
|
end
|
|
4142
4142
|
|
|
4143
|
-
# Create new
|
|
4144
|
-
# Create a new
|
|
4143
|
+
# Create new agent config
|
|
4144
|
+
# Create a new agent config within the given project.
|
|
4145
4145
|
# @param project_key [String] The project key
|
|
4146
|
-
# @param ai_config_post [AIConfigPost]
|
|
4146
|
+
# @param ai_config_post [AIConfigPost] Agent config object to create
|
|
4147
4147
|
# @param [Hash] opts the optional parameters
|
|
4148
4148
|
# @return [Array<(AIConfig, Integer, Hash)>] AIConfig data, response status code and response headers
|
|
4149
4149
|
def post_ai_config_with_http_info(project_key, ai_config_post, opts = {})
|
|
@@ -4203,11 +4203,11 @@ module LaunchDarklyApi
|
|
|
4203
4203
|
return data, status_code, headers
|
|
4204
4204
|
end
|
|
4205
4205
|
|
|
4206
|
-
# Create
|
|
4207
|
-
# Create a new variation for a given
|
|
4206
|
+
# Create agent config variation
|
|
4207
|
+
# Create a new variation for a given agent config. The <code>model</code> in the request body requires a <code>modelName</code> and <code>parameters</code>, for example: ``` \"model\": { \"modelName\": \"claude-3-opus-20240229\", \"parameters\": { \"max_tokens\": 1024 } } ```
|
|
4208
4208
|
# @param project_key [String] The project key
|
|
4209
|
-
# @param config_key [String] The
|
|
4210
|
-
# @param ai_config_variation_post [AIConfigVariationPost]
|
|
4209
|
+
# @param config_key [String] The agent config key
|
|
4210
|
+
# @param ai_config_variation_post [AIConfigVariationPost] Agent config variation object to create
|
|
4211
4211
|
# @param [Hash] opts the optional parameters
|
|
4212
4212
|
# @return [AIConfigVariation]
|
|
4213
4213
|
def post_ai_config_variation(project_key, config_key, ai_config_variation_post, opts = {})
|
|
@@ -4215,11 +4215,11 @@ module LaunchDarklyApi
|
|
|
4215
4215
|
data
|
|
4216
4216
|
end
|
|
4217
4217
|
|
|
4218
|
-
# Create
|
|
4219
|
-
# Create a new variation for a given
|
|
4218
|
+
# Create agent config variation
|
|
4219
|
+
# Create a new variation for a given agent config. The <code>model</code> in the request body requires a <code>modelName</code> and <code>parameters</code>, for example: ``` \"model\": { \"modelName\": \"claude-3-opus-20240229\", \"parameters\": { \"max_tokens\": 1024 } } ```
|
|
4220
4220
|
# @param project_key [String] The project key
|
|
4221
|
-
# @param config_key [String] The
|
|
4222
|
-
# @param ai_config_variation_post [AIConfigVariationPost]
|
|
4221
|
+
# @param config_key [String] The agent config key
|
|
4222
|
+
# @param ai_config_variation_post [AIConfigVariationPost] Agent config variation object to create
|
|
4223
4223
|
# @param [Hash] opts the optional parameters
|
|
4224
4224
|
# @return [Array<(AIConfigVariation, Integer, Hash)>] AIConfigVariation data, response status code and response headers
|
|
4225
4225
|
def post_ai_config_variation_with_http_info(project_key, config_key, ai_config_variation_post, opts = {})
|