This repository contains a client library for LaunchDarkly's REST API. This client was automatically generated from our OpenAPI specification.
This REST API is for custom integrations, data export, or automating your feature flag workflows. DO NOT use this client library to include feature flags in your web or mobile application. To integrate feature flags with your application, please see the SDK documentation
LaunchDarklyApi - JavaScript client for launchdarkly-api Build custom integrations with the LaunchDarkly REST API This SDK is automatically generated by the Swagger Codegen project:
- API version: 3.10.0
- Package version: 3.10.0
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit https://support.launchdarkly.com
For Node.js
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install launchdarkly-api --save
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
Finally, switch to the directory you want to use your launchdarkly-api from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('launchdarkly-api')
in javascript files from the directory you ran the last
command above from.
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually
use this library):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
All URIs are relative to https://app.launchdarkly.com/api/v2
Class | Method | HTTP request | Description |
---|---|---|---|
LaunchDarklyApi.AccessTokensApi | deleteToken | DELETE /tokens/{tokenId} | Delete an access token by ID. |
LaunchDarklyApi.AccessTokensApi | getToken | GET /tokens/{tokenId} | Get a single access token by ID. |
LaunchDarklyApi.AccessTokensApi | getTokens | GET /tokens | Returns a list of tokens in the account. |
LaunchDarklyApi.AccessTokensApi | patchToken | PATCH /tokens/{tokenId} | Modify an access token by ID. |
LaunchDarklyApi.AccessTokensApi | postToken | POST /tokens | Create a new token. |
LaunchDarklyApi.AccessTokensApi | resetToken | POST /tokens/{tokenId}/reset | Reset an access token's secret key with an optional expiry time for the old key. |
LaunchDarklyApi.AuditLogApi | getAuditLogEntries | GET /auditlog | 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. |
LaunchDarklyApi.AuditLogApi | getAuditLogEntry | GET /auditlog/{resourceId} | Use this endpoint to fetch a single audit log entry by its resouce ID. |
LaunchDarklyApi.CustomRolesApi | deleteCustomRole | DELETE /roles/{customRoleKey} | Delete a custom role by key. |
LaunchDarklyApi.CustomRolesApi | getCustomRole | GET /roles/{customRoleKey} | Get one custom role by key. |
LaunchDarklyApi.CustomRolesApi | getCustomRoles | GET /roles | Return a complete list of custom roles. |
LaunchDarklyApi.CustomRolesApi | patchCustomRole | PATCH /roles/{customRoleKey} | Modify a custom role by key. |
LaunchDarklyApi.CustomRolesApi | postCustomRole | POST /roles | Create a new custom role. |
LaunchDarklyApi.CustomerMetricsApi | getEvaluations | GET /usage/evaluations/{envId}/{flagKey} | Get events usage by event id and the feature flag key. |
LaunchDarklyApi.CustomerMetricsApi | getEvent | GET /usage/events/{type} | Get events usage by event type. |
LaunchDarklyApi.CustomerMetricsApi | getEvents | GET /usage/events | Get events usage endpoints. |
LaunchDarklyApi.CustomerMetricsApi | getMAU | GET /usage/mau | Get monthly active user data. |
LaunchDarklyApi.CustomerMetricsApi | getMAUByCategory | GET /usage/mau/bycategory | Get monthly active user data by category. |
LaunchDarklyApi.CustomerMetricsApi | getStream | GET /usage/streams/{source} | Get a stream endpoint and return timeseries data. |
LaunchDarklyApi.CustomerMetricsApi | getStreamBySDK | GET /usage/streams/{source}/bysdkversion | Get a stream timeseries data by source show sdk version metadata. |
LaunchDarklyApi.CustomerMetricsApi | getStreamSDKVersion | GET /usage/streams/{source}/sdkversions | Get a stream timeseries data by source and show all sdk version associated. |
LaunchDarklyApi.CustomerMetricsApi | getStreams | GET /usage/streams | Returns a list of all streams. |
LaunchDarklyApi.CustomerMetricsApi | getUsage | GET /usage | Returns of the usage endpoints available. |
LaunchDarklyApi.DataExportDestinationsApi | deleteDestination | DELETE /destinations/{projectKey}/{environmentKey}/{destinationId} | Get a single data export destination by ID |
LaunchDarklyApi.DataExportDestinationsApi | getDestination | GET /destinations/{projectKey}/{environmentKey}/{destinationId} | Get a single data export destination by ID |
LaunchDarklyApi.DataExportDestinationsApi | getDestinations | GET /destinations | Returns a list of all data export destinations. |
LaunchDarklyApi.DataExportDestinationsApi | patchDestination | PATCH /destinations/{projectKey}/{environmentKey}/{destinationId} | Perform a partial update to a data export destination. |
LaunchDarklyApi.DataExportDestinationsApi | postDestination | POST /destinations/{projectKey}/{environmentKey} | Create a new data export destination |
LaunchDarklyApi.EnvironmentsApi | deleteEnvironment | DELETE /projects/{projectKey}/environments/{environmentKey} | Delete an environment in a specific project. |
LaunchDarklyApi.EnvironmentsApi | getEnvironment | GET /projects/{projectKey}/environments/{environmentKey} | Get an environment given a project and key. |
LaunchDarklyApi.EnvironmentsApi | patchEnvironment | PATCH /projects/{projectKey}/environments/{environmentKey} | Modify an environment by ID. |
LaunchDarklyApi.EnvironmentsApi | postEnvironment | POST /projects/{projectKey}/environments | Create a new environment in a specified project with a given name, key, and swatch color. |
LaunchDarklyApi.EnvironmentsApi | resetEnvironmentMobileKey | POST /projects/{projectKey}/environments/{environmentKey}/mobileKey | Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately. |
LaunchDarklyApi.EnvironmentsApi | resetEnvironmentSDKKey | POST /projects/{projectKey}/environments/{environmentKey}/apiKey | Reset an environment's SDK key with an optional expiry time for the old key. |
LaunchDarklyApi.FeatureFlagsApi | copyFeatureFlag | POST /flags/{projectKey}/{featureFlagKey}/copy | Copies the feature flag configuration from one environment to the same feature flag in another environment. |
LaunchDarklyApi.FeatureFlagsApi | 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. |
LaunchDarklyApi.FeatureFlagsApi | getExpiringUserTargets | GET /flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey} | Get expiring user targets for feature flag |
LaunchDarklyApi.FeatureFlagsApi | getFeatureFlag | GET /flags/{projectKey}/{featureFlagKey} | Get a single feature flag by key. |
LaunchDarklyApi.FeatureFlagsApi | getFeatureFlagChangeRequest | GET /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{featureFlagChangeRequestId} | Get a single change request for a feature flag |
LaunchDarklyApi.FeatureFlagsApi | getFeatureFlagChangeRequests | GET /{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests | Get all change requests for a feature flag |
LaunchDarklyApi.FeatureFlagsApi | getFeatureFlagStatus | GET /flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey} | Get the status for a particular feature flag. |
LaunchDarklyApi.FeatureFlagsApi | getFeatureFlagStatusAcrossEnvironments | GET /flag-status/{projectKey}/{featureFlagKey} | Get the status for a particular feature flag across environments |
LaunchDarklyApi.FeatureFlagsApi | 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. |
LaunchDarklyApi.FeatureFlagsApi | getFeatureFlags | GET /flags/{projectKey} | Get a list of all features in the given project. |
LaunchDarklyApi.FeatureFlagsApi | patchExpiringUserTargets | PATCH /flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey} | Update, add, or delete expiring user targets on feature flag |
LaunchDarklyApi.FeatureFlagsApi | patchFeatureFlag | PATCH /flags/{projectKey}/{featureFlagKey} | Perform a partial update to a feature. |
LaunchDarklyApi.FeatureFlagsApi | postApplyFeatureFlagChangeRequest | POST /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{featureFlagChangeRequestId}/apply | Apply change request for a feature flag |
LaunchDarklyApi.FeatureFlagsApi | postFeatureFlag | POST /flags/{projectKey} | Creates a new feature flag. |
LaunchDarklyApi.FeatureFlagsApi | postFeatureFlagChangeRequest | POST /{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests | |
LaunchDarklyApi.FeatureFlagsApi | postReviewFeatureFlagChangeRequest | POST /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{featureFlagChangeRequestId}/review | Review change request for a feature flag |
LaunchDarklyApi.IntegrationsApi | deleteIntegrationSubscription | DELETE /integrations/{integrationKey}/{integrationId} | Delete an integration subscription by ID. |
LaunchDarklyApi.IntegrationsApi | getIntegrationSubscription | GET /integrations/{integrationKey}/{integrationId} | Get a single integration subscription by ID. |
LaunchDarklyApi.IntegrationsApi | getIntegrationSubscriptions | GET /integrations/{integrationKey} | Get a list of all configured integrations of a given kind. |
LaunchDarklyApi.IntegrationsApi | getIntegrations | GET /integrations | Get a list of all configured audit log event integrations associated with this account. |
LaunchDarklyApi.IntegrationsApi | patchIntegrationSubscription | PATCH /integrations/{integrationKey}/{integrationId} | Modify an integration subscription by ID. |
LaunchDarklyApi.IntegrationsApi | postIntegrationSubscription | POST /integrations/{integrationKey} | Create a new integration subscription of a given kind. |
LaunchDarklyApi.ProjectsApi | deleteProject | DELETE /projects/{projectKey} | 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. |
LaunchDarklyApi.ProjectsApi | getProject | GET /projects/{projectKey} | Fetch a single project by key. |
LaunchDarklyApi.ProjectsApi | getProjects | GET /projects | Returns a list of all projects in the account. |
LaunchDarklyApi.ProjectsApi | patchProject | PATCH /projects/{projectKey} | Modify a project by ID. |
LaunchDarklyApi.ProjectsApi | postProject | POST /projects | Create a new project with the given key and name. |
LaunchDarklyApi.RelayProxyConfigurationsApi | deleteRelayProxyConfig | DELETE /account/relay-auto-configs/{id} | Delete a relay proxy configuration by ID. |
LaunchDarklyApi.RelayProxyConfigurationsApi | getRelayProxyConfig | GET /account/relay-auto-configs/{id} | Get a single relay proxy configuration by ID. |
LaunchDarklyApi.RelayProxyConfigurationsApi | getRelayProxyConfigs | GET /account/relay-auto-configs | Returns a list of relay proxy configurations in the account. |
LaunchDarklyApi.RelayProxyConfigurationsApi | patchRelayProxyConfig | PATCH /account/relay-auto-configs/{id} | Modify a relay proxy configuration by ID. |
LaunchDarklyApi.RelayProxyConfigurationsApi | postRelayAutoConfig | POST /account/relay-auto-configs | Create a new relay proxy config. |
LaunchDarklyApi.RelayProxyConfigurationsApi | resetRelayProxyConfig | POST /account/relay-auto-configs/{id}/reset | Reset a relay proxy configuration's secret key with an optional expiry time for the old key. |
LaunchDarklyApi.RootApi | getRoot | GET / | |
LaunchDarklyApi.TeamMembersApi | deleteMember | DELETE /members/{memberId} | Delete a team member by ID. |
LaunchDarklyApi.TeamMembersApi | getMe | GET /members/me | Get the current team member associated with the token |
LaunchDarklyApi.TeamMembersApi | getMember | GET /members/{memberId} | Get a single team member by ID. |
LaunchDarklyApi.TeamMembersApi | getMembers | GET /members | Returns a list of all members in the account. |
LaunchDarklyApi.TeamMembersApi | patchMember | PATCH /members/{memberId} | Modify a team member by ID. |
LaunchDarklyApi.TeamMembersApi | postMembers | POST /members | Invite new members. |
LaunchDarklyApi.UserSegmentsApi | deleteUserSegment | DELETE /segments/{projectKey}/{environmentKey}/{userSegmentKey} | Delete a user segment. |
LaunchDarklyApi.UserSegmentsApi | getExpiringUserTargetsOnSegment | GET /segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey} | Get expiring user targets for user segment |
LaunchDarklyApi.UserSegmentsApi | getUserSegment | GET /segments/{projectKey}/{environmentKey}/{userSegmentKey} | Get a single user segment by key. |
LaunchDarklyApi.UserSegmentsApi | getUserSegments | GET /segments/{projectKey}/{environmentKey} | Get a list of all user segments in the given project. |
LaunchDarklyApi.UserSegmentsApi | patchExpiringUserTargetsOnSegment | PATCH /segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey} | Update, add, or delete expiring user targets on user segment |
LaunchDarklyApi.UserSegmentsApi | patchUserSegment | PATCH /segments/{projectKey}/{environmentKey}/{userSegmentKey} | Perform a partial update to a user segment. |
LaunchDarklyApi.UserSegmentsApi | postUserSegment | POST /segments/{projectKey}/{environmentKey} | Creates a new user segment. |
LaunchDarklyApi.UserSegmentsApi | updatedUnboundedSegmentTargets | POST /segments/{projectKey}/{environmentKey}/{userSegmentKey}/unbounded-users | Update targets included or excluded in an unbounded segment |
LaunchDarklyApi.UserSettingsApi | getExpiringUserTargetsForUser | GET /users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey} | Get expiring dates on flags for user |
LaunchDarklyApi.UserSettingsApi | getUserFlagSetting | GET /users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} | Fetch a single flag setting for a user by key. |
LaunchDarklyApi.UserSettingsApi | getUserFlagSettings | GET /users/{projectKey}/{environmentKey}/{userKey}/flags | Fetch a single flag setting for a user by key. |
LaunchDarklyApi.UserSettingsApi | patchExpiringUserTargetsForFlags | PATCH /users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey} | Update, add, or delete expiring user targets for a single user on all flags |
LaunchDarklyApi.UserSettingsApi | putFlagSetting | PUT /users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} | Specifically enable or disable a feature flag for a user based on their key. |
LaunchDarklyApi.UsersApi | deleteUser | DELETE /users/{projectKey}/{environmentKey}/{userKey} | Delete a user by ID. |
LaunchDarklyApi.UsersApi | getSearchUsers | GET /user-search/{projectKey}/{environmentKey} | 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. |
LaunchDarklyApi.UsersApi | getUser | GET /users/{projectKey}/{environmentKey}/{userKey} | Get a user by key. |
LaunchDarklyApi.UsersApi | getUsers | GET /users/{projectKey}/{environmentKey} | 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. |
LaunchDarklyApi.WebhooksApi | deleteWebhook | DELETE /webhooks/{resourceId} | Delete a webhook by ID. |
LaunchDarklyApi.WebhooksApi | getWebhook | GET /webhooks/{resourceId} | Get a webhook by ID. |
LaunchDarklyApi.WebhooksApi | getWebhooks | GET /webhooks | Fetch a list of all webhooks. |
LaunchDarklyApi.WebhooksApi | patchWebhook | PATCH /webhooks/{resourceId} | Modify a webhook by ID. |
LaunchDarklyApi.WebhooksApi | postWebhook | POST /webhooks | Create a webhook. |
- LaunchDarklyApi.AuditLogEntries
- LaunchDarklyApi.AuditLogEntry
- LaunchDarklyApi.AuditLogEntryTarget
- LaunchDarklyApi.Clause
- LaunchDarklyApi.ClientSideAvailability
- LaunchDarklyApi.CopyActions
- LaunchDarklyApi.CustomProperty
- LaunchDarklyApi.CustomPropertyValues
- LaunchDarklyApi.CustomRole
- LaunchDarklyApi.CustomRoleBody
- LaunchDarklyApi.CustomRoles
- LaunchDarklyApi.Defaults
- LaunchDarklyApi.Destination
- LaunchDarklyApi.DestinationAmazonKinesis
- LaunchDarklyApi.DestinationBody
- LaunchDarklyApi.DestinationGooglePubSub
- LaunchDarklyApi.DestinationMParticle
- LaunchDarklyApi.DestinationSegment
- LaunchDarklyApi.Destinations
- LaunchDarklyApi.Environment
- LaunchDarklyApi.EnvironmentPost
- LaunchDarklyApi.EvaluationUsageError
- LaunchDarklyApi.Events
- LaunchDarklyApi.Fallthrough
- LaunchDarklyApi.FeatureFlag
- LaunchDarklyApi.FeatureFlagBody
- LaunchDarklyApi.FeatureFlagChangeRequest
- LaunchDarklyApi.FeatureFlagChangeRequestApplyConfigBody
- LaunchDarklyApi.FeatureFlagChangeRequestConfigBody
- LaunchDarklyApi.FeatureFlagChangeRequestReview
- LaunchDarklyApi.FeatureFlagChangeRequestReviewConfigBody
- LaunchDarklyApi.FeatureFlagChangeRequestReviewStatus
- LaunchDarklyApi.FeatureFlagChangeRequests
- LaunchDarklyApi.FeatureFlagConfig
- LaunchDarklyApi.FeatureFlagCopyBody
- LaunchDarklyApi.FeatureFlagCopyObject
- LaunchDarklyApi.FeatureFlagScheduledChange
- LaunchDarklyApi.FeatureFlagScheduledChanges
- LaunchDarklyApi.FeatureFlagScheduledChangesConflicts
- LaunchDarklyApi.FeatureFlagScheduledChangesConflictsInstructions
- LaunchDarklyApi.FeatureFlagStatus
- LaunchDarklyApi.FeatureFlagStatusAcrossEnvironments
- LaunchDarklyApi.FeatureFlagStatusForQueriedEnvironment
- LaunchDarklyApi.FeatureFlagStatuses
- LaunchDarklyApi.FeatureFlags
- LaunchDarklyApi.FlagListItem
- LaunchDarklyApi.HierarchicalLinks
- LaunchDarklyApi.Id
- LaunchDarklyApi.Integration
- LaunchDarklyApi.IntegrationLinks
- LaunchDarklyApi.IntegrationSubscription
- LaunchDarklyApi.IntegrationSubscriptionStatus
- LaunchDarklyApi.Integrations
- LaunchDarklyApi.Link
- LaunchDarklyApi.Links
- LaunchDarklyApi.MAU
- LaunchDarklyApi.MAUMetadata
- LaunchDarklyApi.MAUbyCategory
- LaunchDarklyApi.Member
- LaunchDarklyApi.Members
- LaunchDarklyApi.MembersBody
- LaunchDarklyApi.PatchComment
- LaunchDarklyApi.PatchOperation
- LaunchDarklyApi.Policy
- LaunchDarklyApi.Prerequisite
- LaunchDarklyApi.Project
- LaunchDarklyApi.ProjectBody
- LaunchDarklyApi.Projects
- LaunchDarklyApi.RelayProxyConfig
- LaunchDarklyApi.RelayProxyConfigBody
- LaunchDarklyApi.RelayProxyConfigs
- LaunchDarklyApi.Role
- LaunchDarklyApi.Rollout
- LaunchDarklyApi.Rule
- LaunchDarklyApi.ScheduledChangesFeatureFlagConflict
- LaunchDarklyApi.SemanticPatchInstruction
- LaunchDarklyApi.SemanticPatchInstructionInner
- LaunchDarklyApi.SemanticPatchOperation
- LaunchDarklyApi.Site
- LaunchDarklyApi.Statement
- LaunchDarklyApi.Stream
- LaunchDarklyApi.StreamBySDK
- LaunchDarklyApi.StreamBySDKLinks
- LaunchDarklyApi.StreamBySDKLinksMetadata
- LaunchDarklyApi.StreamLinks
- LaunchDarklyApi.StreamSDKVersion
- LaunchDarklyApi.StreamSDKVersionData
- LaunchDarklyApi.StreamUsageError
- LaunchDarklyApi.StreamUsageLinks
- LaunchDarklyApi.StreamUsageMetadata
- LaunchDarklyApi.StreamUsageSeries
- LaunchDarklyApi.Streams
- LaunchDarklyApi.SubscriptionBody
- LaunchDarklyApi.Target
- LaunchDarklyApi.Token
- LaunchDarklyApi.TokenBody
- LaunchDarklyApi.Tokens
- LaunchDarklyApi.UnboundedSegmentTargetChanges
- LaunchDarklyApi.UnboundedSegmentTargetsBody
- LaunchDarklyApi.Usage
- LaunchDarklyApi.UsageError
- LaunchDarklyApi.UsageLinks
- LaunchDarklyApi.User
- LaunchDarklyApi.UserFlagSetting
- LaunchDarklyApi.UserFlagSettings
- LaunchDarklyApi.UserRecord
- LaunchDarklyApi.UserSegment
- LaunchDarklyApi.UserSegmentBody
- LaunchDarklyApi.UserSegmentRule
- LaunchDarklyApi.UserSegments
- LaunchDarklyApi.UserSettingsBody
- LaunchDarklyApi.UserTargetingExpirationForFlag
- LaunchDarklyApi.UserTargetingExpirationForFlags
- LaunchDarklyApi.UserTargetingExpirationForSegment
- LaunchDarklyApi.UserTargetingExpirationOnFlagsForUser
- LaunchDarklyApi.UserTargetingExpirationResourceIdForFlag
- LaunchDarklyApi.Users
- LaunchDarklyApi.Variation
- LaunchDarklyApi.Webhook
- LaunchDarklyApi.WebhookBody
- LaunchDarklyApi.Webhooks
- LaunchDarklyApi.WeightedVariation
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
var LaunchDarklyApi = require('launchdarkly-api');
var defaultClient = LaunchDarklyApi.ApiClient.instance;
var Token = defaultClient.authentications['Token'];
Token.apiKey = process.env.LD_API_KEY;
var apiInstance = new LaunchDarklyApi.FeatureFlagsApi();
var callback = function(error, data) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}
};
const projectName = "openapi";
const keyName = "test-javascript";
apiInstance.postFeatureFlag(projectName,
{
name: "Test Flag Javascript",
key: keyName,
variations: [{value: [1, 2]}, {value: [3, 4]}, {value: [5]}]
}, {}, callback);
// Clean up new flag (requires a new api instance)
apiInstance = new LaunchDarklyApi.FeatureFlagsApi();
apiInstance.deleteFeatureFlag(projectName, keyName, callback);