All URIs are relative to https://app.launchdarkly.com/api/v2
Method | HTTP request | Description |
---|---|---|
DeleteEnvironment | Delete /projects/{projectKey}/environments/{environmentKey} | Delete an environment in a specific project. |
GetEnvironment | Get /projects/{projectKey}/environments/{environmentKey} | Get an environment given a project and key. |
PatchEnvironment | Patch /projects/{projectKey}/environments/{environmentKey} | Modify an environment by ID. If you try to patch the environment by setting both required and requiredApprovalTags, it will result in an error. Users can specify either required approvals for all flags in an environment or those with specific tags, but not both. Only customers on an Enterprise plan can require approval for flag updates with either mechanism. |
PostEnvironment | Post /projects/{projectKey}/environments | Create a new environment in a specified project with a given name, key, and swatch color. |
ResetEnvironmentMobileKey | 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. |
ResetEnvironmentSDKKey | Post /projects/{projectKey}/environments/{environmentKey}/apiKey | Reset an environment's SDK key with an optional expiry time for the old key. |
DeleteEnvironment(ctx, projectKey, environmentKey) Delete an environment in a specific project.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. | |
environmentKey | string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Environment GetEnvironment(ctx, projectKey, environmentKey) Get an environment given a project and key.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. | |
environmentKey | 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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Environment PatchEnvironment(ctx, projectKey, environmentKey, patchDelta) Modify an environment by ID. If you try to patch the environment by setting both required and requiredApprovalTags, it will result in an error. Users can specify either required approvals for all flags in an environment or those with specific tags, but not both. Only customers on an Enterprise plan can require approval for flag updates with either mechanism.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. | |
environmentKey | string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | |
patchDelta | []PatchOperation | Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/' |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Environment PostEnvironment(ctx, projectKey, environmentBody) Create a new environment in a specified project with a given name, key, and swatch color.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. | |
environmentBody | EnvironmentPost | New environment. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Environment ResetEnvironmentMobileKey(ctx, projectKey, environmentKey, optional) 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.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. | |
environmentKey | string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | |
optional | *EnvironmentsApiResetEnvironmentMobileKeyOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a EnvironmentsApiResetEnvironmentMobileKeyOpts struct
Name | Type | Description | Notes |
---|
expiry | optional.Int64| 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. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Environment ResetEnvironmentSDKKey(ctx, projectKey, environmentKey, optional) Reset an environment's SDK key with an optional expiry time for the old key.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. | |
environmentKey | string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | |
optional | *EnvironmentsApiResetEnvironmentSDKKeyOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a EnvironmentsApiResetEnvironmentSDKKeyOpts struct
Name | Type | Description | Notes |
---|
expiry | optional.Int64| An expiration time for the old environment SDK key, expressed as a Unix epoch time in milliseconds. By default, the key will expire immediately. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]