launchdarkly
Module launchdarkly
API
Definitions
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_launchdarkly_1.2.0.png)
ballerinax/launchdarkly Ballerina library
Overview
This is a generated connector for LaunchDarkly API v2.0 OpenAPI specification.
LaunchDarkly is a feature management platform enables teams to deploy code at any time, even if a feature isn't ready to be released to all users.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create an LaunchDarkly account.
- Obtain tokens - Follow this guide.
Quickstart
To use the LaunchDarkly connector in your Ballerina application, update the .bal file as follows:
Step 1: Import connector
First, import the ballerinax/launchdarkly module into the Ballerina project.
import ballerinax/launchdarkly;
Step 2: Create a new connector instance
You can initialize the client as follows. You can now provide the API key obtained from the LaunchDarkly in the configuration.
launchdarkly:ApiKeysConfig apiKeyConfig = { authorization: "<API_KEY>" } launchdarkly:Client baseClient = check new Client(apiKeyConfig, serviceUrl = ""https://app.launchdarkly.com/api/v2"");
Step 3: Invoke connector operation
- You can find all of the resource categories supported.
launchdarkly:Links links = check baseClient->getRoot();
- Use
bal run
command to compile and run the Ballerina program.
Clients![](/images/permalink.svg)
launchdarkly: Client![](/images/permalink.svg)
This is a generated connector for LaunchDarkly API v2.0 OpenAPI specification. LaunchDarkly is a feature management platform enables teams to deploy code at any time, even if a feature isn't ready to be released to all users.
Constructor![](/images/permalink.svg)
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create an LaunchDarkly account and obtain tokens by following this guide.
init (ApiKeysConfig apiKeyConfig, ClientConfiguration clientConfig, string serviceUrl)
- apiKeyConfig ApiKeysConfig - API keys for authorization
- clientConfig ClientConfiguration {} - The configurations to be used when initializing the
connector
- serviceUrl string "https://app.launchdarkly.com/api/v2" - URL of the target service
getRoot![](/images/permalink.svg)
You can issue a GET request to the root resource to find all of the resource categories supported by the API.
getRelayProxyConfigs![](/images/permalink.svg)
function getRelayProxyConfigs() returns RelayProxyConfigs|error
Returns a list of relay proxy configurations in the account.
Return Type
- RelayProxyConfigs|error - Relay proxy configs response.
postRelayAutoConfig![](/images/permalink.svg)
function postRelayAutoConfig(AccountRelayautoconfigsBody payload) returns RelayProxyConfig|error
Create a new relay proxy config.
Parameters
- payload AccountRelayautoconfigsBody - Create a new relay proxy configuration
Return Type
- RelayProxyConfig|error - Relay proxy config response.
getRelayProxyConfig![](/images/permalink.svg)
function getRelayProxyConfig(string id) returns RelayProxyConfig|error
Get a single relay proxy configuration by ID.
Parameters
- id string - The relay proxy configuration ID
Return Type
- RelayProxyConfig|error - Relay proxy config response.
deleteRelayProxyConfig![](/images/permalink.svg)
Delete a relay proxy configuration by ID.
Parameters
- id string - The relay proxy configuration ID
patchRelayProxyConfig![](/images/permalink.svg)
function patchRelayProxyConfig(string id, PatchOperation[] payload) returns RelayProxyConfig|error
Modify a relay proxy configuration by ID.
Parameters
- id string - The relay proxy configuration ID
- payload PatchOperation[] - Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
Return Type
- RelayProxyConfig|error - Relay proxy config response.
resetRelayProxyConfig![](/images/permalink.svg)
function resetRelayProxyConfig(string id, int? expiry) returns RelayProxyConfig|error
Reset a relay proxy configuration's secret key with an optional expiry time for the old key.
Parameters
- id string - The relay proxy configuration ID
- expiry int? (default ()) - An expiration time for the old relay proxy configuration key, expressed as a Unix epoch time in milliseconds. By default, the relay proxy configuration will expire immediately
Return Type
- RelayProxyConfig|error - Relay proxy config response.
getAuditLogEntries![](/images/permalink.svg)
function getAuditLogEntries(int? before, int? after, string? q, decimal? 'limit, string? spec) returns AuditLogEntries|error
Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query.
Parameters
- before int? (default ()) - A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have before this timestamp.
- after int? (default ()) - A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have occurred after this timestamp.
- q string? (default ()) - Text to search for. You can search for the full or partial name of the resource involved or full or partial email address of the member who made the change.
- 'limit decimal? (default ()) - A limit on the number of audit log entries to be returned, between 1 and 20.
- spec string? (default ()) - A resource specifier, allowing you to filter audit log listings by resource.
Return Type
- AuditLogEntries|error - Audit log entries response.
getAuditLogEntry![](/images/permalink.svg)
function getAuditLogEntry(string resourceId) returns AuditLogEntry|error
Use this endpoint to fetch a single audit log entry by its resouce ID.
Parameters
- resourceId string - The resource ID.
Return Type
- AuditLogEntry|error - Audit log entry response.
getDestinations![](/images/permalink.svg)
function getDestinations() returns Destinations|error
Returns a list of all data export destinations.
Return Type
- Destinations|error - Destinations response.
postDestination![](/images/permalink.svg)
function postDestination(string projectKey, string environmentKey, ProjectkeyEnvironmentkeyBody payload) returns Destination|error
Create a new data export destination
Parameters
- 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.
- payload ProjectkeyEnvironmentkeyBody - Create a new data export destination.
Return Type
- Destination|error - Destination response.
getDestination![](/images/permalink.svg)
function getDestination(string projectKey, string environmentKey, string destinationId) returns Destination|error
Get a single data export destination by ID
Parameters
- 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.
- destinationId string - The data export destination ID.
Return Type
- Destination|error - Destination response.
deleteDestination![](/images/permalink.svg)
function deleteDestination(string projectKey, string environmentKey, string destinationId) returns Response|error
Get a single data export destination by ID
Parameters
- 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.
- destinationId string - The data export destination ID.
patchDestination![](/images/permalink.svg)
function patchDestination(string projectKey, string environmentKey, string destinationId, PatchOperation[] payload) returns Destination|error
Perform a partial update to a data export destination.
Parameters
- 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.
- destinationId string - The data export destination ID.
- payload PatchOperation[] - Requires a JSON Patch representation of the desired changes to the project. '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
- Destination|error - Destination response.
getFeatureFlagStatusAcrossEnvironments![](/images/permalink.svg)
function getFeatureFlagStatusAcrossEnvironments(string projectKey, string featureFlagKey) returns FeatureFlagStatusAcrossEnvironments|error
Get the status for a particular feature flag across environments
Parameters
- 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|error - Status of the requested feature flag across environments
getFeatureFlagStatuses![](/images/permalink.svg)
function getFeatureFlagStatuses(string projectKey, string environmentKey) returns FeatureFlagStatuses|error
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.
Parameters
- 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|error - List of feature flag statuses.
getFeatureFlagStatus![](/images/permalink.svg)
function getFeatureFlagStatus(string projectKey, string environmentKey, string featureFlagKey) returns FeatureFlagStatus|error
Get the status for a particular feature flag.
Parameters
- 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|error - Status of the requested feature flag.
getFeatureFlags![](/images/permalink.svg)
function getFeatureFlags(string projectKey, string[]? env, boolean? summary, boolean? archived, decimal? 'limit, decimal? offset, string? filter, string? sort, string? tag) returns FeatureFlags|error
Get a list of all features in the given project.
Parameters
- projectKey string - The project key, used to tie the flags together under one project so they can be managed together.
- env string[]? (default ()) - 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.
- summary boolean? (default ()) - 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.
- archived boolean? (default ()) - 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.
- 'limit decimal? (default ()) - The number of objects to return. Defaults to -1, which returns everything.
- offset decimal? (default ()) - 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.
- filter string? (default ()) - A comma-separated list of filters. Each filter is of the form field:value.
- sort string? (default ()) - A comma-separated list of fields to sort by. A field prefixed by a - will be sorted in descending order.
- tag string? (default ()) - Filter by tag. A tag can be used to group flags across projects.
Return Type
- FeatureFlags|error - Flags response.
postFeatureFlag![](/images/permalink.svg)
function postFeatureFlag(string projectKey, FlagsProjectkeyBody payload, string? clone) returns FeatureFlag|error
Creates a new feature flag.
Parameters
- projectKey string - The project key, used to tie the flags together under one project so they can be managed together.
- payload FlagsProjectkeyBody - Create a new feature flag.
- clone string? (default ()) - 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.
Return Type
- FeatureFlag|error - Flag response.
getFeatureFlag![](/images/permalink.svg)
function getFeatureFlag(string projectKey, string featureFlagKey, string[]? env) returns FeatureFlag|error
Get a single feature flag by key.
Parameters
- 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 string[]? (default ()) - 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.
Return Type
- FeatureFlag|error - Flag response.
deleteFeatureFlag![](/images/permalink.svg)
Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application.
Parameters
- 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.
patchFeatureFlag![](/images/permalink.svg)
function patchFeatureFlag(string projectKey, string featureFlagKey, ProjectkeyFeatureflagkeyBody payload) returns FeatureFlag|error
Perform a partial update to a feature.
Parameters
- 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.
- payload ProjectkeyFeatureflagkeyBody - 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|error - Feature flag response.
copyFeatureFlag![](/images/permalink.svg)
function copyFeatureFlag(string projectKey, string featureFlagKey, FeatureflagkeyCopyBody payload) returns FeatureFlag|error
Copies the feature flag configuration from one environment to the same feature flag in another environment.
Parameters
- 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.
- payload FeatureflagkeyCopyBody - Copy feature flag configurations between environments.
Return Type
- FeatureFlag|error - Flag configuration copy response.
getExpiringUserTargets![](/images/permalink.svg)
function getExpiringUserTargets(string projectKey, string environmentKey, string featureFlagKey) returns UserTargetingExpirationForFlags|error
Get expiring user targets for feature flag
Parameters
- 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|error - User targets of the requested feature flag.
patchExpiringUserTargets![](/images/permalink.svg)
function patchExpiringUserTargets(string projectKey, string environmentKey, string featureFlagKey, SemanticPatchOperation[] payload) returns UserTargetingExpirationForFlags|error
Update, add, or delete expiring user targets on feature flag
Parameters
- 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.
- payload SemanticPatchOperation[] - 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|error - User targeting expirations on feature flag response.
getIntegrations![](/images/permalink.svg)
function getIntegrations() returns Integrations|error
Get a list of all configured audit log event integrations associated with this account.
Return Type
- Integrations|error - Integrations response.
getIntegrationSubscriptions![](/images/permalink.svg)
function getIntegrationSubscriptions(string integrationKey) returns Integration|error
Get a list of all configured integrations of a given kind.
Parameters
- integrationKey string - The key used to specify the integration kind.
Return Type
- Integration|error - Integrations response.
postIntegrationSubscription![](/images/permalink.svg)
function postIntegrationSubscription(string integrationKey, IntegrationsIntegrationkeyBody payload) returns IntegrationSubscription|error
Create a new integration subscription of a given kind.
Parameters
- integrationKey string - The key used to specify the integration kind.
- payload IntegrationsIntegrationkeyBody - Create a new integration subscription.
Return Type
- IntegrationSubscription|error - Integrations response.
getIntegrationSubscription![](/images/permalink.svg)
function getIntegrationSubscription(string integrationKey, string integrationId) returns IntegrationSubscription|error
Get a single integration subscription by ID.
Parameters
- integrationKey string - The key used to specify the integration kind.
- integrationId string - The integration ID.
Return Type
- IntegrationSubscription|error - Integrations response.
deleteIntegrationSubscription![](/images/permalink.svg)
function deleteIntegrationSubscription(string integrationKey, string integrationId) returns Response|error
Delete an integration subscription by ID.
Parameters
- integrationKey string - The key used to specify the integration kind.
- integrationId string - The integration ID.
patchIntegrationSubscription![](/images/permalink.svg)
function patchIntegrationSubscription(string integrationKey, string integrationId, PatchOperation[] payload) returns IntegrationSubscription|error
Modify an integration subscription by ID.
Parameters
- integrationKey string - The key used to specify the integration kind.
- integrationId string - The integration ID.
- payload PatchOperation[] - Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
Return Type
- IntegrationSubscription|error - Integrations response.
getMembers![](/images/permalink.svg)
function getMembers(decimal? 'limit, decimal? offset, string? filter, string? sort) returns Members|error
Returns a list of all members in the account.
Parameters
- 'limit decimal? (default ()) - The number of objects to return. Defaults to -1, which returns everything.
- offset decimal? (default ()) - 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.
- filter string? (default ()) - A comma-separated list of filters. Each filter is of the form field:value.
- sort string? (default ()) - A comma-separated list of fields to sort by. A field prefixed by a - will be sorted in descending order.
postMembers![](/images/permalink.svg)
function postMembers(MembersBody[] payload) returns Members|error
Invite new members.
Parameters
- payload MembersBody[] - New members to invite.
getMe![](/images/permalink.svg)
Get the current team member associated with the token
getMember![](/images/permalink.svg)
Get a single team member by ID.
Parameters
- memberId string - The member ID.
deleteMember![](/images/permalink.svg)
Delete a team member by ID.
Parameters
- memberId string - The member ID.
patchMember![](/images/permalink.svg)
function patchMember(string memberId, PatchOperation[] payload) returns Member|error
Modify a team member by ID.
Parameters
- memberId string - The member ID.
- payload PatchOperation[] - Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
getProjects![](/images/permalink.svg)
Returns a list of all projects in the account.
postProject![](/images/permalink.svg)
function postProject(ProjectsBody payload) returns Project|error
Create a new project with the given key and name.
Parameters
- payload ProjectsBody - Project keys must be unique within an account.
getProject![](/images/permalink.svg)
Fetch a single project by key.
Parameters
- projectKey string - The project key, used to tie the flags together under one project so they can be managed together.
deleteProject![](/images/permalink.svg)
Delete a project by key. Caution-- deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account.
Parameters
- projectKey string - The project key, used to tie the flags together under one project so they can be managed together.
patchProject![](/images/permalink.svg)
function patchProject(string projectKey, PatchOperation[] payload) returns Project|error
Modify a project by ID.
Parameters
- projectKey string - The project key, used to tie the flags together under one project so they can be managed together.
- payload PatchOperation[] - Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
postEnvironment![](/images/permalink.svg)
function postEnvironment(string projectKey, EnvironmentPost payload) returns Environment|error
Create a new environment in a specified project with a given name, key, and swatch color.
Parameters
- projectKey string - The project key, used to tie the flags together under one project so they can be managed together.
- payload EnvironmentPost - New environment.
Return Type
- Environment|error - Environment response.
getEnvironment![](/images/permalink.svg)
function getEnvironment(string projectKey, string environmentKey) returns Environment|error
Get an environment given a project and key.
Parameters
- 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
- Environment|error - Environment response.
deleteEnvironment![](/images/permalink.svg)
Delete an environment in a specific project.
Parameters
- 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.
patchEnvironment![](/images/permalink.svg)
function patchEnvironment(string projectKey, string environmentKey, PatchOperation[] payload) returns Environment|error
Modify an environment by ID.
Parameters
- 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.
- payload PatchOperation[] - Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
Return Type
- Environment|error - Environment response.
resetEnvironmentSDKKey![](/images/permalink.svg)
function resetEnvironmentSDKKey(string projectKey, string environmentKey, int? expiry) returns Environment|error
Reset an environment's SDK key with an optional expiry time for the old key.
Parameters
- 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.
- expiry int? (default ()) - An expiration time for the old environment SDK key, expressed as a Unix epoch time in milliseconds. By default, the key will expire immediately.
Return Type
- Environment|error - Environment response.
resetEnvironmentMobileKey![](/images/permalink.svg)
function resetEnvironmentMobileKey(string projectKey, string environmentKey, int? expiry) returns Environment|error
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.
Parameters
- 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.
- expiry int? (default ()) - 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.
Return Type
- Environment|error - Environment response.
getFeatureFlagApprovalRequests![](/images/permalink.svg)
function getFeatureFlagApprovalRequests(string projectKey, string featureFlagKey, string environmentKey) returns FeatureFlagApprovalRequests|error
Get all approval requests for a feature flag
Parameters
- 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
- FeatureFlagApprovalRequests|error - Feature flag approval requests response
getFeatureFlagApprovalRequest![](/images/permalink.svg)
function getFeatureFlagApprovalRequest(string projectKey, string featureFlagKey, string environmentKey, string featureFlagApprovalRequestId) returns FeatureFlagApprovalRequests|error
Get a single approval request for a feature flag
Parameters
- 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.
- featureFlagApprovalRequestId string - The feature flag approval request ID
Return Type
- FeatureFlagApprovalRequests|error - Feature flag approval request response
postFeatureFlagApprovalRequest![](/images/permalink.svg)
function postFeatureFlagApprovalRequest(string projectKey, string featureFlagKey, string environmentKey, string featureFlagApprovalRequestId, json payload) returns FeatureFlagApprovalRequest|error
Create an approval request for a feature flag
Parameters
- 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.
- featureFlagApprovalRequestId string - The feature flag approval request ID
- payload json - Create a new feature flag approval request
Return Type
- FeatureFlagApprovalRequest|error - Feature flag approval request response
deleteFeatureFlagApprovalRequest![](/images/permalink.svg)
function deleteFeatureFlagApprovalRequest(string projectKey, string environmentKey, string featureFlagKey, string featureFlagApprovalRequestId) returns Response|error
Delete an approval request for a feature flag
Parameters
- 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.
- featureFlagApprovalRequestId string - The feature flag approval request ID
postApplyFeatureFlagApprovalRequest![](/images/permalink.svg)
function postApplyFeatureFlagApprovalRequest(string projectKey, string featureFlagKey, string environmentKey, string featureFlagApprovalRequestId, FeatureflagapprovalrequestidApplyBody payload) returns FeatureFlagApprovalRequests|error
Apply approval request for a feature flag
Parameters
- 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.
- featureFlagApprovalRequestId string - The feature flag approval request ID
- payload FeatureflagapprovalrequestidApplyBody - Apply a new feature flag approval request
Return Type
- FeatureFlagApprovalRequests|error - Feature flag approval request applied response
postReviewFeatureFlagApprovalRequest![](/images/permalink.svg)
function postReviewFeatureFlagApprovalRequest(string projectKey, string featureFlagKey, string environmentKey, string featureFlagApprovalRequestId, FeatureflagapprovalrequestidReviewBody payload) returns FeatureFlagApprovalRequests|error
Review approval request for a feature flag
Parameters
- 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.
- featureFlagApprovalRequestId string - The feature flag approval request ID
- payload FeatureflagapprovalrequestidReviewBody - Review a feature flag approval request
Return Type
- FeatureFlagApprovalRequests|error - Feature flag approval request reviewed response
getCustomRoles![](/images/permalink.svg)
function getCustomRoles() returns CustomRoles|error
Return a complete list of custom roles.
Return Type
- CustomRoles|error - Custom roles response.
postCustomRole![](/images/permalink.svg)
function postCustomRole(RolesBody payload) returns CustomRole|error
Create a new custom role.
Parameters
- payload RolesBody - New role or roles to create.
Return Type
- CustomRole|error - Custom role response.
getCustomRole![](/images/permalink.svg)
function getCustomRole(string customRoleKey) returns CustomRole|error
Get one custom role by key.
Parameters
- customRoleKey string - The custom role key.
Return Type
- CustomRole|error - Custom role response.
deleteCustomRole![](/images/permalink.svg)
Delete a custom role by key.
Parameters
- customRoleKey string - The custom role key.
patchCustomRole![](/images/permalink.svg)
function patchCustomRole(string customRoleKey, PatchOperation[] payload) returns CustomRole|error
Modify a custom role by key.
Parameters
- customRoleKey string - The custom role key.
- payload PatchOperation[] - Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
Return Type
- CustomRole|error - Custom role response.
getUserSegments![](/images/permalink.svg)
function getUserSegments(string projectKey, string environmentKey, string? tag) returns UserSegments|error
Get a list of all user segments in the given project.
Parameters
- 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.
- tag string? (default ()) - Filter by tag. A tag can be used to group flags across projects.
Return Type
- UserSegments|error - Segments response.
postUserSegment![](/images/permalink.svg)
function postUserSegment(string projectKey, string environmentKey, ProjectkeyEnvironmentkeyBody1 payload) returns UserSegment|error
Creates a new user segment.
Parameters
- 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.
- payload ProjectkeyEnvironmentkeyBody1 - Create a new user segment.
Return Type
- UserSegment|error - User segment response.
getUserSegment![](/images/permalink.svg)
function getUserSegment(string projectKey, string environmentKey, string userSegmentKey) returns UserSegment|error
Get a single user segment by key.
Parameters
- 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.
- userSegmentKey string - The user segment's key. The key identifies the user segment in your code.
Return Type
- UserSegment|error - User segment response.
deleteUserSegment![](/images/permalink.svg)
function deleteUserSegment(string projectKey, string environmentKey, string userSegmentKey) returns Response|error
Delete a user segment.
Parameters
- 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.
- userSegmentKey string - The user segment's key. The key identifies the user segment in your code.
patchUserSegment![](/images/permalink.svg)
function patchUserSegment(string projectKey, string environmentKey, string userSegmentKey, PatchOperation[] payload) returns UserSegment|error
Perform a partial update to a user segment.
Parameters
- 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.
- userSegmentKey string - The user segment's key. The key identifies the user segment in your code.
- payload PatchOperation[] - Requires a JSON Patch representation of the desired changes to the project. '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
- UserSegment|error - User segment response.
updatedUnboundedSegmentTargets![](/images/permalink.svg)
function updatedUnboundedSegmentTargets(string projectKey, string environmentKey, string userSegmentKey, UsersegmentkeyUnboundedusersBody payload) returns Response|error
Update targets included or excluded in an unbounded segment
Parameters
- 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.
- userSegmentKey string - The user segment's key. The key identifies the user segment in your code.
- payload UsersegmentkeyUnboundedusersBody - Add or remove user targets to the included or excluded lists on an unbounded segment
getExpiringUserTargetsOnSegment![](/images/permalink.svg)
function getExpiringUserTargetsOnSegment(string projectKey, string environmentKey, string userSegmentKey) returns UserTargetingExpirationForSegment|error
Get expiring user targets for user segment
Parameters
- 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.
- userSegmentKey string - The user segment's key. The key identifies the user segment in your code.
Return Type
- UserTargetingExpirationForSegment|error - User targeting expirations on user segment response.
patchExpiringUserTargetsOnSegment![](/images/permalink.svg)
function patchExpiringUserTargetsOnSegment(string projectKey, string environmentKey, string userSegmentKey, SemanticPatchOperation[] payload) returns UserTargetingExpirationForSegment|error
Update, add, or delete expiring user targets on user segment
Parameters
- 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.
- userSegmentKey string - The user segment's key. The key identifies the user segment in your code.
- payload SemanticPatchOperation[] - 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
- UserTargetingExpirationForSegment|error - User targeting expirations on user segment response.
getTokens![](/images/permalink.svg)
Returns a list of tokens in the account.
Parameters
- showAll boolean? (default ()) - If set to true, and the authentication access token has the "Admin" role, personal access tokens for all members will be retrieved.
postToken![](/images/permalink.svg)
function postToken(TokensBody payload) returns Token|error
Create a new token.
Parameters
- payload TokensBody - Create a new access token.
getToken![](/images/permalink.svg)
Get a single access token by ID.
Parameters
- tokenId string - The access token ID.
deleteToken![](/images/permalink.svg)
Delete an access token by ID.
Parameters
- tokenId string - The access token ID.
patchToken![](/images/permalink.svg)
function patchToken(string tokenId, PatchOperation[] payload) returns Token|error
Modify an access token by ID.
Parameters
- tokenId string - The access token ID.
- payload PatchOperation[] - Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
resetToken![](/images/permalink.svg)
Reset an access token's secret key with an optional expiry time for the old key.
Parameters
- tokenId string - The access token ID.
- expiry int? (default ()) - An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately.
getUsage![](/images/permalink.svg)
Returns of the usage endpoints available.
getEvaluations![](/images/permalink.svg)
function getEvaluations(string envId, string flagKey) returns StreamSDKVersion|error
Get events usage by event id and the feature flag key.
Parameters
- envId string - The environment id for the flag evaluations in question.
- flagKey string - The key of the flag we want metrics for.
Return Type
- StreamSDKVersion|error - Returns timeseries data and all sdk versions.
getEvents![](/images/permalink.svg)
Get events usage endpoints.
getEvent![](/images/permalink.svg)
function getEvent(string 'type) returns StreamSDKVersion|error
Get events usage by event type.
Parameters
- 'type string - The type of event we would like to track.
Return Type
- StreamSDKVersion|error - Returns timeseries data and all sdk versions.
getMAU![](/images/permalink.svg)
Get monthly active user data.
getMAUByCategory![](/images/permalink.svg)
function getMAUByCategory() returns MAUbyCategory|error
Get monthly active user data by category.
Return Type
- MAUbyCategory|error - Returns timeseries data and all sdk versions.
getStreams![](/images/permalink.svg)
Returns a list of all streams.
getStream![](/images/permalink.svg)
Get a stream endpoint and return timeseries data.
Parameters
- 'source string - The source of where the stream comes from.
getStreamBySDK![](/images/permalink.svg)
function getStreamBySDK(string 'source) returns StreamBySDK|error
Get a stream timeseries data by source show sdk version metadata.
Parameters
- 'source string - The source of where the stream comes from.
Return Type
- StreamBySDK|error - Returns timeseries data and metadata on sdk version.
getStreamSDKVersion![](/images/permalink.svg)
function getStreamSDKVersion(string 'source) returns StreamSDKVersion|error
Get a stream timeseries data by source and show all sdk version associated.
Parameters
- 'source string - The source of where the stream comes from.
Return Type
- StreamSDKVersion|error - Returns timeseries data and all sdk versions.
getSearchUsers![](/images/permalink.svg)
function getSearchUsers(string projectKey, string environmentKey, string? q, int? 'limit, int? offset, int? after) returns Users|error
Search users in LaunchDarkly based on their last active date, or a search query. It should not be used to enumerate all users in LaunchDarkly-- use the List users API resource.
Parameters
- 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.
- q string? (default ()) - Search query.
- 'limit int? (default ()) - Pagination limit.
- offset int? (default ()) - Specifies the first item to return in the collection.
- after int? (default ()) - A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have occurred after this timestamp.
getUsers![](/images/permalink.svg)
function getUsers(string projectKey, string environmentKey, int? 'limit, string? h, string? scrollId) returns Users|error
List all users in the environment. Includes the total count of users. In each page, there will be up to 'limit' users returned (default 20). This is useful for exporting all users in the system for further analysis. Paginated collections will include a next link containing a URL with the next set of elements in the collection.
Parameters
- 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.
- 'limit int? (default ()) - Pagination limit.
- h string? (default ()) - This parameter is required when following "next" links.
- scrollId string? (default ()) - This parameter is required when following "next" links.
getUser![](/images/permalink.svg)
Get a user by key.
Parameters
- 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.
- userKey string - The user's key.
deleteUser![](/images/permalink.svg)
function deleteUser(string projectKey, string environmentKey, string userKey) returns Response|error
Delete a user by ID.
Parameters
- 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.
- userKey string - The user's key.
getUserFlagSettings![](/images/permalink.svg)
function getUserFlagSettings(string projectKey, string environmentKey, string userKey) returns UserFlagSettings|error
Fetch a single flag setting for a user by key.
Parameters
- 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.
- userKey string - The user's key.
Return Type
- UserFlagSettings|error - User flags settings response.
getUserFlagSetting![](/images/permalink.svg)
function getUserFlagSetting(string projectKey, string environmentKey, string userKey, string featureFlagKey) returns UserFlagSetting|error
Fetch a single flag setting for a user by key.
Parameters
- 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.
- userKey string - The user's key.
- featureFlagKey string - The feature flag's key. The key identifies the flag in your code.
Return Type
- UserFlagSetting|error - User flag setting response.
putFlagSetting![](/images/permalink.svg)
function putFlagSetting(string projectKey, string environmentKey, string userKey, string featureFlagKey, FlagsFeatureflagkeyBody payload) returns Response|error
Specifically enable or disable a feature flag for a user based on their key.
Parameters
- 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.
- userKey string - The user's key.
- featureFlagKey string - The feature flag's key. The key identifies the flag in your code.
- payload FlagsFeatureflagkeyBody - A request payload to update feature flag for a user based on their key
getExpiringUserTargetsForUser![](/images/permalink.svg)
function getExpiringUserTargetsForUser(string projectKey, string environmentKey, string userKey) returns UserTargetingExpirationOnFlagsForUser|error
Get expiring dates on flags for user
Parameters
- 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.
- userKey string - The user's key.
Return Type
- UserTargetingExpirationOnFlagsForUser|error - User targets of the requested feature flag.
patchExpiringUserTargetsForFlags![](/images/permalink.svg)
function patchExpiringUserTargetsForFlags(string projectKey, string environmentKey, string userKey, SemanticPatchOperation[] payload) returns UserTargetingExpirationOnFlagsForUser|error
Update, add, or delete expiring user targets for a single user on all flags
Parameters
- 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.
- userKey string - The user's key.
- payload SemanticPatchOperation[] - 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
- UserTargetingExpirationOnFlagsForUser|error - User Targeting expiration for single user on all flags response.
getWebhooks![](/images/permalink.svg)
Fetch a list of all webhooks.
postWebhook![](/images/permalink.svg)
function postWebhook(WebhooksBody payload) returns Webhook|error
Create a webhook.
Parameters
- payload WebhooksBody - New webhook.
getWebhook![](/images/permalink.svg)
Get a webhook by ID.
Parameters
- resourceId string - The resource ID.
deleteWebhook![](/images/permalink.svg)
Delete a webhook by ID.
Parameters
- resourceId string - The resource ID.
patchWebhook![](/images/permalink.svg)
function patchWebhook(string resourceId, PatchOperation[] payload) returns Webhook|error
Modify a webhook by ID.
Parameters
- resourceId string - The resource ID.
- payload PatchOperation[] - Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
Records![](/images/permalink.svg)
launchdarkly: AccountRelayautoconfigsBody![](/images/permalink.svg)
Fields
- name string? - A human-friendly name for the relay proxy configuration
- policy Policy[]? -
launchdarkly: ApiKeysConfig![](/images/permalink.svg)
Provides API key configurations needed when communicating with a remote HTTP endpoint.
Fields
- authorization string - All requests on the LaunchDarkly API needs to include an API key. The API key can be provided as part of the query string or as a request header. The name of the API key needs to be
authorization
launchdarkly: AuditLogEntries![](/images/permalink.svg)
Fields
- _links Links? -
- items AuditLogEntry[]? -
launchdarkly: AuditLogEntry![](/images/permalink.svg)
Fields
- _id Id? - The unique resource id.
- _links Links? -
- comment string? -
- date int? -
- description string? -
- kind string? -
- member Member? -
- name string? -
- shortDescription string? -
- target AuditlogentryTarget? -
- title string? -
- titleVerb string? -
launchdarkly: AuditlogentryTarget![](/images/permalink.svg)
Fields
- _links Links? -
- name string? -
- resources string[]? -
launchdarkly: Clause![](/images/permalink.svg)
Fields
- _id string? -
- attribute string? -
- negate boolean? -
- op string? -
- values record {}[]? -
launchdarkly: ClientSideAvailability![](/images/permalink.svg)
Fields
- usingEnvironmentId boolean? - When set to true, this flag will be available to SDKs using the client-side id.
- usingMobileKey boolean? - When set to true, this flag will be available to SDKS using a mobile key.
launchdarkly: CustomProperty![](/images/permalink.svg)
A name and value describing a custom property.
Fields
- name string - The name of the property.
- value string[]? - Values for this property.
launchdarkly: CustomRole![](/images/permalink.svg)
Fields
- _id Id? - The unique resource id.
- _links Links? -
- description string? - Description of the custom role.
- 'key string? - The 20-hexdigit id or the key for a custom role.
- name string? - Name of the custom role.
- policy Policy[]? -
launchdarkly: CustomRoles![](/images/permalink.svg)
Fields
- _links Links? -
- items CustomRole[]? -
launchdarkly: Defaults![](/images/permalink.svg)
Default values to be used when a new environment is created.
Fields
- offVariation int - The index of the variation to be served when a flag is off.
- onVariation int - The index of the variation to be served when a flag's targeting is on (default variation).
launchdarkly: Destination![](/images/permalink.svg)
Fields
- _id string? - Unique destination ID.
- _links Links? -
- config record {}? - destination-specific configuration.
- kind string? - Destination type ("google-pubsub", "kinesis", "mparticle", or "segment")
- name string? - The destination name
- 'on boolean? - Whether the data export destination is on or not.
- 'version int? -
launchdarkly: DestinationAmazonKinesis![](/images/permalink.svg)
Fields
- region string? -
- roleArn string? -
- streamName string? -
launchdarkly: DestinationGooglePubSub![](/images/permalink.svg)
Fields
- project string? -
- topic string? -
launchdarkly: DestinationMParticle![](/images/permalink.svg)
Fields
- apiKey string? -
- environment string? -
- secret string? -
- userIdentity string? -
launchdarkly: Destinations![](/images/permalink.svg)
Fields
- _links Links? -
- items Destination[]? -
launchdarkly: DestinationSegment![](/images/permalink.svg)
Fields
- writeKey string? -
launchdarkly: Environment![](/images/permalink.svg)
Fields
- _id Id? - The unique resource id.
- _links Links? -
- apiKey string? - The SDK key for backend LaunchDarkly SDKs.
- approvalSettings EnvironmentApprovalsettings? - Approval settings for an environment. Only appears if the approvals feature is enabled.
- color string? - The swatch color for the environment.
- confirmChanges boolean? - Determines if this environment requires confirmation for flag and segment changes.
- defaultTrackEvents boolean? - Set to true to send detailed event information for new flags.
- defaultTtl decimal? - The default TTL.
- 'key string? - The key for the environment.
- mobileKey string? - The SDK key for mobile LaunchDarkly SDKs.
- name string? - The name of the environment.
- requireComments boolean? - Determines if this environment requires comments for flag and segment changes.
- secureMode boolean? - Determines if this environment is in safe mode.
- tags string[]? - An array of tags for this environment.
launchdarkly: EnvironmentApprovalsettings![](/images/permalink.svg)
Approval settings for an environment. Only appears if the approvals feature is enabled.
Fields
- canApplyDeclinedChanges boolean? - Whether changes can be applied as long as minNumApprovals is met, regardless of if any reviewers have declined a request.
- canReviewOwnRequest boolean? - Whether requesters can approve or decline their own request. They may always comment.
- minNumApprovals int? - The number of approvals required before an approval request can be applied.
- required boolean? - Whether any changes to flags in this environment will require approval.
- serviceKind string? - The approvals system used.
launchdarkly: EnvironmentPost![](/images/permalink.svg)
Fields
- color string - A color swatch (as an RGB hex value with no leading '#', e.g. C8C8C8).
- confirmChanges boolean? - Determines if this environment requires confirmation for flag and segment changes.
- defaultTrackEvents boolean? - Set to true to send detailed event information for newly created flags.
- defaultTtl decimal? - The default TTL for the new environment.
- 'key string - A project-unique key for the new environment.
- name string - The name of the new environment.
- requireComments boolean? - Determines if this environment requires comments for flag and segment changes.
- secureMode boolean? - Determines whether the environment is in secure mode.
- tags string[]? - An array of tags for this environment.
launchdarkly: EvaluationUsageError![](/images/permalink.svg)
Fields
- code string? -
- message string? -
launchdarkly: Events![](/images/permalink.svg)
Fields
- links UsageLinks? -
launchdarkly: Fallthrough![](/images/permalink.svg)
Fields
- rollout Rollout? -
- variation int? -
launchdarkly: FeatureFlag![](/images/permalink.svg)
Fields
- _links Links? -
- _maintainer Member? -
- _version int? -
- archived boolean? - Whether or not this flag is archived.
- archivedDate int? - A unix epoch time in milliseconds specifying the archived time of this flag.
- clientSideAvailability ClientSideAvailability? -
- creationDate int? - A unix epoch time in milliseconds specifying the creation time of this flag.
- customProperties record {}? - A mapping of keys to CustomProperty entries.
- defaults Defaults? - Default values to be used when a new environment is created.
- description string? - Description of the feature flag.
- environments record {}? -
- goalIds string[]? - An array goals from all environments associated with this feature flag
- includeInSnippet boolean? -
- 'key string? -
- kind string? - Whether the feature flag is a boolean flag or multivariate.
- maintainerId string? - The ID of the member that should maintain this flag.
- name string? - Name of the feature flag.
- tags string[]? - An array of tags for this feature flag.
- temporary boolean? - Whether or not this flag is temporary.
- variations Variation[]? - The variations for this feature flag.
launchdarkly: FeatureFlagApprovalRequest![](/images/permalink.svg)
Fields
- _id Id? - The unique resource id.
- _version int? -
- allReviews FeatureFlagApprovalRequestReview[]? -
- appliedByMemberID string? - The id of the member that applied the approval request
- appliedDate int? - A unix epoch time in milliseconds specifying the date the approval request was applied
- creationDate int? - A unix epoch time in milliseconds specifying the date the approval request was requested
- instructions SemanticPatchInstruction? - A semantic patch instruction
- notifyMemberIds string[]? - Id of members to notify.
- requestorId string? - The id of the member that requested the change
- reviewStatus FeatureFlagApprovalRequestReviewStatus? - | Name | Description | | --------:| ----------- | | pending | the feature flag approval request has not been reviewed yet | | approved | the feature flag approval request has been approved and can now be applied | | declined | the feature flag approval request has been declined and cannot be applied |
- status string? - | Name | Description | | --------:| ----------- | | pending | the feature flag approval request has not been applied yet | | completed| the feature flag approval request has been applied successfully | | failed | the feature flag approval request has been applied but the changes were not applied successfully |
launchdarkly: FeatureflagapprovalrequestidApplyBody![](/images/permalink.svg)
Fields
- comment string? - comment will be included in audit log item for change.
launchdarkly: FeatureflagapprovalrequestidReviewBody![](/images/permalink.svg)
Fields
- comment string? - comment will be included in audit log item for change.
- kind string - One of approve, decline, or comment.
launchdarkly: FeatureFlagApprovalRequestReview![](/images/permalink.svg)
Fields
- _id Id? - The unique resource id.
- creationDate int? - A unix epoch time in milliseconds specifying the date the approval request was reviewed
- kind FeatureFlagApprovalRequestReviewStatus? - | Name | Description | | --------:| ----------- | | pending | the feature flag approval request has not been reviewed yet | | approved | the feature flag approval request has been approved and can now be applied | | declined | the feature flag approval request has been declined and cannot be applied |
- memberId Id? - The unique resource id.
launchdarkly: FeatureFlagApprovalRequests![](/images/permalink.svg)
Fields
- _links Links? -
- items FeatureFlagApprovalRequest[]? -
launchdarkly: FeatureFlagConfig![](/images/permalink.svg)
Fields
- _environmentName string? -
- _site Site? -
- archived boolean? -
- fallthrough Fallthrough? -
- lastModified int? -
- offVariation int? -
- 'on boolean? -
- prerequisites Prerequisite[]? -
- rules Rule[]? -
- salt string? -
- sel string? -
- targets Target[]? -
- trackEvents boolean? - Set to true to send detailed event information for this flag.
- trackEventsFallthrough boolean? - Set to true to send detailed event information when targeting is enabled but no individual targeting rule is matched.
- 'version int? -
launchdarkly: FeatureFlagCopyObject![](/images/permalink.svg)
Fields
- currentVersion int? - If the latest version of the flag matches provided version it will copy, otherwise it will return a conflict.
- 'key string - The environment key to be used.
launchdarkly: FeatureflagkeyCopyBody![](/images/permalink.svg)
Fields
- comment string? - comment will be included in audit log item for change.
- excludedActions CopyActions[]? - Define the parts of the flag configuration that will not be copied.
- includedActions CopyActions[]? - Define the parts of the flag configuration that will be copied.
- 'source FeatureFlagCopyObject? -
- target FeatureFlagCopyObject? -
launchdarkly: FeatureFlags![](/images/permalink.svg)
Fields
- _links Links? -
- items FeatureFlag[]? -
- totalCount decimal? -
launchdarkly: FeatureFlagScheduledChange![](/images/permalink.svg)
Fields
- _id string? -
- _version int? -
- executionDate int? - A unix epoch time in milliseconds specifying the date the scheduled changes will be applied
- instructions SemanticPatchInstruction? - A semantic patch instruction
launchdarkly: FeatureFlagScheduledChanges![](/images/permalink.svg)
Fields
- _links Links? -
- items FeatureFlagScheduledChange[]? -
launchdarkly: FeatureFlagScheduledChangesConflicts![](/images/permalink.svg)
Fields
- instructions FeatureflagscheduledchangesconflictsInstructions[]? -
launchdarkly: FeatureflagscheduledchangesconflictsInstructions![](/images/permalink.svg)
Fields
- conflicts ScheduledChangesFeatureFlagConflict[]? -
- kind string? - The name of the modification you would like to perform on a resource.
launchdarkly: FeatureFlagStatus![](/images/permalink.svg)
Fields
- _links Links? -
- 'default record {}? -
- lastRequested string? -
- name string? - | Name | Description | | --------:| ----------- | | new | the feature flag was created within the last 7 days, and has not been requested yet | | active | the feature flag was requested by your servers or clients within the last 7 days | | inactive | the feature flag was created more than 7 days ago, and hasn't been requested by your servers or clients within the past 7 days | | launched | one variation of the feature flag has been rolled out to all your users for at least 7 days |
launchdarkly: FeatureFlagStatusAcrossEnvironments![](/images/permalink.svg)
Fields
- _links Links? -
- environments record {}? -
- 'key string? -
launchdarkly: FeatureFlagStatuses![](/images/permalink.svg)
Fields
- _links Links? -
- items FeatureFlagStatus[]? -
launchdarkly: FeatureFlagStatusForQueriedEnvironment![](/images/permalink.svg)
Fields
- 'default record {}? -
- lastRequested string? -
- name string? - | Name | Description | | --------:| ----------- | | new | the feature flag was created within the last 7 days, and has not been requested yet | | active | the feature flag was requested by your servers or clients within the last 7 days | | inactive | the feature flag was created more than 7 days ago, and hasn't been requested by your servers or clients within the past 7 days | | launched | one variation of the feature flag has been rolled out to all your users for at least 7 days |
launchdarkly: FlagListItem![](/images/permalink.svg)
Fields
- _links Links? -
- _site Site? -
- 'key string? -
- name string? -
launchdarkly: FlagsFeatureflagkeyBody![](/images/permalink.svg)
Fields
- setting boolean? - The variation value to set for the user. Must match the variation type of the flag.
launchdarkly: FlagsProjectkeyBody![](/images/permalink.svg)
Fields
- clientSideAvailability ClientSideAvailability? -
- defaults Defaults? - Default values to be used when a new environment is created.
- description string? - A description of the feature flag.
- includeInSnippet boolean? - Whether or not this flag should be made available to the client-side JavaScript SDK.
- 'key string - A unique key that will be used to reference the flag in your code.
- name string - A human-friendly name for the feature flag. Remember to note if this flag is intended to be temporary or permanent.
- tags string[]? - Tags for the feature flag.
- temporary boolean? - Whether or not the flag is a temporary flag.
- variations Variation[] - An array of possible variations for the flag.
launchdarkly: HierarchicalLinks![](/images/permalink.svg)
Fields
- parent Link? -
- self Link? -
launchdarkly: Integration![](/images/permalink.svg)
Fields
- _links IntegrationLinks? -
- items IntegrationSubscription[]? -
launchdarkly: IntegrationLinks![](/images/permalink.svg)
Fields
- self Link? -
launchdarkly: Integrations![](/images/permalink.svg)
Fields
- _links record {}? - A mapping of integration types to their respective API endpoints.
- items IntegrationSubscription[]? -
launchdarkly: IntegrationsIntegrationkeyBody![](/images/permalink.svg)
Fields
- config record {} - Integration-specific configuration fields.
- name string - A human-readable name for your subscription configuration.
- 'on boolean? - Whether the integration subscription is active or not.
- statements Statement[]? -
- tags string[]? - Tags for the integration subscription.
launchdarkly: IntegrationSubscription![](/images/permalink.svg)
Fields
- _id Id? - The unique resource id.
- _links HierarchicalLinks? -
- _status IntegrationsubscriptionStatus? -
- config record {}? - A key-value mapping of configuration fields.
- kind string? - The type of integration associated with this configuration.
- name string? - The user-defined name associated with this configuration.
- 'on boolean? - Whether or not the integration is currently active.
- statements Statement[]? -
- tags string[]? - An array of tags for this integration configuration.
launchdarkly: IntegrationsubscriptionStatus![](/images/permalink.svg)
Fields
- errorCount int? -
- lastSuccess int? - A unix epoch time in milliseconds specifying the last time this integration was successfully used.
- successCount int? -
launchdarkly: Link![](/images/permalink.svg)
Fields
- href string? -
- 'type string? -
launchdarkly: Links![](/images/permalink.svg)
Fields
- next Link? -
- self Link? -
launchdarkly: MAU![](/images/permalink.svg)
Fields
- _links UsageLinks? -
- metadata StreamBySDKLinksMetadata[]? -
- series StreamUsageSeries[]? -
launchdarkly: MAUbyCategory![](/images/permalink.svg)
Fields
- _links StreamBySDKLinks? -
- metadata MAUMetadata[]? -
- series StreamUsageSeries[]? -
launchdarkly: MAUMetadata![](/images/permalink.svg)
launchdarkly: Member![](/images/permalink.svg)
Fields
- _id Id? - The unique resource id.
- _links Links? -
- _pendingInvite boolean? -
- _verified boolean? -
- customRoles Id[]? -
- email string? -
- firstName string? -
- isBeta boolean? -
- lastName string? -
- role Role? -
launchdarkly: Members![](/images/permalink.svg)
Fields
- _links Links? -
- items Member[]? -
- totalCount decimal? -
launchdarkly: MembersBody![](/images/permalink.svg)
Fields
- customRoles string[]? -
- email string -
- firstName string? -
- inlineRole Statement[]? -
- lastName string? -
- role Role? -
launchdarkly: PatchOperation![](/images/permalink.svg)
Fields
- op string -
- path string -
- value record {} -
launchdarkly: Policy![](/images/permalink.svg)
Fields
- actions string[]? -
- effect string? - Effect of the policy - allow or deny.
- notActions string[]? - Targeted actions will be those actions NOT in this list. The "actions" field must be empty to use this field.
- notResources string[]? - Targeted resource will be those resources NOT in this list. The "resources" field must be empty to use this field.
- resources string[]? -
launchdarkly: Prerequisite![](/images/permalink.svg)
Fields
- 'key string? -
- variation int? -
launchdarkly: Project![](/images/permalink.svg)
Fields
- _id Id? - The unique resource id.
- _links Links? -
- defaultClientSideAvailability ClientSideAvailability? -
- environments Environment[]? -
- includeInSnippetByDefault boolean? -
- 'key string? -
- name string? -
- tags string[]? - An array of tags for this project.
launchdarkly: ProjectkeyEnvironmentkeyBody![](/images/permalink.svg)
Fields
- config record {} - destination-specific configuration.
- kind string - The data export destination type. Available choices are kinesis, google-pubsub, mparticle, or segment.
- name string - A human-readable name for your data export destination.
- 'on boolean? - Whether the data export destination is on or not.
launchdarkly: ProjectkeyEnvironmentkeyBody1![](/images/permalink.svg)
Fields
- description string? - A description for the user segment.
- 'key string - A unique key that will be used to reference the user segment in feature flags.
- name string - A human-friendly name for the user segment.
- tags string[]? - Tags for the user segment.
- unbounded boolean? - Controls whether this segment can support unlimited numbers of users. Requires the beta API and additional setup. Include/exclude lists in this payload are not used in unbounded segments.
launchdarkly: ProjectkeyFeatureflagkeyBody![](/images/permalink.svg)
Fields
- comment string? -
- patch PatchOperation[]? -
launchdarkly: Projects![](/images/permalink.svg)
Fields
- _links Links? -
- items Project[]? -
launchdarkly: ProjectsBody![](/images/permalink.svg)
Fields
- defaultClientSideAvailability ClientSideAvailability? -
- environments EnvironmentPost[]? -
- includeInSnippetByDefault boolean? -
- 'key string -
- name string -
- tags string[]? -
launchdarkly: RelayProxyConfig![](/images/permalink.svg)
Fields
- _creator Member -
- _id Id - The unique resource id.
- creationDate int - A unix epoch time in milliseconds specifying the creation time of this relay proxy configuration
- displayKey string - The last 4 digits of the unique secret key for this relay proxy configuration
- fullKey string? - Full secret key. Only included if creating or resetting the relay proxy configuration
- lastModified int - A unix epoch time in milliseconds specifying the last time this relay proxy configuration was modified
- name string - A human-friendly name for the relay proxy configuration
- policy Policy[] -
launchdarkly: RelayProxyConfigs![](/images/permalink.svg)
Fields
- items RelayProxyConfig[]? -
launchdarkly: RolesBody![](/images/permalink.svg)
Fields
- description string? - Description of the custom role.
- 'key string - The 20-hexdigit id or the key for a custom role.
- name string - Name of the custom role.
- policy Policy[] -
launchdarkly: Rollout![](/images/permalink.svg)
Fields
- bucketBy string? -
- variations WeightedVariation[]? -
launchdarkly: Rule![](/images/permalink.svg)
Fields
- _id string? -
- clauses Clause[]? -
- description string? -
- rollout Rollout? -
- trackEvents boolean? -
- variation int? -
launchdarkly: ScheduledChangesFeatureFlagConflict![](/images/permalink.svg)
Fields
- _id string? - Feature flag scheduled change id this change will conflict with
- reason string? - Feature flag scheduled change conflict reason
launchdarkly: SemanticpatchinstructionInner![](/images/permalink.svg)
Fields
- kind string? - The name of the modification you would like to perform on a resource.
launchdarkly: SemanticPatchOperation![](/images/permalink.svg)
Fields
- comment string? -
- instructions SemanticPatchInstruction - A semantic patch instruction
launchdarkly: Site![](/images/permalink.svg)
Fields
- href string? -
- 'type string? -
launchdarkly: Statement![](/images/permalink.svg)
Fields
- actions string[]? -
- effect string? -
- notActions string[]? - Targeted actions will be those actions NOT in this list. The "actions" field must be empty to use this field.
- notResources string[]? - Targeted resource will be those resources NOT in this list. The "resources" field must be empty to use this field.
- resources string[]? -
launchdarkly: Stream![](/images/permalink.svg)
Fields
- _links StreamUsageLinks? -
- metadata StreamUsageMetadata[]? -
- series StreamUsageSeries[]? -
launchdarkly: StreamBySDK![](/images/permalink.svg)
Fields
- _links StreamBySDKLinks? -
- metadata StreamBySDKLinksMetadata[]? -
- series StreamUsageSeries[]? -
launchdarkly: StreamBySDKLinks![](/images/permalink.svg)
Fields
- parent Link? -
- self Link? -
launchdarkly: StreamBySDKLinksMetadata![](/images/permalink.svg)
Fields
- sdk string? -
- 'source string? -
- 'version string? -
launchdarkly: StreamLinks![](/images/permalink.svg)
Fields
- parent Link? -
- self Link? -
- subseries Link[]? - Links to endpoints that are in the request path.
launchdarkly: Streams![](/images/permalink.svg)
Fields
- _links StreamUsageLinks? -
launchdarkly: StreamSDKVersion![](/images/permalink.svg)
Fields
- _links StreamBySDKLinks? -
- sdkVersions StreamSDKVersionData[]? -
launchdarkly: StreamSDKVersionData![](/images/permalink.svg)
Fields
- sdk string? - The language of the sdk
- 'version string? - The version of the sdk
launchdarkly: StreamUsageError![](/images/permalink.svg)
Fields
- code string? -
- message string? -
launchdarkly: StreamUsageLinks![](/images/permalink.svg)
Fields
- parent Link? -
- self Link? -
- subseries Link[]? - The following links that are in the response.
launchdarkly: StreamUsageMetadata![](/images/permalink.svg)
Fields
- sdk string? - The language of the sdk
- 'source string? -
- 'version string? - The version of the SDK
launchdarkly: StreamUsageSeries![](/images/permalink.svg)
Fields
- '0 int? - A key corresponding to a time series data point.
- time int? - A unix epoch time in milliseconds specifying the creation time of this flag.
launchdarkly: Target![](/images/permalink.svg)
Fields
- values string[]? -
- variation int? -
launchdarkly: Token![](/images/permalink.svg)
Fields
- _id Id? - The unique resource id.
- _links Links? -
- _member Member? -
- creationDate int? - A unix epoch time in milliseconds specifying the creation time of this access token.
- customRoleIds string[]? - A list of custom role IDs to use as access limits for the access token
- defaultApiVersion int? - The default API version for this token
- inlineRole Statement[]? -
- lastModified int? - A unix epoch time in milliseconds specifying the last time this access token was modified.
- lastUsed int? - A unix epoch time in milliseconds specifying the last time this access token was used to authorize access to the LaunchDarkly REST API.
- memberId Id? - The unique resource id.
- name string? - A human-friendly name for the access token
- ownerId Id? - The unique resource id.
- role string? - The name of a built-in role for the token
- serviceToken boolean? - Whether the token will be a service token https://docs.launchdarkly.com/home/account-security/api-access-tokens#service-tokens
- token string? - The last 4 digits of the unique secret key for this access token. If creating or resetting the token, this will be the full token secret.
launchdarkly: Tokens![](/images/permalink.svg)
Fields
- _links Links? -
- items Token[]? -
launchdarkly: TokensBody![](/images/permalink.svg)
Fields
- customRoleIds string[]? - A list of custom role IDs to use as access limits for the access token
- defaultApiVersion int? - The default API version for this token
- inlineRole Statement[]? -
- name string? - A human-friendly name for the access token
- role string? - The name of a built-in role for the token
- serviceToken boolean? - Whether the token will be a service token https://docs.launchdarkly.com/home/account-security/api-access-tokens#service-tokens
launchdarkly: UnboundedSegmentTargetChanges![](/images/permalink.svg)
Fields
- add string[]? - Users to add to this list of targets
- remove string[]? - Users to remove from this list of targets
launchdarkly: Usage![](/images/permalink.svg)
Fields
- _links UsageLinks? -
- series StreamUsageSeries[]? -
launchdarkly: UsageError![](/images/permalink.svg)
Fields
- message string? -
launchdarkly: UsageLinks![](/images/permalink.svg)
Fields
- parent Link? -
- self Link? -
- subseries Link[]? - The following links that are in the response.
launchdarkly: User![](/images/permalink.svg)
Fields
- anonymous boolean? -
- avatar string? -
- country string? -
- custom record {}? -
- email string? -
- firstName string? -
- ip string? -
- 'key string? -
- lastName string? -
- name string? -
- secondary string? -
launchdarkly: UserFlagSetting![](/images/permalink.svg)
Fields
- _links Links? -
- _value boolean? - The most important attribute in the response. The _value is the current setting for the user. For a boolean feature toggle, this will be true, false, or null if there is no defined fallthrough value.
- setting boolean? - The setting attribute indicates whether you've explicitly targeted this user to receive a particular variation. For example, if you have explicitly turned off a feature toggle for a user, setting will be false. A setting of null means that you haven't assigned that user to a specific variation.
launchdarkly: UserFlagSettings![](/images/permalink.svg)
Fields
- _links Links? -
- items record {}? -
launchdarkly: UserRecord![](/images/permalink.svg)
Fields
- avatar string? -
- environmentId string? -
- lastPing string? -
- ownerId Id? - The unique resource id.
- user User? -
launchdarkly: Users![](/images/permalink.svg)
Fields
- _links Links? -
- items UserRecord[]? -
- totalCount decimal? -
launchdarkly: UserSegment![](/images/permalink.svg)
Fields
- _flags FlagListItem[]? -
- _links Links? -
- creationDate int - A unix epoch time in milliseconds specifying the creation time of this flag.
- description string? - Description of the user segment.
- excluded string[]? - An array of user keys that should not be included in this segment, unless they are also listed in "included".
- included string[]? - An array of user keys that are included in this segment.
- 'key string - Unique identifier for the user segment.
- name string - Name of the user segment.
- rules UserSegmentRule[]? - An array of rules that can cause a user to be included in this segment.
- tags string[]? - An array of tags for this user segment.
- unbounded boolean? - Controls whether this segment can support unlimited numbers of users. Requires the beta API and additional setup. Include/exclude lists in this payload are not used in unbounded segments.
- 'version int? -
launchdarkly: UsersegmentkeyUnboundedusersBody![](/images/permalink.svg)
Fields
- excluded UnboundedSegmentTargetChanges? -
- included UnboundedSegmentTargetChanges? -
launchdarkly: UserSegmentRule![](/images/permalink.svg)
Fields
- bucketBy string? -
- clauses Clause[]? -
- weight int? -
launchdarkly: UserSegments![](/images/permalink.svg)
Fields
- _links Links? -
- items UserSegment[]? -
launchdarkly: UserTargetingExpirationForFlag![](/images/permalink.svg)
Fields
- _id string? -
- _links Links? -
- _resourceId UserTargetingExpirationResourceIdForFlag? -
- _version int? -
- expirationDate int? - Unix epoch time in milliseconds specifying the expiration date
- userKey string? - Unique identifier for the user
- variationId string? - the ID of the variation that the user is targeted on a flag
launchdarkly: UserTargetingExpirationForFlags![](/images/permalink.svg)
Fields
- _links Links? -
- items UserTargetingExpirationForFlag[]? -
launchdarkly: UserTargetingExpirationForSegment![](/images/permalink.svg)
Fields
- _id string? -
- _links Links? -
- _resourceId UserTargetingExpirationResourceIdForFlag? -
- _version int? -
- expirationDate int? - Unix epoch time in milliseconds specifying the expiration date
- targetType string? - either the included or excluded variation that the user is targeted on a segment
- userKey string? - Unique identifier for the user
launchdarkly: UserTargetingExpirationOnFlagsForUser![](/images/permalink.svg)
Fields
- _links Links? -
- items UserTargetingExpirationForFlag[]? -
launchdarkly: UserTargetingExpirationResourceIdForFlag![](/images/permalink.svg)
Fields
- environmentKey string? -
- flagKey string? -
- 'key string? -
- kind string? -
- projectKey string? -
launchdarkly: Variation![](/images/permalink.svg)
Fields
- _id string? -
- description string? -
- name string? -
- value record {} -
launchdarkly: Webhook![](/images/permalink.svg)
Fields
- _id Id? - The unique resource id.
- _links Links? -
- name string? - The name of the webhook.
- 'on boolean? - Whether this webhook is enabled or not.
- secret string? - If defined, the webhooks post request will include a X-LD-Signature header whose value will contain an HMAC SHA256 hex digest of the webhook payload, using the secret as the key.
- statements Statement[]? -
- tags string[]? - Tags assigned to this webhook.
- url string? - The URL of the remote webhook.
launchdarkly: Webhooks![](/images/permalink.svg)
Fields
- _links Links? -
- items Webhook[]? -
launchdarkly: WebhooksBody![](/images/permalink.svg)
Fields
- name string? - The name of the webhook.
- 'on boolean - Whether this webhook is enabled or not.
- secret string? - If sign is true, and the secret attribute is omitted, LaunchDarkly will automatically generate a secret for you.
- sign boolean - If sign is false, the webhook will not include a signature header, and the secret can be omitted.
- statements Statement[]? -
- tags string[]? - Tags for the webhook.
- url string - The URL of the remote webhook.
launchdarkly: WeightedVariation![](/images/permalink.svg)
Fields
- variation int? -
- weight int? -
String types![](/images/permalink.svg)
launchdarkly: CopyActions![](/images/permalink.svg)
CopyActions
launchdarkly: FeatureFlagApprovalRequestReviewStatus![](/images/permalink.svg)
FeatureFlagApprovalRequestReviewStatus
Name | Description |
---|---|
pending | the feature flag approval request has not been reviewed yet |
approved | the feature flag approval request has been approved and can now be applied |
declined | the feature flag approval request has been declined and cannot be applied |
launchdarkly: Id![](/images/permalink.svg)
Id
The unique resource id.
launchdarkly: Role![](/images/permalink.svg)
Role
Import
import ballerinax/launchdarkly;
Metadata
Released date: over 2 years ago
Version: 1.2.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.0.0
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Productivity/Project Management
Cost/Freemium
Contributors
Dependencies