launchdarkly_api 9.0.0 → 9.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -9
- data/docs/AccountMembersApi.md +6 -6
- data/docs/EnvironmentsApi.md +1 -1
- data/docs/Experiment.md +36 -0
- data/docs/ExperimentCollectionRep.md +1 -1
- data/docs/ExperimentExpandableProperties.md +20 -0
- data/docs/ExperimentInfoRep.md +1 -1
- data/docs/ExperimentsBetaApi.md +12 -12
- data/docs/FeatureFlagsApi.md +1 -1
- data/docs/FeatureFlagsBetaApi.md +2 -2
- data/docs/IterationExpandableProperties.md +1 -1
- data/docs/IterationRep.md +4 -2
- data/docs/{ExperimentRep.md → LegacyExperimentRep.md} +2 -2
- data/docs/MetricRep.md +43 -3
- data/docs/MetricV2Rep.md +22 -0
- data/docs/OtherApi.md +1 -1
- data/docs/StatisticsRep.md +20 -0
- data/docs/TeamsBetaApi.md +9 -9
- data/docs/TreatmentRep.md +1 -1
- data/docs/UserRecord.md +1 -1
- data/docs/Users.md +1 -1
- data/docs/UsersApi.md +4 -4
- data/docs/UsersRep.md +22 -0
- data/lib/launchdarkly_api/api/account_members_api.rb +6 -6
- data/lib/launchdarkly_api/api/environments_api.rb +2 -2
- data/lib/launchdarkly_api/api/experiments_beta_api.rb +9 -9
- data/lib/launchdarkly_api/api/feature_flags_api.rb +2 -2
- data/lib/launchdarkly_api/api/feature_flags_beta_api.rb +4 -4
- data/lib/launchdarkly_api/api/other_api.rb +2 -2
- data/lib/launchdarkly_api/api/teams_beta_api.rb +12 -12
- data/lib/launchdarkly_api/api/users_api.rb +3 -3
- data/lib/launchdarkly_api/models/experiment.rb +328 -0
- data/lib/launchdarkly_api/models/experiment_collection_rep.rb +1 -1
- data/lib/launchdarkly_api/models/{decimal.rb → experiment_expandable_properties.rb} +18 -17
- data/lib/launchdarkly_api/models/experiment_info_rep.rb +1 -1
- data/lib/launchdarkly_api/models/iteration_expandable_properties.rb +1 -1
- data/lib/launchdarkly_api/models/iteration_rep.rb +12 -3
- data/lib/launchdarkly_api/models/{experiment_rep.rb → legacy_experiment_rep.rb} +3 -3
- data/lib/launchdarkly_api/models/metric_rep.rb +256 -4
- data/lib/launchdarkly_api/models/metric_v2_rep.rb +253 -0
- data/lib/launchdarkly_api/models/{null_decimal.rb → statistics_rep.rb} +20 -16
- data/lib/launchdarkly_api/models/treatment_rep.rb +1 -1
- data/lib/launchdarkly_api/models/users_rep.rb +250 -0
- data/lib/launchdarkly_api/version.rb +1 -1
- data/lib/launchdarkly_api.rb +6 -3
- data/spec/api/account_members_api_spec.rb +3 -3
- data/spec/api/environments_api_spec.rb +1 -1
- data/spec/api/experiments_beta_api_spec.rb +3 -3
- data/spec/api/feature_flags_api_spec.rb +1 -1
- data/spec/api/feature_flags_beta_api_spec.rb +2 -2
- data/spec/api/other_api_spec.rb +1 -1
- data/spec/api/teams_beta_api_spec.rb +6 -6
- data/spec/api/users_api_spec.rb +1 -1
- data/spec/models/{decimal_spec.rb → experiment_expandable_properties_spec.rb} +8 -8
- data/spec/models/experiment_spec.rb +88 -0
- data/spec/models/iteration_rep_spec.rb +6 -0
- data/spec/models/{experiment_rep_spec.rb → legacy_experiment_rep_spec.rb} +6 -6
- data/spec/models/metric_rep_spec.rb +128 -0
- data/spec/models/metric_v2_rep_spec.rb +46 -0
- data/spec/models/{null_decimal_spec.rb → statistics_rep_spec.rb} +8 -8
- data/spec/models/users_rep_spec.rb +46 -0
- metadata +26 -14
- data/docs/Decimal.md +0 -20
- data/docs/NullDecimal.md +0 -20
data/docs/TeamsBetaApi.md
CHANGED
@@ -11,7 +11,7 @@ All URIs are relative to *https://app.launchdarkly.com*
|
|
11
11
|
| [**get_teams**](TeamsBetaApi.md#get_teams) | **GET** /api/v2/teams | List teams |
|
12
12
|
| [**patch_team**](TeamsBetaApi.md#patch_team) | **PATCH** /api/v2/teams/{teamKey} | Update team |
|
13
13
|
| [**post_team**](TeamsBetaApi.md#post_team) | **POST** /api/v2/teams | Create team |
|
14
|
-
| [**post_team_members**](TeamsBetaApi.md#post_team_members) | **POST** /api/v2/teams/{teamKey}/members | Add members to team |
|
14
|
+
| [**post_team_members**](TeamsBetaApi.md#post_team_members) | **POST** /api/v2/teams/{teamKey}/members | Add multiple members to team |
|
15
15
|
|
16
16
|
|
17
17
|
## delete_team
|
@@ -20,7 +20,7 @@ All URIs are relative to *https://app.launchdarkly.com*
|
|
20
20
|
|
21
21
|
Delete team
|
22
22
|
|
23
|
-
Delete a team by key
|
23
|
+
Delete a team by key. To learn more, read [Deleting a team](https://docs.launchdarkly.com/home/teams/managing#deleting-a-team).
|
24
24
|
|
25
25
|
### Examples
|
26
26
|
|
@@ -161,7 +161,7 @@ end
|
|
161
161
|
|
162
162
|
Get team maintainers
|
163
163
|
|
164
|
-
Fetch the maintainers that have been assigned to the team.
|
164
|
+
Fetch the maintainers that have been assigned to the team. To learn more, read [Managing team maintainers](https://docs.launchdarkly.com/home/teams/managing#managing-team-maintainers).
|
165
165
|
|
166
166
|
### Examples
|
167
167
|
|
@@ -238,7 +238,7 @@ end
|
|
238
238
|
|
239
239
|
Get team custom roles
|
240
240
|
|
241
|
-
Fetch the custom roles that have been assigned to the team.
|
241
|
+
Fetch the custom roles that have been assigned to the team. To learn more, read [Managing team permissions](https://docs.launchdarkly.com/home/teams/managing#managing-team-permissions).
|
242
242
|
|
243
243
|
### Examples
|
244
244
|
|
@@ -465,7 +465,7 @@ end
|
|
465
465
|
|
466
466
|
Create team
|
467
467
|
|
468
|
-
Create a team
|
468
|
+
Create a team. To learn more, read [Creating a team](https://docs.launchdarkly.com/home/teams/creating).
|
469
469
|
|
470
470
|
### Examples
|
471
471
|
|
@@ -534,9 +534,9 @@ end
|
|
534
534
|
|
535
535
|
> <TeamImportsRep> post_team_members(team_key, opts)
|
536
536
|
|
537
|
-
Add members to team
|
537
|
+
Add multiple members to team
|
538
538
|
|
539
|
-
Add multiple members to an existing team by uploading a CSV file of member email addresses. Your CSV file must include email addresses in the first column. You can include data in additional columns, but LaunchDarkly ignores all data outside the first column. Headers are optional. **Members are only added on a `201` response.** A `207` indicates the CSV file contains a combination of valid and invalid entries and will _not_ result in any members being added to the team. On a `207` response, if an entry contains bad user input the `message` field will contain the row number as well as the reason for the error. The `message` field will be omitted if the entry is valid. Example `207` response: ```json { \"items\": [ { \"status\": \"success\", \"value\": \"a-valid-email@launchdarkly.com\" }, { \"message\": \"Line 2: empty row\", \"status\": \"error\", \"value\": \"\" }, { \"message\": \"Line 3: email already exists in the specified team\", \"status\": \"error\", \"value\": \"existing-team-member@launchdarkly.com\" }, { \"message\": \"Line 4: invalid email formatting\", \"status\": \"error\", \"value\": \"invalid email format\" } ] } ``` Message | Resolution --- | --- Empty row | This line is blank. Add an email address and try again. Duplicate entry | This email address appears in the file twice. Remove the email from the file and try again. Email already exists in the specified team | This member is already on your team. Remove the email from the file and try again. Invalid formatting | This email address is not formatted correctly. Fix the formatting and try again. Email does not belong to a LaunchDarkly member | The email address doesn't belong to a LaunchDarkly account member. Invite them to LaunchDarkly, then re-add them to the team. On a `400` response, the `message` field may contain errors specific to this endpoint. Example `400` response: ```json { \"code\": \"invalid_request\", \"message\": \"Unable to process file\" } ``` Message | Resolution --- | --- Unable to process file | LaunchDarkly could not process the file for an unspecified reason. Review your file for errors and try again. File exceeds 25mb | Break up your file into multiple files of less than 25mbs each. All emails have invalid formatting | None of the email addresses in the file are in the correct format. Fix the formatting and try again. All emails belong to existing team members | All listed members are already on this team. Populate the file with member emails that do not belong to the team and try again. File is empty | The CSV file does not contain any email addresses. Populate the file and try again. No emails belong to members of your LaunchDarkly organization | None of the email addresses belong to members of your LaunchDarkly account. Invite these members to LaunchDarkly, then re-add them to the team.
|
539
|
+
Add multiple members to an existing team by uploading a CSV file of member email addresses. Your CSV file must include email addresses in the first column. You can include data in additional columns, but LaunchDarkly ignores all data outside the first column. Headers are optional. To learn more, read [Managing team members](https://docs.launchdarkly.com/home/teams/managing#managing-team-members). **Members are only added on a `201` response.** A `207` indicates the CSV file contains a combination of valid and invalid entries and will _not_ result in any members being added to the team. On a `207` response, if an entry contains bad user input the `message` field will contain the row number as well as the reason for the error. The `message` field will be omitted if the entry is valid. Example `207` response: ```json { \"items\": [ { \"status\": \"success\", \"value\": \"a-valid-email@launchdarkly.com\" }, { \"message\": \"Line 2: empty row\", \"status\": \"error\", \"value\": \"\" }, { \"message\": \"Line 3: email already exists in the specified team\", \"status\": \"error\", \"value\": \"existing-team-member@launchdarkly.com\" }, { \"message\": \"Line 4: invalid email formatting\", \"status\": \"error\", \"value\": \"invalid email format\" } ] } ``` Message | Resolution --- | --- Empty row | This line is blank. Add an email address and try again. Duplicate entry | This email address appears in the file twice. Remove the email from the file and try again. Email already exists in the specified team | This member is already on your team. Remove the email from the file and try again. Invalid formatting | This email address is not formatted correctly. Fix the formatting and try again. Email does not belong to a LaunchDarkly member | The email address doesn't belong to a LaunchDarkly account member. Invite them to LaunchDarkly, then re-add them to the team. On a `400` response, the `message` field may contain errors specific to this endpoint. Example `400` response: ```json { \"code\": \"invalid_request\", \"message\": \"Unable to process file\" } ``` Message | Resolution --- | --- Unable to process file | LaunchDarkly could not process the file for an unspecified reason. Review your file for errors and try again. File exceeds 25mb | Break up your file into multiple files of less than 25mbs each. All emails have invalid formatting | None of the email addresses in the file are in the correct format. Fix the formatting and try again. All emails belong to existing team members | All listed members are already on this team. Populate the file with member emails that do not belong to the team and try again. File is empty | The CSV file does not contain any email addresses. Populate the file and try again. No emails belong to members of your LaunchDarkly organization | None of the email addresses belong to members of your LaunchDarkly account. Invite these members to LaunchDarkly, then re-add them to the team.
|
540
540
|
|
541
541
|
### Examples
|
542
542
|
|
@@ -558,7 +558,7 @@ opts = {
|
|
558
558
|
}
|
559
559
|
|
560
560
|
begin
|
561
|
-
# Add members to team
|
561
|
+
# Add multiple members to team
|
562
562
|
result = api_instance.post_team_members(team_key, opts)
|
563
563
|
p result
|
564
564
|
rescue LaunchDarklyApi::ApiError => e
|
@@ -574,7 +574,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
574
574
|
|
575
575
|
```ruby
|
576
576
|
begin
|
577
|
-
# Add members to team
|
577
|
+
# Add multiple members to team
|
578
578
|
data, status_code, headers = api_instance.post_team_members_with_http_info(team_key, opts)
|
579
579
|
p status_code # => 2xx
|
580
580
|
p headers # => { ... }
|
data/docs/TreatmentRep.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **_id** | **String** | | [optional] |
|
8
8
|
| **name** | **String** | | |
|
9
|
-
| **allocation_percent** |
|
9
|
+
| **allocation_percent** | **String** | | |
|
10
10
|
| **baseline** | **Boolean** | | [optional] |
|
11
11
|
| **parameters** | [**Array<ParameterRep>**](ParameterRep.md) | | [optional] |
|
12
12
|
|
data/docs/UserRecord.md
CHANGED
@@ -23,7 +23,7 @@ instance = LaunchDarklyApi::UserRecord.new(
|
|
23
23
|
owner_id: null,
|
24
24
|
user: null,
|
25
25
|
sort_value: null,
|
26
|
-
_links:
|
26
|
+
_links: {"parent":{"href":"/api/v2/users/my-project/my-environment","type":"application/json"},"self":{"href":"/api/v2/users/my-project/my-environment/my-user","type":"application/json"},"settings":{"href":"/api/v2/users/my-project/my-environment/my-user/flags","type":"text/html"},"site":{"href":"/my-project/my-environment/users/my-user","type":"text/html"}},
|
27
27
|
_access: null
|
28
28
|
)
|
29
29
|
```
|
data/docs/Users.md
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
require 'launchdarkly_api'
|
15
15
|
|
16
16
|
instance = LaunchDarklyApi::Users.new(
|
17
|
-
_links:
|
17
|
+
_links: {"next":{"href":"/api/v2/user-search/my-project/my-environment?after=1647993600000&limit=20&searchAfter=my-user&sort=userKey","type":"application/json"},"self":{"href":"/api/v2/user-search/my-project/my-environment?after=1647993600000&limit=20&sort=userKey","type":"application/json"}},
|
18
18
|
total_count: null,
|
19
19
|
items: null
|
20
20
|
)
|
data/docs/UsersApi.md
CHANGED
@@ -250,7 +250,7 @@ end
|
|
250
250
|
|
251
251
|
## get_users
|
252
252
|
|
253
|
-
> <
|
253
|
+
> <UsersRep> get_users(project_key, environment_key, opts)
|
254
254
|
|
255
255
|
List users
|
256
256
|
|
@@ -290,7 +290,7 @@ end
|
|
290
290
|
|
291
291
|
This returns an Array which contains the response data, status code and headers.
|
292
292
|
|
293
|
-
> <Array(<
|
293
|
+
> <Array(<UsersRep>, Integer, Hash)> get_users_with_http_info(project_key, environment_key, opts)
|
294
294
|
|
295
295
|
```ruby
|
296
296
|
begin
|
@@ -298,7 +298,7 @@ begin
|
|
298
298
|
data, status_code, headers = api_instance.get_users_with_http_info(project_key, environment_key, opts)
|
299
299
|
p status_code # => 2xx
|
300
300
|
p headers # => { ... }
|
301
|
-
p data # => <
|
301
|
+
p data # => <UsersRep>
|
302
302
|
rescue LaunchDarklyApi::ApiError => e
|
303
303
|
puts "Error when calling UsersApi->get_users_with_http_info: #{e}"
|
304
304
|
end
|
@@ -315,7 +315,7 @@ end
|
|
315
315
|
|
316
316
|
### Return type
|
317
317
|
|
318
|
-
[**
|
318
|
+
[**UsersRep**](UsersRep.md)
|
319
319
|
|
320
320
|
### Authorization
|
321
321
|
|
data/docs/UsersRep.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# LaunchDarklyApi::UsersRep
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **_links** | [**Hash<String, Link>**](Link.md) | | [optional] |
|
8
|
+
| **total_count** | **Integer** | | |
|
9
|
+
| **items** | [**Array<UserRecord>**](UserRecord.md) | | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'launchdarkly_api'
|
15
|
+
|
16
|
+
instance = LaunchDarklyApi::UsersRep.new(
|
17
|
+
_links: {"next":{"href":"/api/v2/users/my-project/my-environment?after=1647993600000&limit=20&searchAfter=my-user","type":"application/json"},"self":{"href":"/api/v2/users/my-project/my-environment?after=1647993600000&limit=20","type":"application/json"}},
|
18
|
+
total_count: null,
|
19
|
+
items: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -83,7 +83,7 @@ module LaunchDarklyApi
|
|
83
83
|
end
|
84
84
|
|
85
85
|
# Get account member
|
86
|
-
# Get a single account member by ID
|
86
|
+
# Get a single account member by ID. `me` is a reserved value for the `id` parameter and returns the caller's member information.
|
87
87
|
# @param id [String] The member ID
|
88
88
|
# @param [Hash] opts the optional parameters
|
89
89
|
# @return [Member]
|
@@ -93,7 +93,7 @@ module LaunchDarklyApi
|
|
93
93
|
end
|
94
94
|
|
95
95
|
# Get account member
|
96
|
-
# Get a single account member by ID
|
96
|
+
# Get a single account member by ID. `me` is a reserved value for the `id` parameter and returns the caller's member information.
|
97
97
|
# @param id [String] The member ID
|
98
98
|
# @param [Hash] opts the optional parameters
|
99
99
|
# @return [Array<(Member, Integer, Hash)>] Member data, response status code and response headers
|
@@ -288,8 +288,8 @@ module LaunchDarklyApi
|
|
288
288
|
return data, status_code, headers
|
289
289
|
end
|
290
290
|
|
291
|
-
# Add member to teams
|
292
|
-
# Add member to
|
291
|
+
# Add a member to teams
|
292
|
+
# Add one member to one or more teams.
|
293
293
|
# @param id [String] The member ID
|
294
294
|
# @param member_teams_post_input [MemberTeamsPostInput]
|
295
295
|
# @param [Hash] opts the optional parameters
|
@@ -299,8 +299,8 @@ module LaunchDarklyApi
|
|
299
299
|
data
|
300
300
|
end
|
301
301
|
|
302
|
-
# Add member to teams
|
303
|
-
# Add member to
|
302
|
+
# Add a member to teams
|
303
|
+
# Add one member to one or more teams.
|
304
304
|
# @param id [String] The member ID
|
305
305
|
# @param member_teams_post_input [MemberTeamsPostInput]
|
306
306
|
# @param [Hash] opts the optional parameters
|
@@ -158,7 +158,7 @@ module LaunchDarklyApi
|
|
158
158
|
end
|
159
159
|
|
160
160
|
# Update environment
|
161
|
-
# Update an environment. Requires a [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes to the environment. To update fields in the environment object that are arrays, set the `path` to the name of the field and then append `/<array index>`. Using `/0` appends to the beginning of the array. ### Approval settings This request only returns the `approvalSettings` key if the [Flag Approvals](https://docs.launchdarkly.com/home/feature-workflows/approvals) feature is enabled. Only the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable. If you try to patch the environment by setting both `required` and `requiredApprovalTags`, the request fails and an error appears. You can specify either required approvals for all flags in an environment or those with specific tags, but not both.
|
161
|
+
# Update an environment. Requires a [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes to the environment. To update fields in the environment object that are arrays, set the `path` to the name of the field and then append `/<array index>`. Using `/0` appends to the beginning of the array. ### Approval settings This request only returns the `approvalSettings` key if the [Flag Approvals](https://docs.launchdarkly.com/home/feature-workflows/approvals) feature is enabled. Only the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable. If you try to patch the environment by setting both `required` and `requiredApprovalTags`, the request fails and an error appears. You can specify either required approvals for all flags in an environment or those with specific tags, but not both.
|
162
162
|
# @param project_key [String] The project key
|
163
163
|
# @param environment_key [String] The environment key
|
164
164
|
# @param patch_operation [Array<PatchOperation>]
|
@@ -170,7 +170,7 @@ module LaunchDarklyApi
|
|
170
170
|
end
|
171
171
|
|
172
172
|
# Update environment
|
173
|
-
# Update an environment. Requires a [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes to the environment. To update fields in the environment object that are arrays, set the `path` to the name of the field and then append `/<array index>`. Using `/0` appends to the beginning of the array. ### Approval settings This request only returns the `approvalSettings` key if the [Flag Approvals](https://docs.launchdarkly.com/home/feature-workflows/approvals) feature is enabled. Only the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable. If you try to patch the environment by setting both `required` and `requiredApprovalTags`, the request fails and an error appears. You can specify either required approvals for all flags in an environment or those with specific tags, but not both.
|
173
|
+
# Update an environment. Requires a [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes to the environment. To update fields in the environment object that are arrays, set the `path` to the name of the field and then append `/<array index>`. Using `/0` appends to the beginning of the array. ### Approval settings This request only returns the `approvalSettings` key if the [Flag Approvals](https://docs.launchdarkly.com/home/feature-workflows/approvals) feature is enabled. Only the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable. If you try to patch the environment by setting both `required` and `requiredApprovalTags`, the request fails and an error appears. You can specify either required approvals for all flags in an environment or those with specific tags, but not both.
|
174
174
|
# @param project_key [String] The project key
|
175
175
|
# @param environment_key [String] The environment key
|
176
176
|
# @param patch_operation [Array<PatchOperation>]
|
@@ -25,7 +25,7 @@ module LaunchDarklyApi
|
|
25
25
|
# @param environment_key [String] The environment key
|
26
26
|
# @param experiment_post [ExperimentPost]
|
27
27
|
# @param [Hash] opts the optional parameters
|
28
|
-
# @return [
|
28
|
+
# @return [Experiment]
|
29
29
|
def create_experiment(project_key, environment_key, experiment_post, opts = {})
|
30
30
|
data, _status_code, _headers = create_experiment_with_http_info(project_key, environment_key, experiment_post, opts)
|
31
31
|
data
|
@@ -37,7 +37,7 @@ module LaunchDarklyApi
|
|
37
37
|
# @param environment_key [String] The environment key
|
38
38
|
# @param experiment_post [ExperimentPost]
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
|
-
# @return [Array<(
|
40
|
+
# @return [Array<(Experiment, Integer, Hash)>] Experiment data, response status code and response headers
|
41
41
|
def create_experiment_with_http_info(project_key, environment_key, experiment_post, opts = {})
|
42
42
|
if @api_client.config.debugging
|
43
43
|
@api_client.config.logger.debug 'Calling API: ExperimentsBetaApi.create_experiment ...'
|
@@ -77,7 +77,7 @@ module LaunchDarklyApi
|
|
77
77
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(experiment_post)
|
78
78
|
|
79
79
|
# return_type
|
80
|
-
return_type = opts[:debug_return_type] || '
|
80
|
+
return_type = opts[:debug_return_type] || 'Experiment'
|
81
81
|
|
82
82
|
# auth_names
|
83
83
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -191,7 +191,7 @@ module LaunchDarklyApi
|
|
191
191
|
# @param environment_key [String] The environment key
|
192
192
|
# @param experiment_key [String] The experiment key
|
193
193
|
# @param [Hash] opts the optional parameters
|
194
|
-
# @return [
|
194
|
+
# @return [Experiment]
|
195
195
|
def get_experiment(project_key, environment_key, experiment_key, opts = {})
|
196
196
|
data, _status_code, _headers = get_experiment_with_http_info(project_key, environment_key, experiment_key, opts)
|
197
197
|
data
|
@@ -203,7 +203,7 @@ module LaunchDarklyApi
|
|
203
203
|
# @param environment_key [String] The environment key
|
204
204
|
# @param experiment_key [String] The experiment key
|
205
205
|
# @param [Hash] opts the optional parameters
|
206
|
-
# @return [Array<(
|
206
|
+
# @return [Array<(Experiment, Integer, Hash)>] Experiment data, response status code and response headers
|
207
207
|
def get_experiment_with_http_info(project_key, environment_key, experiment_key, opts = {})
|
208
208
|
if @api_client.config.debugging
|
209
209
|
@api_client.config.logger.debug 'Calling API: ExperimentsBetaApi.get_experiment ...'
|
@@ -238,7 +238,7 @@ module LaunchDarklyApi
|
|
238
238
|
post_body = opts[:debug_body]
|
239
239
|
|
240
240
|
# return_type
|
241
|
-
return_type = opts[:debug_return_type] || '
|
241
|
+
return_type = opts[:debug_return_type] || 'Experiment'
|
242
242
|
|
243
243
|
# auth_names
|
244
244
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -504,7 +504,7 @@ module LaunchDarklyApi
|
|
504
504
|
# @param experiment_key [String] The experiment key
|
505
505
|
# @param experiment_patch_input [ExperimentPatchInput]
|
506
506
|
# @param [Hash] opts the optional parameters
|
507
|
-
# @return [
|
507
|
+
# @return [Experiment]
|
508
508
|
def patch_experiment(project_key, environment_key, experiment_key, experiment_patch_input, opts = {})
|
509
509
|
data, _status_code, _headers = patch_experiment_with_http_info(project_key, environment_key, experiment_key, experiment_patch_input, opts)
|
510
510
|
data
|
@@ -517,7 +517,7 @@ module LaunchDarklyApi
|
|
517
517
|
# @param experiment_key [String] The experiment key
|
518
518
|
# @param experiment_patch_input [ExperimentPatchInput]
|
519
519
|
# @param [Hash] opts the optional parameters
|
520
|
-
# @return [Array<(
|
520
|
+
# @return [Array<(Experiment, Integer, Hash)>] Experiment data, response status code and response headers
|
521
521
|
def patch_experiment_with_http_info(project_key, environment_key, experiment_key, experiment_patch_input, opts = {})
|
522
522
|
if @api_client.config.debugging
|
523
523
|
@api_client.config.logger.debug 'Calling API: ExperimentsBetaApi.patch_experiment ...'
|
@@ -561,7 +561,7 @@ module LaunchDarklyApi
|
|
561
561
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(experiment_patch_input)
|
562
562
|
|
563
563
|
# return_type
|
564
|
-
return_type = opts[:debug_return_type] || '
|
564
|
+
return_type = opts[:debug_return_type] || 'Experiment'
|
565
565
|
|
566
566
|
# auth_names
|
567
567
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -708,7 +708,7 @@ module LaunchDarklyApi
|
|
708
708
|
end
|
709
709
|
|
710
710
|
# Update feature flag
|
711
|
-
# Perform a partial update to a feature flag. ## Using semantic patches on a feature flag To use a [semantic patch](/reference#updates-via-semantic-patches) on a feature flag resource, you must include a header in the request. If you call a semantic patch resource without this header, you will receive a `400` response because your semantic patch will be interpreted as a JSON patch. Use this header: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` The body of a semantic patch request takes the following three properties: 1. `comment` (string): (Optional) A description of the update. 1. `environmentKey` (string): (Required) The key of the LaunchDarkly environment. 1. `instructions` (array): (Required) The list of actions to be performed by the update. Each action in the list must be an object/hash table with a `kind` property that indicates the instruction. Depending on the `kind`, the API may require other parameters. When this is the case, add the parameters as additional fields to the instruction object. Read below for more information on the specific supported semantic patch instructions. If any instruction in the patch encounters an error, the error will be returned and the flag will not be changed. In general, instructions will silently do nothing if the flag is already in the state requested by the patch instruction. For example, `removeUserTargets` does nothing when the targets have already been removed. They will generally error if a parameter refers to something that does not exist, like a variation ID that doesn't correspond to a variation on the flag or a rule ID that doesn't belong to a rule on the flag. Other specific error conditions are noted in the instruction descriptions. ### Instructions #### `turnFlagOn` Sets the flag's targeting state to on. For example, to flip a flag on, use this request body: ```json { \"environmentKey\": \"example-environment-key\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ``` #### `turnFlagOff` Sets the flag's targeting state to off. For example, to flip a flag off, use this request body: ```json { \"environmentKey\": \"example-environment-key\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### `addUserTargets` Adds the user keys in `values` to the individual user targets for the variation specified by `variationId`. Returns an error if this causes the same user key to be targeted in multiple variations. ##### Parameters - `values`: list of user keys - `variationId`: ID of a variation on the flag #### `removeUserTargets` Removes the user keys in `values` to the individual user targets for the variation specified by `variationId`. Does nothing if the user keys are not targeted. ##### Parameters - `values`: list of user keys - `variationId`: ID of a variation on the flag #### `replaceUserTargets` Completely replaces the existing set of user targeting. All variations must be provided. Example: ```json { \"kind\": \"replaceUserTargets\", \"targets\": [ { \"variationId\": \"variation-1\", \"values\": [\"blah\", \"foo\", \"bar\"] }, { \"variationId\": \"variation-2\", \"values\": [\"abc\", \"def\"] } ] } ``` ##### Parameters - `targets`: a list of user targeting #### `clearUserTargets` Removes all individual user targets from the variation specified by `variationId` ##### Parameters - `variationId`: ID of a variation on the flag #### `addPrerequisite` Adds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag. ##### Parameters - `key`: flag key of another flag - `variationId`: ID of a variation of the flag with key `key` #### `removePrerequisite` Removes the prerequisite indicated by `key`. Does nothing if this prerequisite does not exist. ##### Parameters - `key`: flag key of an existing prerequisite #### `updatePrerequisite` Changes the prerequisite with flag key `key` to the variation indicated by `variationId`. Returns an error if this prerequisite does not exist. ##### Parameters - `key`: flag key of an existing prerequisite - `variationId`: ID of a variation of the flag with key `key` #### `replacePrerequisites` Completely replaces the existing set of prerequisites for a given flag. Example: ```json { \"kind\": \"replacePrerequisites\", \"prerequisites\": [ { \"key\": \"flag-key\", \"variationId\": \"variation-1\" }, { \"key\": \"another-flag\", \"variationId\": \"variation-2\" } ] } ``` ##### Parameters - `prerequisites`: a list of prerequisites #### `addRule` Adds a new rule to the flag with the given `clauses` which serves the variation indicated by `variationId` or the percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. If `beforeRuleId` is set, the rule will be added in the list of rules before the indicated rule. Otherwise, the rule will be added to the end of the list. ##### Parameters - `clauses`: Array of clauses (see `addClauses`) - `beforeRuleId`: Optional ID of a rule in the flag - `variationId`: ID of a variation of the flag - `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000) - `rolloutBucketBy`: Optional user attribute #### `removeRule` Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule in the flag #### `replaceRules` Completely replaces the existing rules for a given flag. Example: ```json { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"variation-1\", \"description\": \"myRule\", \"clauses\": [ { \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ], \"trackEvents\": true } ] } ``` ##### Parameters - `rules`: a list of rules #### `addClauses` Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag - `clauses`: Array of clause objects, with `attribute` (string), `op` (string), and `values` (array of strings, numbers, or dates) properties. #### `removeClauses` Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. #### Parameters - `ruleId`: ID of a rule in the flag - `clauseIds`: Array of IDs of clauses in the rule #### `updateClause` Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the flag - `clauseId`: ID of a clause in that rule - `clause`: Clause object #### `addValuesToClause` Adds `values` to the values of the clause indicated by `ruleId` and `clauseId`. ##### Parameters - `ruleId`: ID of a rule in the flag - `clauseId`: ID of a clause in that rule - `values`: Array of strings #### `removeValuesFromClause` Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. ##### Parameters `ruleId`: ID of a rule in the flag `clauseId`: ID of a clause in that rule `values`: Array of strings #### `reorderRules` Rearranges the rules to match the order given in `ruleIds`. Will return an error if `ruleIds` does not match the current set of rules on the flag. ##### Parameters - `ruleIds`: Array of IDs of all rules in the flag #### `updateRuleVariationOrRollout` Updates what the rule indicated by `ruleId` serves if its clauses evaluate to true. Can either be a fixed variation indicated by `variationId` or a percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. ##### Parameters - `ruleId`: ID of a rule in the flag - `variationId`: ID of a variation of the flag or - `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000) - `rolloutBucketBy`: Optional user attribute #### `updateFallthroughVariationOrRollout` Updates the flag's fallthrough, which is served if none of the targeting rules match. Can either be a fixed variation indicated by `variationId` or a percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. ##### Parameters `variationId`: ID of a variation of the flag or `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000) `rolloutBucketBy`: Optional user attribute #### `updateOffVariation` Updates the variation served when the flag's targeting is off to the variation indicated by `variationId`. ##### Parameters `variationId`: ID of a variation of the flag ### Example ```json { \"environmentKey\": \"production\", \"instructions\": [ { \"kind\": \"turnFlagOn\" }, { \"kind\": \"turnFlagOff\" }, { \"kind\": \"addUserTargets\", \"variationId\": \"8bfb304e-d516-47e5-8727-e7f798e8992d\", \"values\": [\"userId\", \"userId2\"] }, { \"kind\": \"removeUserTargets\", \"variationId\": \"8bfb304e-d516-47e5-8727-e7f798e8992d\", \"values\": [\"userId3\", \"userId4\"] }, { \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutWeights\": { \"variationId\": 50000, \"variationId2\": 50000 }, \"rolloutBucketBy\": null }, { \"kind\": \"addRule\", \"clauses\": [ { \"attribute\": \"segmentMatch\", \"negate\": false, \"values\": [\"test-segment\"] } ], \"variationId\": null, \"rolloutWeights\": { \"variationId\": 50000, \"variationId2\": 50000 }, \"rolloutBucketBy\": \"key\" }, { \"kind\": \"removeRule\", \"ruleId\": \"99f12464-a429-40fc-86cc-b27612188955\" }, { \"kind\": \"reorderRules\", \"ruleIds\": [\"2f72974e-de68-4243-8dd3-739582147a1f\", \"8bfb304e-d516-47e5-8727-e7f798e8992d\"] }, { \"kind\": \"addClauses\", \"ruleId\": \"1134\", \"clauses\": [ { \"attribute\": \"email\", \"op\": \"in\", \"negate\": false, \"values\": [\"test@test.com\"] } ] }, { \"kind\": \"removeClauses\", \"ruleId\": \"1242529\", \"clauseIds\": [\"8bfb304e-d516-47e5-8727-e7f798e8992d\"] }, { \"kind\": \"updateClause\", \"ruleId\": \"2f72974e-de68-4243-8dd3-739582147a1f\", \"clauseId\": \"309845\", \"clause\": { \"attribute\": \"segmentMatch\", \"negate\": false, \"values\": [\"test-segment\"] } }, { \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"2342\", \"rolloutWeights\": null, \"rolloutBucketBy\": null }, { \"kind\": \"updateOffVariation\", \"variationId\": \"3242453\" }, { \"kind\": \"addPrerequisite\", \"variationId\": \"234235\", \"key\": \"flagKey2\" }, { \"kind\": \"updatePrerequisite\", \"variationId\": \"234235\", \"key\": \"flagKey2\" }, { \"kind\": \"removePrerequisite\", \"key\": \"flagKey\" } ] } ``` ## Using JSON Patches on a feature flag If you do not include the header described above, you can use [JSON patch](/reference#updates-via-json-patch). When using the update feature flag endpoint to add individual users to a specific variation, there are two different patch documents, depending on whether users are already being individually targeted for the variation. If a flag variation already has users individually targeted, the path for the JSON Patch operation is: ```json { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ``` If a flag variation does not already have users individually targeted, the path for the JSON Patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` ## Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will required creating an [approval request](/tag/Approvals) or a [workflow](/tag/Workflows-(beta)). This behavior can be bypassed by users and access tokens that have a [custom role](https://docs.launchdarkly.com/home/members/custom-roles) with permission to perform the `bypassRequiredApproval` action on the flag. ## Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`.
|
711
|
+
# Perform a partial update to a feature flag. ## Using semantic patches on a feature flag To use a [semantic patch](/reference#updates-via-semantic-patches) on a feature flag resource, you must include a header in the request. If you call a semantic patch resource without this header, you will receive a `400` response because your semantic patch will be interpreted as a JSON patch. Use this header: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` The body of a semantic patch request takes the following three properties: 1. `comment` (string): (Optional) A description of the update. 1. `environmentKey` (string): (Required) The key of the LaunchDarkly environment. 1. `instructions` (array): (Required) The list of actions to be performed by the update. Each action in the list must be an object/hash table with a `kind` property that indicates the instruction. Depending on the `kind`, the API may require other parameters. When this is the case, add the parameters as additional fields to the instruction object. Read below for more information on the specific supported semantic patch instructions. If any instruction in the patch encounters an error, the error will be returned and the flag will not be changed. In general, instructions will silently do nothing if the flag is already in the state requested by the patch instruction. For example, `removeUserTargets` does nothing when the targets have already been removed. They will generally error if a parameter refers to something that does not exist, like a variation ID that doesn't correspond to a variation on the flag or a rule ID that doesn't belong to a rule on the flag. Other specific error conditions are noted in the instruction descriptions. ### Instructions #### `turnFlagOn` Sets the flag's targeting state to on. For example, to flip a flag on, use this request body: ```json { \"environmentKey\": \"example-environment-key\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ``` #### `turnFlagOff` Sets the flag's targeting state to off. For example, to flip a flag off, use this request body: ```json { \"environmentKey\": \"example-environment-key\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### `addUserTargets` Adds the user keys in `values` to the individual user targets for the variation specified by `variationId`. Returns an error if this causes the same user key to be targeted in multiple variations. ##### Parameters - `values`: list of user keys - `variationId`: ID of a variation on the flag #### `removeUserTargets` Removes the user keys in `values` to the individual user targets for the variation specified by `variationId`. Does nothing if the user keys are not targeted. ##### Parameters - `values`: list of user keys - `variationId`: ID of a variation on the flag #### `replaceUserTargets` Completely replaces the existing set of user targeting. All variations must be provided. Example: ```json { \"kind\": \"replaceUserTargets\", \"targets\": [ { \"variationId\": \"variation-1\", \"values\": [\"blah\", \"foo\", \"bar\"] }, { \"variationId\": \"variation-2\", \"values\": [\"abc\", \"def\"] } ] } ``` ##### Parameters - `targets`: a list of user targeting #### `clearUserTargets` Removes all individual user targets from the variation specified by `variationId` ##### Parameters - `variationId`: ID of a variation on the flag #### `addPrerequisite` Adds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag. ##### Parameters - `key`: flag key of another flag - `variationId`: ID of a variation of the flag with key `key` #### `removePrerequisite` Removes the prerequisite indicated by `key`. Does nothing if this prerequisite does not exist. ##### Parameters - `key`: flag key of an existing prerequisite #### `updatePrerequisite` Changes the prerequisite with flag key `key` to the variation indicated by `variationId`. Returns an error if this prerequisite does not exist. ##### Parameters - `key`: flag key of an existing prerequisite - `variationId`: ID of a variation of the flag with key `key` #### `replacePrerequisites` Completely replaces the existing set of prerequisites for a given flag. Example: ```json { \"kind\": \"replacePrerequisites\", \"prerequisites\": [ { \"key\": \"flag-key\", \"variationId\": \"variation-1\" }, { \"key\": \"another-flag\", \"variationId\": \"variation-2\" } ] } ``` ##### Parameters - `prerequisites`: a list of prerequisites #### `addRule` Adds a new rule to the flag with the given `clauses` which serves the variation indicated by `variationId` or the percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. If `beforeRuleId` is set, the rule will be added in the list of rules before the indicated rule. Otherwise, the rule will be added to the end of the list. ##### Parameters - `clauses`: Array of clauses (see `addClauses`) - `beforeRuleId`: Optional ID of a rule in the flag - `variationId`: ID of a variation of the flag - `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000) - `rolloutBucketBy`: Optional user attribute #### `removeRule` Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule in the flag #### `replaceRules` Completely replaces the existing rules for a given flag. Example: ```json { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"variation-1\", \"description\": \"myRule\", \"clauses\": [ { \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ], \"trackEvents\": true } ] } ``` ##### Parameters - `rules`: a list of rules #### `addClauses` Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag - `clauses`: Array of clause objects, with `attribute` (string), `op` (string), and `values` (array of strings, numbers, or dates) properties. #### `removeClauses` Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. #### Parameters - `ruleId`: ID of a rule in the flag - `clauseIds`: Array of IDs of clauses in the rule #### `updateClause` Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the flag - `clauseId`: ID of a clause in that rule - `clause`: Clause object #### `addValuesToClause` Adds `values` to the values of the clause indicated by `ruleId` and `clauseId`. ##### Parameters - `ruleId`: ID of a rule in the flag - `clauseId`: ID of a clause in that rule - `values`: Array of strings #### `removeValuesFromClause` Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. ##### Parameters `ruleId`: ID of a rule in the flag `clauseId`: ID of a clause in that rule `values`: Array of strings #### `reorderRules` Rearranges the rules to match the order given in `ruleIds`. Will return an error if `ruleIds` does not match the current set of rules on the flag. ##### Parameters - `ruleIds`: Array of IDs of all rules in the flag #### `updateRuleVariationOrRollout` Updates what the rule indicated by `ruleId` serves if its clauses evaluate to true. Can either be a fixed variation indicated by `variationId` or a percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. ##### Parameters - `ruleId`: ID of a rule in the flag - `variationId`: ID of a variation of the flag or - `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000) - `rolloutBucketBy`: Optional user attribute #### `updateFallthroughVariationOrRollout` Updates the flag's fallthrough, which is served if none of the targeting rules match. Can either be a fixed variation indicated by `variationId` or a percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. ##### Parameters `variationId`: ID of a variation of the flag or `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000) `rolloutBucketBy`: Optional user attribute #### `updateOffVariation` Updates the variation served when the flag's targeting is off to the variation indicated by `variationId`. ##### Parameters `variationId`: ID of a variation of the flag ### Example ```json { \"environmentKey\": \"production\", \"instructions\": [ { \"kind\": \"turnFlagOn\" }, { \"kind\": \"turnFlagOff\" }, { \"kind\": \"addUserTargets\", \"variationId\": \"8bfb304e-d516-47e5-8727-e7f798e8992d\", \"values\": [\"userId\", \"userId2\"] }, { \"kind\": \"removeUserTargets\", \"variationId\": \"8bfb304e-d516-47e5-8727-e7f798e8992d\", \"values\": [\"userId3\", \"userId4\"] }, { \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutWeights\": { \"variationId\": 50000, \"variationId2\": 50000 }, \"rolloutBucketBy\": null }, { \"kind\": \"addRule\", \"clauses\": [ { \"attribute\": \"segmentMatch\", \"negate\": false, \"values\": [\"test-segment\"] } ], \"variationId\": null, \"rolloutWeights\": { \"variationId\": 50000, \"variationId2\": 50000 }, \"rolloutBucketBy\": \"key\" }, { \"kind\": \"removeRule\", \"ruleId\": \"99f12464-a429-40fc-86cc-b27612188955\" }, { \"kind\": \"reorderRules\", \"ruleIds\": [\"2f72974e-de68-4243-8dd3-739582147a1f\", \"8bfb304e-d516-47e5-8727-e7f798e8992d\"] }, { \"kind\": \"addClauses\", \"ruleId\": \"1134\", \"clauses\": [ { \"attribute\": \"email\", \"op\": \"in\", \"negate\": false, \"values\": [\"test@test.com\"] } ] }, { \"kind\": \"removeClauses\", \"ruleId\": \"1242529\", \"clauseIds\": [\"8bfb304e-d516-47e5-8727-e7f798e8992d\"] }, { \"kind\": \"updateClause\", \"ruleId\": \"2f72974e-de68-4243-8dd3-739582147a1f\", \"clauseId\": \"309845\", \"clause\": { \"attribute\": \"segmentMatch\", \"negate\": false, \"values\": [\"test-segment\"] } }, { \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"2342\", \"rolloutWeights\": null, \"rolloutBucketBy\": null }, { \"kind\": \"updateOffVariation\", \"variationId\": \"3242453\" }, { \"kind\": \"addPrerequisite\", \"variationId\": \"234235\", \"key\": \"flagKey2\" }, { \"kind\": \"updatePrerequisite\", \"variationId\": \"234235\", \"key\": \"flagKey2\" }, { \"kind\": \"removePrerequisite\", \"key\": \"flagKey\" } ] } ``` ## Using JSON Patches on a feature flag If you do not include the header described above, you can use [JSON patch](/reference#updates-via-json-patch). When using the update feature flag endpoint to add individual users to a specific variation, there are two different patch documents, depending on whether users are already being individually targeted for the variation. If a flag variation already has users individually targeted, the path for the JSON Patch operation is: ```json { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ``` If a flag variation does not already have users individually targeted, the path for the JSON Patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` ## Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will required creating an [approval request](/tag/Approvals) or a [workflow](/tag/Workflows-(beta)). ## Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`.
|
712
712
|
# @param project_key [String] The project key
|
713
713
|
# @param feature_flag_key [String] The feature flag key. The key identifies the flag in your code.
|
714
714
|
# @param patch_with_comment [PatchWithComment]
|
@@ -720,7 +720,7 @@ module LaunchDarklyApi
|
|
720
720
|
end
|
721
721
|
|
722
722
|
# Update feature flag
|
723
|
-
# Perform a partial update to a feature flag. ## Using semantic patches on a feature flag To use a [semantic patch](/reference#updates-via-semantic-patches) on a feature flag resource, you must include a header in the request. If you call a semantic patch resource without this header, you will receive a `400` response because your semantic patch will be interpreted as a JSON patch. Use this header: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` The body of a semantic patch request takes the following three properties: 1. `comment` (string): (Optional) A description of the update. 1. `environmentKey` (string): (Required) The key of the LaunchDarkly environment. 1. `instructions` (array): (Required) The list of actions to be performed by the update. Each action in the list must be an object/hash table with a `kind` property that indicates the instruction. Depending on the `kind`, the API may require other parameters. When this is the case, add the parameters as additional fields to the instruction object. Read below for more information on the specific supported semantic patch instructions. If any instruction in the patch encounters an error, the error will be returned and the flag will not be changed. In general, instructions will silently do nothing if the flag is already in the state requested by the patch instruction. For example, `removeUserTargets` does nothing when the targets have already been removed. They will generally error if a parameter refers to something that does not exist, like a variation ID that doesn't correspond to a variation on the flag or a rule ID that doesn't belong to a rule on the flag. Other specific error conditions are noted in the instruction descriptions. ### Instructions #### `turnFlagOn` Sets the flag's targeting state to on. For example, to flip a flag on, use this request body: ```json { \"environmentKey\": \"example-environment-key\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ``` #### `turnFlagOff` Sets the flag's targeting state to off. For example, to flip a flag off, use this request body: ```json { \"environmentKey\": \"example-environment-key\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### `addUserTargets` Adds the user keys in `values` to the individual user targets for the variation specified by `variationId`. Returns an error if this causes the same user key to be targeted in multiple variations. ##### Parameters - `values`: list of user keys - `variationId`: ID of a variation on the flag #### `removeUserTargets` Removes the user keys in `values` to the individual user targets for the variation specified by `variationId`. Does nothing if the user keys are not targeted. ##### Parameters - `values`: list of user keys - `variationId`: ID of a variation on the flag #### `replaceUserTargets` Completely replaces the existing set of user targeting. All variations must be provided. Example: ```json { \"kind\": \"replaceUserTargets\", \"targets\": [ { \"variationId\": \"variation-1\", \"values\": [\"blah\", \"foo\", \"bar\"] }, { \"variationId\": \"variation-2\", \"values\": [\"abc\", \"def\"] } ] } ``` ##### Parameters - `targets`: a list of user targeting #### `clearUserTargets` Removes all individual user targets from the variation specified by `variationId` ##### Parameters - `variationId`: ID of a variation on the flag #### `addPrerequisite` Adds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag. ##### Parameters - `key`: flag key of another flag - `variationId`: ID of a variation of the flag with key `key` #### `removePrerequisite` Removes the prerequisite indicated by `key`. Does nothing if this prerequisite does not exist. ##### Parameters - `key`: flag key of an existing prerequisite #### `updatePrerequisite` Changes the prerequisite with flag key `key` to the variation indicated by `variationId`. Returns an error if this prerequisite does not exist. ##### Parameters - `key`: flag key of an existing prerequisite - `variationId`: ID of a variation of the flag with key `key` #### `replacePrerequisites` Completely replaces the existing set of prerequisites for a given flag. Example: ```json { \"kind\": \"replacePrerequisites\", \"prerequisites\": [ { \"key\": \"flag-key\", \"variationId\": \"variation-1\" }, { \"key\": \"another-flag\", \"variationId\": \"variation-2\" } ] } ``` ##### Parameters - `prerequisites`: a list of prerequisites #### `addRule` Adds a new rule to the flag with the given `clauses` which serves the variation indicated by `variationId` or the percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. If `beforeRuleId` is set, the rule will be added in the list of rules before the indicated rule. Otherwise, the rule will be added to the end of the list. ##### Parameters - `clauses`: Array of clauses (see `addClauses`) - `beforeRuleId`: Optional ID of a rule in the flag - `variationId`: ID of a variation of the flag - `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000) - `rolloutBucketBy`: Optional user attribute #### `removeRule` Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule in the flag #### `replaceRules` Completely replaces the existing rules for a given flag. Example: ```json { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"variation-1\", \"description\": \"myRule\", \"clauses\": [ { \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ], \"trackEvents\": true } ] } ``` ##### Parameters - `rules`: a list of rules #### `addClauses` Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag - `clauses`: Array of clause objects, with `attribute` (string), `op` (string), and `values` (array of strings, numbers, or dates) properties. #### `removeClauses` Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. #### Parameters - `ruleId`: ID of a rule in the flag - `clauseIds`: Array of IDs of clauses in the rule #### `updateClause` Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the flag - `clauseId`: ID of a clause in that rule - `clause`: Clause object #### `addValuesToClause` Adds `values` to the values of the clause indicated by `ruleId` and `clauseId`. ##### Parameters - `ruleId`: ID of a rule in the flag - `clauseId`: ID of a clause in that rule - `values`: Array of strings #### `removeValuesFromClause` Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. ##### Parameters `ruleId`: ID of a rule in the flag `clauseId`: ID of a clause in that rule `values`: Array of strings #### `reorderRules` Rearranges the rules to match the order given in `ruleIds`. Will return an error if `ruleIds` does not match the current set of rules on the flag. ##### Parameters - `ruleIds`: Array of IDs of all rules in the flag #### `updateRuleVariationOrRollout` Updates what the rule indicated by `ruleId` serves if its clauses evaluate to true. Can either be a fixed variation indicated by `variationId` or a percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. ##### Parameters - `ruleId`: ID of a rule in the flag - `variationId`: ID of a variation of the flag or - `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000) - `rolloutBucketBy`: Optional user attribute #### `updateFallthroughVariationOrRollout` Updates the flag's fallthrough, which is served if none of the targeting rules match. Can either be a fixed variation indicated by `variationId` or a percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. ##### Parameters `variationId`: ID of a variation of the flag or `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000) `rolloutBucketBy`: Optional user attribute #### `updateOffVariation` Updates the variation served when the flag's targeting is off to the variation indicated by `variationId`. ##### Parameters `variationId`: ID of a variation of the flag ### Example ```json { \"environmentKey\": \"production\", \"instructions\": [ { \"kind\": \"turnFlagOn\" }, { \"kind\": \"turnFlagOff\" }, { \"kind\": \"addUserTargets\", \"variationId\": \"8bfb304e-d516-47e5-8727-e7f798e8992d\", \"values\": [\"userId\", \"userId2\"] }, { \"kind\": \"removeUserTargets\", \"variationId\": \"8bfb304e-d516-47e5-8727-e7f798e8992d\", \"values\": [\"userId3\", \"userId4\"] }, { \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutWeights\": { \"variationId\": 50000, \"variationId2\": 50000 }, \"rolloutBucketBy\": null }, { \"kind\": \"addRule\", \"clauses\": [ { \"attribute\": \"segmentMatch\", \"negate\": false, \"values\": [\"test-segment\"] } ], \"variationId\": null, \"rolloutWeights\": { \"variationId\": 50000, \"variationId2\": 50000 }, \"rolloutBucketBy\": \"key\" }, { \"kind\": \"removeRule\", \"ruleId\": \"99f12464-a429-40fc-86cc-b27612188955\" }, { \"kind\": \"reorderRules\", \"ruleIds\": [\"2f72974e-de68-4243-8dd3-739582147a1f\", \"8bfb304e-d516-47e5-8727-e7f798e8992d\"] }, { \"kind\": \"addClauses\", \"ruleId\": \"1134\", \"clauses\": [ { \"attribute\": \"email\", \"op\": \"in\", \"negate\": false, \"values\": [\"test@test.com\"] } ] }, { \"kind\": \"removeClauses\", \"ruleId\": \"1242529\", \"clauseIds\": [\"8bfb304e-d516-47e5-8727-e7f798e8992d\"] }, { \"kind\": \"updateClause\", \"ruleId\": \"2f72974e-de68-4243-8dd3-739582147a1f\", \"clauseId\": \"309845\", \"clause\": { \"attribute\": \"segmentMatch\", \"negate\": false, \"values\": [\"test-segment\"] } }, { \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"2342\", \"rolloutWeights\": null, \"rolloutBucketBy\": null }, { \"kind\": \"updateOffVariation\", \"variationId\": \"3242453\" }, { \"kind\": \"addPrerequisite\", \"variationId\": \"234235\", \"key\": \"flagKey2\" }, { \"kind\": \"updatePrerequisite\", \"variationId\": \"234235\", \"key\": \"flagKey2\" }, { \"kind\": \"removePrerequisite\", \"key\": \"flagKey\" } ] } ``` ## Using JSON Patches on a feature flag If you do not include the header described above, you can use [JSON patch](/reference#updates-via-json-patch). When using the update feature flag endpoint to add individual users to a specific variation, there are two different patch documents, depending on whether users are already being individually targeted for the variation. If a flag variation already has users individually targeted, the path for the JSON Patch operation is: ```json { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ``` If a flag variation does not already have users individually targeted, the path for the JSON Patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` ## Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will required creating an [approval request](/tag/Approvals) or a [workflow](/tag/Workflows-(beta)). This behavior can be bypassed by users and access tokens that have a [custom role](https://docs.launchdarkly.com/home/members/custom-roles) with permission to perform the `bypassRequiredApproval` action on the flag. ## Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`.
|
723
|
+
# Perform a partial update to a feature flag. ## Using semantic patches on a feature flag To use a [semantic patch](/reference#updates-via-semantic-patches) on a feature flag resource, you must include a header in the request. If you call a semantic patch resource without this header, you will receive a `400` response because your semantic patch will be interpreted as a JSON patch. Use this header: ``` Content-Type: application/json; domain-model=launchdarkly.semanticpatch ``` The body of a semantic patch request takes the following three properties: 1. `comment` (string): (Optional) A description of the update. 1. `environmentKey` (string): (Required) The key of the LaunchDarkly environment. 1. `instructions` (array): (Required) The list of actions to be performed by the update. Each action in the list must be an object/hash table with a `kind` property that indicates the instruction. Depending on the `kind`, the API may require other parameters. When this is the case, add the parameters as additional fields to the instruction object. Read below for more information on the specific supported semantic patch instructions. If any instruction in the patch encounters an error, the error will be returned and the flag will not be changed. In general, instructions will silently do nothing if the flag is already in the state requested by the patch instruction. For example, `removeUserTargets` does nothing when the targets have already been removed. They will generally error if a parameter refers to something that does not exist, like a variation ID that doesn't correspond to a variation on the flag or a rule ID that doesn't belong to a rule on the flag. Other specific error conditions are noted in the instruction descriptions. ### Instructions #### `turnFlagOn` Sets the flag's targeting state to on. For example, to flip a flag on, use this request body: ```json { \"environmentKey\": \"example-environment-key\", \"instructions\": [ { \"kind\": \"turnFlagOn\" } ] } ``` #### `turnFlagOff` Sets the flag's targeting state to off. For example, to flip a flag off, use this request body: ```json { \"environmentKey\": \"example-environment-key\", \"instructions\": [ { \"kind\": \"turnFlagOff\" } ] } ``` #### `addUserTargets` Adds the user keys in `values` to the individual user targets for the variation specified by `variationId`. Returns an error if this causes the same user key to be targeted in multiple variations. ##### Parameters - `values`: list of user keys - `variationId`: ID of a variation on the flag #### `removeUserTargets` Removes the user keys in `values` to the individual user targets for the variation specified by `variationId`. Does nothing if the user keys are not targeted. ##### Parameters - `values`: list of user keys - `variationId`: ID of a variation on the flag #### `replaceUserTargets` Completely replaces the existing set of user targeting. All variations must be provided. Example: ```json { \"kind\": \"replaceUserTargets\", \"targets\": [ { \"variationId\": \"variation-1\", \"values\": [\"blah\", \"foo\", \"bar\"] }, { \"variationId\": \"variation-2\", \"values\": [\"abc\", \"def\"] } ] } ``` ##### Parameters - `targets`: a list of user targeting #### `clearUserTargets` Removes all individual user targets from the variation specified by `variationId` ##### Parameters - `variationId`: ID of a variation on the flag #### `addPrerequisite` Adds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag. ##### Parameters - `key`: flag key of another flag - `variationId`: ID of a variation of the flag with key `key` #### `removePrerequisite` Removes the prerequisite indicated by `key`. Does nothing if this prerequisite does not exist. ##### Parameters - `key`: flag key of an existing prerequisite #### `updatePrerequisite` Changes the prerequisite with flag key `key` to the variation indicated by `variationId`. Returns an error if this prerequisite does not exist. ##### Parameters - `key`: flag key of an existing prerequisite - `variationId`: ID of a variation of the flag with key `key` #### `replacePrerequisites` Completely replaces the existing set of prerequisites for a given flag. Example: ```json { \"kind\": \"replacePrerequisites\", \"prerequisites\": [ { \"key\": \"flag-key\", \"variationId\": \"variation-1\" }, { \"key\": \"another-flag\", \"variationId\": \"variation-2\" } ] } ``` ##### Parameters - `prerequisites`: a list of prerequisites #### `addRule` Adds a new rule to the flag with the given `clauses` which serves the variation indicated by `variationId` or the percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. If `beforeRuleId` is set, the rule will be added in the list of rules before the indicated rule. Otherwise, the rule will be added to the end of the list. ##### Parameters - `clauses`: Array of clauses (see `addClauses`) - `beforeRuleId`: Optional ID of a rule in the flag - `variationId`: ID of a variation of the flag - `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000) - `rolloutBucketBy`: Optional user attribute #### `removeRule` Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule in the flag #### `replaceRules` Completely replaces the existing rules for a given flag. Example: ```json { \"kind\": \"replaceRules\", \"rules\": [ { \"variationId\": \"variation-1\", \"description\": \"myRule\", \"clauses\": [ { \"attribute\": \"segmentMatch\", \"op\": \"segmentMatch\", \"values\": [\"test\"] } ], \"trackEvents\": true } ] } ``` ##### Parameters - `rules`: a list of rules #### `addClauses` Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the flag - `clauses`: Array of clause objects, with `attribute` (string), `op` (string), and `values` (array of strings, numbers, or dates) properties. #### `removeClauses` Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. #### Parameters - `ruleId`: ID of a rule in the flag - `clauseIds`: Array of IDs of clauses in the rule #### `updateClause` Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the flag - `clauseId`: ID of a clause in that rule - `clause`: Clause object #### `addValuesToClause` Adds `values` to the values of the clause indicated by `ruleId` and `clauseId`. ##### Parameters - `ruleId`: ID of a rule in the flag - `clauseId`: ID of a clause in that rule - `values`: Array of strings #### `removeValuesFromClause` Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. ##### Parameters `ruleId`: ID of a rule in the flag `clauseId`: ID of a clause in that rule `values`: Array of strings #### `reorderRules` Rearranges the rules to match the order given in `ruleIds`. Will return an error if `ruleIds` does not match the current set of rules on the flag. ##### Parameters - `ruleIds`: Array of IDs of all rules in the flag #### `updateRuleVariationOrRollout` Updates what the rule indicated by `ruleId` serves if its clauses evaluate to true. Can either be a fixed variation indicated by `variationId` or a percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. ##### Parameters - `ruleId`: ID of a rule in the flag - `variationId`: ID of a variation of the flag or - `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000) - `rolloutBucketBy`: Optional user attribute #### `updateFallthroughVariationOrRollout` Updates the flag's fallthrough, which is served if none of the targeting rules match. Can either be a fixed variation indicated by `variationId` or a percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. ##### Parameters `variationId`: ID of a variation of the flag or `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000) `rolloutBucketBy`: Optional user attribute #### `updateOffVariation` Updates the variation served when the flag's targeting is off to the variation indicated by `variationId`. ##### Parameters `variationId`: ID of a variation of the flag ### Example ```json { \"environmentKey\": \"production\", \"instructions\": [ { \"kind\": \"turnFlagOn\" }, { \"kind\": \"turnFlagOff\" }, { \"kind\": \"addUserTargets\", \"variationId\": \"8bfb304e-d516-47e5-8727-e7f798e8992d\", \"values\": [\"userId\", \"userId2\"] }, { \"kind\": \"removeUserTargets\", \"variationId\": \"8bfb304e-d516-47e5-8727-e7f798e8992d\", \"values\": [\"userId3\", \"userId4\"] }, { \"kind\": \"updateFallthroughVariationOrRollout\", \"rolloutWeights\": { \"variationId\": 50000, \"variationId2\": 50000 }, \"rolloutBucketBy\": null }, { \"kind\": \"addRule\", \"clauses\": [ { \"attribute\": \"segmentMatch\", \"negate\": false, \"values\": [\"test-segment\"] } ], \"variationId\": null, \"rolloutWeights\": { \"variationId\": 50000, \"variationId2\": 50000 }, \"rolloutBucketBy\": \"key\" }, { \"kind\": \"removeRule\", \"ruleId\": \"99f12464-a429-40fc-86cc-b27612188955\" }, { \"kind\": \"reorderRules\", \"ruleIds\": [\"2f72974e-de68-4243-8dd3-739582147a1f\", \"8bfb304e-d516-47e5-8727-e7f798e8992d\"] }, { \"kind\": \"addClauses\", \"ruleId\": \"1134\", \"clauses\": [ { \"attribute\": \"email\", \"op\": \"in\", \"negate\": false, \"values\": [\"test@test.com\"] } ] }, { \"kind\": \"removeClauses\", \"ruleId\": \"1242529\", \"clauseIds\": [\"8bfb304e-d516-47e5-8727-e7f798e8992d\"] }, { \"kind\": \"updateClause\", \"ruleId\": \"2f72974e-de68-4243-8dd3-739582147a1f\", \"clauseId\": \"309845\", \"clause\": { \"attribute\": \"segmentMatch\", \"negate\": false, \"values\": [\"test-segment\"] } }, { \"kind\": \"updateRuleVariationOrRollout\", \"ruleId\": \"2342\", \"rolloutWeights\": null, \"rolloutBucketBy\": null }, { \"kind\": \"updateOffVariation\", \"variationId\": \"3242453\" }, { \"kind\": \"addPrerequisite\", \"variationId\": \"234235\", \"key\": \"flagKey2\" }, { \"kind\": \"updatePrerequisite\", \"variationId\": \"234235\", \"key\": \"flagKey2\" }, { \"kind\": \"removePrerequisite\", \"key\": \"flagKey\" } ] } ``` ## Using JSON Patches on a feature flag If you do not include the header described above, you can use [JSON patch](/reference#updates-via-json-patch). When using the update feature flag endpoint to add individual users to a specific variation, there are two different patch documents, depending on whether users are already being individually targeted for the variation. If a flag variation already has users individually targeted, the path for the JSON Patch operation is: ```json { \"op\": \"add\", \"path\": \"/environments/devint/targets/0/values/-\", \"value\": \"TestClient10\" } ``` If a flag variation does not already have users individually targeted, the path for the JSON Patch operation is: ```json [ { \"op\": \"add\", \"path\": \"/environments/devint/targets/-\", \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] } } ] ``` ## Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will required creating an [approval request](/tag/Approvals) or a [workflow](/tag/Workflows-(beta)). ## Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`.
|
724
724
|
# @param project_key [String] The project key
|
725
725
|
# @param feature_flag_key [String] The feature flag key. The key identifies the flag in your code.
|
726
726
|
# @param patch_with_comment [PatchWithComment]
|
@@ -20,7 +20,7 @@ module LaunchDarklyApi
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# List dependent feature flags
|
23
|
-
# List dependent flags across all environments for the flag specified in the path parameters. A dependent flag is a flag that uses another flag as a prerequisite.
|
23
|
+
# > ### Flag prerequisites is an Enterprise feature > > Flag prerequisites is available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/). > ### This feature is in beta > > To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources). List dependent flags across all environments for the flag specified in the path parameters. A dependent flag is a flag that uses another flag as a prerequisite. To learn more, read [Flag prerequisites](https://docs.launchdarkly.com/home/flags/prerequisites).
|
24
24
|
# @param project_key [String] The project key
|
25
25
|
# @param feature_flag_key [String] The feature flag key
|
26
26
|
# @param [Hash] opts the optional parameters
|
@@ -31,7 +31,7 @@ module LaunchDarklyApi
|
|
31
31
|
end
|
32
32
|
|
33
33
|
# List dependent feature flags
|
34
|
-
# List dependent flags across all environments for the flag specified in the path parameters. A dependent flag is a flag that uses another flag as a prerequisite.
|
34
|
+
# > ### Flag prerequisites is an Enterprise feature > > Flag prerequisites is available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/). > ### This feature is in beta > > To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources). List dependent flags across all environments for the flag specified in the path parameters. A dependent flag is a flag that uses another flag as a prerequisite. To learn more, read [Flag prerequisites](https://docs.launchdarkly.com/home/flags/prerequisites).
|
35
35
|
# @param project_key [String] The project key
|
36
36
|
# @param feature_flag_key [String] The feature flag key
|
37
37
|
# @param [Hash] opts the optional parameters
|
@@ -89,7 +89,7 @@ module LaunchDarklyApi
|
|
89
89
|
end
|
90
90
|
|
91
91
|
# List dependent feature flags by environment
|
92
|
-
# List dependent flags across all environments for the flag specified in the path parameters. A dependent flag is a flag that uses another flag as a prerequisite.
|
92
|
+
# > ### Flag prerequisites is an Enterprise feature > > Flag prerequisites is available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/). > ### This feature is in beta > > To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources). List dependent flags across all environments for the flag specified in the path parameters. A dependent flag is a flag that uses another flag as a prerequisite. To learn more, read [Flag prerequisites](https://docs.launchdarkly.com/home/flags/prerequisites).
|
93
93
|
# @param project_key [String] The project key
|
94
94
|
# @param environment_key [String] The environment key
|
95
95
|
# @param feature_flag_key [String] The feature flag key
|
@@ -101,7 +101,7 @@ module LaunchDarklyApi
|
|
101
101
|
end
|
102
102
|
|
103
103
|
# List dependent feature flags by environment
|
104
|
-
# List dependent flags across all environments for the flag specified in the path parameters. A dependent flag is a flag that uses another flag as a prerequisite.
|
104
|
+
# > ### Flag prerequisites is an Enterprise feature > > Flag prerequisites is available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/). > ### This feature is in beta > > To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources). List dependent flags across all environments for the flag specified in the path parameters. A dependent flag is a flag that uses another flag as a prerequisite. To learn more, read [Flag prerequisites](https://docs.launchdarkly.com/home/flags/prerequisites).
|
105
105
|
# @param project_key [String] The project key
|
106
106
|
# @param environment_key [String] The environment key
|
107
107
|
# @param feature_flag_key [String] The feature flag key
|
@@ -20,7 +20,7 @@ module LaunchDarklyApi
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Gets the public IP list
|
23
|
-
# Get a list of IP ranges the LaunchDarkly service uses. You can use this list to allow LaunchDarkly through your firewall.<br /><br />This endpoint returns a JSON object with two attributes: `addresses` and `outboundAddresses`. The `addresses` element contains the IP addresses LaunchDarkly's service uses. The `outboundAddresses` element contains the IP addresses outgoing webhook notifications use.<br /><br />We post upcoming changes to this list in advance on our [status page](https://status.launchdarkly.com/).
|
23
|
+
# Get a list of IP ranges the LaunchDarkly service uses. You can use this list to allow LaunchDarkly through your firewall.<br /><br />This endpoint returns a JSON object with two attributes: `addresses` and `outboundAddresses`. The `addresses` element contains the IP addresses LaunchDarkly's service uses. The `outboundAddresses` element contains the IP addresses outgoing webhook notifications use. To learn more, read [Public IP list](https://docs.launchdarkly.com/home/advanced/public-ip-list).<br /><br />We post upcoming changes to this list in advance on our [status page](https://status.launchdarkly.com/).
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
25
|
# @return [IpList]
|
26
26
|
def get_ips(opts = {})
|
@@ -29,7 +29,7 @@ module LaunchDarklyApi
|
|
29
29
|
end
|
30
30
|
|
31
31
|
# Gets the public IP list
|
32
|
-
# Get a list of IP ranges the LaunchDarkly service uses. You can use this list to allow LaunchDarkly through your firewall.<br /><br />This endpoint returns a JSON object with two attributes: `addresses` and `outboundAddresses`. The `addresses` element contains the IP addresses LaunchDarkly's service uses. The `outboundAddresses` element contains the IP addresses outgoing webhook notifications use.<br /><br />We post upcoming changes to this list in advance on our [status page](https://status.launchdarkly.com/).
|
32
|
+
# Get a list of IP ranges the LaunchDarkly service uses. You can use this list to allow LaunchDarkly through your firewall.<br /><br />This endpoint returns a JSON object with two attributes: `addresses` and `outboundAddresses`. The `addresses` element contains the IP addresses LaunchDarkly's service uses. The `outboundAddresses` element contains the IP addresses outgoing webhook notifications use. To learn more, read [Public IP list](https://docs.launchdarkly.com/home/advanced/public-ip-list).<br /><br />We post upcoming changes to this list in advance on our [status page](https://status.launchdarkly.com/).
|
33
33
|
# @param [Hash] opts the optional parameters
|
34
34
|
# @return [Array<(IpList, Integer, Hash)>] IpList data, response status code and response headers
|
35
35
|
def get_ips_with_http_info(opts = {})
|