Skip to content

launchdarkly/api-client-typescript

Repository files navigation

This repository contains a client library for LaunchDarkly's REST API. This client was automatically generated from our OpenAPI specification using a code generation library.

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, read the SDK documentation.

This client library is only compatible with the latest version of our REST API. Previous versions of this client library are compatible with earlier versions of our REST API. When you create an access token, you can set the REST API version associated with the token. By default, API requests you send using the token will use the specified API version. To learn more, read Versioning. View our sample code for example usage.

launchdarkly-api-typescript@18.1.0

This generator creates TypeScript/JavaScript client that utilizes axios. The generated Node module can be used in the following environments:

Environment

  • Node.js
  • Webpack
  • Browserify

Language level

  • ES5 - you must have a Promises/A+ library installed
  • ES6

Module system

  • CommonJS
  • ES6 module system

It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via package.json. (Reference)

Building

To build and compile the typescript sources to javascript use:

npm install
npm run build

Publishing

First build the package then run npm publish

Consuming

navigate to the folder of your consuming project and run one of the following commands.

published:

npm install launchdarkly-api-typescript@18.1.0 --save

unPublished (not recommended):

npm install PATH_TO_GENERATED_PACKAGE --save

Documentation for API Endpoints

All URIs are relative to https://app.launchdarkly.com

Class Method HTTP request Description
AIConfigsBetaApi deleteAIConfig DELETE /api/v2/projects/{projectKey}/ai-configs/{configKey} Delete AI Config
AIConfigsBetaApi deleteAIConfigVariation DELETE /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey} Delete AI Config variation
AIConfigsBetaApi deleteAITool DELETE /api/v2/projects/{projectKey}/ai-tools/{toolKey} Delete AI tool
AIConfigsBetaApi deleteModelConfig DELETE /api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey} Delete an AI model config
AIConfigsBetaApi deleteRestrictedModels DELETE /api/v2/projects/{projectKey}/ai-configs/model-configs/restricted Remove AI models from the restricted list
AIConfigsBetaApi getAIConfig GET /api/v2/projects/{projectKey}/ai-configs/{configKey} Get AI Config
AIConfigsBetaApi getAIConfigMetrics GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics Get AI Config metrics
AIConfigsBetaApi getAIConfigMetricsByVariation GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics-by-variation Get AI Config metrics by variation
AIConfigsBetaApi getAIConfigTargeting GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting Show an AI Config's targeting
AIConfigsBetaApi getAIConfigVariation GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey} Get AI Config variation
AIConfigsBetaApi getAIConfigs GET /api/v2/projects/{projectKey}/ai-configs List AI Configs
AIConfigsBetaApi getAITool GET /api/v2/projects/{projectKey}/ai-tools/{toolKey} Get AI tool
AIConfigsBetaApi getModelConfig GET /api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey} Get AI model config
AIConfigsBetaApi listAIToolVersions GET /api/v2/projects/{projectKey}/ai-tools/{toolKey}/versions List AI tool versions
AIConfigsBetaApi listAITools GET /api/v2/projects/{projectKey}/ai-tools List AI tools
AIConfigsBetaApi listModelConfigs GET /api/v2/projects/{projectKey}/ai-configs/model-configs List AI model configs
AIConfigsBetaApi patchAIConfig PATCH /api/v2/projects/{projectKey}/ai-configs/{configKey} Update AI Config
AIConfigsBetaApi patchAIConfigTargeting PATCH /api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting Update AI Config targeting
AIConfigsBetaApi patchAIConfigVariation PATCH /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey} Update AI Config variation
AIConfigsBetaApi patchAITool PATCH /api/v2/projects/{projectKey}/ai-tools/{toolKey} Update AI tool
AIConfigsBetaApi postAIConfig POST /api/v2/projects/{projectKey}/ai-configs Create new AI Config
AIConfigsBetaApi postAIConfigVariation POST /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations Create AI Config variation
AIConfigsBetaApi postAITool POST /api/v2/projects/{projectKey}/ai-tools Create an AI tool
AIConfigsBetaApi postModelConfig POST /api/v2/projects/{projectKey}/ai-configs/model-configs Create an AI model config
AIConfigsBetaApi postRestrictedModels POST /api/v2/projects/{projectKey}/ai-configs/model-configs/restricted Add AI models to the restricted list
AccessTokensApi deleteToken DELETE /api/v2/tokens/{id} Delete access token
AccessTokensApi getToken GET /api/v2/tokens/{id} Get access token
AccessTokensApi getTokens GET /api/v2/tokens List access tokens
AccessTokensApi patchToken PATCH /api/v2/tokens/{id} Patch access token
AccessTokensApi postToken POST /api/v2/tokens Create access token
AccessTokensApi resetToken POST /api/v2/tokens/{id}/reset Reset access token
AccountMembersApi deleteMember DELETE /api/v2/members/{id} Delete account member
AccountMembersApi getMember GET /api/v2/members/{id} Get account member
AccountMembersApi getMembers GET /api/v2/members List account members
AccountMembersApi patchMember PATCH /api/v2/members/{id} Modify an account member
AccountMembersApi patchMembers PATCH /api/v2/members Modify account members
AccountMembersApi postMemberTeams POST /api/v2/members/{id}/teams Add a member to teams
AccountMembersApi postMembers POST /api/v2/members Invite new members
AccountUsageBetaApi getContextsClientsideUsage GET /api/v2/usage/clientside-contexts Get contexts clientside usage
AccountUsageBetaApi getContextsServersideUsage GET /api/v2/usage/serverside-contexts Get contexts serverside usage
AccountUsageBetaApi getContextsTotalUsage GET /api/v2/usage/total-contexts Get contexts total usage
AccountUsageBetaApi getDataExportEventsUsage GET /api/v2/usage/data-export-events Get data export events usage
AccountUsageBetaApi getEvaluationsUsage GET /api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey} Get evaluations usage
AccountUsageBetaApi getEventsUsage GET /api/v2/usage/events/{type} Get events usage
AccountUsageBetaApi getExperimentationEventsUsage GET /api/v2/usage/experimentation-events Get experimentation events usage
AccountUsageBetaApi getExperimentationKeysUsage GET /api/v2/usage/experimentation-keys Get experimentation keys usage
AccountUsageBetaApi getMauSdksByType GET /api/v2/usage/mau/sdks Get MAU SDKs by type
AccountUsageBetaApi getMauUsage GET /api/v2/usage/mau Get MAU usage
AccountUsageBetaApi getMauUsageByCategory GET /api/v2/usage/mau/bycategory Get MAU usage by category
AccountUsageBetaApi getObservabilityErrorsUsage GET /api/v2/usage/observability/errors Get observability errors usage
AccountUsageBetaApi getObservabilityLogsUsage GET /api/v2/usage/observability/logs Get observability logs usage
AccountUsageBetaApi getObservabilitySessionsUsage GET /api/v2/usage/observability/sessions Get observability sessions usage
AccountUsageBetaApi getObservabilityTracesUsage GET /api/v2/usage/observability/traces Get observability traces usage
AccountUsageBetaApi getServiceConnectionsUsage GET /api/v2/usage/service-connections Get service connections usage
AccountUsageBetaApi getStreamUsage GET /api/v2/usage/streams/{source} Get stream usage
AccountUsageBetaApi getStreamUsageBySdkVersion GET /api/v2/usage/streams/{source}/bysdkversion Get stream usage by SDK version
AccountUsageBetaApi getStreamUsageSdkversion GET /api/v2/usage/streams/{source}/sdkversions Get stream usage SDK versions
AnnouncementsApi createAnnouncementPublic POST /api/v2/announcements Create an announcement
AnnouncementsApi deleteAnnouncementPublic DELETE /api/v2/announcements/{announcementId} Delete an announcement
AnnouncementsApi getAnnouncementsPublic GET /api/v2/announcements Get announcements
AnnouncementsApi updateAnnouncementPublic PATCH /api/v2/announcements/{announcementId} Update an announcement
ApplicationsBetaApi deleteApplication DELETE /api/v2/applications/{applicationKey} Delete application
ApplicationsBetaApi deleteApplicationVersion DELETE /api/v2/applications/{applicationKey}/versions/{versionKey} Delete application version
ApplicationsBetaApi getApplication GET /api/v2/applications/{applicationKey} Get application by key
ApplicationsBetaApi getApplicationVersions GET /api/v2/applications/{applicationKey}/versions Get application versions by application key
ApplicationsBetaApi getApplications GET /api/v2/applications Get applications
ApplicationsBetaApi patchApplication PATCH /api/v2/applications/{applicationKey} Update application
ApplicationsBetaApi patchApplicationVersion PATCH /api/v2/applications/{applicationKey}/versions/{versionKey} Update application version
ApprovalsApi deleteApprovalRequest DELETE /api/v2/approval-requests/{id} Delete approval request
ApprovalsApi deleteApprovalRequestForFlag DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id} Delete approval request for a flag
ApprovalsApi getApprovalForFlag GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id} Get approval request for a flag
ApprovalsApi getApprovalRequest GET /api/v2/approval-requests/{id} Get approval request
ApprovalsApi getApprovalRequests GET /api/v2/approval-requests List approval requests
ApprovalsApi getApprovalsForFlag GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests List approval requests for a flag
ApprovalsApi postApprovalRequest POST /api/v2/approval-requests Create approval request
ApprovalsApi postApprovalRequestApply POST /api/v2/approval-requests/{id}/apply Apply approval request
ApprovalsApi postApprovalRequestApplyForFlag POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/apply Apply approval request for a flag
ApprovalsApi postApprovalRequestForFlag POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests Create approval request for a flag
ApprovalsApi postApprovalRequestReview POST /api/v2/approval-requests/{id}/reviews Review approval request
ApprovalsApi postApprovalRequestReviewForFlag POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/reviews Review approval request for a flag
ApprovalsApi postFlagCopyConfigApprovalRequest POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests-flag-copy Create approval request to copy flag configurations across environments
ApprovalsBetaApi getApprovalRequestSettings GET /api/v2/approval-requests/projects/{projectKey}/settings Get approval request settings
ApprovalsBetaApi patchApprovalRequest PATCH /api/v2/approval-requests/{id} Update approval request
ApprovalsBetaApi patchApprovalRequestSettings PATCH /api/v2/approval-requests/projects/{projectKey}/settings Update approval request settings
ApprovalsBetaApi patchFlagConfigApprovalRequest PATCH /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id} Update flag approval request
AuditLogApi getAuditLogEntries GET /api/v2/auditlog List audit log entries
AuditLogApi getAuditLogEntry GET /api/v2/auditlog/{id} Get audit log entry
AuditLogApi postAuditLogEntries POST /api/v2/auditlog Search audit log entries
CodeReferencesApi deleteBranches POST /api/v2/code-refs/repositories/{repo}/branch-delete-tasks Delete branches
CodeReferencesApi deleteRepository DELETE /api/v2/code-refs/repositories/{repo} Delete repository
CodeReferencesApi getBranch GET /api/v2/code-refs/repositories/{repo}/branches/{branch} Get branch
CodeReferencesApi getBranches GET /api/v2/code-refs/repositories/{repo}/branches List branches
CodeReferencesApi getExtinctions GET /api/v2/code-refs/extinctions List extinctions
CodeReferencesApi getRepositories GET /api/v2/code-refs/repositories List repositories
CodeReferencesApi getRepository GET /api/v2/code-refs/repositories/{repo} Get repository
CodeReferencesApi getRootStatistic GET /api/v2/code-refs/statistics Get links to code reference repositories for each project
CodeReferencesApi getStatistics GET /api/v2/code-refs/statistics/{projectKey} Get code references statistics for flags
CodeReferencesApi patchRepository PATCH /api/v2/code-refs/repositories/{repo} Update repository
CodeReferencesApi postExtinction POST /api/v2/code-refs/repositories/{repo}/branches/{branch}/extinction-events Create extinction
CodeReferencesApi postRepository POST /api/v2/code-refs/repositories Create repository
CodeReferencesApi putBranch PUT /api/v2/code-refs/repositories/{repo}/branches/{branch} Upsert branch
ContextSettingsApi putContextFlagSetting PUT /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{contextKind}/{contextKey}/flags/{featureFlagKey} Update flag settings for context
ContextsApi deleteContextInstances DELETE /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id} Delete context instances
ContextsApi evaluateContextInstance POST /api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate Evaluate flags for context instance
ContextsApi getContextAttributeNames GET /api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes Get context attribute names
ContextsApi getContextAttributeValues GET /api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes/{attributeName} Get context attribute values
ContextsApi getContextInstances GET /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id} Get context instances
ContextsApi getContextKindsByProjectKey GET /api/v2/projects/{projectKey}/context-kinds Get context kinds
ContextsApi getContexts GET /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{kind}/{key} Get contexts
ContextsApi putContextKind PUT /api/v2/projects/{projectKey}/context-kinds/{key} Create or update context kind
ContextsApi searchContextInstances POST /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search Search for context instances
ContextsApi searchContexts POST /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/search Search for contexts
CustomRolesApi deleteCustomRole DELETE /api/v2/roles/{customRoleKey} Delete custom role
CustomRolesApi getCustomRole GET /api/v2/roles/{customRoleKey} Get custom role
CustomRolesApi getCustomRoles GET /api/v2/roles List custom roles
CustomRolesApi patchCustomRole PATCH /api/v2/roles/{customRoleKey} Update custom role
CustomRolesApi postCustomRole POST /api/v2/roles Create custom role
DataExportDestinationsApi deleteDestination DELETE /api/v2/destinations/{projectKey}/{environmentKey}/{id} Delete Data Export destination
DataExportDestinationsApi getDestination GET /api/v2/destinations/{projectKey}/{environmentKey}/{id} Get destination
DataExportDestinationsApi getDestinations GET /api/v2/destinations List destinations
DataExportDestinationsApi patchDestination PATCH /api/v2/destinations/{projectKey}/{environmentKey}/{id} Update Data Export destination
DataExportDestinationsApi postDestination POST /api/v2/destinations/{projectKey}/{environmentKey} Create Data Export destination
DataExportDestinationsApi postGenerateWarehouseDestinationKeyPair POST /api/v2/destinations/generate-warehouse-destination-key-pair Generate Snowflake destination key pair
EnvironmentsApi deleteEnvironment DELETE /api/v2/projects/{projectKey}/environments/{environmentKey} Delete environment
EnvironmentsApi getEnvironment GET /api/v2/projects/{projectKey}/environments/{environmentKey} Get environment
EnvironmentsApi getEnvironmentsByProject GET /api/v2/projects/{projectKey}/environments List environments
EnvironmentsApi patchEnvironment PATCH /api/v2/projects/{projectKey}/environments/{environmentKey} Update environment
EnvironmentsApi postEnvironment POST /api/v2/projects/{projectKey}/environments Create environment
EnvironmentsApi resetEnvironmentMobileKey POST /api/v2/projects/{projectKey}/environments/{environmentKey}/mobileKey Reset environment mobile SDK key
EnvironmentsApi resetEnvironmentSDKKey POST /api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey Reset environment SDK key
ExperimentsApi createExperiment POST /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments Create experiment
ExperimentsApi createIteration POST /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/iterations Create iteration
ExperimentsApi getExperiment GET /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey} Get experiment
ExperimentsApi getExperimentationSettings GET /api/v2/projects/{projectKey}/experimentation-settings Get experimentation settings
ExperimentsApi getExperiments GET /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments Get experiments
ExperimentsApi patchExperiment PATCH /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey} Patch experiment
ExperimentsApi putExperimentationSettings PUT /api/v2/projects/{projectKey}/experimentation-settings Update experimentation settings
FeatureFlagsApi copyFeatureFlag POST /api/v2/flags/{projectKey}/{featureFlagKey}/copy Copy feature flag
FeatureFlagsApi deleteFeatureFlag DELETE /api/v2/flags/{projectKey}/{featureFlagKey} Delete feature flag
FeatureFlagsApi getExpiringContextTargets GET /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey} Get expiring context targets for feature flag
FeatureFlagsApi getExpiringUserTargets GET /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey} Get expiring user targets for feature flag
FeatureFlagsApi getFeatureFlag GET /api/v2/flags/{projectKey}/{featureFlagKey} Get feature flag
FeatureFlagsApi getFeatureFlagStatus GET /api/v2/flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey} Get feature flag status
FeatureFlagsApi getFeatureFlagStatusAcrossEnvironments GET /api/v2/flag-status/{projectKey}/{featureFlagKey} Get flag status across environments
FeatureFlagsApi getFeatureFlagStatuses GET /api/v2/flag-statuses/{projectKey}/{environmentKey} List feature flag statuses
FeatureFlagsApi getFeatureFlags GET /api/v2/flags/{projectKey} List feature flags
FeatureFlagsApi patchExpiringTargets PATCH /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey} Update expiring context targets on feature flag
FeatureFlagsApi patchExpiringUserTargets PATCH /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey} Update expiring user targets on feature flag
FeatureFlagsApi patchFeatureFlag PATCH /api/v2/flags/{projectKey}/{featureFlagKey} Update feature flag
FeatureFlagsApi postFeatureFlag POST /api/v2/flags/{projectKey} Create a feature flag
FeatureFlagsApi postMigrationSafetyIssues POST /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/migration-safety-issues Get migration safety issues
FeatureFlagsBetaApi getDependentFlags GET /api/v2/flags/{projectKey}/{featureFlagKey}/dependent-flags List dependent feature flags
FeatureFlagsBetaApi getDependentFlagsByEnv GET /api/v2/flags/{projectKey}/{environmentKey}/{featureFlagKey}/dependent-flags List dependent feature flags by environment
FlagImportConfigurationsBetaApi createFlagImportConfiguration POST /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey} Create a flag import configuration
FlagImportConfigurationsBetaApi deleteFlagImportConfiguration DELETE /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId} Delete a flag import configuration
FlagImportConfigurationsBetaApi getFlagImportConfiguration GET /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId} Get a single flag import configuration
FlagImportConfigurationsBetaApi getFlagImportConfigurations GET /api/v2/integration-capabilities/flag-import List all flag import configurations
FlagImportConfigurationsBetaApi patchFlagImportConfiguration PATCH /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId} Update a flag import configuration
FlagImportConfigurationsBetaApi triggerFlagImportJob POST /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}/trigger Trigger a single flag import run
FlagLinksBetaApi createFlagLink POST /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey} Create flag link
FlagLinksBetaApi deleteFlagLink DELETE /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id} Delete flag link
FlagLinksBetaApi getFlagLinks GET /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey} List flag links
FlagLinksBetaApi updateFlagLink PATCH /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id} Update flag link
FlagTriggersApi createTriggerWorkflow POST /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey} Create flag trigger
FlagTriggersApi deleteTriggerWorkflow DELETE /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id} Delete flag trigger
FlagTriggersApi getTriggerWorkflowById GET /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id} Get flag trigger by ID
FlagTriggersApi getTriggerWorkflows GET /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey} List flag triggers
FlagTriggersApi patchTriggerWorkflow PATCH /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id} Update flag trigger
FollowFlagsApi deleteFlagFollower DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId} Remove a member as a follower of a flag in a project and environment
FollowFlagsApi getFlagFollowers GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers Get followers of a flag in a project and environment
FollowFlagsApi getFollowersByProjEnv GET /api/v2/projects/{projectKey}/environments/{environmentKey}/followers Get followers of all flags in a given project and environment
FollowFlagsApi putFlagFollower PUT /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId} Add a member as a follower of a flag in a project and environment
HoldoutsBetaApi getAllHoldouts GET /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts Get all holdouts
HoldoutsBetaApi getHoldout GET /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/{holdoutKey} Get holdout
HoldoutsBetaApi getHoldoutById GET /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/id/{holdoutId} Get Holdout by Id
HoldoutsBetaApi patchHoldout PATCH /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/{holdoutKey} Patch holdout
HoldoutsBetaApi postHoldout POST /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts Create holdout
InsightsChartsBetaApi getDeploymentFrequencyChart GET /api/v2/engineering-insights/charts/deployments/frequency Get deployment frequency chart data
InsightsChartsBetaApi getFlagStatusChart GET /api/v2/engineering-insights/charts/flags/status Get flag status chart data
InsightsChartsBetaApi getLeadTimeChart GET /api/v2/engineering-insights/charts/lead-time Get lead time chart data
InsightsChartsBetaApi getReleaseFrequencyChart GET /api/v2/engineering-insights/charts/releases/frequency Get release frequency chart data
InsightsChartsBetaApi getStaleFlagsChart GET /api/v2/engineering-insights/charts/flags/stale Get stale flags chart data
InsightsDeploymentsBetaApi createDeploymentEvent POST /api/v2/engineering-insights/deployment-events Create deployment event
InsightsDeploymentsBetaApi getDeployment GET /api/v2/engineering-insights/deployments/{deploymentID} Get deployment
InsightsDeploymentsBetaApi getDeployments GET /api/v2/engineering-insights/deployments List deployments
InsightsDeploymentsBetaApi updateDeployment PATCH /api/v2/engineering-insights/deployments/{deploymentID} Update deployment
InsightsFlagEventsBetaApi getFlagEvents GET /api/v2/engineering-insights/flag-events List flag events
InsightsPullRequestsBetaApi getPullRequests GET /api/v2/engineering-insights/pull-requests List pull requests
InsightsRepositoriesBetaApi associateRepositoriesAndProjects PUT /api/v2/engineering-insights/repositories/projects Associate repositories with projects
InsightsRepositoriesBetaApi deleteRepositoryProject DELETE /api/v2/engineering-insights/repositories/{repositoryKey}/projects/{projectKey} Remove repository project association
InsightsRepositoriesBetaApi getInsightsRepositories GET /api/v2/engineering-insights/repositories List repositories
InsightsScoresBetaApi createInsightGroup POST /api/v2/engineering-insights/insights/group Create insight group
InsightsScoresBetaApi deleteInsightGroup DELETE /api/v2/engineering-insights/insights/groups/{insightGroupKey} Delete insight group
InsightsScoresBetaApi getInsightGroup GET /api/v2/engineering-insights/insights/groups/{insightGroupKey} Get insight group
InsightsScoresBetaApi getInsightGroups GET /api/v2/engineering-insights/insights/groups List insight groups
InsightsScoresBetaApi getInsightsScores GET /api/v2/engineering-insights/insights/scores Get insight scores
InsightsScoresBetaApi patchInsightGroup PATCH /api/v2/engineering-insights/insights/groups/{insightGroupKey} Patch insight group
IntegrationAuditLogSubscriptionsApi createSubscription POST /api/v2/integrations/{integrationKey} Create audit log subscription
IntegrationAuditLogSubscriptionsApi deleteSubscription DELETE /api/v2/integrations/{integrationKey}/{id} Delete audit log subscription
IntegrationAuditLogSubscriptionsApi getSubscriptionByID GET /api/v2/integrations/{integrationKey}/{id} Get audit log subscription by ID
IntegrationAuditLogSubscriptionsApi getSubscriptions GET /api/v2/integrations/{integrationKey} Get audit log subscriptions by integration
IntegrationAuditLogSubscriptionsApi updateSubscription PATCH /api/v2/integrations/{integrationKey}/{id} Update audit log subscription
IntegrationDeliveryConfigurationsBetaApi createIntegrationDeliveryConfiguration POST /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey} Create delivery configuration
IntegrationDeliveryConfigurationsBetaApi deleteIntegrationDeliveryConfiguration DELETE /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id} Delete delivery configuration
IntegrationDeliveryConfigurationsBetaApi getIntegrationDeliveryConfigurationByEnvironment GET /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey} Get delivery configurations by environment
IntegrationDeliveryConfigurationsBetaApi getIntegrationDeliveryConfigurationById GET /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id} Get delivery configuration by ID
IntegrationDeliveryConfigurationsBetaApi getIntegrationDeliveryConfigurations GET /api/v2/integration-capabilities/featureStore List all delivery configurations
IntegrationDeliveryConfigurationsBetaApi patchIntegrationDeliveryConfiguration PATCH /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id} Update delivery configuration
IntegrationDeliveryConfigurationsBetaApi validateIntegrationDeliveryConfiguration POST /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}/validate Validate delivery configuration
IntegrationsBetaApi createIntegrationConfiguration POST /api/v2/integration-configurations/keys/{integrationKey} Create integration configuration
IntegrationsBetaApi deleteIntegrationConfiguration DELETE /api/v2/integration-configurations/{integrationConfigurationId} Delete integration configuration
IntegrationsBetaApi getAllIntegrationConfigurations GET /api/v2/integration-configurations/keys/{integrationKey} Get all configurations for the integration
IntegrationsBetaApi getIntegrationConfiguration GET /api/v2/integration-configurations/{integrationConfigurationId} Get an integration configuration
IntegrationsBetaApi updateIntegrationConfiguration PATCH /api/v2/integration-configurations/{integrationConfigurationId} Update integration configuration
LayersApi createLayer POST /api/v2/projects/{projectKey}/layers Create layer
LayersApi getLayers GET /api/v2/projects/{projectKey}/layers Get layers
LayersApi updateLayer PATCH /api/v2/projects/{projectKey}/layers/{layerKey} Update layer
MetricsApi deleteMetric DELETE /api/v2/metrics/{projectKey}/{metricKey} Delete metric
MetricsApi getMetric GET /api/v2/metrics/{projectKey}/{metricKey} Get metric
MetricsApi getMetrics GET /api/v2/metrics/{projectKey} List metrics
MetricsApi patchMetric PATCH /api/v2/metrics/{projectKey}/{metricKey} Update metric
MetricsApi postMetric POST /api/v2/metrics/{projectKey} Create metric
MetricsBetaApi createMetricGroup POST /api/v2/projects/{projectKey}/metric-groups Create metric group
MetricsBetaApi deleteMetricGroup DELETE /api/v2/projects/{projectKey}/metric-groups/{metricGroupKey} Delete metric group
MetricsBetaApi getMetricGroup GET /api/v2/projects/{projectKey}/metric-groups/{metricGroupKey} Get metric group
MetricsBetaApi getMetricGroups GET /api/v2/projects/{projectKey}/metric-groups List metric groups
MetricsBetaApi patchMetricGroup PATCH /api/v2/projects/{projectKey}/metric-groups/{metricGroupKey} Patch metric group
OAuth2ClientsApi createOAuth2Client POST /api/v2/oauth/clients Create a LaunchDarkly OAuth 2.0 client
OAuth2ClientsApi deleteOAuthClient DELETE /api/v2/oauth/clients/{clientId} Delete OAuth 2.0 client
OAuth2ClientsApi getOAuthClientById GET /api/v2/oauth/clients/{clientId} Get client by ID
OAuth2ClientsApi getOAuthClients GET /api/v2/oauth/clients Get clients
OAuth2ClientsApi patchOAuthClient PATCH /api/v2/oauth/clients/{clientId} Patch client by ID
OtherApi getCallerIdentity GET /api/v2/caller-identity Identify the caller
OtherApi getIps GET /api/v2/public-ip-list Gets the public IP list
OtherApi getOpenapiSpec GET /api/v2/openapi.json Gets the OpenAPI spec in json
OtherApi getRoot GET /api/v2 Root resource
OtherApi getVersions GET /api/v2/versions Get version information
PersistentStoreIntegrationsBetaApi createBigSegmentStoreIntegration POST /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey} Create big segment store integration
PersistentStoreIntegrationsBetaApi deleteBigSegmentStoreIntegration DELETE /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId} Delete big segment store integration
PersistentStoreIntegrationsBetaApi getBigSegmentStoreIntegration GET /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId} Get big segment store integration by ID
PersistentStoreIntegrationsBetaApi getBigSegmentStoreIntegrations GET /api/v2/integration-capabilities/big-segment-store List all big segment store integrations
PersistentStoreIntegrationsBetaApi patchBigSegmentStoreIntegration PATCH /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId} Update big segment store integration
ProjectsApi deleteProject DELETE /api/v2/projects/{projectKey} Delete project
ProjectsApi getFlagDefaultsByProject GET /api/v2/projects/{projectKey}/flag-defaults Get flag defaults for project
ProjectsApi getProject GET /api/v2/projects/{projectKey} Get project
ProjectsApi getProjects GET /api/v2/projects List projects
ProjectsApi patchFlagDefaultsByProject PATCH /api/v2/projects/{projectKey}/flag-defaults Update flag default for project
ProjectsApi patchProject PATCH /api/v2/projects/{projectKey} Update project
ProjectsApi postProject POST /api/v2/projects Create project
ProjectsApi putFlagDefaultsByProject PUT /api/v2/projects/{projectKey}/flag-defaults Create or update flag defaults for project
RelayProxyConfigurationsApi deleteRelayAutoConfig DELETE /api/v2/account/relay-auto-configs/{id} Delete Relay Proxy config by ID
RelayProxyConfigurationsApi getRelayProxyConfig GET /api/v2/account/relay-auto-configs/{id} Get Relay Proxy config
RelayProxyConfigurationsApi getRelayProxyConfigs GET /api/v2/account/relay-auto-configs List Relay Proxy configs
RelayProxyConfigurationsApi patchRelayAutoConfig PATCH /api/v2/account/relay-auto-configs/{id} Update a Relay Proxy config
RelayProxyConfigurationsApi postRelayAutoConfig POST /api/v2/account/relay-auto-configs Create a new Relay Proxy config
RelayProxyConfigurationsApi resetRelayAutoConfig POST /api/v2/account/relay-auto-configs/{id}/reset Reset Relay Proxy configuration key
ReleasePipelinesBetaApi deleteReleasePipeline DELETE /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey} Delete release pipeline
ReleasePipelinesBetaApi getAllReleasePipelines GET /api/v2/projects/{projectKey}/release-pipelines Get all release pipelines
ReleasePipelinesBetaApi getAllReleaseProgressionsForReleasePipeline GET /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}/releases Get release progressions for release pipeline
ReleasePipelinesBetaApi getReleasePipelineByKey GET /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey} Get release pipeline by key
ReleasePipelinesBetaApi postReleasePipeline POST /api/v2/projects/{projectKey}/release-pipelines Create a release pipeline
ReleasePipelinesBetaApi putReleasePipeline PUT /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey} Update a release pipeline
ReleasePoliciesBetaApi deleteReleasePolicy DELETE /api/v2/projects/{projectKey}/release-policies/{policyKey} Delete a release policy
ReleasePoliciesBetaApi getReleasePolicies GET /api/v2/projects/{projectKey}/release-policies List release policies
ReleasePoliciesBetaApi getReleasePolicy GET /api/v2/projects/{projectKey}/release-policies/{policyKey} Get a release policy by key
ReleasePoliciesBetaApi postReleasePoliciesOrder POST /api/v2/projects/{projectKey}/release-policies/order Update the order of existing release policies
ReleasePoliciesBetaApi postReleasePolicy POST /api/v2/projects/{projectKey}/release-policies Create a release policy
ReleasePoliciesBetaApi putReleasePolicy PUT /api/v2/projects/{projectKey}/release-policies/{policyKey} Update a release policy
ReleasesBetaApi createReleaseForFlag PUT /api/v2/projects/{projectKey}/flags/{flagKey}/release Create a new release for flag
ReleasesBetaApi deleteReleaseByFlagKey DELETE /api/v2/flags/{projectKey}/{flagKey}/release Delete a release for flag
ReleasesBetaApi getReleaseByFlagKey GET /api/v2/flags/{projectKey}/{flagKey}/release Get release for flag
ReleasesBetaApi patchReleaseByFlagKey PATCH /api/v2/flags/{projectKey}/{flagKey}/release Patch release for flag
ReleasesBetaApi updatePhaseStatus PUT /api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId} Update phase status for release
ScheduledChangesApi deleteFlagConfigScheduledChanges DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id} Delete scheduled changes workflow
ScheduledChangesApi getFeatureFlagScheduledChange GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id} Get a scheduled change
ScheduledChangesApi getFlagConfigScheduledChanges GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes List scheduled changes
ScheduledChangesApi patchFlagConfigScheduledChange PATCH /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id} Update scheduled changes workflow
ScheduledChangesApi postFlagConfigScheduledChanges POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes Create scheduled changes workflow
SegmentsApi createBigSegmentExport POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports Create big segment export
SegmentsApi createBigSegmentImport POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports Create big segment import
SegmentsApi deleteSegment DELETE /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey} Delete segment
SegmentsApi getBigSegmentExport GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID} Get big segment export
SegmentsApi getBigSegmentImport GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID} Get big segment import
SegmentsApi getContextInstanceSegmentsMembershipByEnv POST /api/v2/projects/{projectKey}/environments/{environmentKey}/segments/evaluate List segment memberships for context instance
SegmentsApi getExpiringTargetsForSegment GET /api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey} Get expiring targets for segment
SegmentsApi getExpiringUserTargetsForSegment GET /api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey} Get expiring user targets for segment
SegmentsApi getSegment GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey} Get segment
SegmentsApi getSegmentMembershipForContext GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts/{contextKey} Get big segment membership for context
SegmentsApi getSegmentMembershipForUser GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users/{userKey} Get big segment membership for user
SegmentsApi getSegments GET /api/v2/segments/{projectKey}/{environmentKey} List segments
SegmentsApi patchExpiringTargetsForSegment PATCH /api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey} Update expiring targets for segment
SegmentsApi patchExpiringUserTargetsForSegment PATCH /api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey} Update expiring user targets for segment
SegmentsApi patchSegment PATCH /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey} Patch segment
SegmentsApi postSegment POST /api/v2/segments/{projectKey}/{environmentKey} Create segment
SegmentsApi updateBigSegmentContextTargets POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts Update context targets on a big segment
SegmentsApi updateBigSegmentTargets POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users Update user context targets on a big segment
TagsApi getTags GET /api/v2/tags List tags
TeamsApi deleteTeam DELETE /api/v2/teams/{teamKey} Delete team
TeamsApi getTeam GET /api/v2/teams/{teamKey} Get team
TeamsApi getTeamMaintainers GET /api/v2/teams/{teamKey}/maintainers Get team maintainers
TeamsApi getTeamRoles GET /api/v2/teams/{teamKey}/roles Get team custom roles
TeamsApi getTeams GET /api/v2/teams List teams
TeamsApi patchTeam PATCH /api/v2/teams/{teamKey} Update team
TeamsApi postTeam POST /api/v2/teams Create team
TeamsApi postTeamMembers POST /api/v2/teams/{teamKey}/members Add multiple members to team
TeamsBetaApi patchTeams PATCH /api/v2/teams Update teams
UserSettingsApi getExpiringFlagsForUser GET /api/v2/users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey} Get expiring dates on flags for user
UserSettingsApi getUserFlagSetting GET /api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} Get flag setting for user
UserSettingsApi getUserFlagSettings GET /api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags List flag settings for user
UserSettingsApi patchExpiringFlagsForUser PATCH /api/v2/users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey} Update expiring user target for flags
UserSettingsApi putFlagSetting PUT /api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} Update flag settings for user
UsersApi deleteUser DELETE /api/v2/users/{projectKey}/{environmentKey}/{userKey} Delete user
UsersApi getSearchUsers GET /api/v2/user-search/{projectKey}/{environmentKey} Find users
UsersApi getUser GET /api/v2/users/{projectKey}/{environmentKey}/{userKey} Get user
UsersApi getUsers GET /api/v2/users/{projectKey}/{environmentKey} List users
UsersBetaApi getUserAttributeNames GET /api/v2/user-attributes/{projectKey}/{environmentKey} Get user attribute names
ViewsBetaApi createView POST /api/v2/projects/{projectKey}/views Create view
ViewsBetaApi deleteView DELETE /api/v2/projects/{projectKey}/views/{viewKey} Delete view
ViewsBetaApi getLinkedResources GET /api/v2/projects/{projectKey}/views/{viewKey}/linked/{resourceType} Get linked resources
ViewsBetaApi getLinkedViews GET /api/v2/projects/{projectKey}/view-associations/{resourceType}/{resourceKey} Get linked views for a given resource
ViewsBetaApi getView GET /api/v2/projects/{projectKey}/views/{viewKey} Get view
ViewsBetaApi getViews GET /api/v2/projects/{projectKey}/views List views
ViewsBetaApi linkResource POST /api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType} Link resource
ViewsBetaApi unlinkResource DELETE /api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType} Unlink resource
ViewsBetaApi updateView PATCH /api/v2/projects/{projectKey}/views/{viewKey} Update view
WebhooksApi deleteWebhook DELETE /api/v2/webhooks/{id} Delete webhook
WebhooksApi getAllWebhooks GET /api/v2/webhooks List webhooks
WebhooksApi getWebhook GET /api/v2/webhooks/{id} Get webhook
WebhooksApi patchWebhook PATCH /api/v2/webhooks/{id} Update webhook
WebhooksApi postWebhook POST /api/v2/webhooks Creates a webhook
WorkflowTemplatesApi createWorkflowTemplate POST /api/v2/templates Create workflow template
WorkflowTemplatesApi deleteWorkflowTemplate DELETE /api/v2/templates/{templateKey} Delete workflow template
WorkflowTemplatesApi getWorkflowTemplates GET /api/v2/templates Get workflow templates
WorkflowsApi deleteWorkflow DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId} Delete workflow
WorkflowsApi getCustomWorkflow GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId} Get custom workflow
WorkflowsApi getWorkflows GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows Get workflows
WorkflowsApi postWorkflow POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows Create workflow

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

ApiKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Sample Code

import { FeatureFlagsApi, Configuration, FeatureFlagBody } from "launchdarkly-api-typescript";

const apiToken = process.env.LD_API_KEY;
const config = new Configuration({apiKey: apiToken});
let apiInstance = new FeatureFlagsApi(config);

const successCallback = function(res){
    console.log('API called successfully. Returned data: ' + JSON.stringify(res.data));
};
const errorCallback = function(error) {
    console.error('Error!', error);
    process.exit(1);
};

const createSuccessCallback = function(res){
    successCallback(res);

    // Clean up
    apiInstance.deleteFeatureFlag(projectName, keyName).then(successCallback, errorCallback);
};

const projectName = "openapi";
const keyName = "test-typescript";
const flagBody: FeatureFlagBody = {
    name: "Test Flag Typescript",
    key: keyName,
    variations: [{value: [1, 2]}, {value: [3, 4]}, {value: [5]}]
};

apiInstance.deleteFeatureFlag(projectName, keyName)
    .then(() => {
        console.log("flag deleted")
        apiInstance.postFeatureFlag(projectName, flagBody).then(createSuccessCallback, errorCallback);
    })
    .catch((err) => {
        if (err?.response?.status == 404) {
            console.log("No flag to cleanup")
        } else {
            errorCallback(err)
        }
        apiInstance.postFeatureFlag(projectName, flagBody).then(createSuccessCallback, errorCallback);
    })