All URIs are relative to https://app.launchdarkly.com/api/v2
Method | HTTP request | Description |
---|---|---|
delete_environment | DELETE /projects/{projectKey}/environments/{environmentKey} | Delete an environment in a specific project. |
get_environment | GET /projects/{projectKey}/environments/{environmentKey} | Get an environment given a project and key. |
patch_environment | PATCH /projects/{projectKey}/environments/{environmentKey} | Modify an environment by ID. |
post_environment | POST /projects/{projectKey}/environments | Create a new environment in a specified project with a given name, key, and swatch color. |
reset_environment_mobile_key | POST /projects/{projectKey}/environments/{environmentKey}/mobileKey | Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately. |
reset_environment_sdk_key | POST /projects/{projectKey}/environments/{environmentKey}/apiKey | Reset an environment's SDK key with an optional expiry time for the old key. |
delete_environment(project_key, environment_key, )
Delete an environment in a specific project.
# load the gem
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = LaunchDarklyApi::EnvironmentsApi.new
project_key = 'project_key_example' # String | The project key, used to tie the flags together under one project so they can be managed together.
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.
begin
#Delete an environment in a specific project.
api_instance.delete_environment(project_key, environment_key, )
rescue LaunchDarklyApi::ApiError => e
puts "Exception when calling EnvironmentsApi->delete_environment: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_key | String | The project key, used to tie the flags together under one project so they can be managed together. | |
environment_key | String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
Environment get_environment(project_key, environment_key, )
Get an environment given a project and key.
# load the gem
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = LaunchDarklyApi::EnvironmentsApi.new
project_key = 'project_key_example' # String | The project key, used to tie the flags together under one project so they can be managed together.
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.
begin
#Get an environment given a project and key.
result = api_instance.get_environment(project_key, environment_key, )
p result
rescue LaunchDarklyApi::ApiError => e
puts "Exception when calling EnvironmentsApi->get_environment: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_key | String | The project key, used to tie the flags together under one project so they can be managed together. | |
environment_key | String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
- Content-Type: application/json
- Accept: application/json
Environment patch_environment(project_key, environment_key, patch_delta)
Modify an environment by ID.
# load the gem
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = LaunchDarklyApi::EnvironmentsApi.new
project_key = 'project_key_example' # String | The project key, used to tie the flags together under one project so they can be managed together.
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.
patch_delta = [LaunchDarklyApi::PatchOperation.new] # Array<PatchOperation> | Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
begin
#Modify an environment by ID.
result = api_instance.patch_environment(project_key, environment_key, patch_delta)
p result
rescue LaunchDarklyApi::ApiError => e
puts "Exception when calling EnvironmentsApi->patch_environment: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_key | String | The project key, used to tie the flags together under one project so they can be managed together. | |
environment_key | String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | |
patch_delta | Array<PatchOperation> | Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/' |
- Content-Type: application/json
- Accept: application/json
Environment post_environment(project_key, environment_body)
Create a new environment in a specified project with a given name, key, and swatch color.
# load the gem
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = LaunchDarklyApi::EnvironmentsApi.new
project_key = 'project_key_example' # String | The project key, used to tie the flags together under one project so they can be managed together.
environment_body = LaunchDarklyApi::EnvironmentPost.new # EnvironmentPost | New environment.
begin
#Create a new environment in a specified project with a given name, key, and swatch color.
result = api_instance.post_environment(project_key, environment_body)
p result
rescue LaunchDarklyApi::ApiError => e
puts "Exception when calling EnvironmentsApi->post_environment: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_key | String | The project key, used to tie the flags together under one project so they can be managed together. | |
environment_body | EnvironmentPost | New environment. |
- Content-Type: application/json
- Accept: application/json
Environment reset_environment_mobile_key(project_key, environment_key, , opts)
Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.
# load the gem
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = LaunchDarklyApi::EnvironmentsApi.new
project_key = 'project_key_example' # String | The project key, used to tie the flags together under one project so they can be managed together.
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.
opts = {
expiry: 789 # Integer | The expiry parameter is deprecated for this endpoint, so the old mobile key will always expire immediately. This parameter will be removed in an upcoming major API client version.
}
begin
#Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.
result = api_instance.reset_environment_mobile_key(project_key, environment_key, , opts)
p result
rescue LaunchDarklyApi::ApiError => e
puts "Exception when calling EnvironmentsApi->reset_environment_mobile_key: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_key | String | The project key, used to tie the flags together under one project so they can be managed together. | |
environment_key | String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | |
expiry | Integer | The expiry parameter is deprecated for this endpoint, so the old mobile key will always expire immediately. This parameter will be removed in an upcoming major API client version. | [optional] |
- Content-Type: application/json
- Accept: application/json
Environment reset_environment_sdk_key(project_key, environment_key, , opts)
Reset an environment's SDK key with an optional expiry time for the old key.
# load the gem
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = LaunchDarklyApi::EnvironmentsApi.new
project_key = 'project_key_example' # String | The project key, used to tie the flags together under one project so they can be managed together.
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.
opts = {
expiry: 789 # Integer | An expiration time for the old environment SDK key, expressed as a Unix epoch time in milliseconds. By default, the key will expire immediately.
}
begin
#Reset an environment's SDK key with an optional expiry time for the old key.
result = api_instance.reset_environment_sdk_key(project_key, environment_key, , opts)
p result
rescue LaunchDarklyApi::ApiError => e
puts "Exception when calling EnvironmentsApi->reset_environment_sdk_key: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_key | String | The project key, used to tie the flags together under one project so they can be managed together. | |
environment_key | String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | |
expiry | Integer | An expiration time for the old environment SDK key, expressed as a Unix epoch time in milliseconds. By default, the key will expire immediately. | [optional] |
- Content-Type: application/json
- Accept: application/json