Skip to content
This repository was archived by the owner on Sep 3, 2021. It is now read-only.

Latest commit

 

History

History
851 lines (547 loc) · 36.2 KB

FeatureFlagsApi.md

File metadata and controls

851 lines (547 loc) · 36.2 KB

FeatureFlagsApi

All URIs are relative to /api/v2

Method HTTP request Description
copyFeatureFlag POST /flags/{projectKey}/{featureFlagKey}/copy Copies the feature flag configuration from one environment to the same feature flag in another environment.
deleteApprovalRequest DELETE /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId} Delete an approval request for a feature flag config
deleteFeatureFlag 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.
deleteFlagConfigScheduledChanges DELETE /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId} Delete a scheduled change on a feature flag in an environment.
flagsProjectKeyEnvironmentKeyFeatureFlagKeyDependentFlagsGet GET /flags/{projectKey}/{environmentKey}/{featureFlagKey}/dependent-flags Get dependent flags for the flag in the environment specified in path parameters
flagsProjectKeyFeatureFlagKeyDependentFlagsGet GET /flags/{projectKey}/{featureFlagKey}/dependent-flags Get dependent flags across all environments for the flag specified in the path parameters
getApprovalRequest GET /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId} Get a single approval request for a feature flag config
getApprovalRequests GET /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests Get all approval requests for a feature flag config
getExpiringUserTargets GET /flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey} Get expiring user targets for feature flag
getFeatureFlag GET /flags/{projectKey}/{featureFlagKey} Get a single feature flag by key.
getFeatureFlagStatus GET /flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey} Get the status for a particular feature flag.
getFeatureFlagStatusAcrossEnvironments GET /flag-status/{projectKey}/{featureFlagKey} Get the status for a particular feature flag across environments
getFeatureFlagStatuses 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.
getFeatureFlags GET /flags/{projectKey} Get a list of all features in the given project.
getFlagConfigScheduledChange GET /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId} Get a scheduled change on a feature flag by id.
getFlagConfigScheduledChanges GET /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes Get all scheduled workflows for a feature flag by key.
getFlagConfigScheduledChangesConflicts POST /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes-conflicts Lists conflicts between the given instructions and any existing scheduled changes for the feature flag. The actual HTTP verb should be REPORT, not POST.
patchExpiringUserTargets PATCH /flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey} Update, add, or delete expiring user targets on feature flag
patchFeatureFlag PATCH /flags/{projectKey}/{featureFlagKey} Perform a partial update to a feature.
patchFlagConfigScheduledChange PATCH /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId} Updates an existing scheduled-change on a feature flag in an environment.
postApplyApprovalRequest POST /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/apply Apply approval request for a feature flag config
postApprovalRequest POST /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId} Create an approval request for a feature flag config
postFeatureFlag POST /flags/{projectKey} Creates a new feature flag.
postFlagConfigScheduledChanges POST /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes Creates a new scheduled change for a feature flag.
postReviewApprovalRequest POST /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/review Review approval request for a feature flag config

copyFeatureFlag

Copies the feature flag configuration from one environment to the same feature flag in another environment.

Example

 copyFeatureFlag projectKey=value featureFlagKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
featureFlagCopyBody FeatureFlagCopyBody Copy feature flag configurations between environments.

Return type

FeatureFlag

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteApprovalRequest

Delete an approval request for a feature flag config

Example

 deleteApprovalRequest projectKey=value environmentKey=value featureFlagKey=value approvalRequestId=value

Parameters

Name Type Description Notes
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.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
approvalRequestId string The approval request ID
approvalRequestConfigBody ApprovalRequestConfigBody Create a new approval request [optional]

Return type

(empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteFeatureFlag

Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application.

Example

 deleteFeatureFlag projectKey=value featureFlagKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.

Return type

(empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteFlagConfigScheduledChanges

Delete a scheduled change on a feature flag in an environment.

Example

 deleteFlagConfigScheduledChanges projectKey=value featureFlagKey=value environmentKey=value scheduledChangeId=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
scheduledChangeId string The id of the scheduled change

Return type

(empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

flagsProjectKeyEnvironmentKeyFeatureFlagKeyDependentFlagsGet

Get dependent flags for the flag in the environment specified in path parameters

Example

 flagsProjectKeyEnvironmentKeyFeatureFlagKeyDependentFlagsGet projectKey=value environmentKey=value featureFlagKey=value

Parameters

Name Type Description Notes
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.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.

Return type

DependentFlagsByEnvironment

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

flagsProjectKeyFeatureFlagKeyDependentFlagsGet

Get dependent flags across all environments for the flag specified in the path parameters

Example

 flagsProjectKeyFeatureFlagKeyDependentFlagsGet projectKey=value featureFlagKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.

Return type

MultiEnvironmentDependentFlags

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getApprovalRequest

Get a single approval request for a feature flag config

Example

 getApprovalRequest projectKey=value featureFlagKey=value environmentKey=value approvalRequestId=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
approvalRequestId string The approval request ID

Return type

ApprovalRequests

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getApprovalRequests

Get all approval requests for a feature flag config

Example

 getApprovalRequests projectKey=value featureFlagKey=value environmentKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

Return type

ApprovalRequests

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getExpiringUserTargets

Get expiring user targets for feature flag

Example

 getExpiringUserTargets projectKey=value environmentKey=value featureFlagKey=value

Parameters

Name Type Description Notes
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.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.

Return type

UserTargetingExpirationForFlags

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFeatureFlag

Get a single feature flag by key.

Example

 getFeatureFlag projectKey=value featureFlagKey=value  Specify as:  env=value1 env=value2 env=...

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
env array[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]

Return type

FeatureFlag

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFeatureFlagStatus

Get the status for a particular feature flag.

Example

 getFeatureFlagStatus projectKey=value environmentKey=value featureFlagKey=value

Parameters

Name Type Description Notes
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.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.

Return type

FeatureFlagStatus

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFeatureFlagStatusAcrossEnvironments

Get the status for a particular feature flag across environments

Example

 getFeatureFlagStatusAcrossEnvironments projectKey=value featureFlagKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.

Return type

FeatureFlagStatusAcrossEnvironments

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFeatureFlagStatuses

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.

Example

 getFeatureFlagStatuses projectKey=value environmentKey=value

Parameters

Name Type Description Notes
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.

Return type

FeatureFlagStatuses

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFeatureFlags

Get a list of all features in the given project.

Example

 getFeatureFlags projectKey=value  Specify as:  env=value1 env=value2 env=...  summary=value  archived=value  limit=value  offset=value  filter=value  sort=value  tag=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
env array[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]
summary boolean By default in api version >= 1, flags will not include their list of prerequisites, targets or rules. Set summary=0 to include these fields for each flag returned. [optional]
archived boolean When set to 1, only archived flags will be included in the list of flags returned. By default, archived flags are not included in the list of flags. [optional]
limit integer The number of objects to return. Defaults to -1, which returns everything. [optional]
offset integer Where to start in the list. This is for use with pagination. For example, an offset of 10 would skip the first 10 items and then return the next limit items. [optional]
filter string A comma-separated list of filters. Each filter is of the form field:value. [optional]
sort string A comma-separated list of fields to sort by. A field prefixed by a - will be sorted in descending order. [optional]
tag string Filter by tag. A tag can be used to group flags across projects. [optional]

Return type

FeatureFlags

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFlagConfigScheduledChange

Get a scheduled change on a feature flag by id.

Example

 getFlagConfigScheduledChange projectKey=value featureFlagKey=value environmentKey=value scheduledChangeId=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
scheduledChangeId string The id of the scheduled change

Return type

FeatureFlagScheduledChange

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFlagConfigScheduledChanges

Get all scheduled workflows for a feature flag by key.

Example

 getFlagConfigScheduledChanges projectKey=value featureFlagKey=value environmentKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

Return type

FeatureFlagScheduledChanges

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFlagConfigScheduledChangesConflicts

Lists conflicts between the given instructions and any existing scheduled changes for the feature flag. The actual HTTP verb should be REPORT, not POST.

Example

 getFlagConfigScheduledChangesConflicts projectKey=value featureFlagKey=value environmentKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
flagConfigScheduledChangesConflictsBody FlagConfigScheduledChangesConflictsBody Used to determine if a semantic patch will result in conflicts with scheduled changes on a feature flag.

Return type

FeatureFlagScheduledChangesConflicts

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

patchExpiringUserTargets

Update, add, or delete expiring user targets on feature flag

Example

 patchExpiringUserTargets projectKey=value environmentKey=value featureFlagKey=value

Parameters

Name Type Description Notes
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.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
semanticPatchWithComment map Requires a Semantic Patch representation of the desired changes to the resource. 'https://apidocs.launchdarkly.com/reference#updates-via-semantic-patches'. The addition of comments is also supported.

Return type

UserTargetingExpirationForFlags

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

patchFeatureFlag

Perform a partial update to a feature.

Example

 patchFeatureFlag projectKey=value featureFlagKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
patchComment 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.

Return type

FeatureFlag

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

patchFlagConfigScheduledChange

Updates an existing scheduled-change on a feature flag in an environment.

Example

 patchFlagConfigScheduledChange projectKey=value featureFlagKey=value environmentKey=value scheduledChangeId=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
flagConfigScheduledChangesPatchBody FlagConfigScheduledChangesPatchBody Update scheduled changes on a feature flag.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
scheduledChangeId string The id of the scheduled change

Return type

FeatureFlagScheduledChange

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

postApplyApprovalRequest

Apply approval request for a feature flag config

Example

 postApplyApprovalRequest projectKey=value featureFlagKey=value environmentKey=value approvalRequestId=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
approvalRequestId string The approval request ID
approvalRequestApplyConfigBody ApprovalRequestApplyConfigBody Apply an approval request

Return type

ApprovalRequests

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

postApprovalRequest

Create an approval request for a feature flag config

Example

 postApprovalRequest projectKey=value featureFlagKey=value environmentKey=value approvalRequestId=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
approvalRequestId string The approval request ID
approvalRequestConfigBody ApprovalRequestConfigBody Create a new approval request [optional]

Return type

ApprovalRequest

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

postFeatureFlag

Creates a new feature flag.

Example

 postFeatureFlag projectKey=value  clone=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagBody FeatureFlagBody Create a new feature flag.
clone string The key of the feature flag to be cloned. The key identifies the flag in your code. For example, setting clone=flagKey will copy the full targeting configuration for all environments (including on/off state) from the original flag to the new flag. [optional]

Return type

FeatureFlag

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

postFlagConfigScheduledChanges

Creates a new scheduled change for a feature flag.

Example

 postFlagConfigScheduledChanges projectKey=value featureFlagKey=value environmentKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
flagConfigScheduledChangesPostBody FlagConfigScheduledChangesPostBody Create scheduled changes on a feature flag.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

Return type

FeatureFlagScheduledChange

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

postReviewApprovalRequest

Review approval request for a feature flag config

Example

 postReviewApprovalRequest projectKey=value featureFlagKey=value environmentKey=value approvalRequestId=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
featureFlagKey string The feature flag's key. The key identifies the flag in your code.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
approvalRequestId string The approval request ID
approvalRequestReviewConfigBody ApprovalRequestReviewConfigBody Review an approval request

Return type

ApprovalRequests

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]