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.
Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +64 -39
  3. data/docs/AIConfig.md +7 -5
  4. data/docs/AIConfigPatch.md +8 -4
  5. data/docs/AIConfigPost.md +8 -6
  6. data/docs/AIConfigTargeting.md +3 -3
  7. data/docs/AIConfigTargetingEnvironmentRule.md +8 -0
  8. data/docs/AIConfigTargetingEnvironmentRuleClause.md +2 -0
  9. data/docs/AIConfigVariation.md +1 -1
  10. data/docs/AIConfigVariationPatch.md +1 -1
  11. data/docs/AgentControlApi.md +110 -110
  12. data/docs/AgentOptimization.md +1 -1
  13. data/docs/AgentOptimizationJudge.md +1 -1
  14. data/docs/AgentOptimizationPost.md +1 -1
  15. data/docs/AgentSkill.md +3 -1
  16. data/docs/AgentSkillPatch.md +3 -1
  17. data/docs/AgentSkillPost.md +3 -1
  18. data/docs/AiConfigsMetricListingRep.md +2 -0
  19. data/docs/ApprovalsApi.md +1 -1
  20. data/docs/CreateFlagReleasePlanRequest.md +32 -0
  21. data/docs/EnvironmentReleasePlan.md +38 -0
  22. data/docs/EnvironmentReleasePlanClause.md +28 -0
  23. data/docs/EnvironmentReleasePlanMetric.md +20 -0
  24. data/docs/EnvironmentReleasePlanPhase.md +24 -0
  25. data/docs/EnvironmentReleasePlanProgressiveRelease.md +26 -0
  26. data/docs/EnvironmentReleasePlanProgressiveReleaseRep.md +26 -0
  27. data/docs/EnvironmentReleasePlanStep.md +22 -0
  28. data/docs/EnvironmentReleasePlans.md +22 -0
  29. data/docs/EnvironmentReleasePlansBetaApi.md +633 -0
  30. data/docs/EnvironmentReleasePlansLink.md +20 -0
  31. data/docs/EnvironmentReleasePlansPaginatedLinks.md +26 -0
  32. data/docs/EnvironmentReleasesMetricListingRep.md +2 -0
  33. data/docs/{ReleaseMethod.md → ExecutionMode.md} +2 -2
  34. data/docs/FeatureFlagsApi.md +1 -1
  35. data/docs/FlagReleasePlan.md +36 -0
  36. data/docs/FlagReleasePlanEnvironment.md +24 -0
  37. data/docs/FlagReleasePlanRequest.md +30 -0
  38. data/docs/FlagReleasePlansBetaApi.md +392 -0
  39. data/docs/FlagReleasePlansError.md +20 -0
  40. data/docs/FlagReleasePlansLink.md +20 -0
  41. data/docs/FlagReleasePlansPaginatedLinks.md +26 -0
  42. data/docs/ListFlagReleasePlansResponse.md +22 -0
  43. data/docs/MaintainerIdentifier.md +79 -0
  44. data/docs/MaintainerIdentifierMember.md +20 -0
  45. data/docs/MaintainerIdentifierTeam.md +20 -0
  46. data/docs/MaintainerResponse.md +79 -0
  47. data/docs/MaintainerResponseMember.md +26 -0
  48. data/docs/MaintainerResponseTeam.md +22 -0
  49. data/docs/PinnedSkillToolRef.md +20 -0
  50. data/docs/PostEnvironmentReleasePlanRequest.md +26 -0
  51. data/docs/PutDefaultEnvironmentReleasePlanRequest.md +18 -0
  52. data/docs/PutEnvironmentReleasePlanRequest.md +26 -0
  53. data/docs/PutFlagReleasePlanRequest.md +32 -0
  54. data/docs/QuickStats.md +2 -2
  55. data/docs/SkillToolRef.md +20 -0
  56. data/docs/ToolReferences.md +5 -1
  57. data/docs/ToolSkillReference.md +22 -0
  58. data/docs/TriggerType.md +15 -0
  59. data/lib/launchdarkly_api/api/agent_control_api.rb +98 -98
  60. data/lib/launchdarkly_api/api/approvals_api.rb +2 -2
  61. data/lib/launchdarkly_api/api/environment_release_plans_beta_api.rb +730 -0
  62. data/lib/launchdarkly_api/api/feature_flags_api.rb +2 -2
  63. data/lib/launchdarkly_api/api/{release_policies_beta_api.rb → flag_release_plans_beta_api.rb} +173 -212
  64. data/lib/launchdarkly_api/models/agent_optimization.rb +1 -1
  65. data/lib/launchdarkly_api/models/agent_optimization_judge.rb +1 -1
  66. data/lib/launchdarkly_api/models/agent_optimization_post.rb +1 -1
  67. data/lib/launchdarkly_api/models/agent_skill.rb +14 -2
  68. data/lib/launchdarkly_api/models/agent_skill_patch.rb +16 -4
  69. data/lib/launchdarkly_api/models/agent_skill_post.rb +16 -4
  70. data/lib/launchdarkly_api/models/ai_config.rb +16 -6
  71. data/lib/launchdarkly_api/models/ai_config_patch.rb +27 -7
  72. data/lib/launchdarkly_api/models/ai_config_post.rb +19 -9
  73. data/lib/launchdarkly_api/models/ai_config_targeting.rb +3 -3
  74. data/lib/launchdarkly_api/models/ai_config_targeting_environment_rule.rb +40 -1
  75. data/lib/launchdarkly_api/models/ai_config_targeting_environment_rule_clause.rb +11 -1
  76. data/lib/launchdarkly_api/models/ai_config_variation.rb +1 -1
  77. data/lib/launchdarkly_api/models/ai_config_variation_patch.rb +1 -1
  78. data/lib/launchdarkly_api/models/ai_configs_metric_listing_rep.rb +11 -1
  79. data/lib/launchdarkly_api/models/create_flag_release_plan_request.rb +335 -0
  80. data/lib/launchdarkly_api/models/environment_release_plan.rb +426 -0
  81. data/lib/launchdarkly_api/models/{release_policies_access_allowed_reason.rb → environment_release_plan_clause.rb} +98 -65
  82. data/lib/launchdarkly_api/models/{release_policies_access_allowed_rep.rb → environment_release_plan_metric.rb} +28 -41
  83. data/lib/launchdarkly_api/models/environment_release_plan_phase.rb +208 -0
  84. data/lib/launchdarkly_api/models/environment_release_plan_progressive_release.rb +285 -0
  85. data/lib/launchdarkly_api/models/{release_policies_access_denied_reason.rb → environment_release_plan_progressive_release_rep.rb} +85 -67
  86. data/lib/launchdarkly_api/models/{release_policy_stage.rb → environment_release_plan_step.rb} +43 -4
  87. data/lib/launchdarkly_api/models/{release_policies_response.rb → environment_release_plans.rb} +16 -7
  88. data/lib/launchdarkly_api/models/{release_policies_access_denied.rb → environment_release_plans_link.rb} +16 -50
  89. data/lib/launchdarkly_api/models/environment_release_plans_paginated_links.rb +200 -0
  90. data/lib/launchdarkly_api/models/environment_releases_metric_listing_rep.rb +11 -1
  91. data/lib/launchdarkly_api/models/{release_method.rb → execution_mode.rb} +6 -7
  92. data/lib/launchdarkly_api/models/expanded_ai_config.rb +1 -1
  93. data/lib/launchdarkly_api/models/flag_release_plan.rb +359 -0
  94. data/lib/launchdarkly_api/models/{put_release_policy_request.rb → flag_release_plan_environment.rb} +47 -65
  95. data/lib/launchdarkly_api/models/{post_release_policy_request.rb → flag_release_plan_request.rb} +64 -67
  96. data/lib/launchdarkly_api/models/flag_release_plans_error.rb +208 -0
  97. data/lib/launchdarkly_api/models/flag_release_plans_link.rb +156 -0
  98. data/lib/launchdarkly_api/models/flag_release_plans_paginated_links.rb +200 -0
  99. data/lib/launchdarkly_api/models/list_flag_release_plans_response.rb +202 -0
  100. data/lib/launchdarkly_api/models/maintainer_identifier.rb +56 -0
  101. data/lib/launchdarkly_api/models/maintainer_identifier_member.rb +214 -0
  102. data/lib/launchdarkly_api/models/{progressive_release_config.rb → maintainer_identifier_team.rb} +66 -32
  103. data/lib/launchdarkly_api/models/maintainer_response.rb +56 -0
  104. data/lib/launchdarkly_api/models/maintainer_response_member.rb +225 -0
  105. data/lib/launchdarkly_api/models/maintainer_response_team.rb +206 -0
  106. data/lib/launchdarkly_api/models/{release_policies_access_rep.rb → pinned_skill_tool_ref.rb} +46 -45
  107. data/lib/launchdarkly_api/models/{release_policy.rb → post_environment_release_plan_request.rb} +93 -120
  108. data/lib/launchdarkly_api/models/{release_policies_access.rb → put_default_environment_release_plan_request.rb} +33 -44
  109. data/lib/launchdarkly_api/models/put_environment_release_plan_request.rb +285 -0
  110. data/lib/launchdarkly_api/models/put_flag_release_plan_request.rb +309 -0
  111. data/lib/launchdarkly_api/models/quick_stats.rb +2 -2
  112. data/lib/launchdarkly_api/models/skill_tool_ref.rb +195 -0
  113. data/lib/launchdarkly_api/models/tool_references.rb +26 -4
  114. data/lib/launchdarkly_api/models/tool_skill_reference.rb +220 -0
  115. data/lib/launchdarkly_api/models/trigger_type.rb +42 -0
  116. data/lib/launchdarkly_api/version.rb +1 -1
  117. data/lib/launchdarkly_api.rb +35 -16
  118. data/spec/api/agent_control_api_spec.rb +49 -49
  119. data/spec/api/approvals_api_spec.rb +1 -1
  120. data/spec/api/environment_release_plans_beta_api_spec.rb +156 -0
  121. data/spec/api/feature_flags_api_spec.rb +1 -1
  122. data/spec/api/{release_policies_beta_api_spec.rb → flag_release_plans_beta_api_spec.rb} +43 -56
  123. data/spec/models/agent_skill_patch_spec.rb +6 -0
  124. data/spec/models/agent_skill_post_spec.rb +6 -0
  125. data/spec/models/agent_skill_spec.rb +6 -0
  126. data/spec/models/ai_config_patch_spec.rb +12 -0
  127. data/spec/models/ai_config_post_spec.rb +6 -0
  128. data/spec/models/ai_config_spec.rb +6 -0
  129. data/spec/models/ai_config_targeting_environment_rule_clause_spec.rb +6 -0
  130. data/spec/models/ai_config_targeting_environment_rule_spec.rb +24 -0
  131. data/spec/models/ai_configs_metric_listing_rep_spec.rb +6 -0
  132. data/spec/models/{release_policy_spec.rb → create_flag_release_plan_request_spec.rb} +13 -19
  133. data/spec/models/{release_policies_access_allowed_reason_spec.rb → environment_release_plan_clause_spec.rb} +16 -16
  134. data/spec/models/{release_policies_access_rep_spec.rb → environment_release_plan_metric_spec.rb} +8 -8
  135. data/spec/models/environment_release_plan_phase_spec.rb +54 -0
  136. data/spec/models/environment_release_plan_progressive_release_rep_spec.rb +68 -0
  137. data/spec/models/environment_release_plan_progressive_release_spec.rb +68 -0
  138. data/spec/models/environment_release_plan_spec.rb +100 -0
  139. data/spec/models/{release_policies_access_allowed_rep_spec.rb → environment_release_plan_step_spec.rb} +14 -8
  140. data/spec/models/{release_policies_access_denied_spec.rb → environment_release_plans_link_spec.rb} +8 -8
  141. data/spec/models/{guarded_release_config_spec.rb → environment_release_plans_paginated_links_spec.rb} +11 -17
  142. data/spec/models/environment_release_plans_spec.rb +48 -0
  143. data/spec/models/environment_releases_metric_listing_rep_spec.rb +6 -0
  144. data/spec/models/{release_method_spec.rb → execution_mode_spec.rb} +6 -6
  145. data/spec/models/flag_release_plan_environment_spec.rb +54 -0
  146. data/spec/models/{release_policies_access_denied_reason_spec.rb → flag_release_plan_request_spec.rb} +18 -16
  147. data/spec/models/flag_release_plan_spec.rb +90 -0
  148. data/spec/models/{release_policy_scope_spec.rb → flag_release_plans_error_spec.rb} +8 -8
  149. data/spec/models/{release_policy_stage_spec.rb → flag_release_plans_link_spec.rb} +8 -8
  150. data/spec/models/{put_release_policy_request_spec.rb → flag_release_plans_paginated_links_spec.rb} +11 -11
  151. data/spec/models/list_flag_release_plans_response_spec.rb +48 -0
  152. data/spec/models/maintainer_identifier_member_spec.rb +46 -0
  153. data/spec/models/maintainer_identifier_spec.rb +44 -0
  154. data/spec/models/{progressive_release_config_spec.rb → maintainer_identifier_team_spec.rb} +12 -8
  155. data/spec/models/maintainer_response_member_spec.rb +64 -0
  156. data/spec/models/maintainer_response_spec.rb +44 -0
  157. data/spec/models/maintainer_response_team_spec.rb +52 -0
  158. data/spec/models/{release_policies_access_spec.rb → pinned_skill_tool_ref_spec.rb} +8 -8
  159. data/spec/models/{post_release_policy_request_spec.rb → post_environment_release_plan_request_spec.rb} +15 -17
  160. data/spec/models/put_default_environment_release_plan_request_spec.rb +36 -0
  161. data/spec/models/put_environment_release_plan_request_spec.rb +64 -0
  162. data/spec/models/put_flag_release_plan_request_spec.rb +78 -0
  163. data/spec/models/{release_policies_response_spec.rb → skill_tool_ref_spec.rb} +8 -8
  164. data/spec/models/tool_references_spec.rb +12 -0
  165. data/spec/models/tool_skill_reference_spec.rb +48 -0
  166. data/spec/models/trigger_type_spec.rb +30 -0
  167. metadata +141 -65
  168. data/docs/GuardedReleaseConfig.md +0 -28
  169. data/docs/PostReleasePolicyRequest.md +0 -28
  170. data/docs/ProgressiveReleaseConfig.md +0 -20
  171. data/docs/PutReleasePolicyRequest.md +0 -26
  172. data/docs/ReleasePoliciesAccess.md +0 -20
  173. data/docs/ReleasePoliciesAccessAllowedReason.md +0 -28
  174. data/docs/ReleasePoliciesAccessAllowedRep.md +0 -20
  175. data/docs/ReleasePoliciesAccessDenied.md +0 -20
  176. data/docs/ReleasePoliciesAccessDeniedReason.md +0 -28
  177. data/docs/ReleasePoliciesAccessRep.md +0 -20
  178. data/docs/ReleasePoliciesBetaApi.md +0 -466
  179. data/docs/ReleasePoliciesResponse.md +0 -20
  180. data/docs/ReleasePolicy.md +0 -34
  181. data/docs/ReleasePolicyScope.md +0 -20
  182. data/docs/ReleasePolicyStage.md +0 -20
  183. data/lib/launchdarkly_api/models/guarded_release_config.rb +0 -224
  184. 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 AI Config
329
- # Delete an existing AI Config.
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 AI Config key
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 AI Config
340
- # Delete an existing AI Config.
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 AI Config key
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 AI Config variation
398
- # Delete a specific variation of an AI Config by config key and variation key.
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 AI Config key
401
- # @param variation_key [String] The AI Config variation key
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 AI Config variation
410
- # Delete a specific variation of an AI Config by config key and variation key.
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 AI Config key
413
- # @param variation_key [String] The AI Config variation key
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 AI Config
973
- # Retrieve a specific AI Config by its key.
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 AI Config key
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 AI Config
984
- # Retrieve a specific AI Config by its key.
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 AI Config key
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 AI Config metrics
1042
- # Retrieve usage metrics for an AI Config by config key.
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 AI Config key
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 &#x60;from&#x60;.
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 AI Config metrics
1058
- # Retrieve usage metrics for an AI Config by config key.
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 AI Config key
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 &#x60;from&#x60;.
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 AI Config metrics by variation
1138
- # Retrieve usage metrics for an AI Config by config key, with results split by variation.
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 AI Config key
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 &#x60;from&#x60;.
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 AI Config metrics by variation
1154
- # Retrieve usage metrics for an AI Config by config key, with results split by variation.
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 AI Config key
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 &#x60;from&#x60;.
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 AI Config quick stats
1234
- # Retrieve aggregate quick stats for AI Configs in a project.
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 AI Config quick stats
1245
- # Retrieve aggregate quick stats for AI Configs in a project.
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 AI Config's targeting
1304
- # Retrieves a specific AI Config's targeting by its key
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 AI Config key
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 AI Config&#39;s targeting
1315
- # Retrieves a specific AI Config&#39;s targeting by its key
1314
+ # Show an agent config&#39;s targeting
1315
+ # Retrieves a specific agent config&#39;s targeting by its key
1316
1316
  # @param project_key [String] The project key
1317
- # @param config_key [String] The AI Config key
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 AI Config variation
1373
- # Get an AI Config variation by key. The response includes all variation versions for the given variation key.
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 AI Config key
1376
- # @param variation_key [String] The AI Config variation key
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 AI Config variation
1385
- # Get an AI Config variation by key. The response includes all variation versions for the given variation key.
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 AI Config key
1388
- # @param variation_key [String] The AI Config variation key
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 AI Configs
1448
- # Get a list of all AI Configs in the given project.
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 AI Configs
1462
- # Get a list of all AI Configs in the given project.
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 &#x60;filter&#x60; parameter supports the following fields and operators: - &#x60;query&#x60; with the &#x60;equals&#x60; operator: case-insensitive substring match on the optimization key, label, or AgentControl config key. - &#x60;aiConfigKey&#x60; with the &#x60;equals&#x60; operator: exact match on the key of the AgentControl config being optimized. Separate multiple fields with a comma, for example &#x60;filter&#x3D;aiConfigKey equals \&quot;my-agent\&quot;,query equals \&quot;tone\&quot;&#x60;.
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 &#x60;limit&#x60; and &#x60;offset&#x60; apply to &#x60;items&#x60; and to &#x60;skills&#x60;, and each list is paged on its own. The pagination links follow whichever list has more entries, so keep requesting &#x60;next&#x60; until both lists are complete, or use &#x60;totalCount&#x60; and &#x60;skillsTotalCount&#x60;.
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 AI Config
3349
- # Edit an existing AI 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\"] } ```
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 AI Config key
3351
+ # @param config_key [String] The agent config key
3352
3352
  # @param [Hash] opts the optional parameters
3353
- # @option opts [AIConfigPatch] :ai_config_patch AI Config object to update
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 AI Config
3361
- # Edit an existing AI 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&#39;s an example: &#x60;&#x60;&#x60; { \&quot;description\&quot;: \&quot;Example updated description\&quot;, \&quot;tags\&quot;: [\&quot;new-tag\&quot;] } &#x60;&#x60;&#x60;
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&#39;s an example: &#x60;&#x60;&#x60; { \&quot;description\&quot;: \&quot;Example updated description\&quot;, \&quot;tags\&quot;: [\&quot;new-tag\&quot;] } &#x60;&#x60;&#x60;
3362
3362
  # @param project_key [String] The project key
3363
- # @param config_key [String] The AI Config key
3363
+ # @param config_key [String] The agent config key
3364
3364
  # @param [Hash] opts the optional parameters
3365
- # @option opts [AIConfigPatch] :ai_config_patch AI Config object to update
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 AI Config targeting
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 AI Config key
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 AI Config targeting semantic patch instructions
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 AI Config targeting
3437
- # Perform a partial update to an AI Config&#39;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 &#x60;domain-model&#x3D;launchdarkly.semanticpatch&#x60; to your &#x60;Content-Type&#x60; 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&#39;s targeting takes the following properties: * &#x60;comment&#x60; (string): (Optional) A description of the update. * &#x60;environmentKey&#x60; (string): The key of the LaunchDarkly environment. * &#x60;instructions&#x60; (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a &#x60;kind&#x60; 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 &#x60;kind&#x60; instructions for updating AI Configs. &lt;details&gt; &lt;summary&gt;Click to expand instructions for &lt;strong&gt;working with targeting and variations&lt;/strong&gt; for AI Configs&lt;/summary&gt; #### addClauses Adds the given clauses to the rule indicated by &#x60;ruleId&#x60;. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule in the AI Config. - &#x60;clauses&#x60;: Array of clause objects, with &#x60;contextKind&#x60; (string), &#x60;attribute&#x60; (string), &#x60;op&#x60; (string), &#x60;negate&#x60; (boolean), and &#x60;values&#x60; (array of strings, numbers, or dates) properties. The &#x60;contextKind&#x60;, &#x60;attribute&#x60;, and &#x60;values&#x60; are case sensitive. The &#x60;op&#x60; must be lower-case. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;addClauses\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;clauses\&quot;: [{ \&quot;contextKind\&quot;: \&quot;user\&quot;, \&quot;attribute\&quot;: \&quot;country\&quot;, \&quot;op\&quot;: \&quot;in\&quot;, \&quot;negate\&quot;: false, \&quot;values\&quot;: [\&quot;USA\&quot;, \&quot;Canada\&quot;] }] }] } &#x60;&#x60;&#x60; #### addRule Adds a new targeting rule to the AI Config. The rule may contain &#x60;clauses&#x60; and serve the variation that &#x60;variationId&#x60; indicates, or serve a percentage rollout that &#x60;rolloutWeights&#x60;, &#x60;rolloutBucketBy&#x60;, and &#x60;rolloutContextKind&#x60; indicate. If you set &#x60;beforeRuleId&#x60;, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - &#x60;clauses&#x60;: Array of clause objects, with &#x60;contextKind&#x60; (string), &#x60;attribute&#x60; (string), &#x60;op&#x60; (string), &#x60;negate&#x60; (boolean), and &#x60;values&#x60; (array of strings, numbers, or dates) properties. The &#x60;contextKind&#x60;, &#x60;attribute&#x60;, and &#x60;values&#x60; are case sensitive. The &#x60;op&#x60; must be lower-case. - &#x60;beforeRuleId&#x60;: (Optional) ID of a rule. - Either - &#x60;variationId&#x60;: ID of a variation. or - &#x60;rolloutWeights&#x60;: (Optional) Map of &#x60;variationId&#x60; to weight, in thousandths of a percent (0-100000). - &#x60;rolloutBucketBy&#x60;: (Optional) Context attribute available in the specified &#x60;rolloutContextKind&#x60;. - &#x60;rolloutContextKind&#x60;: (Optional) Context kind, defaults to &#x60;user&#x60; Here&#39;s an example that uses a &#x60;variationId&#x60;: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;addRule\&quot;, \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot;, \&quot;clauses\&quot;: [{ \&quot;contextKind\&quot;: \&quot;organization\&quot;, \&quot;attribute\&quot;: \&quot;located_in\&quot;, \&quot;op\&quot;: \&quot;in\&quot;, \&quot;negate\&quot;: false, \&quot;values\&quot;: [\&quot;Sweden\&quot;, \&quot;Norway\&quot;] }] }] } &#x60;&#x60;&#x60; Here&#39;s an example that uses a percentage rollout: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;addRule\&quot;, \&quot;clauses\&quot;: [{ \&quot;contextKind\&quot;: \&quot;organization\&quot;, \&quot;attribute\&quot;: \&quot;located_in\&quot;, \&quot;op\&quot;: \&quot;in\&quot;, \&quot;negate\&quot;: false, \&quot;values\&quot;: [\&quot;Sweden\&quot;, \&quot;Norway\&quot;] }], \&quot;rolloutContextKind\&quot;: \&quot;organization\&quot;, \&quot;rolloutWeights\&quot;: { \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot;: 15000, // serve 15% this variation \&quot;e5830889-1ec5-4b0c-9cc9-c48790090c43\&quot;: 85000 // serve 85% this variation } }] } &#x60;&#x60;&#x60; #### addTargets Adds context keys to the individual context targets for the context kind that &#x60;contextKind&#x60; specifies and the variation that &#x60;variationId&#x60; specifies. Returns an error if this causes the AI Config to target the same context key in multiple variations. ##### Parameters - &#x60;values&#x60;: List of context keys. - &#x60;contextKind&#x60;: (Optional) Context kind to target, defaults to &#x60;user&#x60; - &#x60;variationId&#x60;: ID of a variation. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;addTargets\&quot;, \&quot;values\&quot;: [\&quot;context-key-123abc\&quot;, \&quot;context-key-456def\&quot;], \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot; }] } &#x60;&#x60;&#x60; #### addValuesToClause Adds &#x60;values&#x60; to the values of the clause that &#x60;ruleId&#x60; and &#x60;clauseId&#x60; indicate. Does not update the context kind, attribute, or operator. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule in the AI Config. - &#x60;clauseId&#x60;: ID of a clause in that rule. - &#x60;values&#x60;: Array of strings, case sensitive. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;addValuesToClause\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;clauseId\&quot;: \&quot;10a58772-3121-400f-846b-b8a04e8944ed\&quot;, \&quot;values\&quot;: [\&quot;beta_testers\&quot;] }] } &#x60;&#x60;&#x60; #### clearTargets Removes all individual targets from the variation that &#x60;variationId&#x60; specifies. This includes both user and non-user targets. ##### Parameters - &#x60;variationId&#x60;: ID of a variation. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;clearTargets\&quot;, \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot; } ] } &#x60;&#x60;&#x60; #### removeClauses Removes the clauses specified by &#x60;clauseIds&#x60; from the rule indicated by &#x60;ruleId&#x60;. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule. - &#x60;clauseIds&#x60;: Array of IDs of clauses in the rule. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;removeClauses\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;clauseIds\&quot;: [\&quot;10a58772-3121-400f-846b-b8a04e8944ed\&quot;, \&quot;36a461dc-235e-4b08-97b9-73ce9365873e\&quot;] }] } &#x60;&#x60;&#x60; #### removeRule Removes the targeting rule specified by &#x60;ruleId&#x60;. Does nothing if the rule does not exist. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;removeRule\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot; } ] } &#x60;&#x60;&#x60; #### removeTargets Removes context keys from the individual context targets for the context kind that &#x60;contextKind&#x60; specifies and the variation that &#x60;variationId&#x60; specifies. Does nothing if the flag does not target the context keys. ##### Parameters - &#x60;values&#x60;: List of context keys. - &#x60;contextKind&#x60;: (Optional) Context kind to target, defaults to &#x60;user&#x60; - &#x60;variationId&#x60;: ID of a variation. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;removeTargets\&quot;, \&quot;values\&quot;: [\&quot;context-key-123abc\&quot;, \&quot;context-key-456def\&quot;], \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot; }] } &#x60;&#x60;&#x60; #### removeValuesFromClause Removes &#x60;values&#x60; from the values of the clause indicated by &#x60;ruleId&#x60; and &#x60;clauseId&#x60;. Does not update the context kind, attribute, or operator. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule. - &#x60;clauseId&#x60;: ID of a clause in that rule. - &#x60;values&#x60;: Array of strings, case sensitive. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;removeValuesFromClause\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;clauseId\&quot;: \&quot;10a58772-3121-400f-846b-b8a04e8944ed\&quot;, \&quot;values\&quot;: [\&quot;beta_testers\&quot;] }] } &#x60;&#x60;&#x60; #### reorderRules Rearranges the rules to match the order given in &#x60;ruleIds&#x60;. Returns an error if &#x60;ruleIds&#x60; does not match the current set of rules on the AI Config. ##### Parameters - &#x60;ruleIds&#x60;: Array of IDs of all rules. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;reorderRules\&quot;, \&quot;ruleIds\&quot;: [\&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;63c238d1-835d-435e-8f21-c8d5e40b2a3d\&quot;] }] } &#x60;&#x60;&#x60; #### replaceRules Removes all targeting rules for the AI Config and replaces them with the list you provide. ##### Parameters - &#x60;rules&#x60;: A list of rules. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;replaceRules\&quot;, \&quot;rules\&quot;: [ { \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot;, \&quot;description\&quot;: \&quot;My new rule\&quot;, \&quot;clauses\&quot;: [ { \&quot;contextKind\&quot;: \&quot;user\&quot;, \&quot;attribute\&quot;: \&quot;segmentMatch\&quot;, \&quot;op\&quot;: \&quot;segmentMatch\&quot;, \&quot;values\&quot;: [\&quot;test\&quot;] } ] } ] } ] } &#x60;&#x60;&#x60; #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - &#x60;targets&#x60;: A list of context targeting. Each item in the list includes an optional &#x60;contextKind&#x60; that defaults to &#x60;user&#x60;, a required &#x60;variationId&#x60;, and a required list of &#x60;values&#x60;. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;replaceTargets\&quot;, \&quot;targets\&quot;: [ { \&quot;contextKind\&quot;: \&quot;user\&quot;, \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot;, \&quot;values\&quot;: [\&quot;user-key-123abc\&quot;] }, { \&quot;contextKind\&quot;: \&quot;device\&quot;, \&quot;variationId\&quot;: \&quot;e5830889-1ec5-4b0c-9cc9-c48790090c43\&quot;, \&quot;values\&quot;: [\&quot;device-key-456def\&quot;] } ] } ] } &#x60;&#x60;&#x60; #### updateClause Replaces the clause indicated by &#x60;ruleId&#x60; and &#x60;clauseId&#x60; with &#x60;clause&#x60;. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule. - &#x60;clauseId&#x60;: ID of a clause in that rule. - &#x60;clause&#x60;: New &#x60;clause&#x60; object, with &#x60;contextKind&#x60; (string), &#x60;attribute&#x60; (string), &#x60;op&#x60; (string), &#x60;negate&#x60; (boolean), and &#x60;values&#x60; (array of strings, numbers, or dates) properties. The &#x60;contextKind&#x60;, &#x60;attribute&#x60;, and &#x60;values&#x60; are case sensitive. The &#x60;op&#x60; must be lower-case. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;updateClause\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;clauseId\&quot;: \&quot;10c7462a-2062-45ba-a8bb-dfb3de0f8af5\&quot;, \&quot;clause\&quot;: { \&quot;contextKind\&quot;: \&quot;user\&quot;, \&quot;attribute\&quot;: \&quot;country\&quot;, \&quot;op\&quot;: \&quot;in\&quot;, \&quot;negate\&quot;: false, \&quot;values\&quot;: [\&quot;Mexico\&quot;, \&quot;Canada\&quot;] } }] } &#x60;&#x60;&#x60; #### updateDefaultVariation Updates the default on or off variation of the AI Config. ##### Parameters - &#x60;onVariationValue&#x60;: (Optional) The value of the variation of the new on variation. - &#x60;offVariationValue&#x60;: (Optional) The value of the variation of the new off variation Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;updateDefaultVariation\&quot;, \&quot;OnVariationValue\&quot;: true, \&quot;OffVariationValue\&quot;: false } ] } &#x60;&#x60;&#x60; #### updateFallthroughVariationOrRollout Updates the default or \&quot;fallthrough\&quot; 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 &#x60;variationId&#x60; indicates, or a percentage rollout that &#x60;rolloutWeights&#x60; and &#x60;rolloutBucketBy&#x60; indicate. ##### Parameters - &#x60;variationId&#x60;: ID of a variation. or - &#x60;rolloutWeights&#x60;: Map of &#x60;variationId&#x60; to weight, in thousandths of a percent (0-100000). - &#x60;rolloutBucketBy&#x60;: (Optional) Context attribute available in the specified &#x60;rolloutContextKind&#x60;. - &#x60;rolloutContextKind&#x60;: (Optional) Context kind, defaults to &#x60;user&#x60; Here&#39;s an example that uses a &#x60;variationId&#x60;: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;updateFallthroughVariationOrRollout\&quot;, \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot; }] } &#x60;&#x60;&#x60; Here&#39;s an example that uses a percentage rollout: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;updateFallthroughVariationOrRollout\&quot;, \&quot;rolloutContextKind\&quot;: \&quot;user\&quot;, \&quot;rolloutWeights\&quot;: { \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot;: 15000, // serve 15% this variation \&quot;e5830889-1ec5-4b0c-9cc9-c48790090c43\&quot;: 85000 // serve 85% this variation } }] } &#x60;&#x60;&#x60; #### updateOffVariation Updates the default off variation to &#x60;variationId&#x60;. The AI Config serves the default off variation when the AI Config&#39;s targeting is **Off**. ##### Parameters - &#x60;variationId&#x60;: ID of a variation. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;updateOffVariation\&quot;, \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot; } ] } &#x60;&#x60;&#x60; #### updateRuleDescription Updates the description of the targeting rule. ##### Parameters - &#x60;description&#x60;: The new human-readable description for this rule. - &#x60;ruleId&#x60;: The ID of the rule. You can retrieve this by making a GET request for the AI Config. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;updateRuleDescription\&quot;, \&quot;description\&quot;: \&quot;New rule description\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot; }] } &#x60;&#x60;&#x60; #### updateRuleTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config associated with this rule. ##### Parameters - &#x60;ruleId&#x60;: The ID of the rule. You can retrieve this by making a GET request for the AI Config. - &#x60;trackEvents&#x60;: Whether or not events are tracked. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;updateRuleTrackEvents\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;trackEvents\&quot;: true }] } &#x60;&#x60;&#x60; #### updateRuleVariationOrRollout Updates what &#x60;ruleId&#x60; serves when its clauses evaluate to true. The rule can serve either the variation that &#x60;variationId&#x60; indicates, or a percent rollout that &#x60;rolloutWeights&#x60; and &#x60;rolloutBucketBy&#x60; indicate. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule. - &#x60;variationId&#x60;: ID of a variation. or - &#x60;rolloutWeights&#x60;: Map of &#x60;variationId&#x60; to weight, in thousandths of a percent (0-100000). - &#x60;rolloutBucketBy&#x60;: (Optional) Context attribute available in the specified &#x60;rolloutContextKind&#x60;. - &#x60;rolloutContextKind&#x60;: (Optional) Context kind, defaults to &#x60;user&#x60; Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;updateRuleVariationOrRollout\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot; }] } &#x60;&#x60;&#x60; #### updateTrackEvents Updates whether or not LaunchDarkly tracks events for the AI Config, for all rules. ##### Parameters - &#x60;trackEvents&#x60;: Whether or not events are tracked. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;updateTrackEvents\&quot;, \&quot;trackEvents\&quot;: true } ] } &#x60;&#x60;&#x60; #### updateTrackEventsFallthrough Updates whether or not LaunchDarkly tracks events for the AI Config, for the default rule. ##### Parameters - &#x60;trackEvents&#x60;: Whether or not events are tracked. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;updateTrackEventsFallthrough\&quot;, \&quot;trackEvents\&quot;: true } ] } &#x60;&#x60;&#x60; &lt;/details&gt;
3436
+ # Update agent config targeting
3437
+ # Perform a partial update to an agent config&#39;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 &#x60;domain-model&#x3D;launchdarkly.semanticpatch&#x60; to your &#x60;Content-Type&#x60; 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&#39;s targeting takes the following properties: * &#x60;comment&#x60; (string): (Optional) A description of the update. * &#x60;environmentKey&#x60; (string): The key of the LaunchDarkly environment. * &#x60;instructions&#x60; (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a &#x60;kind&#x60; 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 &#x60;kind&#x60; instructions for updating agent configs. &lt;details&gt; &lt;summary&gt;Click to expand instructions for &lt;strong&gt;working with targeting and variations&lt;/strong&gt; for agent configs&lt;/summary&gt; #### addClauses Adds the given clauses to the rule indicated by &#x60;ruleId&#x60;. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule in the agent config. - &#x60;clauses&#x60;: Array of clause objects, with &#x60;contextKind&#x60; (string), &#x60;attribute&#x60; (string), &#x60;op&#x60; (string), &#x60;negate&#x60; (boolean), and &#x60;values&#x60; (array of strings, numbers, or dates) properties. The &#x60;contextKind&#x60;, &#x60;attribute&#x60;, and &#x60;values&#x60; are case sensitive. The &#x60;op&#x60; must be lower-case. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;addClauses\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;clauses\&quot;: [{ \&quot;contextKind\&quot;: \&quot;user\&quot;, \&quot;attribute\&quot;: \&quot;country\&quot;, \&quot;op\&quot;: \&quot;in\&quot;, \&quot;negate\&quot;: false, \&quot;values\&quot;: [\&quot;USA\&quot;, \&quot;Canada\&quot;] }] }] } &#x60;&#x60;&#x60; #### addRule Adds a new targeting rule to the agent config. The rule may contain &#x60;clauses&#x60; and serve the variation that &#x60;variationId&#x60; indicates, or serve a percentage rollout that &#x60;rolloutWeights&#x60;, &#x60;rolloutBucketBy&#x60;, and &#x60;rolloutContextKind&#x60; indicate. If you set &#x60;beforeRuleId&#x60;, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - &#x60;clauses&#x60;: Array of clause objects, with &#x60;contextKind&#x60; (string), &#x60;attribute&#x60; (string), &#x60;op&#x60; (string), &#x60;negate&#x60; (boolean), and &#x60;values&#x60; (array of strings, numbers, or dates) properties. The &#x60;contextKind&#x60;, &#x60;attribute&#x60;, and &#x60;values&#x60; are case sensitive. The &#x60;op&#x60; must be lower-case. - &#x60;beforeRuleId&#x60;: (Optional) ID of a rule. - Either - &#x60;variationId&#x60;: ID of a variation. or - &#x60;rolloutWeights&#x60;: (Optional) Map of &#x60;variationId&#x60; to weight, in thousandths of a percent (0-100000). - &#x60;rolloutBucketBy&#x60;: (Optional) Context attribute available in the specified &#x60;rolloutContextKind&#x60;. - &#x60;rolloutContextKind&#x60;: (Optional) Context kind, defaults to &#x60;user&#x60; Here&#39;s an example that uses a &#x60;variationId&#x60;: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;addRule\&quot;, \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot;, \&quot;clauses\&quot;: [{ \&quot;contextKind\&quot;: \&quot;organization\&quot;, \&quot;attribute\&quot;: \&quot;located_in\&quot;, \&quot;op\&quot;: \&quot;in\&quot;, \&quot;negate\&quot;: false, \&quot;values\&quot;: [\&quot;Sweden\&quot;, \&quot;Norway\&quot;] }] }] } &#x60;&#x60;&#x60; Here&#39;s an example that uses a percentage rollout: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;addRule\&quot;, \&quot;clauses\&quot;: [{ \&quot;contextKind\&quot;: \&quot;organization\&quot;, \&quot;attribute\&quot;: \&quot;located_in\&quot;, \&quot;op\&quot;: \&quot;in\&quot;, \&quot;negate\&quot;: false, \&quot;values\&quot;: [\&quot;Sweden\&quot;, \&quot;Norway\&quot;] }], \&quot;rolloutContextKind\&quot;: \&quot;organization\&quot;, \&quot;rolloutWeights\&quot;: { \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot;: 15000, // serve 15% this variation \&quot;e5830889-1ec5-4b0c-9cc9-c48790090c43\&quot;: 85000 // serve 85% this variation } }] } &#x60;&#x60;&#x60; #### addTargets Adds context keys to the individual context targets for the context kind that &#x60;contextKind&#x60; specifies and the variation that &#x60;variationId&#x60; specifies. Returns an error if this causes the agent config to target the same context key in multiple variations. ##### Parameters - &#x60;values&#x60;: List of context keys. - &#x60;contextKind&#x60;: (Optional) Context kind to target, defaults to &#x60;user&#x60; - &#x60;variationId&#x60;: ID of a variation. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;addTargets\&quot;, \&quot;values\&quot;: [\&quot;context-key-123abc\&quot;, \&quot;context-key-456def\&quot;], \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot; }] } &#x60;&#x60;&#x60; #### addValuesToClause Adds &#x60;values&#x60; to the values of the clause that &#x60;ruleId&#x60; and &#x60;clauseId&#x60; indicate. Does not update the context kind, attribute, or operator. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule in the agent config. - &#x60;clauseId&#x60;: ID of a clause in that rule. - &#x60;values&#x60;: Array of strings, case sensitive. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;addValuesToClause\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;clauseId\&quot;: \&quot;10a58772-3121-400f-846b-b8a04e8944ed\&quot;, \&quot;values\&quot;: [\&quot;beta_testers\&quot;] }] } &#x60;&#x60;&#x60; #### clearTargets Removes all individual targets from the variation that &#x60;variationId&#x60; specifies. This includes both user and non-user targets. ##### Parameters - &#x60;variationId&#x60;: ID of a variation. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;clearTargets\&quot;, \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot; } ] } &#x60;&#x60;&#x60; #### removeClauses Removes the clauses specified by &#x60;clauseIds&#x60; from the rule indicated by &#x60;ruleId&#x60;. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule. - &#x60;clauseIds&#x60;: Array of IDs of clauses in the rule. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;removeClauses\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;clauseIds\&quot;: [\&quot;10a58772-3121-400f-846b-b8a04e8944ed\&quot;, \&quot;36a461dc-235e-4b08-97b9-73ce9365873e\&quot;] }] } &#x60;&#x60;&#x60; #### removeRule Removes the targeting rule specified by &#x60;ruleId&#x60;. Does nothing if the rule does not exist. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;removeRule\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot; } ] } &#x60;&#x60;&#x60; #### removeTargets Removes context keys from the individual context targets for the context kind that &#x60;contextKind&#x60; specifies and the variation that &#x60;variationId&#x60; specifies. Does nothing if the flag does not target the context keys. ##### Parameters - &#x60;values&#x60;: List of context keys. - &#x60;contextKind&#x60;: (Optional) Context kind to target, defaults to &#x60;user&#x60; - &#x60;variationId&#x60;: ID of a variation. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;removeTargets\&quot;, \&quot;values\&quot;: [\&quot;context-key-123abc\&quot;, \&quot;context-key-456def\&quot;], \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot; }] } &#x60;&#x60;&#x60; #### removeValuesFromClause Removes &#x60;values&#x60; from the values of the clause indicated by &#x60;ruleId&#x60; and &#x60;clauseId&#x60;. Does not update the context kind, attribute, or operator. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule. - &#x60;clauseId&#x60;: ID of a clause in that rule. - &#x60;values&#x60;: Array of strings, case sensitive. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;removeValuesFromClause\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;clauseId\&quot;: \&quot;10a58772-3121-400f-846b-b8a04e8944ed\&quot;, \&quot;values\&quot;: [\&quot;beta_testers\&quot;] }] } &#x60;&#x60;&#x60; #### reorderRules Rearranges the rules to match the order given in &#x60;ruleIds&#x60;. Returns an error if &#x60;ruleIds&#x60; does not match the current set of rules on the agent config. ##### Parameters - &#x60;ruleIds&#x60;: Array of IDs of all rules. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;reorderRules\&quot;, \&quot;ruleIds\&quot;: [\&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;63c238d1-835d-435e-8f21-c8d5e40b2a3d\&quot;] }] } &#x60;&#x60;&#x60; #### replaceRules Removes all targeting rules for the agent config and replaces them with the list you provide. ##### Parameters - &#x60;rules&#x60;: A list of rules. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;replaceRules\&quot;, \&quot;rules\&quot;: [ { \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot;, \&quot;description\&quot;: \&quot;My new rule\&quot;, \&quot;clauses\&quot;: [ { \&quot;contextKind\&quot;: \&quot;user\&quot;, \&quot;attribute\&quot;: \&quot;segmentMatch\&quot;, \&quot;op\&quot;: \&quot;segmentMatch\&quot;, \&quot;values\&quot;: [\&quot;test\&quot;] } ] } ] } ] } &#x60;&#x60;&#x60; #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - &#x60;targets&#x60;: A list of context targeting. Each item in the list includes an optional &#x60;contextKind&#x60; that defaults to &#x60;user&#x60;, a required &#x60;variationId&#x60;, and a required list of &#x60;values&#x60;. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;replaceTargets\&quot;, \&quot;targets\&quot;: [ { \&quot;contextKind\&quot;: \&quot;user\&quot;, \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot;, \&quot;values\&quot;: [\&quot;user-key-123abc\&quot;] }, { \&quot;contextKind\&quot;: \&quot;device\&quot;, \&quot;variationId\&quot;: \&quot;e5830889-1ec5-4b0c-9cc9-c48790090c43\&quot;, \&quot;values\&quot;: [\&quot;device-key-456def\&quot;] } ] } ] } &#x60;&#x60;&#x60; #### updateClause Replaces the clause indicated by &#x60;ruleId&#x60; and &#x60;clauseId&#x60; with &#x60;clause&#x60;. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule. - &#x60;clauseId&#x60;: ID of a clause in that rule. - &#x60;clause&#x60;: New &#x60;clause&#x60; object, with &#x60;contextKind&#x60; (string), &#x60;attribute&#x60; (string), &#x60;op&#x60; (string), &#x60;negate&#x60; (boolean), and &#x60;values&#x60; (array of strings, numbers, or dates) properties. The &#x60;contextKind&#x60;, &#x60;attribute&#x60;, and &#x60;values&#x60; are case sensitive. The &#x60;op&#x60; must be lower-case. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;updateClause\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;clauseId\&quot;: \&quot;10c7462a-2062-45ba-a8bb-dfb3de0f8af5\&quot;, \&quot;clause\&quot;: { \&quot;contextKind\&quot;: \&quot;user\&quot;, \&quot;attribute\&quot;: \&quot;country\&quot;, \&quot;op\&quot;: \&quot;in\&quot;, \&quot;negate\&quot;: false, \&quot;values\&quot;: [\&quot;Mexico\&quot;, \&quot;Canada\&quot;] } }] } &#x60;&#x60;&#x60; #### updateDefaultVariation Updates the default on or off variation of the agent config. ##### Parameters - &#x60;onVariationValue&#x60;: (Optional) The value of the variation of the new on variation. - &#x60;offVariationValue&#x60;: (Optional) The value of the variation of the new off variation Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;updateDefaultVariation\&quot;, \&quot;OnVariationValue\&quot;: true, \&quot;OffVariationValue\&quot;: false } ] } &#x60;&#x60;&#x60; #### updateFallthroughVariationOrRollout Updates the default or \&quot;fallthrough\&quot; 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 &#x60;variationId&#x60; indicates, or a percentage rollout that &#x60;rolloutWeights&#x60; and &#x60;rolloutBucketBy&#x60; indicate. ##### Parameters - &#x60;variationId&#x60;: ID of a variation. or - &#x60;rolloutWeights&#x60;: Map of &#x60;variationId&#x60; to weight, in thousandths of a percent (0-100000). - &#x60;rolloutBucketBy&#x60;: (Optional) Context attribute available in the specified &#x60;rolloutContextKind&#x60;. - &#x60;rolloutContextKind&#x60;: (Optional) Context kind, defaults to &#x60;user&#x60; Here&#39;s an example that uses a &#x60;variationId&#x60;: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;updateFallthroughVariationOrRollout\&quot;, \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot; }] } &#x60;&#x60;&#x60; Here&#39;s an example that uses a percentage rollout: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;updateFallthroughVariationOrRollout\&quot;, \&quot;rolloutContextKind\&quot;: \&quot;user\&quot;, \&quot;rolloutWeights\&quot;: { \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot;: 15000, // serve 15% this variation \&quot;e5830889-1ec5-4b0c-9cc9-c48790090c43\&quot;: 85000 // serve 85% this variation } }] } &#x60;&#x60;&#x60; #### updateOffVariation Updates the default off variation to &#x60;variationId&#x60;. The agent config serves the default off variation when the agent config&#39;s targeting is **Off**. ##### Parameters - &#x60;variationId&#x60;: ID of a variation. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;updateOffVariation\&quot;, \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot; } ] } &#x60;&#x60;&#x60; #### updateRuleDescription Updates the description of the targeting rule. ##### Parameters - &#x60;description&#x60;: The new human-readable description for this rule. - &#x60;ruleId&#x60;: The ID of the rule. You can retrieve this by making a GET request for the agent config. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;updateRuleDescription\&quot;, \&quot;description\&quot;: \&quot;New rule description\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot; }] } &#x60;&#x60;&#x60; #### updateRuleTrackEvents Updates whether or not LaunchDarkly tracks events for the agent config associated with this rule. ##### Parameters - &#x60;ruleId&#x60;: The ID of the rule. You can retrieve this by making a GET request for the agent config. - &#x60;trackEvents&#x60;: Whether or not events are tracked. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;updateRuleTrackEvents\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;trackEvents\&quot;: true }] } &#x60;&#x60;&#x60; #### updateRuleVariationOrRollout Updates what &#x60;ruleId&#x60; serves when its clauses evaluate to true. The rule can serve either the variation that &#x60;variationId&#x60; indicates, or a percent rollout that &#x60;rolloutWeights&#x60; and &#x60;rolloutBucketBy&#x60; indicate. ##### Parameters - &#x60;ruleId&#x60;: ID of a rule. - &#x60;variationId&#x60;: ID of a variation. or - &#x60;rolloutWeights&#x60;: Map of &#x60;variationId&#x60; to weight, in thousandths of a percent (0-100000). - &#x60;rolloutBucketBy&#x60;: (Optional) Context attribute available in the specified &#x60;rolloutContextKind&#x60;. - &#x60;rolloutContextKind&#x60;: (Optional) Context kind, defaults to &#x60;user&#x60; Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;updateRuleVariationOrRollout\&quot;, \&quot;ruleId\&quot;: \&quot;a902ef4a-2faf-4eaf-88e1-ecc356708a29\&quot;, \&quot;variationId\&quot;: \&quot;2f43f67c-3e4e-4945-a18a-26559378ca00\&quot; }] } &#x60;&#x60;&#x60; #### updateTrackEvents Updates whether or not LaunchDarkly tracks events for the agent config, for all rules. ##### Parameters - &#x60;trackEvents&#x60;: Whether or not events are tracked. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;updateTrackEvents\&quot;, \&quot;trackEvents\&quot;: true } ] } &#x60;&#x60;&#x60; #### updateTrackEventsFallthrough Updates whether or not LaunchDarkly tracks events for the agent config, for the default rule. ##### Parameters - &#x60;trackEvents&#x60;: Whether or not events are tracked. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;environmentKey\&quot;: \&quot;environment-key-123abc\&quot;, \&quot;instructions\&quot;: [ { \&quot;kind\&quot;: \&quot;updateTrackEventsFallthrough\&quot;, \&quot;trackEvents\&quot;: true } ] } &#x60;&#x60;&#x60; &lt;/details&gt;
3438
3438
  # @param project_key [String] The project key
3439
- # @param config_key [String] The AI Config key
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 AI Config targeting semantic patch instructions
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 AI Config variation
3501
- # Edit an existing variation of an AI 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 AI 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\" } ] } ```
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 AI Config key
3504
- # @param variation_key [String] The AI Config variation key
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 AI Config variation object to update
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 AI Config variation
3514
- # Edit an existing variation of an AI 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 AI Config, this endpoint returns 403 and the change must be submitted through an approval request. Here&#39;s an example: &#x60;&#x60;&#x60; { \&quot;messages\&quot;: [ { \&quot;role\&quot;: \&quot;system\&quot;, \&quot;content\&quot;: \&quot;The new message\&quot; } ] } &#x60;&#x60;&#x60;
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&#39;s an example: &#x60;&#x60;&#x60; { \&quot;messages\&quot;: [ { \&quot;role\&quot;: \&quot;system\&quot;, \&quot;content\&quot;: \&quot;The new message\&quot; } ] } &#x60;&#x60;&#x60;
3515
3515
  # @param project_key [String] The project key
3516
- # @param config_key [String] The AI Config key
3517
- # @param variation_key [String] The AI Config variation key
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 AI Config variation object to update
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 AI Config
4133
- # Create a new AI Config within the given project.
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] AI Config object to create
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 AI Config
4144
- # Create a new AI Config within the given project.
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] AI Config object to create
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 AI Config variation
4207
- # Create a new variation for a given AI 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 } } ```
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 AI Config key
4210
- # @param ai_config_variation_post [AIConfigVariationPost] AI Config variation object to create
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 AI Config variation
4219
- # Create a new variation for a given AI Config. The &lt;code&gt;model&lt;/code&gt; in the request body requires a &lt;code&gt;modelName&lt;/code&gt; and &lt;code&gt;parameters&lt;/code&gt;, for example: &#x60;&#x60;&#x60; \&quot;model\&quot;: { \&quot;modelName\&quot;: \&quot;claude-3-opus-20240229\&quot;, \&quot;parameters\&quot;: { \&quot;max_tokens\&quot;: 1024 } } &#x60;&#x60;&#x60;
4218
+ # Create agent config variation
4219
+ # Create a new variation for a given agent config. The &lt;code&gt;model&lt;/code&gt; in the request body requires a &lt;code&gt;modelName&lt;/code&gt; and &lt;code&gt;parameters&lt;/code&gt;, for example: &#x60;&#x60;&#x60; \&quot;model\&quot;: { \&quot;modelName\&quot;: \&quot;claude-3-opus-20240229\&quot;, \&quot;parameters\&quot;: { \&quot;max_tokens\&quot;: 1024 } } &#x60;&#x60;&#x60;
4220
4220
  # @param project_key [String] The project key
4221
- # @param config_key [String] The AI Config key
4222
- # @param ai_config_variation_post [AIConfigVariationPost] AI Config variation object to create
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 = {})