launchdarkly_api 18.1.0 → 20.0.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 (114) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -10
  3. data/docs/AIConfig.md +3 -1
  4. data/docs/AIConfigPost.md +3 -1
  5. data/docs/AIConfigsBetaApi.md +387 -0
  6. data/docs/AccountUsageBetaApi.md +182 -0
  7. data/docs/AgentGraph.md +30 -0
  8. data/docs/AgentGraphEdge.md +24 -0
  9. data/docs/AgentGraphEdgePost.md +24 -0
  10. data/docs/AgentGraphPatch.md +24 -0
  11. data/docs/AgentGraphPost.md +26 -0
  12. data/docs/AgentGraphs.md +22 -0
  13. data/docs/AiConfigsMetricDataSourceRefRep.md +1 -1
  14. data/docs/AiConfigsMetricListingRep.md +1 -1
  15. data/docs/DataExportDestinationsApi.md +74 -0
  16. data/docs/FeatureFlagsApi.md +5 -3
  17. data/docs/GenerateTrustPolicyPostRep.md +18 -0
  18. data/docs/GuardedReleaseConfig.md +10 -2
  19. data/docs/IterationInput.md +0 -2
  20. data/docs/IterationRep.md +1 -3
  21. data/docs/MetricDataSourceRefRep.md +1 -1
  22. data/docs/MetricGroupRep.md +1 -5
  23. data/docs/MetricListingRep.md +1 -1
  24. data/docs/MetricRep.md +1 -1
  25. data/docs/Metrics.md +7 -1
  26. data/docs/MetricsApi.md +3 -3
  27. data/docs/PostReleasePolicyRequest.md +2 -2
  28. data/docs/ProgressiveReleaseConfig.md +20 -0
  29. data/docs/PutReleasePolicyRequest.md +2 -2
  30. data/docs/RelayAutoConfigRep.md +1 -1
  31. data/docs/ReleasePolicy.md +2 -2
  32. data/docs/ReleasePolicyScope.md +3 -1
  33. data/docs/ReleasePolicyStage.md +20 -0
  34. data/docs/Rule.md +2 -0
  35. data/docs/ScheduledChangesApi.md +1 -1
  36. data/docs/SegmentsApi.md +9 -5
  37. data/docs/TagsApi.md +2 -2
  38. data/docs/TrustPolicyDetails.md +20 -0
  39. data/docs/TrustPolicyStatement.md +24 -0
  40. data/lib/launchdarkly_api/api/account_usage_beta_api.rb +171 -0
  41. data/lib/launchdarkly_api/api/ai_configs_beta_api.rb +417 -0
  42. data/lib/launchdarkly_api/api/data_export_destinations_api.rb +69 -0
  43. data/lib/launchdarkly_api/api/feature_flags_api.rb +5 -2
  44. data/lib/launchdarkly_api/api/metrics_api.rb +4 -4
  45. data/lib/launchdarkly_api/api/scheduled_changes_api.rb +2 -2
  46. data/lib/launchdarkly_api/api/segments_api.rb +5 -2
  47. data/lib/launchdarkly_api/api/tags_api.rb +2 -2
  48. data/lib/launchdarkly_api/models/agent_graph.rb +350 -0
  49. data/lib/launchdarkly_api/models/agent_graph_edge.rb +303 -0
  50. data/lib/launchdarkly_api/models/agent_graph_edge_post.rb +303 -0
  51. data/lib/launchdarkly_api/models/agent_graph_patch.rb +254 -0
  52. data/lib/launchdarkly_api/models/agent_graph_post.rb +298 -0
  53. data/lib/launchdarkly_api/models/{covariance_info_rep.rb → agent_graphs.rb} +43 -59
  54. data/lib/launchdarkly_api/models/ai_config.rb +16 -4
  55. data/lib/launchdarkly_api/models/ai_config_post.rb +13 -4
  56. data/lib/launchdarkly_api/models/ai_configs_metric_data_source_ref_rep.rb +17 -0
  57. data/lib/launchdarkly_api/models/ai_configs_metric_listing_rep.rb +17 -0
  58. data/lib/launchdarkly_api/models/destination.rb +2 -2
  59. data/lib/launchdarkly_api/models/destination_post.rb +2 -2
  60. data/lib/launchdarkly_api/models/generate_trust_policy_post_rep.rb +220 -0
  61. data/lib/launchdarkly_api/models/guarded_release_config.rb +50 -21
  62. data/lib/launchdarkly_api/models/iteration_input.rb +1 -11
  63. data/lib/launchdarkly_api/models/iteration_rep.rb +32 -17
  64. data/lib/launchdarkly_api/models/metric_data_source_ref_rep.rb +17 -0
  65. data/lib/launchdarkly_api/models/metric_group_rep.rb +4 -24
  66. data/lib/launchdarkly_api/models/metric_listing_rep.rb +17 -0
  67. data/lib/launchdarkly_api/models/metric_rep.rb +17 -0
  68. data/lib/launchdarkly_api/models/metrics.rb +118 -4
  69. data/lib/launchdarkly_api/models/naming_convention.rb +2 -2
  70. data/lib/launchdarkly_api/models/post_release_policy_request.rb +1 -2
  71. data/lib/launchdarkly_api/models/progressive_release_config.rb +234 -0
  72. data/lib/launchdarkly_api/models/put_release_policy_request.rb +1 -2
  73. data/lib/launchdarkly_api/models/relay_auto_config_rep.rb +0 -17
  74. data/lib/launchdarkly_api/models/release_policy.rb +1 -2
  75. data/lib/launchdarkly_api/models/release_policy_scope.rb +16 -4
  76. data/lib/launchdarkly_api/models/release_policy_stage.rb +263 -0
  77. data/lib/launchdarkly_api/models/rule.rb +11 -1
  78. data/lib/launchdarkly_api/models/trust_policy_details.rb +233 -0
  79. data/lib/launchdarkly_api/models/trust_policy_statement.rb +255 -0
  80. data/lib/launchdarkly_api/version.rb +1 -1
  81. data/lib/launchdarkly_api.rb +11 -1
  82. data/spec/api/account_usage_beta_api_spec.rb +41 -0
  83. data/spec/api/ai_configs_beta_api_spec.rb +72 -0
  84. data/spec/api/data_export_destinations_api_spec.rb +13 -0
  85. data/spec/api/feature_flags_api_spec.rb +2 -1
  86. data/spec/api/metrics_api_spec.rb +2 -2
  87. data/spec/api/scheduled_changes_api_spec.rb +1 -1
  88. data/spec/api/segments_api_spec.rb +2 -1
  89. data/spec/api/tags_api_spec.rb +1 -1
  90. data/spec/models/agent_graph_edge_post_spec.rb +54 -0
  91. data/spec/models/agent_graph_edge_spec.rb +54 -0
  92. data/spec/models/agent_graph_patch_spec.rb +54 -0
  93. data/spec/models/agent_graph_post_spec.rb +60 -0
  94. data/spec/models/agent_graph_spec.rb +72 -0
  95. data/spec/models/{covariance_info_rep_spec.rb → agent_graphs_spec.rb} +9 -9
  96. data/spec/models/ai_config_post_spec.rb +6 -0
  97. data/spec/models/ai_config_spec.rb +6 -0
  98. data/spec/models/destination_post_spec.rb +1 -1
  99. data/spec/models/destination_spec.rb +1 -1
  100. data/spec/models/generate_trust_policy_post_rep_spec.rb +36 -0
  101. data/spec/models/guarded_release_config_spec.rb +24 -0
  102. data/spec/models/iteration_input_spec.rb +0 -6
  103. data/spec/models/iteration_rep_spec.rb +4 -6
  104. data/spec/models/metric_group_rep_spec.rb +0 -12
  105. data/spec/models/metrics_spec.rb +18 -0
  106. data/spec/models/naming_convention_spec.rb +1 -1
  107. data/spec/models/progressive_release_config_spec.rb +42 -0
  108. data/spec/models/release_policy_scope_spec.rb +6 -0
  109. data/spec/models/release_policy_stage_spec.rb +42 -0
  110. data/spec/models/rule_spec.rb +6 -0
  111. data/spec/models/trust_policy_details_spec.rb +42 -0
  112. data/spec/models/trust_policy_statement_spec.rb +54 -0
  113. metadata +46 -6
  114. data/docs/CovarianceInfoRep.md +0 -22
data/docs/Metrics.md CHANGED
@@ -17,6 +17,9 @@
17
17
  | **satisfaction_rating** | **Float** | A value between 0 and 1 representing satisfaction rating | [optional] |
18
18
  | **input_cost** | **Float** | Cost of input tokens in USD | [optional] |
19
19
  | **output_cost** | **Float** | Cost of output tokens in USD | [optional] |
20
+ | **judge_accuracy** | **Float** | Average accuracy judge score (0.0-1.0) | [optional] |
21
+ | **judge_relevance** | **Float** | Average relevance judge score (0.0-1.0) | [optional] |
22
+ | **judge_toxicity** | **Float** | Average toxicity judge score (0.0-1.0) | [optional] |
20
23
 
21
24
  ## Example
22
25
 
@@ -36,7 +39,10 @@ instance = LaunchDarklyApi::Metrics.new(
36
39
  time_to_first_token_ms: null,
37
40
  satisfaction_rating: null,
38
41
  input_cost: null,
39
- output_cost: null
42
+ output_cost: null,
43
+ judge_accuracy: null,
44
+ judge_relevance: null,
45
+ judge_toxicity: null
40
46
  )
41
47
  ```
42
48
 
data/docs/MetricsApi.md CHANGED
@@ -168,7 +168,7 @@ end
168
168
 
169
169
  List metrics
170
170
 
171
- Get a list of all metrics for the specified project. ### Filtering metrics The `filter` parameter supports the following operators: `contains`, `equals`, `anyOf`. #### Supported fields and operators You can only filter certain fields in metrics when using the `filter` parameter. Additionally, you can only filter some fields with certain operators. When you search for metrics, the `filter` parameter supports the following fields and operators: |<div style=\"width:120px\">Field</div> |Description |Supported operators | |---|---|---| | `eventKind` | The metric event kind. One of `custom`, `pageview`, `click`. | `equals` | | `hasConnections` | Whether the metric has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` | | `isNumeric` | Whether the metric is numeric. One of `true`, `false`. | `equals` | | `maintainerIds` | A comma-separated list of metric maintainer IDs. | `anyOf` | | `maintainerTeamKey` | The metric maintainer team key. | `equals` | | `query` | A \"fuzzy\" search across metric key and name. Supply a string or list of strings to the operator. | `equals` | | `tags` | The metric tags. | `contains` | | `unitAggregationType` | The metric's unit aggregation type. One of `sum`, `average`. | `equals` | For example, the filter `?filter=tags contains [\"tag1\", \"tag2\", \"tag3\"]` matches metrics that have all three tags. The documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=tags contains [\"tag1\", \"tag2\", \"tag3\"]` must be encoded to `%5B`. ### Expanding the metric list response LaunchDarkly supports expanding the \"List metrics\" response. By default, the expandable field is **not** included in the response. To expand the response, append the `expand` query parameter and add the following supported field: - `experimentCount` includes the number of experiments from the specific project that use the metric For example, `expand=experimentCount` includes the `experimentCount` field for each metric in the response.
171
+ Get a list of all metrics for the specified project. ### Filtering metrics The `filter` parameter supports the following operators: `contains`, `equals`, `anyOf`. #### Supported fields and operators You can only filter certain fields in metrics when using the `filter` parameter. Additionally, you can only filter some fields with certain operators. When you search for metrics, the `filter` parameter supports the following fields and operators: |<div style=\"width:120px\">Field</div> |Description |Supported operators | |---|---|---| | `eventKind` | The metric event kind. One of `custom`, `pageview`, `click`. | `equals` | | `hasConnections` | Whether the metric has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` | | `isNumeric` | Whether the metric is numeric. One of `true`, `false`. | `equals` | | `maintainerIds` | A comma-separated list of metric maintainer IDs. | `anyOf` | | `maintainerTeamKey` | The metric maintainer team key. | `equals` | | `metricUsedIn` | Filter by where the metric is used. One of `experiments`, `guarded_rollouts`, `any`, `none`. | `equals` | | `query` | A \"fuzzy\" search across metric key and name. Supply a string or list of strings to the operator. | `equals` | | `tags` | The metric tags. | `contains` | | `unitAggregationType` | The metric's unit aggregation type. One of `sum`, `average`. | `equals` | For example, the filter `?filter=tags contains [\"tag1\", \"tag2\", \"tag3\"]` matches metrics that have all three tags. The documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=tags contains [\"tag1\", \"tag2\", \"tag3\"]` must be encoded to `%5B`. ### Expanding the metric list response LaunchDarkly supports expanding the \"List metrics\" response. By default, the expandable field is **not** included in the response. To expand the response, append the `expand` query parameter and add the following supported field: - `experimentCount` includes the number of experiments from the specific project that use the metric For example, `expand=experimentCount` includes the `experimentCount` field for each metric in the response.
172
172
 
173
173
  ### Examples
174
174
 
@@ -190,7 +190,7 @@ opts = {
190
190
  limit: 789, # Integer | The number of metrics to return in the response. Defaults to 20. Maximum limit is 50.
191
191
  offset: 789, # Integer | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items.
192
192
  sort: 'sort_example', # String | A field to sort the items by. Prefix field by a dash ( - ) to sort in descending order. This endpoint supports sorting by `createdAt` or `name`.
193
- filter: 'filter_example' # String | A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, `maintainerTeamKey`, `view`, and `dataSourceKeys`. To learn more about the filter syntax, read the 'Filtering metrics' section above.
193
+ filter: 'filter_example' # String | A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, `maintainerTeamKey`, `view`, `dataSourceKeys`, and `metricUsedIn`. To learn more about the filter syntax, read the 'Filtering metrics' section above.
194
194
  }
195
195
 
196
196
  begin
@@ -229,7 +229,7 @@ end
229
229
  | **limit** | **Integer** | The number of metrics to return in the response. Defaults to 20. Maximum limit is 50. | [optional] |
230
230
  | **offset** | **Integer** | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next &#x60;limit&#x60; items. | [optional] |
231
231
  | **sort** | **String** | A field to sort the items by. Prefix field by a dash ( - ) to sort in descending order. This endpoint supports sorting by &#x60;createdAt&#x60; or &#x60;name&#x60;. | [optional] |
232
- | **filter** | **String** | A comma-separated list of filters. This endpoint accepts filtering by &#x60;query&#x60;, &#x60;tags&#x60;, &#39;eventKind&#39;, &#39;isNumeric&#39;, &#39;unitAggregationType&#x60;, &#x60;hasConnections&#x60;, &#x60;maintainerIds&#x60;, &#x60;maintainerTeamKey&#x60;, &#x60;view&#x60;, and &#x60;dataSourceKeys&#x60;. To learn more about the filter syntax, read the &#39;Filtering metrics&#39; section above. | [optional] |
232
+ | **filter** | **String** | A comma-separated list of filters. This endpoint accepts filtering by &#x60;query&#x60;, &#x60;tags&#x60;, &#39;eventKind&#39;, &#39;isNumeric&#39;, &#39;unitAggregationType&#x60;, &#x60;hasConnections&#x60;, &#x60;maintainerIds&#x60;, &#x60;maintainerTeamKey&#x60;, &#x60;view&#x60;, &#x60;dataSourceKeys&#x60;, and &#x60;metricUsedIn&#x60;. To learn more about the filter syntax, read the &#39;Filtering metrics&#39; section above. | [optional] |
233
233
 
234
234
  ### Return type
235
235
 
@@ -7,7 +7,7 @@
7
7
  | **scope** | [**ReleasePolicyScope**](ReleasePolicyScope.md) | | [optional] |
8
8
  | **release_method** | [**ReleaseMethod**](ReleaseMethod.md) | | |
9
9
  | **guarded_release_config** | [**GuardedReleaseConfig**](GuardedReleaseConfig.md) | | [optional] |
10
- | **progressive_release_config** | **Object** | Configuration for progressive releases | [optional] |
10
+ | **progressive_release_config** | [**ProgressiveReleaseConfig**](ProgressiveReleaseConfig.md) | | [optional] |
11
11
  | **name** | **String** | The name of the release policy | |
12
12
  | **key** | **String** | The human-readable key of the release policy | |
13
13
 
@@ -20,7 +20,7 @@ instance = LaunchDarklyApi::PostReleasePolicyRequest.new(
20
20
  scope: null,
21
21
  release_method: null,
22
22
  guarded_release_config: null,
23
- progressive_release_config: {&quot;rolloutContextKindKey&quot;:&quot;user&quot;},
23
+ progressive_release_config: null,
24
24
  name: Production Release,
25
25
  key: production-release
26
26
  )
@@ -0,0 +1,20 @@
1
+ # LaunchDarklyApi::ProgressiveReleaseConfig
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **rollout_context_kind_key** | **String** | Context kind key to use as the randomization unit for the rollout | [optional] |
8
+ | **stages** | [**Array&lt;ReleasePolicyStage&gt;**](ReleasePolicyStage.md) | List of stages | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'launchdarkly_api'
14
+
15
+ instance = LaunchDarklyApi::ProgressiveReleaseConfig.new(
16
+ rollout_context_kind_key: user,
17
+ stages: null
18
+ )
19
+ ```
20
+
@@ -7,7 +7,7 @@
7
7
  | **scope** | [**ReleasePolicyScope**](ReleasePolicyScope.md) | | [optional] |
8
8
  | **release_method** | [**ReleaseMethod**](ReleaseMethod.md) | | |
9
9
  | **guarded_release_config** | [**GuardedReleaseConfig**](GuardedReleaseConfig.md) | | [optional] |
10
- | **progressive_release_config** | **Object** | Configuration for progressive releases | [optional] |
10
+ | **progressive_release_config** | [**ProgressiveReleaseConfig**](ProgressiveReleaseConfig.md) | | [optional] |
11
11
  | **name** | **String** | The name of the release policy | |
12
12
 
13
13
  ## Example
@@ -19,7 +19,7 @@ instance = LaunchDarklyApi::PutReleasePolicyRequest.new(
19
19
  scope: null,
20
20
  release_method: null,
21
21
  guarded_release_config: null,
22
- progressive_release_config: {&quot;rolloutContextKindKey&quot;:&quot;user&quot;},
22
+ progressive_release_config: null,
23
23
  name: Production Release
24
24
  )
25
25
  ```
@@ -9,7 +9,7 @@
9
9
  | **_access** | [**Access**](Access.md) | | [optional] |
10
10
  | **name** | **String** | A human-friendly name for the Relay Proxy configuration | |
11
11
  | **policy** | [**Array&lt;Statement&gt;**](Statement.md) | A description of what environments and projects the Relay Proxy should include or exclude | |
12
- | **full_key** | **String** | The Relay Proxy configuration key | |
12
+ | **full_key** | **String** | The Relay Proxy configuration key | [optional] |
13
13
  | **display_key** | **String** | The last few characters of the Relay Proxy configuration key, displayed in the LaunchDarkly UI | |
14
14
  | **creation_date** | **Integer** | | |
15
15
  | **last_modified** | **Integer** | | |
@@ -10,7 +10,7 @@
10
10
  | **rank** | **Integer** | The rank/priority of the release policy | |
11
11
  | **release_method** | [**ReleaseMethod**](ReleaseMethod.md) | | |
12
12
  | **guarded_release_config** | [**GuardedReleaseConfig**](GuardedReleaseConfig.md) | | [optional] |
13
- | **progressive_release_config** | **Object** | Configuration for progressive releases | [optional] |
13
+ | **progressive_release_config** | [**ProgressiveReleaseConfig**](ProgressiveReleaseConfig.md) | | [optional] |
14
14
  | **name** | **String** | The name of the release policy | |
15
15
  | **key** | **String** | The human-readable key of the release policy | |
16
16
 
@@ -26,7 +26,7 @@ instance = LaunchDarklyApi::ReleasePolicy.new(
26
26
  rank: 1,
27
27
  release_method: null,
28
28
  guarded_release_config: null,
29
- progressive_release_config: {&quot;rolloutContextKindKey&quot;:&quot;user&quot;},
29
+ progressive_release_config: null,
30
30
  name: Production Release,
31
31
  key: production-release
32
32
  )
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **environment_keys** | **Array&lt;String&gt;** | List of environment keys this policy applies to | [optional] |
8
+ | **flag_tag_keys** | **Array&lt;String&gt;** | List of flag tag keys this policy applies to | [optional] |
8
9
 
9
10
  ## Example
10
11
 
@@ -12,7 +13,8 @@
12
13
  require 'launchdarkly_api'
13
14
 
14
15
  instance = LaunchDarklyApi::ReleasePolicyScope.new(
15
- environment_keys: [&quot;production&quot;,&quot;staging&quot;]
16
+ environment_keys: [&quot;production&quot;,&quot;staging&quot;],
17
+ flag_tag_keys: [&quot;frontend&quot;,&quot;backend&quot;]
16
18
  )
17
19
  ```
18
20
 
@@ -0,0 +1,20 @@
1
+ # LaunchDarklyApi::ReleasePolicyStage
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **allocation** | **Integer** | | |
8
+ | **duration_millis** | **Integer** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'launchdarkly_api'
14
+
15
+ instance = LaunchDarklyApi::ReleasePolicyStage.new(
16
+ allocation: 25000,
17
+ duration_millis: 60000
18
+ )
19
+ ```
20
+
data/docs/Rule.md CHANGED
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **_id** | **String** | The flag rule ID | [optional] |
8
+ | **disabled** | **Boolean** | Whether the rule is disabled | [optional] |
8
9
  | **variation** | **Integer** | The index of the variation, from the array of variations for this flag | [optional] |
9
10
  | **rollout** | [**Rollout**](Rollout.md) | | [optional] |
10
11
  | **clauses** | [**Array&lt;Clause&gt;**](Clause.md) | An array of clauses used for individual targeting based on attributes | |
@@ -19,6 +20,7 @@ require 'launchdarkly_api'
19
20
 
20
21
  instance = LaunchDarklyApi::Rule.new(
21
22
  _id: null,
23
+ disabled: null,
22
24
  variation: null,
23
25
  rollout: null,
24
26
  clauses: null,
@@ -328,7 +328,7 @@ end
328
328
 
329
329
  Create scheduled changes workflow
330
330
 
331
- Create scheduled changes for a feature flag. The changes you schedule may include any semantic patch instructions available when [updating a feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag#using-semantic-patches-on-a-feature-flag). If the `ignoreConficts` query parameter is false and there are conflicts between these instructions and existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed.
331
+ Create scheduled changes for a feature flag. The changes you schedule may include any semantic patch instructions available when [updating a feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag#using-semantic-patches-on-a-feature-flag). If the `ignoreConflicts` query parameter is false and there are conflicts between these instructions and existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed.
332
332
 
333
333
  ### Examples
334
334
 
data/docs/SegmentsApi.md CHANGED
@@ -1101,11 +1101,11 @@ end
1101
1101
 
1102
1102
  ## patch_segment
1103
1103
 
1104
- > <UserSegment> patch_segment(project_key, environment_key, segment_key, patch_with_comment)
1104
+ > <UserSegment> patch_segment(project_key, environment_key, segment_key, patch_with_comment, opts)
1105
1105
 
1106
1106
  Patch segment
1107
1107
 
1108
- Update a segment. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://launchdarkly.com/docs/api#updates). ### Using semantic patches on a segment 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 segments requires an `environmentKey` in addition to `instructions` and an optional `comment`. The body of the request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required) 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. ### Instructions Semantic patch requests support the following `kind` instructions for updating segments. <details> <summary>Click to expand instructions for <strong>updating segment details and settings</strong></summary> #### addTags Adds tags to the segment. ##### Parameters - `values`: A list of tags to add. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] }] } ``` #### removeTags Removes tags from the segment. ##### Parameters - `values`: A list of tags to remove. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] }] } ``` #### updateName Updates the name of the segment. ##### Parameters - `value`: Name of the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateName\", \"value\": \"Updated segment name\" }] } ``` </details> <details> <summary>Click to expand instructions for <strong>updating segment individual targets</strong></summary> #### addExcludedTargets Adds context keys to the individual context targets excluded from the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addExcludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### addExcludedUsers Adds user keys to the individual user targets excluded from the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addExcludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` #### addIncludedTargets Adds context keys to the individual context targets included in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addIncludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### addIncludedUsers Adds user keys to the individual user targets included in the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addIncludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` #### removeExcludedTargets Removes context keys from the individual context targets excluded from the segment for the specified `contextKind`. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeExcludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### removeExcludedUsers Removes user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeExcludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` #### removeIncludedTargets Removes context keys from the individual context targets included in the segment for the specified `contextKind`. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeIncludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### removeIncludedUsers Removes user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeIncludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` </details> <details> <summary>Click to expand instructions for <strong>updating segment targeting rules</strong></summary> #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### 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`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `ruleId`: ID of a rule in the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addClauses\", \"clauses\": [ { \"attribute\": \"email\", \"negate\": false, \"op\": \"contains\", \"values\": [\"value1\"] } ], \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", }] } ``` #### addRule Adds a new targeting rule to the segment. The rule may contain `clauses`. ##### 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`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `description`: A description of the rule. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [ { \"attribute\": \"email\", \"op\": \"contains\", \"negate\": false, \"values\": [\"@launchdarkly.com\"] } ], \"description\": \"Targeting rule for LaunchDarkly employees\", }] } ``` #### 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 segment. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the segment. - `clauseIds`: Array of IDs of clauses in the rule. Here's an example: ```json { \"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 in the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### 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 in the segment. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"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 in the segment. ##### Parameters - `ruleIds`: Array of IDs of all targeting rules in the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the segment. - `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`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { \"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\"] } }] } ``` #### updateRuleDescription Updates the description of the segment 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 segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleRolloutAndContextKind For a rule that includes a percentage of targets, updates the percentage and the context kind of the targets to include. ##### Parameters - `ruleId`: The ID of a targeting rule in the segment that includes a percentage of targets. - `weight`: The weight, in thousandths of a percent (0-100000). - `contextKind`: The context kind. Here's an example: ```json { \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"weight\": \"20000\", \"contextKind\": \"device\" }] } ``` </details> <details> <summary>Click to expand instructions for <strong>working with Big Segments</strong></summary> A \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance. The following semantic patch instructions apply only to these [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments). #### addBigSegmentExcludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets excluded from the segment. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addBigSegmentExcludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### addBigSegmentIncludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets included in the segment. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addBigSegmentIncludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### processBigSegmentImport For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Processes a segment import. ##### Parameters - `importId`: The ID of the import. The import ID is returned in the `Location` header as part of the [Create big segment import](https://launchdarkly.com/docs/api/segments/create-big-segment-import) request. Here's an example: ```json { \"instructions\": [{ \"kind\": \"processBigSegmentImport\", \"importId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### removeBigSegmentExcludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets excluded from the segment. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeBigSegmentExcludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### removeBigSegmentIncludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets included in the segment. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeBigSegmentIncludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` </details> ### Using JSON patches on a segment If you do not include the header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. For example, to update the description for a segment with a JSON patch, use the following request body: ```json { \"patch\": [ { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"new description\" } ] } ``` To update fields in the segment that are arrays, set the `path` to the name of the field and then append `/<array index>`. Use `/0` to add the new entry to the beginning of the array. Use `/-` to add the new entry to the end of the array. For example, to add a rule to a segment, use the following request body: ```json { \"patch\":[ { \"op\": \"add\", \"path\": \"/rules/0\", \"value\": { \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }] } } ] } ``` To add or remove targets from segments, we recommend using semantic patch. Semantic patch for segments includes specific instructions for adding and removing both included and excluded targets.
1108
+ Update a segment. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://launchdarkly.com/docs/api#updates). ### Using semantic patches on a segment 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 segments requires an `environmentKey` in addition to `instructions` and an optional `comment`. The body of the request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required) 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. ### Instructions Semantic patch requests support the following `kind` instructions for updating segments. <details> <summary>Click to expand instructions for <strong>updating segment details and settings</strong></summary> #### addTags Adds tags to the segment. ##### Parameters - `values`: A list of tags to add. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] }] } ``` #### removeTags Removes tags from the segment. ##### Parameters - `values`: A list of tags to remove. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] }] } ``` #### updateName Updates the name of the segment. ##### Parameters - `value`: Name of the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateName\", \"value\": \"Updated segment name\" }] } ``` </details> <details> <summary>Click to expand instructions for <strong>updating segment individual targets</strong></summary> #### addExcludedTargets Adds context keys to the individual context targets excluded from the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded, or if the number of operations on targets exceeds the batch limit of 1,500. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addExcludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### addExcludedUsers Adds user keys to the individual user targets excluded from the segment. Returns an error if this causes the same user key to be both included and excluded, or if the number of operations on targets exceeds the batch limit of 1,500. If you are working with contexts, use `addExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addExcludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` #### addIncludedTargets Adds context keys to the individual context targets included in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded, or if the number of operations on targets exceeds the batch limit of 1,500. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addIncludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### addIncludedUsers Adds user keys to the individual user targets included in the segment. Returns an error if this causes the same user key to be both included and excluded, or if the number of operations on targets exceeds the batch limit of 1,500. If you are working with contexts, use `addIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addIncludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` #### removeExcludedTargets Removes context keys from the individual context targets excluded from the segment for the specified `contextKind`. Returns an error if the number of operations on targets exceeds the batch limit of 1,500. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeExcludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### removeExcludedUsers Removes user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction. Returns an error if the number of operations on targets exceeds the batch limit of 1,500. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeExcludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` #### removeIncludedTargets Removes context keys from the individual context targets included in the segment for the specified `contextKind`. Returns an error if the number of operations on targets exceeds the batch limit of 1,500. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeIncludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### removeIncludedUsers Removes user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction. Returns an error if the number of operations on targets exceeds the batch limit of 1,500. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeIncludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` </details> <details> <summary>Click to expand instructions for <strong>updating segment targeting rules</strong></summary> #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### 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`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `ruleId`: ID of a rule in the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addClauses\", \"clauses\": [ { \"attribute\": \"email\", \"negate\": false, \"op\": \"contains\", \"values\": [\"value1\"] } ], \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", }] } ``` #### addRule Adds a new targeting rule to the segment. The rule may contain `clauses`. ##### 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`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `description`: A description of the rule. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [ { \"attribute\": \"email\", \"op\": \"contains\", \"negate\": false, \"values\": [\"@launchdarkly.com\"] } ], \"description\": \"Targeting rule for LaunchDarkly employees\", }] } ``` #### 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 segment. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the segment. - `clauseIds`: Array of IDs of clauses in the rule. Here's an example: ```json { \"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 in the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### 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 in the segment. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"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 in the segment. ##### Parameters - `ruleIds`: Array of IDs of all targeting rules in the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the segment. - `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`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { \"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\"] } }] } ``` #### updateRuleDescription Updates the description of the segment 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 segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleRolloutAndContextKind For a rule that includes a percentage of targets, updates the percentage and the context kind of the targets to include. ##### Parameters - `ruleId`: The ID of a targeting rule in the segment that includes a percentage of targets. - `weight`: The weight, in thousandths of a percent (0-100000). - `contextKind`: The context kind. Here's an example: ```json { \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"weight\": \"20000\", \"contextKind\": \"device\" }] } ``` </details> <details> <summary>Click to expand instructions for <strong>working with Big Segments</strong></summary> A \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance. The following semantic patch instructions apply only to these [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments). #### addBigSegmentExcludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets excluded from the segment. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addBigSegmentExcludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### addBigSegmentIncludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets included in the segment. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addBigSegmentIncludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### processBigSegmentImport For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Processes a segment import. ##### Parameters - `importId`: The ID of the import. The import ID is returned in the `Location` header as part of the [Create big segment import](https://launchdarkly.com/docs/api/segments/create-big-segment-import) request. Here's an example: ```json { \"instructions\": [{ \"kind\": \"processBigSegmentImport\", \"importId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### removeBigSegmentExcludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets excluded from the segment. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeBigSegmentExcludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### removeBigSegmentIncludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets included in the segment. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeBigSegmentIncludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` </details> ### Using JSON patches on a segment If you do not include the header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. For example, to update the description for a segment with a JSON patch, use the following request body: ```json { \"patch\": [ { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"new description\" } ] } ``` To update fields in the segment that are arrays, set the `path` to the name of the field and then append `/<array index>`. Use `/0` to add the new entry to the beginning of the array. Use `/-` to add the new entry to the end of the array. For example, to add a rule to a segment, use the following request body: ```json { \"patch\":[ { \"op\": \"add\", \"path\": \"/rules/0\", \"value\": { \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }] } } ] } ``` To add or remove targets from segments, we recommend using semantic patch. Semantic patch for segments includes specific instructions for adding and removing both included and excluded targets.
1109
1109
 
1110
1110
  ### Examples
1111
1111
 
@@ -1125,10 +1125,13 @@ project_key = 'project_key_example' # String | The project key
1125
1125
  environment_key = 'environment_key_example' # String | The environment key
1126
1126
  segment_key = 'segment_key_example' # String | The segment key
1127
1127
  patch_with_comment = LaunchDarklyApi::PatchWithComment.new({patch: [LaunchDarklyApi::PatchOperation.new({op: 'replace', path: '/exampleField'})]}) # PatchWithComment |
1128
+ opts = {
1129
+ dry_run: true # Boolean | If true, the patch will be validated but not persisted. Returns a preview of the segment after the patch is applied.
1130
+ }
1128
1131
 
1129
1132
  begin
1130
1133
  # Patch segment
1131
- result = api_instance.patch_segment(project_key, environment_key, segment_key, patch_with_comment)
1134
+ result = api_instance.patch_segment(project_key, environment_key, segment_key, patch_with_comment, opts)
1132
1135
  p result
1133
1136
  rescue LaunchDarklyApi::ApiError => e
1134
1137
  puts "Error when calling SegmentsApi->patch_segment: #{e}"
@@ -1139,12 +1142,12 @@ end
1139
1142
 
1140
1143
  This returns an Array which contains the response data, status code and headers.
1141
1144
 
1142
- > <Array(<UserSegment>, Integer, Hash)> patch_segment_with_http_info(project_key, environment_key, segment_key, patch_with_comment)
1145
+ > <Array(<UserSegment>, Integer, Hash)> patch_segment_with_http_info(project_key, environment_key, segment_key, patch_with_comment, opts)
1143
1146
 
1144
1147
  ```ruby
1145
1148
  begin
1146
1149
  # Patch segment
1147
- data, status_code, headers = api_instance.patch_segment_with_http_info(project_key, environment_key, segment_key, patch_with_comment)
1150
+ data, status_code, headers = api_instance.patch_segment_with_http_info(project_key, environment_key, segment_key, patch_with_comment, opts)
1148
1151
  p status_code # => 2xx
1149
1152
  p headers # => { ... }
1150
1153
  p data # => <UserSegment>
@@ -1161,6 +1164,7 @@ end
1161
1164
  | **environment_key** | **String** | The environment key | |
1162
1165
  | **segment_key** | **String** | The segment key | |
1163
1166
  | **patch_with_comment** | [**PatchWithComment**](PatchWithComment.md) | | |
1167
+ | **dry_run** | **Boolean** | If true, the patch will be validated but not persisted. Returns a preview of the segment after the patch is applied. | [optional] |
1164
1168
 
1165
1169
  ### Return type
1166
1170
 
data/docs/TagsApi.md CHANGED
@@ -30,7 +30,7 @@ end
30
30
 
31
31
  api_instance = LaunchDarklyApi::TagsApi.new
32
32
  opts = {
33
- kind: ['inner_example'], # Array<String> | Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `aiconfig`, and `view`. Returns all types by default.
33
+ kind: ['inner_example'], # Array<String> | Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, and `view`. Returns all types by default.
34
34
  pre: 'pre_example', # String | Return tags with the specified prefix
35
35
  archived: true, # Boolean | Whether or not to return archived flags
36
36
  limit: 56, # Integer | The number of tags to return. Maximum is 1000.
@@ -69,7 +69,7 @@ end
69
69
 
70
70
  | Name | Type | Description | Notes |
71
71
  | ---- | ---- | ----------- | ----- |
72
- | **kind** | [**Array&lt;String&gt;**](String.md) | Fetch tags associated with the specified resource type. Options are &#x60;flag&#x60;, &#x60;project&#x60;, &#x60;environment&#x60;, &#x60;segment&#x60;, &#x60;metric&#x60;, &#x60;aiconfig&#x60;, and &#x60;view&#x60;. Returns all types by default. | [optional] |
72
+ | **kind** | [**Array&lt;String&gt;**](String.md) | Fetch tags associated with the specified resource type. Options are &#x60;flag&#x60;, &#x60;project&#x60;, &#x60;environment&#x60;, &#x60;segment&#x60;, &#x60;metric&#x60;, &#x60;metric-data-source&#x60;, &#x60;aiconfig&#x60;, and &#x60;view&#x60;. Returns all types by default. | [optional] |
73
73
  | **pre** | **String** | Return tags with the specified prefix | [optional] |
74
74
  | **archived** | **Boolean** | Whether or not to return archived flags | [optional] |
75
75
  | **limit** | **Integer** | The number of tags to return. Maximum is 1000. | [optional] |
@@ -0,0 +1,20 @@
1
+ # LaunchDarklyApi::TrustPolicyDetails
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **version** | **String** | The version of the trust policy | [optional] |
8
+ | **statement** | [**Array&lt;TrustPolicyStatement&gt;**](TrustPolicyStatement.md) | The statements of the trust policy | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'launchdarkly_api'
14
+
15
+ instance = LaunchDarklyApi::TrustPolicyDetails.new(
16
+ version: null,
17
+ statement: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,24 @@
1
+ # LaunchDarklyApi::TrustPolicyStatement
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **effect** | **String** | The effect of trust policy statement | [optional] |
8
+ | **action** | **Array&lt;String&gt;** | The action of trust policy statement | [optional] |
9
+ | **principal** | **Object** | The principal of trust policy statement | [optional] |
10
+ | **condition** | **Object** | The condition of trust policy statement | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'launchdarkly_api'
16
+
17
+ instance = LaunchDarklyApi::TrustPolicyStatement.new(
18
+ effect: null,
19
+ action: null,
20
+ principal: null,
21
+ condition: null
22
+ )
23
+ ```
24
+
@@ -682,6 +682,90 @@ module LaunchDarklyApi
682
682
  return data, status_code, headers
683
683
  end
684
684
 
685
+ # Get MAU clientside usage
686
+ # Get a time series of the number of context key usages observed by LaunchDarkly in your account, for the primary context kind only. The counts reflect data reported from client-side SDKs.<br/><br/>For past months, the primary context kind is fixed and reflects the last known primary kind for that month. For the current month, it may vary as new primary context kinds are observed.<br/><br/>The supported granularity varies by aggregation type. The maximum time range is 365 days.
687
+ # @param [Hash] opts the optional parameters
688
+ # @option opts [String] :from The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.
689
+ # @option opts [String] :to The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.
690
+ # @option opts [String] :project_key A project key to filter results by. Can be specified multiple times, one query parameter per project key.
691
+ # @option opts [String] :environment_key An environment key to filter results by. If specified, exactly one &#x60;projectKey&#x60; must be provided. Can be specified multiple times, one query parameter per environment key.
692
+ # @option opts [String] :sdk_name An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.
693
+ # @option opts [String] :anonymous An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.
694
+ # @option opts [String] :group_by If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;sdkName&#x60;, &#x60;sdkAppId&#x60;, &#x60;anonymousV2&#x60;.
695
+ # @option opts [String] :aggregation_type Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.
696
+ # @option opts [String] :granularity Specifies the data granularity. Defaults to &#x60;daily&#x60;. Valid values depend on &#x60;aggregationType&#x60;: **month_to_date** supports &#x60;daily&#x60; and &#x60;monthly&#x60;; **incremental** and **rolling_30d** support &#x60;daily&#x60; only.
697
+ # @return [SeriesListRep]
698
+ def get_mau_clientside_usage(opts = {})
699
+ data, _status_code, _headers = get_mau_clientside_usage_with_http_info(opts)
700
+ data
701
+ end
702
+
703
+ # Get MAU clientside usage
704
+ # Get a time series of the number of context key usages observed by LaunchDarkly in your account, for the primary context kind only. The counts reflect data reported from client-side SDKs.&lt;br/&gt;&lt;br/&gt;For past months, the primary context kind is fixed and reflects the last known primary kind for that month. For the current month, it may vary as new primary context kinds are observed.&lt;br/&gt;&lt;br/&gt;The supported granularity varies by aggregation type. The maximum time range is 365 days.
705
+ # @param [Hash] opts the optional parameters
706
+ # @option opts [String] :from The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.
707
+ # @option opts [String] :to The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.
708
+ # @option opts [String] :project_key A project key to filter results by. Can be specified multiple times, one query parameter per project key.
709
+ # @option opts [String] :environment_key An environment key to filter results by. If specified, exactly one &#x60;projectKey&#x60; must be provided. Can be specified multiple times, one query parameter per environment key.
710
+ # @option opts [String] :sdk_name An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.
711
+ # @option opts [String] :anonymous An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.
712
+ # @option opts [String] :group_by If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;sdkName&#x60;, &#x60;sdkAppId&#x60;, &#x60;anonymousV2&#x60;.
713
+ # @option opts [String] :aggregation_type Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.
714
+ # @option opts [String] :granularity Specifies the data granularity. Defaults to &#x60;daily&#x60;. Valid values depend on &#x60;aggregationType&#x60;: **month_to_date** supports &#x60;daily&#x60; and &#x60;monthly&#x60;; **incremental** and **rolling_30d** support &#x60;daily&#x60; only.
715
+ # @return [Array<(SeriesListRep, Integer, Hash)>] SeriesListRep data, response status code and response headers
716
+ def get_mau_clientside_usage_with_http_info(opts = {})
717
+ if @api_client.config.debugging
718
+ @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_mau_clientside_usage ...'
719
+ end
720
+ # resource path
721
+ local_var_path = '/api/v2/usage/clientside-mau'
722
+
723
+ # query parameters
724
+ query_params = opts[:query_params] || {}
725
+ query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
726
+ query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
727
+ query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
728
+ query_params[:'environmentKey'] = opts[:'environment_key'] if !opts[:'environment_key'].nil?
729
+ query_params[:'sdkName'] = opts[:'sdk_name'] if !opts[:'sdk_name'].nil?
730
+ query_params[:'anonymous'] = opts[:'anonymous'] if !opts[:'anonymous'].nil?
731
+ query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
732
+ query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?
733
+ query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?
734
+
735
+ # header parameters
736
+ header_params = opts[:header_params] || {}
737
+ # HTTP header 'Accept' (if needed)
738
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
739
+
740
+ # form parameters
741
+ form_params = opts[:form_params] || {}
742
+
743
+ # http body (model)
744
+ post_body = opts[:debug_body]
745
+
746
+ # return_type
747
+ return_type = opts[:debug_return_type] || 'SeriesListRep'
748
+
749
+ # auth_names
750
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
751
+
752
+ new_options = opts.merge(
753
+ :operation => :"AccountUsageBetaApi.get_mau_clientside_usage",
754
+ :header_params => header_params,
755
+ :query_params => query_params,
756
+ :form_params => form_params,
757
+ :body => post_body,
758
+ :auth_names => auth_names,
759
+ :return_type => return_type
760
+ )
761
+
762
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
763
+ if @api_client.config.debugging
764
+ @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_mau_clientside_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
765
+ end
766
+ return data, status_code, headers
767
+ end
768
+
685
769
  # Get MAU SDKs by type
686
770
  # Get a list of SDKs. These are all of the SDKs that have connected to LaunchDarkly by monthly active users (MAU) in the requested time period.<br/><br/>Endpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read [Account usage metrics](https://launchdarkly.com/docs/home/account/metrics).
687
771
  # @param [Hash] opts the optional parameters
@@ -748,6 +832,93 @@ module LaunchDarklyApi
748
832
  return data, status_code, headers
749
833
  end
750
834
 
835
+ # Get MAU total usage
836
+ # Get a time series of the number of context key usages observed by LaunchDarkly in your account, for the primary context kind only.<br/><br/>For past months, this reflects the context kind that was most recently marked as primary for that month. For the current month, the context kind may vary as new primary kinds are observed.<br/><br/>The supported granularity varies by aggregation type. The maximum time range is 365 days.
837
+ # @param [Hash] opts the optional parameters
838
+ # @option opts [String] :from The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.
839
+ # @option opts [String] :to The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.
840
+ # @option opts [String] :project_key A project key to filter results by. Can be specified multiple times, one query parameter per project key.
841
+ # @option opts [String] :environment_key An environment key to filter results by. If specified, exactly one &#x60;projectKey&#x60; must be provided. Can be specified multiple times, one query parameter per environment key.
842
+ # @option opts [String] :sdk_name An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.
843
+ # @option opts [String] :sdk_type An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type.
844
+ # @option opts [String] :anonymous An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.
845
+ # @option opts [String] :group_by If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;sdkName&#x60;, &#x60;sdkType&#x60;, &#x60;sdkAppId&#x60;, &#x60;anonymousV2&#x60;.
846
+ # @option opts [String] :aggregation_type Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.
847
+ # @option opts [String] :granularity Specifies the data granularity. Defaults to &#x60;daily&#x60;. Valid values depend on &#x60;aggregationType&#x60;: **month_to_date** supports &#x60;daily&#x60; and &#x60;monthly&#x60;; **incremental** and **rolling_30d** support &#x60;daily&#x60; only.
848
+ # @return [SeriesListRep]
849
+ def get_mau_total_usage(opts = {})
850
+ data, _status_code, _headers = get_mau_total_usage_with_http_info(opts)
851
+ data
852
+ end
853
+
854
+ # Get MAU total usage
855
+ # Get a time series of the number of context key usages observed by LaunchDarkly in your account, for the primary context kind only.&lt;br/&gt;&lt;br/&gt;For past months, this reflects the context kind that was most recently marked as primary for that month. For the current month, the context kind may vary as new primary kinds are observed.&lt;br/&gt;&lt;br/&gt;The supported granularity varies by aggregation type. The maximum time range is 365 days.
856
+ # @param [Hash] opts the optional parameters
857
+ # @option opts [String] :from The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.
858
+ # @option opts [String] :to The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.
859
+ # @option opts [String] :project_key A project key to filter results by. Can be specified multiple times, one query parameter per project key.
860
+ # @option opts [String] :environment_key An environment key to filter results by. If specified, exactly one &#x60;projectKey&#x60; must be provided. Can be specified multiple times, one query parameter per environment key.
861
+ # @option opts [String] :sdk_name An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.
862
+ # @option opts [String] :sdk_type An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type.
863
+ # @option opts [String] :anonymous An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.&lt;br/&gt;Valid values: &#x60;true&#x60;, &#x60;false&#x60;.
864
+ # @option opts [String] :group_by If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions, one query parameter per dimension.&lt;br/&gt;Valid values: &#x60;projectId&#x60;, &#x60;environmentId&#x60;, &#x60;sdkName&#x60;, &#x60;sdkType&#x60;, &#x60;sdkAppId&#x60;, &#x60;anonymousV2&#x60;.
865
+ # @option opts [String] :aggregation_type Specifies the aggregation method. Defaults to &#x60;month_to_date&#x60;.&lt;br/&gt;Valid values: &#x60;month_to_date&#x60;, &#x60;incremental&#x60;, &#x60;rolling_30d&#x60;.
866
+ # @option opts [String] :granularity Specifies the data granularity. Defaults to &#x60;daily&#x60;. Valid values depend on &#x60;aggregationType&#x60;: **month_to_date** supports &#x60;daily&#x60; and &#x60;monthly&#x60;; **incremental** and **rolling_30d** support &#x60;daily&#x60; only.
867
+ # @return [Array<(SeriesListRep, Integer, Hash)>] SeriesListRep data, response status code and response headers
868
+ def get_mau_total_usage_with_http_info(opts = {})
869
+ if @api_client.config.debugging
870
+ @api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_mau_total_usage ...'
871
+ end
872
+ # resource path
873
+ local_var_path = '/api/v2/usage/total-mau'
874
+
875
+ # query parameters
876
+ query_params = opts[:query_params] || {}
877
+ query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
878
+ query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
879
+ query_params[:'projectKey'] = opts[:'project_key'] if !opts[:'project_key'].nil?
880
+ query_params[:'environmentKey'] = opts[:'environment_key'] if !opts[:'environment_key'].nil?
881
+ query_params[:'sdkName'] = opts[:'sdk_name'] if !opts[:'sdk_name'].nil?
882
+ query_params[:'sdkType'] = opts[:'sdk_type'] if !opts[:'sdk_type'].nil?
883
+ query_params[:'anonymous'] = opts[:'anonymous'] if !opts[:'anonymous'].nil?
884
+ query_params[:'groupBy'] = opts[:'group_by'] if !opts[:'group_by'].nil?
885
+ query_params[:'aggregationType'] = opts[:'aggregation_type'] if !opts[:'aggregation_type'].nil?
886
+ query_params[:'granularity'] = opts[:'granularity'] if !opts[:'granularity'].nil?
887
+
888
+ # header parameters
889
+ header_params = opts[:header_params] || {}
890
+ # HTTP header 'Accept' (if needed)
891
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
892
+
893
+ # form parameters
894
+ form_params = opts[:form_params] || {}
895
+
896
+ # http body (model)
897
+ post_body = opts[:debug_body]
898
+
899
+ # return_type
900
+ return_type = opts[:debug_return_type] || 'SeriesListRep'
901
+
902
+ # auth_names
903
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
904
+
905
+ new_options = opts.merge(
906
+ :operation => :"AccountUsageBetaApi.get_mau_total_usage",
907
+ :header_params => header_params,
908
+ :query_params => query_params,
909
+ :form_params => form_params,
910
+ :body => post_body,
911
+ :auth_names => auth_names,
912
+ :return_type => return_type
913
+ )
914
+
915
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
916
+ if @api_client.config.debugging
917
+ @api_client.config.logger.debug "API called: AccountUsageBetaApi#get_mau_total_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
918
+ end
919
+ return data, status_code, headers
920
+ end
921
+
751
922
  # Get MAU usage
752
923
  # Get a time-series array of the number of monthly active users (MAU) seen by LaunchDarkly from your account. The granularity is always daily.<br/><br/>Endpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read [Account usage metrics](https://launchdarkly.com/docs/home/account/metrics).
753
924
  # @param [Hash] opts the optional parameters