LaunchDarkly

LaunchDarkly REST API

Build custom integrations with the LaunchDarkly REST API

Developer tools#openapi#developer-tools

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Build custom integrations with the LaunchDarkly REST API

Endpoints 105

Root

  • GETgetRoot/You can issue a GET request to the root resource to find all of the resource categories supported by the API.

Relay proxy configurations

  • GETReturns a list of relay proxy configurations in the account./account/relay-auto-configs
  • POSTCreate a new relay proxy config./account/relay-auto-configs
  • GETGet a single relay proxy configuration by ID./account/relay-auto-configs/:id
  • DELETEDelete a relay proxy configuration by ID./account/relay-auto-configs/:id
  • PATCHModify a relay proxy configuration by ID./account/relay-auto-configs/:id
  • POSTReset a relay proxy configuration's secret key with an optional expiry time for the old key./account/relay-auto-configs/:id/reset?expiry=0

Audit log

  • GETGet 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./auditlog?before=0&after=0&q=string&limit=0.0&spec=string
  • GETUse this endpoint to fetch a single audit log entry by its resouce ID./auditlog/:resourceId

Data export destinations

  • GETReturns a list of all data export destinations./destinations
  • POSTCreate a new data export destination/destinations/:projectKey/:environmentKey
  • GETGet a single data export destination by ID/destinations/:projectKey/:environmentKey/:destinationId
  • DELETEGet a single data export destination by ID/destinations/:projectKey/:environmentKey/:destinationId
  • PATCHPerform a partial update to a data export destination./destinations/:projectKey/:environmentKey/:destinationId

Feature flags

  • GETGet the status for a particular feature flag across environments/flag-status/:projectKey/:featureFlagKey
  • GETGet 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./flag-statuses/:projectKey/:environmentKey
  • GETGet the status for a particular feature flag./flag-statuses/:projectKey/:environmentKey/:featureFlagKey
  • GETGet a list of all features in the given project./flags/:projectKey?env=string&summary=true&archived=true&limit=0.0&offset=0.0&filter=string&sort=string&tag=string
  • POSTCreates a new feature flag./flags/:projectKey?clone=string
  • GETGet dependent flags for the flag in the environment specified in path parameters/flags/:projectKey/:environmentKey/:featureFlagKey/dependent-flags
  • GETGet a single feature flag by key./flags/:projectKey/:featureFlagKey?env=string
  • DELETEDelete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application./flags/:projectKey/:featureFlagKey
  • PATCHPerform a partial update to a feature./flags/:projectKey/:featureFlagKey
  • POSTCopies the feature flag configuration from one environment to the same feature flag in another environment./flags/:projectKey/:featureFlagKey/copy
  • GETGet dependent flags across all environments for the flag specified in the path parameters/flags/:projectKey/:featureFlagKey/dependent-flags
  • GETGet expiring user targets for feature flag/flags/:projectKey/:featureFlagKey/expiring-user-targets/:environmentKey
  • PATCHUpdate, add, or delete expiring user targets on feature flag/flags/:projectKey/:featureFlagKey/expiring-user-targets/:environmentKey
  • GETGet all approval requests for a feature flag config/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/approval-requests
  • GETGet a single approval request for a feature flag config/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/approval-requests/:approvalRequestId
  • POSTCreate an approval request for a feature flag config/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/approval-requests/:approvalRequestId
  • DELETEDelete an approval request for a feature flag config/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/approval-requests/:approvalRequestId
  • POSTApply approval request for a feature flag config/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/approval-requests/:approvalRequestId/apply
  • POSTReview approval request for a feature flag config/projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/approval-requests/:approvalRequestId/review
  • GETGet all scheduled workflows for a feature flag by key./projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/scheduled-changes
  • POSTCreates a new scheduled change for a feature flag./projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/scheduled-changes
  • POSTLists conflicts between the given instructions and any existing scheduled changes for the feature flag. The actual HTTP verb should be REPORT, not POST./projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/scheduled-changes-conflicts
  • GETGet a scheduled change on a feature flag by id./projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/scheduled-changes/:scheduledChangeId
  • DELETEDelete a scheduled change on a feature flag in an environment./projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/scheduled-changes/:scheduledChangeId
  • PATCHUpdates an existing scheduled-change on a feature flag in an environment./projects/:projectKey/flags/:featureFlagKey/environments/:environmentKey/scheduled-changes/:scheduledChangeId

Integrations

  • GETGet a list of all configured audit log event integrations associated with this account./integrations
  • GETGet a list of all configured integrations of a given kind./integrations/:integrationKey
  • POSTCreate a new integration subscription of a given kind./integrations/:integrationKey
  • GETGet a single integration subscription by ID./integrations/:integrationKey/:integrationId
  • DELETEDelete an integration subscription by ID./integrations/:integrationKey/:integrationId
  • PATCHModify an integration subscription by ID./integrations/:integrationKey/:integrationId

Team members

  • GETReturns a list of all members in the account./members?limit=0.0&offset=0.0&filter=string&sort=string
  • POSTInvite new members./members
  • GETGet the current team member associated with the token/members/me
  • GETGet a single team member by ID./members/:memberId
  • DELETEDelete a team member by ID./members/:memberId
  • PATCHModify a team member by ID./members/:memberId

Projects

  • GETReturns a list of all projects in the account./projects
  • POSTCreate a new project with the given key and name./projects
  • GETFetch a single project by key./projects/:projectKey
  • DELETEDelete 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./projects/:projectKey
  • PATCHModify a project by ID./projects/:projectKey

Environments

  • POSTCreate a new environment in a specified project with a given name, key, and swatch color./projects/:projectKey/environments
  • GETGet an environment given a project and key./projects/:projectKey/environments/:environmentKey
  • DELETEDelete an environment in a specific project./projects/:projectKey/environments/:environmentKey
  • PATCHModify an environment by ID. If you try to patch the environment by setting both required and requiredApprovalTags, it will result in an error. Users can specify either required approvals for all flags in an environment or those with specific tags, but not both. Only customers on an Enterprise plan can require approval for flag updates with either mechanism./projects/:projectKey/environments/:environmentKey
  • POSTReset an environment's SDK key with an optional expiry time for the old key./projects/:projectKey/environments/:environmentKey/apiKey?expiry=0
  • POSTReset 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./projects/:projectKey/environments/:environmentKey/mobileKey?expiry=0

Custom roles

  • GETReturn a complete list of custom roles./roles
  • POSTCreate a new custom role./roles
  • GETGet one custom role by key./roles/:customRoleKey
  • DELETEDelete a custom role by key./roles/:customRoleKey
  • PATCHModify a custom role by key./roles/:customRoleKey

User segments

  • GETGet a list of all user segments in the given project./segments/:projectKey/:environmentKey?tag=string
  • POSTCreates a new user segment./segments/:projectKey/:environmentKey
  • GETGet a single user segment by key./segments/:projectKey/:environmentKey/:userSegmentKey
  • DELETEDelete a user segment./segments/:projectKey/:environmentKey/:userSegmentKey
  • PATCHPerform a partial update to a user segment./segments/:projectKey/:environmentKey/:userSegmentKey
  • POSTUpdate targets included or excluded in a big segment/segments/:projectKey/:environmentKey/:userSegmentKey/users
  • GETGet expiring user targets for user segment/segments/:projectKey/:userSegmentKey/expiring-user-targets/:environmentKey
  • PATCHUpdate, add, or delete expiring user targets on user segment/segments/:projectKey/:userSegmentKey/expiring-user-targets/:environmentKey

Access tokens

  • GETReturns a list of tokens in the account./tokens?showAll=true
  • POSTCreate a new token./tokens
  • GETGet a single access token by ID./tokens/:tokenId
  • DELETEDelete an access token by ID./tokens/:tokenId
  • PATCHModify an access token by ID./tokens/:tokenId
  • POSTReset an access token's secret key with an optional expiry time for the old key./tokens/:tokenId/reset?expiry=0

Customer Metrics

  • GETReturns of the usage endpoints available./usage
  • GETGet events usage by event id and the feature flag key./usage/evaluations/:envId/:flagKey
  • GETGet events usage endpoints./usage/events
  • GETGet events usage by event type./usage/events/:type
  • GETGet monthly active user data./usage/mau
  • GETGet monthly active user data by category./usage/mau/bycategory
  • GETReturns a list of all streams./usage/streams
  • GETGet a stream endpoint and return timeseries data./usage/streams/:source
  • GETGet a stream timeseries data by source show sdk version metadata./usage/streams/:source/bysdkversion
  • GETGet a stream timeseries data by source and show all sdk version associated./usage/streams/:source/sdkversions

Users

  • GETSearch 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./user-search/:projectKey/:environmentKey?q=string&limit=0&offset=0&after=0
  • GETList 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./users/:projectKey/:environmentKey?limit=0&h=string&scrollId=string
  • GETGet a user by key./users/:projectKey/:environmentKey/:userKey
  • DELETEDelete a user by ID./users/:projectKey/:environmentKey/:userKey

User settings

  • GETFetch a single flag setting for a user by key./users/:projectKey/:environmentKey/:userKey/flags
  • GETFetch a single flag setting for a user by key./users/:projectKey/:environmentKey/:userKey/flags/:featureFlagKey
  • PUTSpecifically enable or disable a feature flag for a user based on their key./users/:projectKey/:environmentKey/:userKey/flags/:featureFlagKey
  • GETGet expiring dates on flags for user/users/:projectKey/:userKey/expiring-user-targets/:environmentKey
  • PATCHUpdate, add, or delete expiring user targets for a single user on all flags/users/:projectKey/:userKey/expiring-user-targets/:environmentKey

Webhooks

  • GETFetch a list of all webhooks./webhooks
  • POSTCreate a webhook./webhooks
  • GETGet a webhook by ID./webhooks/:resourceId
  • DELETEDelete a webhook by ID./webhooks/:resourceId
  • PATCHModify a webhook by ID./webhooks/:resourceId

API details

Base URL
https://app.launchdarkly.com/api/v2
Authentication
An API key in the Authorization header
Operations
105 operations on 64 pathsGET 53POST 22PATCH 15DELETE 14PUT 1
Main resources
Feature flags 25Customer Metrics 10User segments 8Access tokens 6Environments 6Integrations 6Relay proxy configurations 6Team members 6Custom roles 5Data export destinations 5
Response formats
application/json
Description format
Swagger 2.0, API version 5.3.0
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the LaunchDarkly REST API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the LaunchDarkly REST API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “getRoot” (GET /), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the LaunchDarkly REST API?

Build custom integrations with the LaunchDarkly REST API It is listed under Developer tools and has 105 endpoints.

Who publishes the LaunchDarkly REST API?

It is listed from LaunchDarkly's public API description (an OpenAPI document), not published by LaunchDarkly on Swastik Codes. Anyone who controls launchdarkly.com can claim the profile by adding a DNS TXT record.

What is the base URL of the LaunchDarkly REST API?

Requests go to https://app.launchdarkly.com/api/v2. Endpoint paths are added to this base URL.

How do I authenticate with the LaunchDarkly REST API?

With an API key in the Authorization header.

How many endpoints does the LaunchDarkly REST API have?

105 operations on 64 paths (53 GET, 22 POST, 15 PATCH, 14 DELETE, 1 PUT). The largest groups are Feature flags, Customer Metrics, User segments, Access tokens.

Is forking the LaunchDarkly REST API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.