|
- ---
- openapi: 3.0.0
- info:
- title: LaunchDarkly REST API
- description: |
- # Overview
-
- ## Authentication
-
- All REST API resources are authenticated with either [personal or service access tokens](https://docs.launchdarkly.com/home/account-security/api-access-tokens), or session cookies. Other authentication mechanisms are not supported. You can manage personal access tokens on your [Account settings](https://app.launchdarkly.com/settings/tokens) page.
-
- LaunchDarkly also has SDK keys, mobile keys, and client-side IDs that are used by our server-side SDKs, mobile SDKs, and client-side SDKs, respectively. **These keys cannot be used to access our REST API**. These keys are environment-specific, and can only perform read-only operations (fetching feature flag settings).
-
- | Auth mechanism | Allowed resources | Use cases |
- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
- | [Personal access tokens](https://docs.launchdarkly.com/home/account-security/api-access-tokens) | Can be customized on a per-token basis | Building scripts, custom integrations, data export |
- | SDK keys | Can only access read-only SDK-specific resources and the firehose, restricted to a single environment | Server-side SDKs, Firehose API |
- | Mobile keys | Can only access read-only mobile SDK-specific resources, restricted to a single environment | Mobile SDKs |
- | Client-side ID | Single environment, only flags marked available to client-side | Client-side JavaScript |
-
- > #### Keep your access tokens and SDK keys private
- >
- > Access tokens should _never_ be exposed in untrusted contexts. Never put an access token in client-side JavaScript, or embed it in a mobile application. LaunchDarkly has special mobile keys that you can embed in mobile apps. If you accidentally expose an access token or SDK key, you can reset it from your [Account Settings](https://app.launchdarkly.com/settings#/tokens) page.
- >
- > The client-side ID is safe to embed in untrusted contexts. It's designed for use in client-side JavaScript.
-
- ### Via request header
-
- The preferred way to authenticate with the API is by adding an `Authorization` header containing your access token to your requests. The value of the `Authorization` header must be your access token.
-
- Manage personal access tokens from the [Account Settings](https://app.launchdarkly.com/settings/tokens) page.
-
- ### Via session cookie
-
- For testing purposes, you can make API calls directly from your web browser. If you're logged in to the application, the API will use your existing session to authenticate calls.
-
- If you have a [role](https://docs.launchdarkly.com/home/team/built-in-roles) other than Admin, or have a [custom role](https://docs.launchdarkly.com/home/team/custom-roles) defined, you may not have permission to perform some API calls. You will receive a `401` response code in that case.
-
- > ### Modifying the Origin header causes an error
- >
- > LaunchDarkly validates that the Origin header for any API request authenticated by a session cookie matches the expected Origin header. The expected Origin header is `https://app.launchdarkly.com`.
- >
- > If the Origin header does not match what's expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly.
- >
- > Any browser extension that intentionally changes the Origin header can cause this problem. For example, the `Allow-Control-Allow-Origin: *` Chrome extension changes the Origin header to `http://evil.com` and causes the app to fail.
- >
- > To prevent this error, do not modify your Origin header.
- >
- > LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage.
-
- ## Representations
-
- All resources expect and return JSON response bodies. Error responses will also send a JSON body. Read [Errors](#section/Errors) for a more detailed description of the error format used by the API.
-
- In practice this means that you always get a response with a `Content-Type` header set to `application/json`.
-
- In addition, request bodies for `PUT`, `POST`, `REPORT` and `PATCH` requests must be encoded as JSON with a `Content-Type` header set to `application/json`.
-
- ### Summary and detailed representations
-
- When you fetch a list of resources, the response includes only the most important attributes of each resource. This is a _summary representation_ of the resource. When you fetch an individual resource (for example, a single feature flag), you receive a _detailed representation_ containing all of the attributes of the resource.
-
- The best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation.
-
- ### Links and addressability
-
- The best way to navigate the API is by following links. These are attributes in representations that link to other resources. The API always uses the same format for links:
-
- - Links to other resources within the API are encapsulated in a `_links` object.
- - If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link.
-
- Each link has two attributes: an href (the URL) and a type (the content type). For example, a feature resource might return the following:
-
- ```json
- {
- "_links": {
- "parent": {
- "href": "/api/features",
- "type": "application/json"
- },
- "self": {
- "href": "/api/features/sort.order",
- "type": "application/json"
- }
- },
- "_site": {
- "href": "/features/sort.order",
- "type": "text/html"
- }
- }
- ```
-
- From this, you can navigate to the parent collection of features by following the `parent` link, or navigate to the site page for the feature by following the `_site` link.
-
- Collections are always represented as a JSON object with an `items` attribute containing an array of representations. Like all other representations, collections have `_links` defined at the top level.
-
- Paginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection.
-
- ## Updates
-
- Resources that accept partial updates use the `PATCH` verb, and support the [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) format. Some resources also support the [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7386) format. In addition, some resources support optional comments that can be submitted with updates. Comments appear in outgoing webhooks, the audit log, and other integrations.
-
- ### Updates via JSON Patch
-
- [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) is a way to specify the modifications to perform on a resource. For example, in this feature flag representation:
-
- ```json
- {
- "name": "New recommendations engine",
- "key": "engine.enable",
- "description": "This is the description",
- ...
- }
- ```
-
- You can change the feature flag's description with the following patch document:
-
- ```json
- [{ "op": "replace", "path": "/description", "value": "This is the new description" }]
- ```
-
- JSON Patch documents are always arrays. You can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch:
-
- ```json
- [
- { "op": "test", "path": "/version", "value": 10 },
- { "op": "replace", "path": "/description", "value": "The new description" }
- ]
- ```
-
- The above patch request tests whether the feature flag's `version` is `10`, and if so, changes the feature flag's description.
-
- Attributes that aren't editable, like a resource's `_links`, have names that start with an underscore.
-
- ### Updates via JSON Merge Patch
-
- The API also supports the [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7386) format, as well as the [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag) resource.
-
- JSON Merge Patch is less expressive than JSON Patch but in many cases, it is simpler to construct a merge patch document. For example, you can change a feature flag's description with the following merge patch document:
-
- ```json
- {
- "description": "New flag description"
- }
- ```
-
- ### Updates with comments
-
- You can submit optional comments with `PATCH` changes. The [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag) resource supports comments.
-
- To submit a comment along with a JSON Patch document, use the following format:
-
- ```json
- {
- "comment": "This is a comment string",
- "patch": [{ "op": "replace", "path": "/description", "value": "The new description" }]
- }
- ```
-
- To submit a comment along with a JSON Merge Patch document, use the following format:
-
- ```json
- {
- "comment": "This is a comment string",
- "merge": { "description": "New flag description" }
- }
- ```
-
- ### Updates via semantic patches
-
- The API also supports the Semantic patch format. A semantic `PATCH` is a way to specify the modifications to perform on a resource as a set of executable instructions.
-
- JSON Patch uses paths and a limited set of operations to describe how to transform the current state of the resource into a new state. Semantic patch allows you to be explicit about intent using precise, custom instructions. In many cases, semantic patch instructions can also be defined independently of the current state of the resource. This can be useful when defining a change that may be applied at a future date.
-
- For example, in this feature flag configuration in environment Production:
-
- ```json
- {
- "name": "Alternate sort order",
- "kind": "boolean",
- "key": "sort.order",
- ...
- "environments": {
- "production": {
- "on": true,
- "archived": false,
- "salt": "c29ydC5vcmRlcg==",
- "sel": "8de1085cb7354b0ab41c0e778376dfd3",
- "lastModified": 1469131558260,
- "version": 81,
- "targets": [
- {
- "values": [
- "Gerhard.Little@yahoo.com"
- ],
- "variation": 0
- },
- {
- "values": [
- "1461797806429-33-861961230",
- "438580d8-02ee-418d-9eec-0085cab2bdf0"
- ],
- "variation": 1
- }
- ],
- "rules": [],
- "fallthrough": {
- "variation": 0
- },
- "offVariation": 1,
- "prerequisites": [],
- "_site": {
- "href": "/default/production/features/sort.order",
- "type": "text/html"
- }
- }
- }
- }
- ```
-
- You can add a date you want a user to be removed from the feature flag's user targets. For example, “remove user 1461797806429-33-861961230 from the user target for variation 0 on the Alternate sort order flag in the production environment on Wed Jul 08 2020 at 15:27:41 pm”. This is done using the following:
-
- ```json
- {
- "comment": "update expiring user targets",
- "instructions": [
- {
- "kind": "removeExpireUserTargetDate",
- "userKey": "userKey",
- "variationId": "978d53f9-7fe3-4a63-992d-97bcb4535dc8"
- },
- {
- "kind": "updateExpireUserTargetDate",
- "userKey": "userKey2",
- "variationId": "978d53f9-7fe3-4a63-992d-97bcb4535dc8",
- "value": 1587582000000
- },
- {
- "kind": "addExpireUserTargetDate",
- "userKey": "userKey3",
- "variationId": "978d53f9-7fe3-4a63-992d-97bcb4535dc8",
- "value": 1594247266386
- }
- ]
- }
- ```
-
- Here is another example. In this feature flag configuration:
-
- ```json
- {
- "name": "New recommendations engine",
- "key": "engine.enable",
- "environments": {
- "test": {
- "on": true
- }
- }
- }
- ```
-
- You can change the feature flag's description with the following patch document as a set of executable instructions. For example, “add user X to targets for variation Y and remove user A from targets for variation B for test flag”:
-
- ```json
- {
- "comment": "",
- "instructions": [
- {
- "kind": "removeUserTargets",
- "values": ["438580d8-02ee-418d-9eec-0085cab2bdf0"],
- "variationId": "852cb784-54ff-46b9-8c35-5498d2e4f270"
- },
- {
- "kind": "addUserTargets",
- "values": ["438580d8-02ee-418d-9eec-0085cab2bdf0"],
- "variationId": "1bb18465-33b6-49aa-a3bd-eeb6650b33ad"
- }
- ]
- }
- ```
-
- > ### Supported semantic patch API endpoints
- >
- > - [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag)
- > - [Update expiring user targets on feature flag](/tag/Feature-flags#operation/patchExpiringUserTargets)
- > - [Update expiring user target for flags](/tag/User-settings#operation/patchExpiringFlagsForUser)
- > - [Update expiring user targets on segment](/tag/Segments#operation/patchExpiringUserTargetsForSegment)
-
- ## Errors
-
- The API always returns errors in a common format. Here's an example:
-
- ```json
- {
- "code": "invalid_request",
- "message": "A feature with that key already exists",
- "id": "30ce6058-87da-11e4-b116-123b93f75cba"
- }
- ```
-
- The general class of error is indicated by the `code`. The `message` is a human-readable explanation of what went wrong. The `id` is a unique identifier. Use it when you're working with LaunchDarkly support to debug a problem with a specific API call.
-
- ### HTTP Status - Error Response Codes
-
- | Code | Definition | Desc. | Possible Solution |
- | ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
- | 400 | Bad Request | A request that fails may return this HTTP response code. | Ensure JSON syntax in request body is correct. |
- | 401 | Unauthorized | User doesn't have permission to an API call. | Ensure your SDK key is good. |
- | 403 | Forbidden | User does not have permission for operation. | Ensure that the user or access token has proper permissions set. |
- | 409 | Conflict | The API request could not be completed because it conflicted with a concurrent API request. | Retry your request. |
- | 429 | Too many requests | See [Rate limiting](/#section/Rate-limiting). | Wait and try again later. |
-
- ## CORS
-
- The LaunchDarkly API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. If an `Origin` header is given in a request, it will be echoed as an explicitly allowed origin. Otherwise, a wildcard is returned: `Access-Control-Allow-Origin: *`. For more information on CORS, see the [CORS W3C Recommendation](http://www.w3.org/TR/cors). Example CORS headers might look like:
-
- ```http
- Access-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization
- Access-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH
- Access-Control-Allow-Origin: *
- Access-Control-Max-Age: 300
- ```
-
- You can make authenticated CORS calls just as you would make same-origin calls, using either [token or session-based authentication](#section/Authentication). If you’re using session auth, you should set the `withCredentials` property for your `xhr` request to `true`. You should never expose your access tokens to untrusted users.
-
- ## Rate limiting
-
- We use several rate limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs will return a `429` status code. Calls to our APIs will include headers indicating the current rate limit status. The specific headers returned depend on the API route being called. The limits differ based on the route, authentication mechanism, and other factors. Routes that are not rate limited may not contain any of the headers described below.
-
- > ### Rate limiting and SDKs
- >
- > LaunchDarkly SDKs are never rate limited and do not use the API endpoints defined here. LaunchDarkly uses a different set of approaches, including streaming/server-sent events and a global CDN, to ensure availability to the routes used by LaunchDarkly SDKs.
- >
- > The client-side ID is safe to embed in untrusted contexts. It's designed for use in client-side JavaScript.
-
- ### Global rate limits
-
- Authenticated requests are subject to a global limit. This is the maximum number of calls that can be made to the API per ten seconds. All personal access tokens on the account share this limit, so exceeding the limit with one access token will impact other tokens. Calls that are subject to global rate limits will return the headers below:
-
- | Header name | Description |
- | ------------------------------ | -------------------------------------------------------------------------------- |
- | `X-Ratelimit-Global-Remaining` | The maximum number of requests the account is permitted to make per ten seconds. |
- | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. |
-
- We do not publicly document the specific number of calls that can be made globally. This limit may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limit.
-
- ### Route-level rate limits
-
- Some authenticated routes have custom rate limits. These also reset every ten seconds. Any access tokens hitting the same route share this limit, so exceeding the limit with one access token may impact other tokens. Calls that are subject to route-level rate limits will return the headers below:
-
- | Header name | Description |
- | ----------------------------- | ----------------------------------------------------------------------------------------------------- |
- | `X-Ratelimit-Route-Remaining` | The maximum number of requests to the current route the account is permitted to make per ten seconds. |
- | `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. |
-
- A _route_ represents a specific URL pattern and verb. For example, the [Delete environment](/tag/Environments#operation/deleteEnvironment) endpoint is considered a single route, and each call to delete an environment counts against your route-level rate limit for that route.
-
- We do not publicly document the specific number of calls that can be made to each endpoint per ten seconds. These limits may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limits.
-
- ### IP-based rate limiting
-
- We also employ IP-based rate limiting on some API routes. If you hit an IP-based rate limit, your API response will include a `Retry-After` header indicating how long to wait before re-trying the call. Clients must wait at least `Retry-After` seconds before making additional calls to our API, and should employ jitter and backoff strategies to avoid triggering rate limits again.
-
- ## OpenAPI (Swagger)
-
- We have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API.
-
- You can use this specification to generate client libraries to interact with our REST API in your language of choice.
-
- This specification is supported by several API-based tools such as Postman and Insomnia. In many cases, you can directly import our specification to ease use in navigating the APIs in the tooling.
-
- ## Client libraries
-
- We auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit [GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories).
-
- ## Method Overriding
-
- Some firewalls and HTTP clients restrict the use of verbs other than `GET` and `POST`. In those environments, our API endpoints that use `PUT`, `PATCH`, and `DELETE` verbs will be inaccessible.
-
- To avoid this issue, our API supports the `X-HTTP-Method-Override` header, allowing clients to "tunnel" `PUT`, `PATCH`, and `DELETE` requests via a `POST` request.
-
- For example, if you wish to call one of our `PATCH` resources via a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header.
-
- ## Beta resources
-
- We sometimes release new API resources in **beta** status before we release them with general availability.
-
- Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.
-
- We try to promote resources into general availability as quickly as possible. This happens after sufficient testing and when we're satisfied that we no longer need to make backwards-incompatible changes.
-
- We mark beta resources with a "Beta" callout in our documentation, pictured below:
-
- > ### This feature is in beta
- >
- > To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Beta-resources).
-
- ### Using beta resources
-
- To use a beta resource, you must include a header in the request. If you call a beta resource without this header, you'll receive a `403` response.
-
- Use this header:
-
- ```
- LD-API-Version: beta
- ```
-
- ## Versioning
-
- We try hard to keep our REST API backwards compatible, but we occasionally have to make backwards-incompatible changes in the process of shipping new features. These breaking changes can cause unexpected behavior if you don't prepare for them accordingly.
-
- Updates to our REST API include support for the latest features in LaunchDarkly. We also release a new version of our REST API every time we make a breaking change. We provide simultaneous support for multiple API versions so you can migrate from your current API version to a new version at your own pace.
-
- ### Setting the API version per request
-
- You can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below:
-
- ```
- LD-API-Version: 20191212
- ```
-
- The header value is the version number of the API version you'd like to request. The number for each version corresponds to the date the version was released. In the example above the version `20191212` corresponds to December 12, 2019.
-
- ### Setting the API version per access token
-
- When creating an access token, you must specify a specific version of the API to use. This ensures that integrations using this token cannot be broken by version changes.
-
- Tokens created before versioning was released have their version set to `20160426` (the version of the API that existed before versioning) so that they continue working the same way they did before versioning.
-
- If you would like to upgrade your integration to use a new API version, you can explicitly set the header described above.
-
- > ### Best practice: Set the header for every client or integration
- >
- > We recommend that you set the API version header explicitly in any client or integration you build.
- >
- > Only rely on the access token API version during manual testing.
- contact:
- name: LaunchDarkly Technical Support Team
- url: https://support.launchdarkly.com
- email: support@launchdarkly.com
- license:
- name: Apache 2.0
- url: https://www.apache.org/licenses/LICENSE-2.0
- version: '2.0'
- servers:
- - url: https://app.launchdarkly.com
- paths:
- "/api/v2":
- get:
- responses:
- '200':
- description: Root response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RootResponse"
- tags:
- - Other
- summary: Root resource
- description: Issue a `GET` request to the root resource to find all of the resource
- categories supported by the API
- operationId: getRoot
- "/api/v2/account/relay-auto-configs":
- get:
- responses:
- '200':
- description: Relay auto config response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RelayAutoConfigCollectionRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Relay Proxy configurations
- summary: List Relay Proxy configs
- description: Get a list of Relay Proxy configurations in the account.
- operationId: getRelayProxyConfigs
- post:
- responses:
- '201':
- description: Relay auto config response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RelayAutoConfigRep"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Relay Proxy configurations
- summary: Create a new Relay Proxy config
- description: Create a Relay Proxy config
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RelayAutoConfigPost"
- required: true
- operationId: postRelayAutoConfig
- "/api/v2/account/relay-auto-configs/{id}":
- get:
- responses:
- '200':
- description: Relay auto config response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RelayAutoConfigRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Relay Proxy configurations
- summary: Get Relay Proxy config
- description: Get a single Relay Proxy Auto Config by ID
- parameters:
- - name: id
- in: path
- description: The relay auto config id
- required: true
- schema:
- type: string
- format: string
- description: The relay auto config id
- operationId: getRelayProxyConfig
- patch:
- responses:
- '200':
- description: Relay auto config response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RelayAutoConfigRep"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '409':
- description: Status conflict
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatusConflictErrorRep"
- '422':
- description: Invalid patch content
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/PatchFailedErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Relay Proxy configurations
- summary: Update a Relay Proxy config
- description: Update a Relay Proxy config.
- parameters:
- - name: id
- in: path
- description: The relay auto config id
- required: true
- schema:
- type: string
- format: string
- description: The relay auto config id
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/PatchWithComment"
- required: true
- operationId: patchRelayAutoConfig
- delete:
- responses:
- '204':
- description: Action succeeded
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '409':
- description: Status conflict
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatusConflictErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Relay Proxy configurations
- summary: Delete Relay Proxy config by ID
- description: Delete a Relay Proxy config
- parameters:
- - name: id
- in: path
- description: The relay auto config id
- required: true
- schema:
- type: string
- format: string
- description: The relay auto config id
- operationId: deleteRelayAutoConfig
- "/api/v2/account/relay-auto-configs/{id}/reset":
- post:
- responses:
- '200':
- description: Relay auto config response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RelayAutoConfigRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Relay Proxy configurations
- summary: Reset Relay Proxy configuration key
- description: Reset a Relay Proxy configuration's secret key with an optional
- expiry time for the old key.
- parameters:
- - name: id
- in: path
- description: The Relay Proxy configuration ID
- required: true
- schema:
- type: string
- format: string
- description: The Relay Proxy configuration ID
- - name: expiry
- in: query
- description: 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.
- schema:
- type: integer
- format: int64
- description: 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.
- operationId: resetRelayAutoConfig
- "/api/v2/auditlog":
- get:
- responses:
- '200':
- description: Audit log entries response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/AuditLogEntryListingRepCollection"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Audit log
- summary: List audit log feature flag entries
- description: Get a list of all audit log entries. The query parameters let you
- restrict the results that return by date ranges, resource specifiers, or a
- full-text search query.
- parameters:
- - name: before
- in: query
- description: A timestamp filter, expressed as a Unix epoch time in milliseconds. All
- entries this returns occurred before the timestamp.
- schema:
- type: integer
- format: int64
- description: A timestamp filter, expressed as a Unix epoch time in milliseconds. All
- entries this returns occurred before the timestamp.
- - name: after
- in: query
- description: A timestamp filter, expressed as a Unix epoch time in milliseconds.
- All entries this returns occurred after the timestamp.
- schema:
- type: integer
- format: int64
- description: A timestamp filter, expressed as a Unix epoch time in milliseconds.
- All entries this returns occurred after the timestamp.
- - name: q
- in: query
- description: Text to search for. You can search for the full or partial name
- of the resource, or full or partial email address of the member who made
- a change.
- schema:
- type: string
- format: string
- description: Text to search for. You can search for the full or partial
- name of the resource, or full or partial email address of the member who
- made a change.
- - name: limit
- in: query
- description: A limit on the number of audit log entries that return. Set between
- 1 and 20.
- schema:
- type: integer
- format: int64
- description: A limit on the number of audit log entries that return. Set
- between 1 and 20.
- - name: spec
- in: query
- description: A resource specifier that lets you filter audit log listings
- by resource
- schema:
- type: string
- format: string
- description: A resource specifier that lets you filter audit log listings
- by resource
- operationId: getAuditLogEntries
- "/api/v2/auditlog/{id}":
- get:
- responses:
- '200':
- description: Audit log entry response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/AuditLogEntryRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Audit log
- summary: Get audit log entry
- description: |
- Fetch a detailed audit log entry representation. The detailed representation includes several fields that are not present in the summary representation:
-
- - `delta`: the JSON patch body that was used in the request to update the entity
- - `previousVersion`: a JSON representation of the previous version of the entity
- - `currentVersion`: a JSON representation of the current version of the entity
- parameters:
- - name: id
- in: path
- description: The ID of the audit log entry
- required: true
- schema:
- type: string
- format: string
- description: The ID of the audit log entry
- operationId: getAuditLogEntry
- "/api/v2/code-refs/extinctions":
- get:
- responses:
- '200':
- description: Extinction collection response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ExtinctionCollectionRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: List extinctions
- description: Get a list of all extinctions.
- parameters:
- - name: repoName
- in: query
- description: Filter results to a specific repository
- schema:
- type: string
- format: string
- description: Filter results to a specific repository
- - name: branchName
- in: query
- description: Filter results to a specific branch. By default, only the default
- branch will be queried for extinctions.
- schema:
- type: string
- format: string
- description: Filter results to a specific branch. By default, only the default
- branch will be queried for extinctions.
- - name: projKey
- in: query
- description: Filter results to a specific project
- schema:
- type: string
- format: string
- description: Filter results to a specific project
- - name: flagKey
- in: query
- description: Filter results to a specific flag key
- schema:
- type: string
- format: string
- description: Filter results to a specific flag key
- - name: from
- in: query
- description: Filter results to a specific timeframe based on commit time,
- expressed as a Unix epoch time in milliseconds. Must be used with `to`.
- schema:
- type: integer
- format: int64
- description: Filter results to a specific timeframe based on commit time,
- expressed as a Unix epoch time in milliseconds. Must be used with `to`.
- - name: to
- in: query
- description: Filter results to a specific timeframe based on commit time,
- expressed as a Unix epoch time in milliseconds. Must be used with `from`.
- schema:
- type: integer
- format: int64
- description: Filter results to a specific timeframe based on commit time,
- expressed as a Unix epoch time in milliseconds. Must be used with `from`.
- operationId: getExtinctions
- "/api/v2/code-refs/repositories":
- get:
- responses:
- '200':
- description: Repository collection response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RepositoryCollectionRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: List repositories
- description: Get a list of connected repositories. Optionally, you can include
- branch metadata with the `withBranches` query parameter. Embed references
- for the default branch with `ReferencesForDefaultBranch`. You can also filter
- the list of code references by project key and flag key.
- parameters:
- - name: withBranches
- in: query
- description: If set to any value, the endpoint returns repositories with associated
- branch data
- schema:
- type: string
- format: string
- description: If set to any value, the endpoint returns repositories with
- associated branch data
- - name: withReferencesForDefaultBranch
- in: query
- description: If set to any value, the endpoint returns repositories with associated
- branch data, as well as code references for the default git branch
- schema:
- type: string
- format: string
- description: If set to any value, the endpoint returns repositories with
- associated branch data, as well as code references for the default git
- branch
- - name: projKey
- in: query
- description: A LaunchDarkly project key. If provided, this filters code reference
- results to the specified project.
- schema:
- type: string
- format: string
- description: A LaunchDarkly project key. If provided, this filters code
- reference results to the specified project.
- - name: flagKey
- in: query
- description: If set to any value, the endpoint returns repositories with associated
- branch data, as well as code references for the default git branch
- schema:
- type: string
- format: string
- description: If set to any value, the endpoint returns repositories with
- associated branch data, as well as code references for the default git
- branch
- operationId: getRepositories
- post:
- responses:
- '200':
- description: Repository response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RepositoryRep"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '409':
- description: Status conflict
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatusConflictErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: Create repository
- description: Create a repository with the specified name.
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/repositoryPost"
- required: true
- operationId: postRepository
- "/api/v2/code-refs/repositories/{repo}":
- get:
- responses:
- '200':
- description: Repository response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RepositoryRep"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: Get repository
- description: Get a single repository by name.
- parameters:
- - name: repo
- in: path
- description: The repository name
- required: true
- schema:
- type: string
- format: string
- description: The repository name
- operationId: getRepository
- patch:
- responses:
- '200':
- description: Repository response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RepositoryRep"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: Update repository
- description: Update a repository's settings. The request must be a valid JSON
- Patch document describing the changes to be made to the repository.
- parameters:
- - name: repo
- in: path
- description: The repository name
- required: true
- schema:
- type: string
- format: string
- description: The repository name
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/JSONPatch"
- required: true
- operationId: patchRepository
- delete:
- responses:
- '204':
- description: Action succeeded
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: Delete repository
- description: Delete a repository with the specified name
- parameters:
- - name: repo
- in: path
- description: The repository name
- required: true
- schema:
- type: string
- format: string
- description: The repository name
- operationId: deleteRepository
- "/api/v2/code-refs/repositories/{repo}/branch-delete-tasks":
- post:
- responses:
- '200':
- description: Action succeeded
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: Delete branches
- description: Asynchronously delete a number of branches.
- parameters:
- - name: repo
- in: path
- description: The repository name to delete branches for.
- required: true
- schema:
- type: string
- format: string
- description: The repository name to delete branches for.
- requestBody:
- content:
- application/json:
- schema:
- type: array
- items:
- type: string
- required: true
- operationId: deleteBranches
- "/api/v2/code-refs/repositories/{repo}/branches":
- get:
- responses:
- '200':
- description: Branch collection response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/BranchCollectionRep"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: List branches
- description: Get a list of branches.
- parameters:
- - name: repo
- in: path
- description: The repository name
- required: true
- schema:
- type: string
- format: string
- description: The repository name
- operationId: getBranches
- "/api/v2/code-refs/repositories/{repo}/branches/{branch}":
- get:
- responses:
- '200':
- description: Branch response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/BranchRep"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: Get branch
- description: Get a specific branch in a repository
- parameters:
- - name: repo
- in: path
- description: The repository name
- required: true
- schema:
- type: string
- format: string
- description: The repository name
- - name: branch
- in: path
- description: The url-encoded branch name
- required: true
- schema:
- type: string
- format: string
- description: The url-encoded branch name
- - name: projKey
- in: query
- description: Filter results to a specific project
- schema:
- type: string
- format: string
- description: Filter results to a specific project
- - name: flagKey
- in: query
- description: Filter results to a specific flag key
- schema:
- type: string
- format: string
- description: Filter results to a specific flag key
- operationId: getBranch
- put:
- responses:
- '200':
- description: Action succeeded
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '409':
- description: Status conflict
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatusConflictErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: Upsert branch
- description: Create a new branch if it doesn't exist, or updates the branch
- if it already exists.
- parameters:
- - name: repo
- in: path
- description: The repository name
- required: true
- schema:
- type: string
- format: string
- description: The repository name
- - name: branch
- in: path
- description: The url-encoded branch name
- required: true
- schema:
- type: string
- format: string
- description: The url-encoded branch name
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/putBranch"
- required: true
- operationId: putBranch
- "/api/v2/code-refs/repositories/{repo}/branches/{branch}/extinction-events":
- post:
- responses:
- '200':
- description: Action succeeded
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: Create extinction
- description: Create a new extinction
- parameters:
- - name: repo
- in: path
- description: The repository name
- required: true
- schema:
- type: string
- format: string
- description: The repository name
- - name: branch
- in: path
- description: The url-encoded branch name
- required: true
- schema:
- type: string
- format: string
- description: The url-encoded branch name
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ExtinctionListPost"
- required: true
- operationId: postExtinction
- "/api/v2/code-refs/statistics":
- get:
- responses:
- '200':
- description: Statistic root response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatisticsRoot"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: Get links to code reference repositories for each project
- description: Get links for all projects that have Code References.
- operationId: getRootStatistic
- "/api/v2/code-refs/statistics/{projKey}":
- get:
- responses:
- '200':
- description: Statistic collection response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatisticCollectionRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Code references
- summary: Get number of code references for flags
- description: 'Get the number of code references across repositories for all
- flags in your project that have code references in the default branch (for
- example: master). You can optionally include the `flagKey` query parameter
- to get the number of code references across repositories for a single flag.
- This endpoint returns the number of times your flag keys are referenced in
- your repositories. You can filter to a single flag with by passing in a flag
- key.'
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: flagKey
- in: query
- description: Filter results to a specific flag key
- schema:
- type: string
- format: string
- description: Filter results to a specific flag key
- operationId: getStatistics
- "/api/v2/destinations":
- get:
- responses:
- '200':
- description: Destination collection response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/Destinations"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Data Export destinations
- summary: List destinations
- description: Get a list of Data Export destinations configured across all projects
- and environments.
- operationId: getDestinations
- "/api/v2/destinations/{projKey}/{envKey}":
- post:
- responses:
- '201':
- description: Destination response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/Destination"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '409':
- description: Status conflict
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatusConflictErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Data Export destinations
- summary: Create data export destination
- description: Create a new destination. The `config` body parameter represents
- the configuration parameters required for a destination type.
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/DestinationPost"
- example:
- config:
- project: test-prod
- topic: ld-pubsub-test-192301
- kind: google-pubsub
- required: true
- operationId: postDestination
- "/api/v2/destinations/{projKey}/{envKey}/{id}":
- get:
- responses:
- '200':
- description: Destination response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/Destination"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Data Export destinations
- summary: Get destination
- description: Get a single Data Export destination by ID
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- - name: id
- in: path
- description: The Data Export destination ID
- required: true
- schema:
- type: string
- format: string
- description: The Data Export destination ID
- operationId: getDestination
- patch:
- responses:
- '200':
- description: Destination response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/Destination"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '409':
- description: Status conflict
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatusConflictErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Data Export destinations
- summary: Update Data Export destination
- description: Update a Data Export destination. This requires a JSON Patch representation
- of the modified destination.
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- - name: id
- in: path
- description: The Data Export destination ID
- required: true
- schema:
- type: string
- format: string
- description: The Data Export destination ID
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/JSONPatch"
- example:
- - op: replace
- path: "/config/topic"
- value: ld-pubsub-test-192302
- required: true
- operationId: patchDestination
- delete:
- responses:
- '204':
- description: Destination response
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Data Export destinations
- summary: Delete Data Export destination
- description: Delete Data Export destination by ID
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- - name: id
- in: path
- description: The Data Export destination ID
- required: true
- schema:
- type: string
- format: string
- description: The Data Export destination ID
- operationId: deleteDestination
- "/api/v2/flag-status/{projKey}/{key}":
- get:
- responses:
- '200':
- description: Flag status across environments response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/FeatureFlagStatusAcrossEnvironments"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags
- summary: Get flag status across environments
- description: Get the status for a particular feature flag across environments.
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: key
- in: path
- description: The feature flag key
- required: true
- schema:
- type: string
- format: string
- description: The feature flag key
- - name: env
- in: query
- description: Optional environment filter
- schema:
- type: string
- format: string
- description: Optional environment filter
- operationId: getFeatureFlagStatusAcrossEnvironments
- "/api/v2/flag-statuses/{projKey}/{envKey}":
- get:
- responses:
- '200':
- description: Flag Statuses collection response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/FeatureFlagStatuses"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags
- summary: List feature flag statuses
- description: |
- Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as a state, which is one of the following:
-
- - `new`: the feature flag was created within the last seven days, and has not been requested yet
- - `active`: the feature flag was requested by your servers or clients within the last seven days
- - `inactive`: the feature flag was created more than seven days ago, and hasn't been requested by your servers or clients within the past seven days
- - `launched`: one variation of the feature flag has been rolled out to all your users for at least 7 days
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: envKey
- in: path
- description: Filter configurations by environment
- required: true
- schema:
- type: string
- format: string
- description: Filter configurations by environment
- operationId: getFeatureFlagStatuses
- "/api/v2/flag-statuses/{projKey}/{envKey}/{key}":
- get:
- responses:
- '200':
- description: Flag status response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/FlagStatusRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags
- summary: Get feature flag status
- description: Get the status for a particular feature flag.
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- - name: key
- in: path
- description: The feature flag key
- required: true
- schema:
- type: string
- format: string
- description: The feature flag key
- operationId: getFeatureFlagStatus
- "/api/v2/flags/{projKey}":
- get:
- responses:
- '200':
- description: Global flags collection response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/FeatureFlags"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags
- summary: List feature flags
- description: |
- Get a list of all features in the given project. By default, each feature includes configurations for each environment. You can filter environments with the env query parameter. For example, setting `env=production` restricts the returned configurations to just your production environment. You can also filter feature flags by tag with the tag query parameter.
-
- We support the following fields for filters:
-
- - `query` is a string that matches against the flags' keys and names. It is not case sensitive.
- - `archived` is a boolean to filter the list to archived flags. When this is absent, only unarchived flags are returned.
- - `type` is a string allowing filtering to `temporary` or `permanent` flags.
- - `status` is a string allowing filtering to `new`, `inactive`, `active`, or `launched` flags in the specified environment. This filter also requires a `filterEnv` field to be set to a valid environment. For example: `filter=status:active,filterEnv:production`.
- - `tags` is a + separated list of tags. It filters the list to members who have all of the tags in the list.
- - `hasExperiment` is a boolean with values of true or false and returns any flags that have an attached metric.
- - `hasDataExport` is a boolean with values of true or false and returns any flags that are currently exporting data in the specified environment. This includes flags that are exporting data via Experimentation. This filter also requires a `filterEnv` field to be set to a valid environment key. e.g. `filter=hasExperiment:true,filterEnv:production`
- - `evaluated` is an object that contains a key of `after` and a value in Unix time in milliseconds. This returns all flags that have been evaluated since the time you specify in the environment provided. This filter also requires a `filterEnv` field to be set to a valid environment. For example: `filter=evaluated:{"after": 1590768455282},filterEnv:production`.
- - `filterEnv` is a string with the key of a valid environment. The filterEnv field is used for filters that are environment specific. If there are multiple environment specific filters you should only declare this parameter once. For example: `filter=evaluated:{"after": 1590768455282},filterEnv:production,status:active`.
-
- An example filter is `query:abc,tags:foo+bar`. This matches flags with the string `abc` in their key or name, ignoring case, which also have the tags `foo` and `bar`.
-
- By default, this returns all flags. You can page through the list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the returned `_links` field. These links will not be present if the pages they refer to don't exist. For example, the `first` and `prev` links will be missing from the response on the first page.
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: env
- in: query
- description: Filter configurations by environment
- schema:
- type: string
- format: string
- description: Filter configurations by environment
- - name: tag
- in: query
- description: Filter feature flags by tag
- schema:
- type: string
- format: string
- description: Filter feature flags by tag
- - name: limit
- in: query
- description: The number of feature flags to return. Defaults to -1, which
- returns all flags
- schema:
- type: integer
- format: int64
- description: The number of feature flags to return. Defaults to -1, which
- returns all flags
- - name: offset
- in: query
- description: Where to start in the list. Use this with pagination. For example,
- an offset of 10 skips the first ten items and then returns the next limit
- items
- schema:
- type: integer
- format: int64
- description: Where to start in the list. Use this with pagination. For example,
- an offset of 10 skips the first ten items and then returns the next limit
- items
- - name: archived
- in: query
- description: A boolean to filter the list to archived flags. When this is
- absent, only unarchived flags will be returned
- schema:
- type: boolean
- format: boolean
- description: A boolean to filter the list to archived flags. When this is
- absent, only unarchived flags will be returned
- - name: summary
- in: query
- description: 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
- schema:
- type: boolean
- format: boolean
- description: 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
- - name: filter
- in: query
- description: A comma-separated list of filters. Each filter is of the form
- field:value
- schema:
- type: string
- format: string
- description: A comma-separated list of filters. Each filter is of the form
- field:value
- - name: sort
- in: query
- description: A comma-separated list of fields to sort by. Fields prefixed
- by a dash ( - ) sort in descending order
- schema:
- type: string
- format: string
- description: A comma-separated list of fields to sort by. Fields prefixed
- by a dash ( - ) sort in descending order
- operationId: getFeatureFlags
- post:
- responses:
- '201':
- description: Global flag response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/FeatureFlag"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '409':
- description: Status conflict
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatusConflictErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags
- summary: Create a feature flag
- description: Create a feature flag with the given name, key, and variations
- parameters:
- - name: projKey
- in: path
- description: The project key.
- required: true
- schema:
- type: string
- format: string
- description: The project key.
- - name: clone
- in: query
- description: The key of the feature flag to be cloned. The key identifies
- the flag in your code. For example, setting `clone=flagKey` copies the full
- targeting configuration for all environments, including `on/off` state,
- from the original flag to the new flag.
- schema:
- type: string
- format: string
- description: The key of the feature flag to be cloned. The key identifies
- the flag in your code. For example, setting `clone=flagKey` copies the
- full targeting configuration for all environments, including `on/off`
- state, from the original flag to the new flag.
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/FeatureFlagBody"
- example:
- key: my-flag
- name: My Flag
- required: true
- operationId: postFeatureFlag
- "/api/v2/flags/{projKey}/{envKey}/{flagKey}/dependent-flags":
- get:
- responses:
- '200':
- description: Dependent flags collection response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/DependentFlagsByEnvironment"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags (beta)
- summary: List dependent feature flags by environment
- description: List dependent flags across all environments for the flag specified
- in the path parameters. A dependent flag is a flag that uses another flag
- as a prerequisite.
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- - name: flagKey
- in: path
- description: The flag key
- required: true
- schema:
- type: string
- format: string
- description: The flag key
- operationId: getDependentFlagsByEnv
- "/api/v2/flags/{projKey}/{featureFlagKey}/copy":
- post:
- responses:
- '201':
- description: Global flag response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/FeatureFlag"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '405':
- description: Method not allowed
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/MethodNotAllowedErrorRep"
- '409':
- description: Status conflict
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatusConflictErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags
- summary: Copy feature flag
- description: "The includedActions and excludedActions define the parts of the
- flag configuration that are copied or not copied. By default, the entire flag
- configuration is copied.\n\nYou can have either `includedActions` or `excludedActions`
- but not both.\n\nValid `includedActions` and `excludedActions` include:\n\n-
- `updateOn`\n- `updatePrerequisites`\n- `updateTargets`\n- `updateRules`\n-
- `updateFallthrough`\n- `updateOffVariation`\n \n The `source` and `target`
- must be JSON objects if using curl, specifying the environment key and (optional)
- current flag configuration version in that environment. For example:\n\n```json\n{\n
- \ \"key\": \"production\",\n \"currentVersion\": 3\n}\n```\n\nIf target is
- specified as above, the API will test to ensure that the current flag version
- in the `production` environment is `3`, and reject attempts to copy settings
- to `production` otherwise. You can use this to enforce optimistic locking
- on copy attempts.\n"
- parameters:
- - name: projKey
- in: path
- description: The project key.
- required: true
- schema:
- type: string
- format: string
- description: The project key.
- - name: featureFlagKey
- in: path
- description: The feature flag's key. The key identifies the flag in your code.
- required: true
- schema:
- type: string
- format: string
- description: The feature flag's key. The key identifies the flag in your
- code.
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/FlagCopyConfigPost"
- required: true
- operationId: copyFeatureFlag
- "/api/v2/flags/{projKey}/{flagKey}/dependent-flags":
- get:
- responses:
- '200':
- description: Multi environment dependent flags collection response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/MultiEnvironmentDependentFlags"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags (beta)
- summary: List dependent feature flags
- description: List dependent flags across all environments for the flag specified
- in the path parameters. A dependent flag is a flag that uses another flag
- as a prerequisite.
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: flagKey
- in: path
- description: The flag key
- required: true
- schema:
- type: string
- format: string
- description: The flag key
- operationId: getDependentFlags
- "/api/v2/flags/{projKey}/{flagKey}/experiments/{envKey}/{metricKey}":
- get:
- responses:
- '200':
- description: Experiment results response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ExperimentResultsRep"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Experiments (beta)
- summary: Get experiment results
- description: Get detailed experiment result data
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: flagKey
- in: path
- description: The flag key
- required: true
- schema:
- type: string
- format: string
- description: The flag key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- - name: metricKey
- in: path
- description: The metric key
- required: true
- schema:
- type: string
- format: string
- description: The metric key
- - name: from
- in: query
- description: A timestamp denoting the start of the data collection period,
- expressed as a Unix epoch time in milliseconds.
- schema:
- type: integer
- format: int64
- description: A timestamp denoting the start of the data collection period,
- expressed as a Unix epoch time in milliseconds.
- - name: to
- in: query
- description: A timestamp denoting the end of the data collection period, expressed
- as a Unix epoch time in milliseconds.
- schema:
- type: integer
- format: int64
- description: A timestamp denoting the end of the data collection period,
- expressed as a Unix epoch time in milliseconds.
- operationId: getExperiment
- "/api/v2/flags/{projKey}/{flagKey}/experiments/{envKey}/{metricKey}/results":
- delete:
- responses:
- '204':
- description: Experiment results reset successfully
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Experiments (beta)
- summary: Reset experiment results
- description: Reset all experiment results by deleting all existing data for
- an experiment
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: flagKey
- in: path
- description: The feature flag's key
- required: true
- schema:
- type: string
- format: string
- description: The feature flag's key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- - name: metricKey
- in: path
- description: The metric's key
- required: true
- schema:
- type: string
- format: string
- description: The metric's key
- operationId: resetExperiment
- "/api/v2/flags/{projKey}/{flagKey}/expiring-user-targets/{envKey}":
- get:
- responses:
- '200':
- description: User targeting expirations on feature flag response.
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ExpiringUserTargetGetResponse"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags
- summary: Get expiring user targets for feature flag
- description: Get a list of user targets on a feature flag that are scheduled
- for removal.
- parameters:
- - name: projKey
- in: path
- description: The project key.
- required: true
- schema:
- type: string
- format: string
- description: The project key.
- - name: envKey
- in: path
- description: The environment key.
- required: true
- schema:
- type: string
- format: string
- description: The environment key.
- - name: flagKey
- in: path
- description: The feature flag key.
- required: true
- schema:
- type: string
- format: string
- description: The feature flag key.
- operationId: getExpiringUserTargets
- patch:
- responses:
- '200':
- description: User targeting expirations on feature flag response.
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ExpiringUserTargetPatchResponse"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags
- summary: Update expiring user targets on feature flag
- description: Update the list of user targets on a feature flag that are scheduled
- for removal.
- parameters:
- - name: projKey
- in: path
- description: The project key.
- required: true
- schema:
- type: string
- format: string
- description: The project key.
- - name: envKey
- in: path
- description: The environment key.
- required: true
- schema:
- type: string
- format: string
- description: The environment key.
- - name: flagKey
- in: path
- description: The feature flag key.
- required: true
- schema:
- type: string
- format: string
- description: The feature flag key.
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/PatchWithComment"
- required: true
- operationId: patchExpiringUserTargets
- "/api/v2/flags/{projKey}/{flagKey}/triggers/{envKey}":
- get:
- responses:
- '200':
- description: Flag trigger collection response JSON
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/TriggerWorkflowCollectionRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Flag triggers
- summary: List flag triggers
- description: Get a list of all flag triggers.
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- - name: flagKey
- in: path
- description: The flag key
- required: true
- schema:
- type: string
- format: string
- description: The flag key
- operationId: getTriggerWorkflows
- post:
- responses:
- '201':
- description: Successful flag trigger response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/TriggerWorkflowRep"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Flag triggers
- summary: Create flag trigger
- description: Create a new flag trigger. Triggers let you initiate changes to
- flag targeting remotely using a unique webhook URL.
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- - name: flagKey
- in: path
- description: The flag key
- required: true
- schema:
- type: string
- format: string
- description: The flag key
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/triggerPost"
- required: true
- operationId: createTriggerWorkflow
- "/api/v2/flags/{projKey}/{flagKey}/triggers/{envKey}/{id}":
- get:
- responses:
- '200':
- description: Flag trigger response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/TriggerWorkflowRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Flag triggers
- summary: Get flag trigger by ID
- description: Get a flag trigger by ID.
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: flagKey
- in: path
- description: The flag key
- required: true
- schema:
- type: string
- format: string
- description: The flag key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- - name: id
- in: path
- description: The flag trigger ID
- required: true
- schema:
- type: string
- format: string
- description: The flag trigger ID
- operationId: getTriggerWorkflowById
- patch:
- responses:
- '200':
- description: Flag trigger response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/TriggerWorkflowRep"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '409':
- description: Status conflict
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatusConflictErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Flag triggers
- summary: Update flag trigger
- description: Update a flag trigger. The request body must be a valid JSON patch
- or JSON merge patch document. To learn more, read [Updates](/#section/Overview/Updates).
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- - name: flagKey
- in: path
- description: The flag key
- required: true
- schema:
- type: string
- format: string
- description: The flag key
- - name: id
- in: path
- description: The flag trigger ID
- required: true
- schema:
- type: string
- format: string
- description: The flag trigger ID
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/FlagTriggerInput"
- required: true
- operationId: patchTriggerWorkflow
- delete:
- responses:
- '204':
- description: Action succeeded
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Flag triggers
- summary: Delete flag trigger
- description: Delete a flag trigger by ID.
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: envKey
- in: path
- description: The environment key
- required: true
- schema:
- type: string
- format: string
- description: The environment key
- - name: flagKey
- in: path
- description: The flag key
- required: true
- schema:
- type: string
- format: string
- description: The flag key
- - name: id
- in: path
- description: The flag trigger ID
- required: true
- schema:
- type: string
- format: string
- description: The flag trigger ID
- operationId: deleteTriggerWorkflow
- "/api/v2/flags/{projKey}/{key}":
- get:
- responses:
- '200':
- description: Global flag response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/FeatureFlag"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags
- summary: Get feature flag
- description: Get a single feature flag by key. By default, this returns the
- configurations for all environments. You can filter environments with the
- `env` query parameter. For example, setting `env=production` restricts the
- returned configurations to just the `production` environment.
- parameters:
- - name: projKey
- in: path
- description: The project key
- required: true
- schema:
- type: string
- format: string
- description: The project key
- - name: key
- in: path
- description: The feature flag key
- required: true
- schema:
- type: string
- format: string
- description: The feature flag key
- - name: env
- in: query
- description: Filter configurations by environment
- schema:
- type: string
- format: string
- description: Filter configurations by environment
- operationId: getFeatureFlag
- patch:
- responses:
- '200':
- description: Global flag response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/FeatureFlag"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '409':
- description: Status conflict
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatusConflictErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags
- summary: Update feature flag
- description: |
- Perform a partial update to a feature flag.
-
- ## Using JSON Patches on a feature flag
-
- When using the update feature flag endpoint to add individual users to a specific variation, there are two different patch documents, depending on whether users are already being individually targeted for the variation.
-
- If a flag variation already has users individually targeted, the path for the JSON Patch operation is:
-
- ```json
- {
- "op": "add",
- "path": "/environments/devint/targets/0/values/-",
- "value": "TestClient10"
- }
- ```
-
- If a flag variation does not already have users individually targeted, the path for the JSON Patch operation is:
-
- ```json
- [
- {
- "op": "add",
- "path": "/environments/devint/targets/-",
- "value": { "variation": 0, "values": ["TestClient10"] }
- }
- ]
- ```
-
- ## Using semantic patches on a feature flag
-
- To use a [semantic patch](/reference#updates-via-semantic-patches) on a feature flag resource, you must include a header in the request. If you call a semantic patch resource without this header, you will receive a `400` response because your semantic patch will be interpreted as a JSON patch.
-
- Use this header:
-
- ```
- Content-Type: application/json; domain-model=launchdarkly.semanticpatch
- ```
-
- The body of a semantic patch request takes the following three properties:
-
- 1. comment `string`: (Optional) A description of the update.
- 1. environmentKey `string`: (Required) The key of the LaunchDarkly environment.
- 1. instructions `array`: (Required) The action or list of actions to be performed by the update. Each update action in the list must be an object/hash table with a `kind` property, although depending on the action, other properties may be necessary. Read below for more information on the specific supported semantic patch instructions.
-
- If any instruction in the patch encounters an error, the error will be returned and the flag will not be changed. In general, instructions will silently do nothing if the flag is already in the state requested by the patch instruction. For example, `removeUserTargets` does nothing when the targets have already been removed). They will generally error if a parameter refers to something that does not exist, like a variation ID that doesn't correspond to a variation on the flag or a rule ID that doesn't belong to a rule on the flag. Other specific error conditions are noted in the instruction descriptions.
-
- ### Instructions
-
- #### `turnFlagOn`
-
- Sets the flag's targeting state to on.
-
- #### `turnFlagOff`
-
- Sets the flag's targeting state to off.
-
- #### `addUserTargets`
-
- Adds the user keys in `values` to the individual user targets for the variation specified by `variationId`. Returns an error if this causes the same user key to be targeted in multiple variations.
-
- ##### Parameters
-
- - `values`: list of user keys
- - `variationId`: ID of a variation on the flag
-
- #### `removeUserTargets`
-
- Removes the user keys in `values` to the individual user targets for the variation specified by `variationId`. Does nothing if the user keys are not targeted.
-
- ##### Parameters
-
- - `values`: list of user keys
- - `variationId`: ID of a variation on the flag
-
- #### `replaceUserTargets`
-
- Completely replaces the existing set of user targeting. All variations must be provided. Example:
-
- ```json
- {
- "kind": "replaceUserTargets",
- "targets": [
- {
- "variationId": "variation-1",
- "values": ["blah", "foo", "bar"]
- },
- {
- "variationId": "variation-2",
- "values": ["abc", "def"]
- }
- ]
- }
- ```
-
- ##### Parameters
-
- - `targets`: a list of user targeting
-
- #### `clearUserTargets`
-
- Removes all individual user targets from the variation specified by `variationId`
-
- ##### Parameters
-
- - `variationId`: ID of a variation on the flag
-
- #### `addPrerequisite`
-
- Adds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag.
-
- ##### Parameters
-
- - `key`: flag key of another flag
- - `variationId`: ID of a variation of the flag with key `key`
-
- #### `removePrerequisite`
-
- Removes the prerequisite indicated by `key`. Does nothing if this prerequisite does not exist.
-
- ##### Parameters
-
- - `key`: flag key of an existing prerequisite
-
- #### `updatePrerequisite`
-
- Changes the prerequisite with flag key `key` to the variation indicated by `variationId`. Returns an error if this prerequisite does not exist.
-
- ##### Parameters
-
- - `key`: flag key of an existing prerequisite
- - `variationId`: ID of a variation of the flag with key `key`
-
- #### `replacePrerequisites`
-
- Completely replaces the existing set of prerequisites for a given flag. Example:
-
- ```json
- {
- "kind": "replacePrerequisites",
- "prerequisites": [
- {
- "key": "flag-key",
- "variationId": "variation-1"
- },
- {
- "key": "another-flag",
- "variationId": "variation-2"
- }
- ]
- }
- ```
-
- ##### Parameters
-
- - `prerequisites`: a list of prerequisites
-
- #### `addRule`
-
- Adds a new rule to the flag with the given `clauses` which serves the variation indicated by `variationId` or the percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`. If `beforeRuleId` is set, the rule will be added in the list of rules before the indicated rule. Otherwise, the rule will be added to the end of the list.
-
- ##### Parameters
-
- - `clauses`: Array of clauses (see `addClauses`)
- - `beforeRuleId`: Optional ID of a rule in the flag
- - `variationId`: ID of a variation of the flag
- - `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000)
- - `rolloutBucketBy`: Optional user attribute
-
- #### `removeRule`
-
- Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.
-
- ##### Parameters
-
- - `ruleId`: ID of a rule in the flag
-
- #### `replaceRules`
-
- Completely replaces the existing rules for a given flag. Example:
-
- ```json
- {
- "kind": "replaceRules",
- "rules": [
- {
- "variationId": "variation-1",
- "description": "myRule",
- "clauses": [
- {
- "attribute": "segmentMatch",
- "op": "segmentMatch",
- "values": ["test"]
- }
- ],
- "trackEvents": true
- }
- ]
- }
- ```
-
- ##### Parameters
-
- - `rules`: a list of rules
-
- #### `addClauses`
-
- Adds the given clauses to the rule indicated by `ruleId`.
-
- ##### Parameters
-
- - `ruleId`: ID of a rule in the flag
- - `clauses`: Array of clause objects, with `attribute` (string), `op` (string), and `values` (array of strings, numbers, or dates) properties.
-
- #### `removeClauses`
-
- Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`.
-
- #### Parameters
-
- - `ruleId`: ID of a rule in the flag
- - `clauseIds`: Array of IDs of clauses in the rule
-
- #### `updateClause`
-
- Replaces the clause indicated by `ruleId` and `clauseId` with `clause`.
-
- ##### Parameters
-
- - `ruleId`: ID of a rule in the flag
- - `clauseId`: ID of a clause in that rule
- - `clause`: Clause object
-
- #### `addValuesToClause`
-
- Adds `values` to the values of the clause indicated by `ruleId` and `clauseId`.
-
- ##### Parameters
-
- - `ruleId`: ID of a rule in the flag
- - `clauseId`: ID of a clause in that rule
- - `values`: Array of strings
-
- #### `removeValuesFromClause`
-
- Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`.
-
- ##### Parameters
-
- `ruleId`: ID of a rule in the flag
- `clauseId`: ID of a clause in that rule
- `values`: Array of strings
-
- #### `reorderRules`
-
- Rearranges the rules to match the order given in `ruleIds`. Will return an error if `ruleIds` does not match the current set of rules on the flag.
-
- ##### Parameters
-
- - `ruleIds`: Array of IDs of all rules in the flag
-
- #### `updateRuleVariationOrRollout`
-
- Updates what the rule indicated by `ruleId` serves if its clauses evaluate to true.
- Can either be a fixed variation indicated by `variationId` or a percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`.
-
- ##### Parameters
-
- - `ruleId`: ID of a rule in the flag
- - `variationId`: ID of a variation of the flag
- or
- - `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000)
- - `rolloutBucketBy`: Optional user attribute
-
- #### `updateFallthroughVariationOrRollout`
-
- Updates the flag's fallthrough, which is served if none of the targeting rules match.
- Can either be a fixed variation indicated by `variationId` or a percent rollout indicated by `rolloutWeights` and `rolloutBucketBy`.
-
- ##### Parameters
-
- `variationId`: ID of a variation of the flag
- or
- `rolloutWeights`: Map of variationId to weight in thousandths of a percent (0-100000)
- `rolloutBucketBy`: Optional user attribute
-
- #### `updateOffVariation`
-
- Updates the variation served when the flag's targeting is off to the variation indicated by `variationId`.
-
- ##### Parameters
-
- `variationId`: ID of a variation of the flag
-
- ### Example
-
- ```json
- {
- "environmentKey": "production",
- "instructions": [
- {
- "kind": "turnFlagOn"
- },
- {
- "kind": "turnFlagOff"
- },
- {
- "kind": "addUserTargets",
- "variationId": "8bfb304e-d516-47e5-8727-e7f798e8992d",
- "values": ["userId", "userId2"]
- },
- {
- "kind": "removeUserTargets",
- "variationId": "8bfb304e-d516-47e5-8727-e7f798e8992d",
- "values": ["userId3", "userId4"]
- },
- {
- "kind": "updateFallthroughVariationOrRollout",
- "rolloutWeights": {
- "variationId": 50000,
- "variationId2": 50000
- },
- "rolloutBucketBy": null
- },
- {
- "kind": "addRule",
- "clauses": [
- {
- "attribute": "segmentMatch",
- "negate": false,
- "values": ["test-segment"]
- }
- ],
- "variationId": null,
- "rolloutWeights": {
- "variationId": 50000,
- "variationId2": 50000
- },
- "rolloutBucketBy": "key"
- },
- {
- "kind": "removeRule",
- "ruleId": "99f12464-a429-40fc-86cc-b27612188955"
- },
- {
- "kind": "reorderRules",
- "ruleIds": ["2f72974e-de68-4243-8dd3-739582147a1f", "8bfb304e-d516-47e5-8727-e7f798e8992d"]
- },
- {
- "kind": "addClauses",
- "ruleId": "1134",
- "clauses": [
- {
- "attribute": "email",
- "op": "in",
- "negate": false,
- "values": ["test@test.com"]
- }
- ]
- },
- {
- "kind": "removeClauses",
- "ruleId": "1242529",
- "clauseIds": ["8bfb304e-d516-47e5-8727-e7f798e8992d"]
- },
- {
- "kind": "updateClause",
- "ruleId": "2f72974e-de68-4243-8dd3-739582147a1f",
- "clauseId": "309845",
- "clause": {
- "attribute": "segmentMatch",
- "negate": false,
- "values": ["test-segment"]
- }
- },
- {
- "kind": "updateRuleVariationOrRollout",
- "ruleId": "2342",
- "rolloutWeights": null,
- "rolloutBucketBy": null
- },
- {
- "kind": "updateOffVariation",
- "variationId": "3242453"
- },
- {
- "kind": "addPrerequisite",
- "variationId": "234235",
- "key": "flagKey2"
- },
- {
- "kind": "updatePrerequisite",
- "variationId": "234235",
- "key": "flagKey2"
- },
- {
- "kind": "removePrerequisite",
- "key": "flagKey"
- }
- ]
- }
- ```
-
- ## Using JSON patches on a feature flag
-
- If you do not include the header described above, you can use [JSON patch](/reference#updates-via-json-patch).
- parameters:
- - name: projKey
- in: path
- description: The project key.
- required: true
- schema:
- type: string
- format: string
- description: The project key.
- - name: key
- in: path
- description: The feature flag's key. The key identifies the flag in your code.
- required: true
- schema:
- type: string
- format: string
- description: The feature flag's key. The key identifies the flag in your
- code.
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/PatchWithComment"
- required: true
- operationId: patchFeatureFlag
- delete:
- responses:
- '204':
- description: Action succeeded
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Feature flags
- summary: Delete feature flag
- description: 'Delete a feature flag in all environments. Use with caution: only
- delete feature flags your application no longer uses.'
- parameters:
- - name: projKey
- in: path
- description: The project key.
- required: true
- schema:
- type: string
- format: string
- description: The project key.
- - name: key
- in: path
- description: The feature flag's key. The key identifies the flag in your code.
- required: true
- schema:
- type: string
- format: string
- description: The feature flag's key. The key identifies the flag in your
- code.
- operationId: deleteFeatureFlag
- "/api/v2/integrations/{integrationKey}":
- get:
- responses:
- '200':
- description: Successful integrations response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/Integrations"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Integration audit log subscriptions
- summary: Get audit log subscriptions by integration
- description: Get all audit log subscriptions associated with a given integration.
- parameters:
- - name: integrationKey
- in: path
- description: The integration key
- required: true
- schema:
- type: string
- format: string
- description: The integration key
- operationId: getSubscriptions
- post:
- responses:
- '201':
- description: Successful integration
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/Integration"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Integration audit log subscriptions
- summary: Create audit log subscription
- description: Create an audit log subscription.
- parameters:
- - name: integrationKey
- in: path
- description: The integration key
- required: true
- schema:
- type: string
- format: string
- description: The integration key
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/subscriptionPost"
- required: true
- operationId: createSubscription
- "/api/v2/integrations/{integrationKey}/{id}":
- get:
- responses:
- '200':
- description: Successful integrations response
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/Integration"
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Integration audit log subscriptions
- summary: Get audit log subscription by ID
- description: Get an audit log subscription by ID.
- parameters:
- - name: integrationKey
- in: path
- description: The integration key
- required: true
- schema:
- type: string
- format: string
- description: The integration key
- - name: id
- in: path
- description: The subscription ID
- required: true
- schema:
- type: string
- format: string
- description: The subscription ID
- operationId: getSubscriptionByID
- patch:
- responses:
- '200':
- description: Successful
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/Integration"
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/InvalidRequestErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '409':
- description: Status conflict
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/StatusConflictErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Integration audit log subscriptions
- summary: Update audit log subscription
- description: Update an audit log subscription configuration. Requires a [JSON
- Patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the
- desired changes to the audit log subscription.
- parameters:
- - name: integrationKey
- in: path
- description: The integration key
- required: true
- schema:
- type: string
- format: string
- description: The integration key
- - name: id
- in: path
- description: The ID of the audit log subscription
- required: true
- schema:
- type: string
- format: string
- description: The ID of the audit log subscription
- requestBody:
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/JSONPatch"
- required: true
- operationId: updateSubscription
- delete:
- responses:
- '204':
- description: Action succeeded
- '401':
- description: Invalid access token
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- '403':
- description: Forbidden
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- '404':
- description: Invalid resource identifier
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/NotFoundErrorRep"
- '429':
- description: Rate limited
- content:
- application/json:
- schema:
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- tags:
- - Integration audit log subscriptions
- summary: Delete audit log subscription
- description: Delete an audit log subscription.
- parameters:
- - name: integrationKey
- in: path
|