launchdarkly_api 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +69 -0
- data/LICENSE.txt +13 -0
- data/README.md +264 -0
- data/Rakefile +8 -0
- data/docs/Action.md +7 -0
- data/docs/Actions.md +7 -0
- data/docs/AuditLogApi.md +123 -0
- data/docs/AuditLogEntries.md +9 -0
- data/docs/AuditLogEntry.md +19 -0
- data/docs/AuditLogEntryTarget.md +10 -0
- data/docs/Clause.md +11 -0
- data/docs/CustomRole.md +13 -0
- data/docs/CustomRoleBody.md +11 -0
- data/docs/CustomRoleKeyOrId.md +7 -0
- data/docs/CustomRoles.md +9 -0
- data/docs/CustomRolesApi.md +268 -0
- data/docs/Environment.md +17 -0
- data/docs/EnvironmentBody.md +11 -0
- data/docs/EnvironmentsApi.md +233 -0
- data/docs/Fallthrough.md +9 -0
- data/docs/FeatureFlag.md +20 -0
- data/docs/FeatureFlagBody.md +13 -0
- data/docs/FeatureFlagConfig.md +19 -0
- data/docs/FeatureFlagStatus.md +11 -0
- data/docs/FeatureFlagStatuses.md +9 -0
- data/docs/FeatureFlags.md +9 -0
- data/docs/FeatureFlagsApi.md +411 -0
- data/docs/Id.md +7 -0
- data/docs/Link.md +9 -0
- data/docs/Links.md +9 -0
- data/docs/Member.md +14 -0
- data/docs/Members.md +9 -0
- data/docs/MembersBody.md +13 -0
- data/docs/PatchComment.md +9 -0
- data/docs/PatchOperation.md +10 -0
- data/docs/Policy.md +10 -0
- data/docs/Prerequisite.md +9 -0
- data/docs/Project.md +12 -0
- data/docs/ProjectBody.md +9 -0
- data/docs/Projects.md +9 -0
- data/docs/ProjectsApi.md +268 -0
- data/docs/Resource.md +7 -0
- data/docs/Resources.md +7 -0
- data/docs/Role.md +7 -0
- data/docs/Rollout.md +8 -0
- data/docs/RootApi.md +56 -0
- data/docs/Rule.md +10 -0
- data/docs/Statement.md +12 -0
- data/docs/Statements.md +7 -0
- data/docs/Target.md +9 -0
- data/docs/TeamMembersApi.md +268 -0
- data/docs/User.md +18 -0
- data/docs/UserFlagSetting.md +10 -0
- data/docs/UserFlagSettings.md +9 -0
- data/docs/UserRecord.md +12 -0
- data/docs/UserSegment.md +17 -0
- data/docs/UserSegmentBody.md +11 -0
- data/docs/UserSegmentRule.md +10 -0
- data/docs/UserSegments.md +9 -0
- data/docs/UserSegmentsApi.md +305 -0
- data/docs/UserSettingsApi.md +193 -0
- data/docs/UserSettingsBody.md +8 -0
- data/docs/Users.md +10 -0
- data/docs/UsersApi.md +255 -0
- data/docs/Variation.md +10 -0
- data/docs/Webhook.md +14 -0
- data/docs/WebhookBody.md +12 -0
- data/docs/Webhooks.md +9 -0
- data/docs/WebhooksApi.md +268 -0
- data/docs/WeightedVariation.md +9 -0
- data/git_push.sh +55 -0
- data/launchdarkly_api-2.0.2.gem +0 -0
- data/launchdarkly_api.gemspec +46 -0
- data/lib/.DS_Store +0 -0
- data/lib/launchdarkly_api/api/audit_log_api.rb +142 -0
- data/lib/launchdarkly_api/api/custom_roles_api.rb +296 -0
- data/lib/launchdarkly_api/api/environments_api.rb +271 -0
- data/lib/launchdarkly_api/api/feature_flags_api.rb +463 -0
- data/lib/launchdarkly_api/api/projects_api.rb +296 -0
- data/lib/launchdarkly_api/api/root_api.rb +72 -0
- data/lib/launchdarkly_api/api/team_members_api.rb +296 -0
- data/lib/launchdarkly_api/api/user_segments_api.rb +359 -0
- data/lib/launchdarkly_api/api/user_settings_api.rb +241 -0
- data/lib/launchdarkly_api/api/users_api.rb +299 -0
- data/lib/launchdarkly_api/api/webhooks_api.rb +296 -0
- data/lib/launchdarkly_api/api_client.rb +389 -0
- data/lib/launchdarkly_api/api_error.rb +38 -0
- data/lib/launchdarkly_api/configuration.rb +209 -0
- data/lib/launchdarkly_api/models/action.rb +179 -0
- data/lib/launchdarkly_api/models/actions.rb +179 -0
- data/lib/launchdarkly_api/models/audit_log_entries.rb +199 -0
- data/lib/launchdarkly_api/models/audit_log_entry.rb +287 -0
- data/lib/launchdarkly_api/models/audit_log_entry_target.rb +208 -0
- data/lib/launchdarkly_api/models/clause.rb +217 -0
- data/lib/launchdarkly_api/models/custom_role.rb +237 -0
- data/lib/launchdarkly_api/models/custom_role_body.rb +234 -0
- data/lib/launchdarkly_api/models/custom_role_key_or_id.rb +179 -0
- data/lib/launchdarkly_api/models/custom_roles.rb +197 -0
- data/lib/launchdarkly_api/models/environment.rb +277 -0
- data/lib/launchdarkly_api/models/environment_body.rb +234 -0
- data/lib/launchdarkly_api/models/fallthrough.rb +197 -0
- data/lib/launchdarkly_api/models/feature_flag.rb +310 -0
- data/lib/launchdarkly_api/models/feature_flag_body.rb +258 -0
- data/lib/launchdarkly_api/models/feature_flag_config.rb +294 -0
- data/lib/launchdarkly_api/models/feature_flag_status.rb +249 -0
- data/lib/launchdarkly_api/models/feature_flag_statuses.rb +199 -0
- data/lib/launchdarkly_api/models/feature_flags.rb +199 -0
- data/lib/launchdarkly_api/models/id.rb +179 -0
- data/lib/launchdarkly_api/models/link.rb +197 -0
- data/lib/launchdarkly_api/models/links.rb +197 -0
- data/lib/launchdarkly_api/models/member.rb +244 -0
- data/lib/launchdarkly_api/models/members.rb +197 -0
- data/lib/launchdarkly_api/models/members_body.rb +240 -0
- data/lib/launchdarkly_api/models/patch_comment.rb +199 -0
- data/lib/launchdarkly_api/models/patch_operation.rb +221 -0
- data/lib/launchdarkly_api/models/policy.rb +207 -0
- data/lib/launchdarkly_api/models/prerequisite.rb +197 -0
- data/lib/launchdarkly_api/models/project.rb +226 -0
- data/lib/launchdarkly_api/models/project_body.rb +207 -0
- data/lib/launchdarkly_api/models/projects.rb +199 -0
- data/lib/launchdarkly_api/models/resource.rb +179 -0
- data/lib/launchdarkly_api/models/resources.rb +179 -0
- data/lib/launchdarkly_api/models/role.rb +33 -0
- data/lib/launchdarkly_api/models/rollout.rb +190 -0
- data/lib/launchdarkly_api/models/rule.rb +208 -0
- data/lib/launchdarkly_api/models/statement.rb +259 -0
- data/lib/launchdarkly_api/models/statements.rb +179 -0
- data/lib/launchdarkly_api/models/target.rb +199 -0
- data/lib/launchdarkly_api/models/user.rb +278 -0
- data/lib/launchdarkly_api/models/user_flag_setting.rb +208 -0
- data/lib/launchdarkly_api/models/user_flag_settings.rb +197 -0
- data/lib/launchdarkly_api/models/user_record.rb +224 -0
- data/lib/launchdarkly_api/models/user_segment.rb +300 -0
- data/lib/launchdarkly_api/models/user_segment_body.rb +231 -0
- data/lib/launchdarkly_api/models/user_segment_rule.rb +208 -0
- data/lib/launchdarkly_api/models/user_segments.rb +199 -0
- data/lib/launchdarkly_api/models/user_settings_body.rb +189 -0
- data/lib/launchdarkly_api/models/users.rb +208 -0
- data/lib/launchdarkly_api/models/variation.rb +211 -0
- data/lib/launchdarkly_api/models/webhook.rb +249 -0
- data/lib/launchdarkly_api/models/webhook_body.rb +244 -0
- data/lib/launchdarkly_api/models/webhooks.rb +199 -0
- data/lib/launchdarkly_api/models/weighted_variation.rb +197 -0
- data/lib/launchdarkly_api/version.rb +15 -0
- data/lib/launchdarkly_api.rb +105 -0
- data/lib/swagger_client/.DS_Store +0 -0
- data/spec/api/audit_log_api_spec.rb +63 -0
- data/spec/api/custom_roles_api_spec.rb +95 -0
- data/spec/api/environments_api_spec.rb +88 -0
- data/spec/api/feature_flags_api_spec.rb +130 -0
- data/spec/api/projects_api_spec.rb +95 -0
- data/spec/api/root_api_spec.rb +46 -0
- data/spec/api/team_members_api_spec.rb +95 -0
- data/spec/api/user_segments_api_spec.rb +106 -0
- data/spec/api/user_settings_api_spec.rb +80 -0
- data/spec/api/users_api_spec.rb +96 -0
- data/spec/api/webhooks_api_spec.rb +95 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/action_spec.rb +36 -0
- data/spec/models/actions_spec.rb +36 -0
- data/spec/models/audit_log_entries_spec.rb +48 -0
- data/spec/models/audit_log_entry_spec.rb +108 -0
- data/spec/models/audit_log_entry_target_spec.rb +54 -0
- data/spec/models/clause_spec.rb +60 -0
- data/spec/models/custom_role_body_spec.rb +60 -0
- data/spec/models/custom_role_key_or_id_spec.rb +36 -0
- data/spec/models/custom_role_spec.rb +72 -0
- data/spec/models/custom_roles_spec.rb +48 -0
- data/spec/models/environment_body_spec.rb +60 -0
- data/spec/models/environment_spec.rb +96 -0
- data/spec/models/fallthrough_spec.rb +48 -0
- data/spec/models/feature_flag_body_spec.rb +72 -0
- data/spec/models/feature_flag_config_spec.rb +108 -0
- data/spec/models/feature_flag_spec.rb +114 -0
- data/spec/models/feature_flag_status_spec.rb +64 -0
- data/spec/models/feature_flag_statuses_spec.rb +48 -0
- data/spec/models/feature_flags_spec.rb +48 -0
- data/spec/models/id_spec.rb +36 -0
- data/spec/models/link_spec.rb +48 -0
- data/spec/models/links_spec.rb +48 -0
- data/spec/models/member_spec.rb +78 -0
- data/spec/models/members_body_spec.rb +72 -0
- data/spec/models/members_spec.rb +48 -0
- data/spec/models/patch_comment_spec.rb +48 -0
- data/spec/models/patch_operation_spec.rb +54 -0
- data/spec/models/policy_spec.rb +54 -0
- data/spec/models/prerequisite_spec.rb +48 -0
- data/spec/models/project_body_spec.rb +48 -0
- data/spec/models/project_spec.rb +66 -0
- data/spec/models/projects_spec.rb +48 -0
- data/spec/models/resource_spec.rb +36 -0
- data/spec/models/resources_spec.rb +36 -0
- data/spec/models/role_spec.rb +36 -0
- data/spec/models/rollout_spec.rb +42 -0
- data/spec/models/rule_spec.rb +54 -0
- data/spec/models/statement_spec.rb +70 -0
- data/spec/models/statements_spec.rb +36 -0
- data/spec/models/target_spec.rb +48 -0
- data/spec/models/user_flag_setting_spec.rb +54 -0
- data/spec/models/user_flag_settings_spec.rb +48 -0
- data/spec/models/user_record_spec.rb +66 -0
- data/spec/models/user_segment_body_spec.rb +60 -0
- data/spec/models/user_segment_rule_spec.rb +54 -0
- data/spec/models/user_segment_spec.rb +96 -0
- data/spec/models/user_segments_spec.rb +48 -0
- data/spec/models/user_settings_body_spec.rb +42 -0
- data/spec/models/user_spec.rb +102 -0
- data/spec/models/users_spec.rb +54 -0
- data/spec/models/variation_spec.rb +54 -0
- data/spec/models/webhook_body_spec.rb +66 -0
- data/spec/models/webhook_spec.rb +78 -0
- data/spec/models/webhooks_spec.rb +48 -0
- data/spec/models/weighted_variation_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- data/test.rb +50 -0
- metadata +509 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
# LaunchDarklyApi::FeatureFlagsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://app.launchdarkly.com/api/v2*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**delete_feature_flag**](FeatureFlagsApi.md#delete_feature_flag) | **DELETE** /flags/{projectKey}/{featureFlagKey} | Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application.
|
|
8
|
+
[**get_feature_flag**](FeatureFlagsApi.md#get_feature_flag) | **GET** /flags/{projectKey}/{featureFlagKey} | Get a single feature flag by key.
|
|
9
|
+
[**get_feature_flag_status**](FeatureFlagsApi.md#get_feature_flag_status) | **GET** /flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey} | Get the status for a particular feature flag.
|
|
10
|
+
[**get_feature_flag_statuses**](FeatureFlagsApi.md#get_feature_flag_statuses) | **GET** /flag-statuses/{projectKey}/{environmentKey} | Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag.
|
|
11
|
+
[**get_feature_flags**](FeatureFlagsApi.md#get_feature_flags) | **GET** /flags/{projectKey} | Get a list of all features in the given project.
|
|
12
|
+
[**patch_feature_flag**](FeatureFlagsApi.md#patch_feature_flag) | **PATCH** /flags/{projectKey}/{featureFlagKey} | Perform a partial update to a feature.
|
|
13
|
+
[**post_feature_flag**](FeatureFlagsApi.md#post_feature_flag) | **POST** /flags/{projectKey} | Creates a new feature flag.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# **delete_feature_flag**
|
|
17
|
+
> delete_feature_flag(project_key, feature_flag_key, )
|
|
18
|
+
|
|
19
|
+
Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application.
|
|
20
|
+
|
|
21
|
+
### Example
|
|
22
|
+
```ruby
|
|
23
|
+
# load the gem
|
|
24
|
+
require 'launchdarkly_api'
|
|
25
|
+
# setup authorization
|
|
26
|
+
LaunchDarklyApi.configure do |config|
|
|
27
|
+
# Configure API key authorization: Token
|
|
28
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
29
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
30
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
api_instance = LaunchDarklyApi::FeatureFlagsApi.new
|
|
34
|
+
|
|
35
|
+
project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
|
|
36
|
+
|
|
37
|
+
feature_flag_key = "feature_flag_key_example" # String | The feature flag's key. The key identifies the flag in your code.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
begin
|
|
41
|
+
#Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application.
|
|
42
|
+
api_instance.delete_feature_flag(project_key, feature_flag_key, )
|
|
43
|
+
rescue LaunchDarklyApi::ApiError => e
|
|
44
|
+
puts "Exception when calling FeatureFlagsApi->delete_feature_flag: #{e}"
|
|
45
|
+
end
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Parameters
|
|
49
|
+
|
|
50
|
+
Name | Type | Description | Notes
|
|
51
|
+
------------- | ------------- | ------------- | -------------
|
|
52
|
+
**project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
|
|
53
|
+
**feature_flag_key** | **String**| The feature flag's key. The key identifies the flag in your code. |
|
|
54
|
+
|
|
55
|
+
### Return type
|
|
56
|
+
|
|
57
|
+
nil (empty response body)
|
|
58
|
+
|
|
59
|
+
### Authorization
|
|
60
|
+
|
|
61
|
+
[Token](../README.md#Token)
|
|
62
|
+
|
|
63
|
+
### HTTP request headers
|
|
64
|
+
|
|
65
|
+
- **Content-Type**: application/json
|
|
66
|
+
- **Accept**: application/json
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
# **get_feature_flag**
|
|
71
|
+
> FeatureFlag get_feature_flag(project_key, feature_flag_key, , opts)
|
|
72
|
+
|
|
73
|
+
Get a single feature flag by key.
|
|
74
|
+
|
|
75
|
+
### Example
|
|
76
|
+
```ruby
|
|
77
|
+
# load the gem
|
|
78
|
+
require 'launchdarkly_api'
|
|
79
|
+
# setup authorization
|
|
80
|
+
LaunchDarklyApi.configure do |config|
|
|
81
|
+
# Configure API key authorization: Token
|
|
82
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
83
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
84
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
api_instance = LaunchDarklyApi::FeatureFlagsApi.new
|
|
88
|
+
|
|
89
|
+
project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
|
|
90
|
+
|
|
91
|
+
feature_flag_key = "feature_flag_key_example" # String | The feature flag's key. The key identifies the flag in your code.
|
|
92
|
+
|
|
93
|
+
opts = {
|
|
94
|
+
env: "env_example" # String | By default, each feature will include configurations for each environment. You can filter environments with the env query parameter. For example, setting env=production will restrict the returned configurations to just your production environment.
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
begin
|
|
98
|
+
#Get a single feature flag by key.
|
|
99
|
+
result = api_instance.get_feature_flag(project_key, feature_flag_key, , opts)
|
|
100
|
+
p result
|
|
101
|
+
rescue LaunchDarklyApi::ApiError => e
|
|
102
|
+
puts "Exception when calling FeatureFlagsApi->get_feature_flag: #{e}"
|
|
103
|
+
end
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Parameters
|
|
107
|
+
|
|
108
|
+
Name | Type | Description | Notes
|
|
109
|
+
------------- | ------------- | ------------- | -------------
|
|
110
|
+
**project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
|
|
111
|
+
**feature_flag_key** | **String**| The feature flag's key. The key identifies the flag in your code. |
|
|
112
|
+
**env** | **String**| By default, each feature will include configurations for each environment. You can filter environments with the env query parameter. For example, setting env=production will restrict the returned configurations to just your production environment. | [optional]
|
|
113
|
+
|
|
114
|
+
### Return type
|
|
115
|
+
|
|
116
|
+
[**FeatureFlag**](FeatureFlag.md)
|
|
117
|
+
|
|
118
|
+
### Authorization
|
|
119
|
+
|
|
120
|
+
[Token](../README.md#Token)
|
|
121
|
+
|
|
122
|
+
### HTTP request headers
|
|
123
|
+
|
|
124
|
+
- **Content-Type**: application/json
|
|
125
|
+
- **Accept**: application/json
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
# **get_feature_flag_status**
|
|
130
|
+
> FeatureFlagStatus get_feature_flag_status(project_key, environment_key, feature_flag_key, )
|
|
131
|
+
|
|
132
|
+
Get the status for a particular feature flag.
|
|
133
|
+
|
|
134
|
+
### Example
|
|
135
|
+
```ruby
|
|
136
|
+
# load the gem
|
|
137
|
+
require 'launchdarkly_api'
|
|
138
|
+
# setup authorization
|
|
139
|
+
LaunchDarklyApi.configure do |config|
|
|
140
|
+
# Configure API key authorization: Token
|
|
141
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
142
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
143
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
api_instance = LaunchDarklyApi::FeatureFlagsApi.new
|
|
147
|
+
|
|
148
|
+
project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
|
|
149
|
+
|
|
150
|
+
environment_key = "environment_key_example" # String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
|
|
151
|
+
|
|
152
|
+
feature_flag_key = "feature_flag_key_example" # String | The feature flag's key. The key identifies the flag in your code.
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
begin
|
|
156
|
+
#Get the status for a particular feature flag.
|
|
157
|
+
result = api_instance.get_feature_flag_status(project_key, environment_key, feature_flag_key, )
|
|
158
|
+
p result
|
|
159
|
+
rescue LaunchDarklyApi::ApiError => e
|
|
160
|
+
puts "Exception when calling FeatureFlagsApi->get_feature_flag_status: #{e}"
|
|
161
|
+
end
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Parameters
|
|
165
|
+
|
|
166
|
+
Name | Type | Description | Notes
|
|
167
|
+
------------- | ------------- | ------------- | -------------
|
|
168
|
+
**project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
|
|
169
|
+
**environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
|
|
170
|
+
**feature_flag_key** | **String**| The feature flag's key. The key identifies the flag in your code. |
|
|
171
|
+
|
|
172
|
+
### Return type
|
|
173
|
+
|
|
174
|
+
[**FeatureFlagStatus**](FeatureFlagStatus.md)
|
|
175
|
+
|
|
176
|
+
### Authorization
|
|
177
|
+
|
|
178
|
+
[Token](../README.md#Token)
|
|
179
|
+
|
|
180
|
+
### HTTP request headers
|
|
181
|
+
|
|
182
|
+
- **Content-Type**: application/json
|
|
183
|
+
- **Accept**: application/json
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
# **get_feature_flag_statuses**
|
|
188
|
+
> FeatureFlagStatuses get_feature_flag_statuses(project_key, environment_key, )
|
|
189
|
+
|
|
190
|
+
Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag.
|
|
191
|
+
|
|
192
|
+
### Example
|
|
193
|
+
```ruby
|
|
194
|
+
# load the gem
|
|
195
|
+
require 'launchdarkly_api'
|
|
196
|
+
# setup authorization
|
|
197
|
+
LaunchDarklyApi.configure do |config|
|
|
198
|
+
# Configure API key authorization: Token
|
|
199
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
200
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
201
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
api_instance = LaunchDarklyApi::FeatureFlagsApi.new
|
|
205
|
+
|
|
206
|
+
project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
|
|
207
|
+
|
|
208
|
+
environment_key = "environment_key_example" # String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
begin
|
|
212
|
+
#Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag.
|
|
213
|
+
result = api_instance.get_feature_flag_statuses(project_key, environment_key, )
|
|
214
|
+
p result
|
|
215
|
+
rescue LaunchDarklyApi::ApiError => e
|
|
216
|
+
puts "Exception when calling FeatureFlagsApi->get_feature_flag_statuses: #{e}"
|
|
217
|
+
end
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Parameters
|
|
221
|
+
|
|
222
|
+
Name | Type | Description | Notes
|
|
223
|
+
------------- | ------------- | ------------- | -------------
|
|
224
|
+
**project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
|
|
225
|
+
**environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
|
|
226
|
+
|
|
227
|
+
### Return type
|
|
228
|
+
|
|
229
|
+
[**FeatureFlagStatuses**](FeatureFlagStatuses.md)
|
|
230
|
+
|
|
231
|
+
### Authorization
|
|
232
|
+
|
|
233
|
+
[Token](../README.md#Token)
|
|
234
|
+
|
|
235
|
+
### HTTP request headers
|
|
236
|
+
|
|
237
|
+
- **Content-Type**: application/json
|
|
238
|
+
- **Accept**: application/json
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
# **get_feature_flags**
|
|
243
|
+
> FeatureFlags get_feature_flags(project_key, , opts)
|
|
244
|
+
|
|
245
|
+
Get a list of all features in the given project.
|
|
246
|
+
|
|
247
|
+
### Example
|
|
248
|
+
```ruby
|
|
249
|
+
# load the gem
|
|
250
|
+
require 'launchdarkly_api'
|
|
251
|
+
# setup authorization
|
|
252
|
+
LaunchDarklyApi.configure do |config|
|
|
253
|
+
# Configure API key authorization: Token
|
|
254
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
255
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
256
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
api_instance = LaunchDarklyApi::FeatureFlagsApi.new
|
|
260
|
+
|
|
261
|
+
project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
|
|
262
|
+
|
|
263
|
+
opts = {
|
|
264
|
+
env: "env_example" # String | By default, each feature will include configurations for each environment. You can filter environments with the env query parameter. For example, setting env=production will restrict the returned configurations to just your production environment.
|
|
265
|
+
tag: "tag_example" # String | Filter by tag. A tag can be used to group flags across projects.
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
begin
|
|
269
|
+
#Get a list of all features in the given project.
|
|
270
|
+
result = api_instance.get_feature_flags(project_key, , opts)
|
|
271
|
+
p result
|
|
272
|
+
rescue LaunchDarklyApi::ApiError => e
|
|
273
|
+
puts "Exception when calling FeatureFlagsApi->get_feature_flags: #{e}"
|
|
274
|
+
end
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Parameters
|
|
278
|
+
|
|
279
|
+
Name | Type | Description | Notes
|
|
280
|
+
------------- | ------------- | ------------- | -------------
|
|
281
|
+
**project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
|
|
282
|
+
**env** | **String**| By default, each feature will include configurations for each environment. You can filter environments with the env query parameter. For example, setting env=production will restrict the returned configurations to just your production environment. | [optional]
|
|
283
|
+
**tag** | **String**| Filter by tag. A tag can be used to group flags across projects. | [optional]
|
|
284
|
+
|
|
285
|
+
### Return type
|
|
286
|
+
|
|
287
|
+
[**FeatureFlags**](FeatureFlags.md)
|
|
288
|
+
|
|
289
|
+
### Authorization
|
|
290
|
+
|
|
291
|
+
[Token](../README.md#Token)
|
|
292
|
+
|
|
293
|
+
### HTTP request headers
|
|
294
|
+
|
|
295
|
+
- **Content-Type**: application/json
|
|
296
|
+
- **Accept**: application/json
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
# **patch_feature_flag**
|
|
301
|
+
> FeatureFlag patch_feature_flag(project_key, feature_flag_key, patch_comment)
|
|
302
|
+
|
|
303
|
+
Perform a partial update to a feature.
|
|
304
|
+
|
|
305
|
+
### Example
|
|
306
|
+
```ruby
|
|
307
|
+
# load the gem
|
|
308
|
+
require 'launchdarkly_api'
|
|
309
|
+
# setup authorization
|
|
310
|
+
LaunchDarklyApi.configure do |config|
|
|
311
|
+
# Configure API key authorization: Token
|
|
312
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
313
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
314
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
api_instance = LaunchDarklyApi::FeatureFlagsApi.new
|
|
318
|
+
|
|
319
|
+
project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
|
|
320
|
+
|
|
321
|
+
feature_flag_key = "feature_flag_key_example" # String | The feature flag's key. The key identifies the flag in your code.
|
|
322
|
+
|
|
323
|
+
patch_comment = LaunchDarklyApi::PatchComment.new # PatchComment | Requires a JSON Patch representation of the desired changes to the project, and an optional comment. 'http://jsonpatch.com/' Feature flag patches also support JSON Merge Patch format. 'https://tools.ietf.org/html/rfc7386' The addition of comments is also supported.
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
begin
|
|
327
|
+
#Perform a partial update to a feature.
|
|
328
|
+
result = api_instance.patch_feature_flag(project_key, feature_flag_key, patch_comment)
|
|
329
|
+
p result
|
|
330
|
+
rescue LaunchDarklyApi::ApiError => e
|
|
331
|
+
puts "Exception when calling FeatureFlagsApi->patch_feature_flag: #{e}"
|
|
332
|
+
end
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Parameters
|
|
336
|
+
|
|
337
|
+
Name | Type | Description | Notes
|
|
338
|
+
------------- | ------------- | ------------- | -------------
|
|
339
|
+
**project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
|
|
340
|
+
**feature_flag_key** | **String**| The feature flag's key. The key identifies the flag in your code. |
|
|
341
|
+
**patch_comment** | [**PatchComment**](PatchComment.md)| Requires a JSON Patch representation of the desired changes to the project, and an optional comment. 'http://jsonpatch.com/' Feature flag patches also support JSON Merge Patch format. 'https://tools.ietf.org/html/rfc7386' The addition of comments is also supported. |
|
|
342
|
+
|
|
343
|
+
### Return type
|
|
344
|
+
|
|
345
|
+
[**FeatureFlag**](FeatureFlag.md)
|
|
346
|
+
|
|
347
|
+
### Authorization
|
|
348
|
+
|
|
349
|
+
[Token](../README.md#Token)
|
|
350
|
+
|
|
351
|
+
### HTTP request headers
|
|
352
|
+
|
|
353
|
+
- **Content-Type**: application/json
|
|
354
|
+
- **Accept**: application/json
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
# **post_feature_flag**
|
|
359
|
+
> post_feature_flag(project_key, feature_flag_body)
|
|
360
|
+
|
|
361
|
+
Creates a new feature flag.
|
|
362
|
+
|
|
363
|
+
### Example
|
|
364
|
+
```ruby
|
|
365
|
+
# load the gem
|
|
366
|
+
require 'launchdarkly_api'
|
|
367
|
+
# setup authorization
|
|
368
|
+
LaunchDarklyApi.configure do |config|
|
|
369
|
+
# Configure API key authorization: Token
|
|
370
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
371
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
372
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
api_instance = LaunchDarklyApi::FeatureFlagsApi.new
|
|
376
|
+
|
|
377
|
+
project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
|
|
378
|
+
|
|
379
|
+
feature_flag_body = LaunchDarklyApi::FeatureFlagBody.new # FeatureFlagBody | Create a new feature flag.
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
begin
|
|
383
|
+
#Creates a new feature flag.
|
|
384
|
+
api_instance.post_feature_flag(project_key, feature_flag_body)
|
|
385
|
+
rescue LaunchDarklyApi::ApiError => e
|
|
386
|
+
puts "Exception when calling FeatureFlagsApi->post_feature_flag: #{e}"
|
|
387
|
+
end
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### Parameters
|
|
391
|
+
|
|
392
|
+
Name | Type | Description | Notes
|
|
393
|
+
------------- | ------------- | ------------- | -------------
|
|
394
|
+
**project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
|
|
395
|
+
**feature_flag_body** | [**FeatureFlagBody**](FeatureFlagBody.md)| Create a new feature flag. |
|
|
396
|
+
|
|
397
|
+
### Return type
|
|
398
|
+
|
|
399
|
+
nil (empty response body)
|
|
400
|
+
|
|
401
|
+
### Authorization
|
|
402
|
+
|
|
403
|
+
[Token](../README.md#Token)
|
|
404
|
+
|
|
405
|
+
### HTTP request headers
|
|
406
|
+
|
|
407
|
+
- **Content-Type**: application/json
|
|
408
|
+
- **Accept**: application/json
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
data/docs/Id.md
ADDED
data/docs/Link.md
ADDED
data/docs/Links.md
ADDED
data/docs/Member.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# LaunchDarklyApi::Member
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**_links** | [**Links**](Links.md) | | [optional]
|
|
7
|
+
**_id** | [**Id**](Id.md) | | [optional]
|
|
8
|
+
**role** | [**Role**](Role.md) | | [optional]
|
|
9
|
+
**email** | **String** | | [optional]
|
|
10
|
+
**_pending_invite** | **BOOLEAN** | | [optional]
|
|
11
|
+
**is_beta** | **BOOLEAN** | | [optional]
|
|
12
|
+
**custom_roles** | [**Array<Id>**](Id.md) | | [optional]
|
|
13
|
+
|
|
14
|
+
|
data/docs/Members.md
ADDED
data/docs/MembersBody.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# LaunchDarklyApi::MembersBody
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**email** | **String** | |
|
|
7
|
+
**first_name** | **String** | | [optional]
|
|
8
|
+
**last_name** | **String** | | [optional]
|
|
9
|
+
**role** | [**Role**](Role.md) | | [optional]
|
|
10
|
+
**custom_roles** | [**Array<CustomRoleKeyOrId>**](CustomRoleKeyOrId.md) | | [optional]
|
|
11
|
+
**inline_role** | [**Statements**](Statements.md) | | [optional]
|
|
12
|
+
|
|
13
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# LaunchDarklyApi::PatchComment
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**comment** | **String** | | [optional]
|
|
7
|
+
**patch** | [**Array<PatchOperation>**](PatchOperation.md) | | [optional]
|
|
8
|
+
|
|
9
|
+
|
data/docs/Policy.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# LaunchDarklyApi::Policy
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**resources** | [**Resources**](Resources.md) | | [optional]
|
|
7
|
+
**actions** | [**Actions**](Actions.md) | | [optional]
|
|
8
|
+
**effect** | **String** | Effect of the policy - allow or deny. | [optional]
|
|
9
|
+
|
|
10
|
+
|
data/docs/Project.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# LaunchDarklyApi::Project
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**_links** | [**Links**](Links.md) | | [optional]
|
|
7
|
+
**_id** | [**Id**](Id.md) | | [optional]
|
|
8
|
+
**key** | **String** | | [optional]
|
|
9
|
+
**name** | **String** | | [optional]
|
|
10
|
+
**environments** | [**Array<Environment>**](Environment.md) | | [optional]
|
|
11
|
+
|
|
12
|
+
|
data/docs/ProjectBody.md
ADDED
data/docs/Projects.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# LaunchDarklyApi::Projects
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**_links** | [**Links**](Links.md) | | [optional]
|
|
7
|
+
**items** | [**Array<Project>**](Project.md) | | [optional]
|
|
8
|
+
|
|
9
|
+
|