Query structured spec data via REST or MCP. Get exactly what your agent needs.
https://app.launchdarkly.com
https://app.launchdarkly.us
/api/v2/tokens
Fetch a list of all access tokens.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| showAll | query | optional | boolean | If set to true, and the authentication access token has the 'Admin' role, personal access tokens for all members will be retrieved. |
| limit | query | optional | integer | The number of access tokens to return in the response. Defaults to 25. |
| offset | query | optional | integer | Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. |
GET /api/v2/tokens
/api/v2/tokens
Create a new access token.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccessTokenPost"
},
"example": {
"role": "reader"
}
}
},
"required": true
}
POST /api/v2/tokens
/api/v2/tokens/{id}
Delete an access token by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The ID of the access token to update |
DELETE /api/v2/tokens/{id}
/api/v2/tokens/{id}
Get a single access token by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The ID of the access token |
GET /api/v2/tokens/{id}
/api/v2/tokens/{id}
Update an access token's settings. Updating an access token uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The ID of the access token to update |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/role",
"value": "writer"
}
]
}
},
"required": true
}
PATCH /api/v2/tokens/{id}
/api/v2/tokens/{id}/reset
Reset an access token's secret key with an optional expiry time for the old key.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The ID of the access token to update |
| expiry | query | optional | integer | An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. |
POST /api/v2/tokens/{id}/reset
/api/v2/members
Return a list of account members. By default, this returns the first 20 members. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the returned `_links` field. These links are not 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. ### Filtering members LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the members' emails and names. It is not case sensitive. - `role` is a `|` separated list of roles and custom roles. It filters the list to members who have any of the roles in the list. For the purposes of this filtering, `Owner` counts as `Admin`. - `team` is a string that matches against the key of the teams the members belong to. It is not case sensitive. - `noteam` is a boolean that filters the list of members who are not on a team if true and members on a team if false. - `lastSeen` is a JSON object in one of the following formats: - `{"never": true}` - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM. - `{"noData": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps. - `{"before": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds. - `accessCheck` is a string that represents a specific action on a specific resource and is in the format `<ActionSpecifier>:<ResourceSpecifier>`. It filters the list to members who have the ability to perform that action on that resource. Note: `accessCheck` is only supported in API version `20220603` and earlier. To learn more, read [Versioning](https://apidocs.launchdarkly.com/#section/Overview/Versioning). - For example, the filter `accessCheck:createApprovalRequest:proj/default:env/test:flag/alternate-page` matches members with the ability to create an approval request for the `alternate-page` flag in the `test` environment of the `default` project. - Wildcard and tag filters are not supported when filtering for access. For example, the filter `query:abc,role:admin|customrole` matches members with the string `abc` in their email or name, ignoring case, who also are either an `Owner` or `Admin` or have the custom role `customrole`. ### Sorting members LaunchDarkly supports two fields for sorting: `displayName` and `lastSeen`: - `displayName` sorts by first + last name, using the member's email if no name is set. - `lastSeen` sorts by the `_lastSeen` property. LaunchDarkly considers members that have never been seen or have no data the oldest.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | The number of members to return in the response. Defaults to 20. |
| offset | query | optional | integer | Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. |
| filter | query | optional | string | A comma-separated list of filters. Each filter is of the form `field:value`. Supported fields are explained above. |
| sort | query | optional | string | A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order. |
GET /api/v2/members
/api/v2/members
Invite one or more new members to join an account. Each member is sent an invitation. Members with "admin" or "owner" roles may create new members, as well as anyone with a "createMember" permission for "member/\*". If a member cannot be invited, the entire request is rejected and no members are invited from that request. Each member _must_ have an `email` field and either a `role` or a `customRoles` field. If any of the fields are not populated correctly, the request is rejected with the reason specified in the "message" field of the response. Requests to create account members will not work if SCIM is enabled for the account. _No more than 50 members may be created per request._ A request may also fail because of conflicts with existing members. These conflicts are reported using the additional `code` and `invalid_emails` response fields with the following possible values for `code`: - **email_already_exists_in_account**: A member with this email address already exists in this account. - **email_taken_in_different_account**: A member with this email address exists in another account. - **duplicate_email**s: This request contains two or more members with the same email address. A request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request).
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewMemberFormListPost"
}
}
},
"required": true
}
POST /api/v2/members
/api/v2/members/{id}
Delete a single account member by ID. Requests to delete account members will not work if SCIM is enabled for the account.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The member ID |
DELETE /api/v2/members/{id}
/api/v2/members/{id}
Get a single account member by member ID. `me` is a reserved value for the `id` parameter that returns the caller's member information.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The member ID |
GET /api/v2/members/{id}
/api/v2/members/{id}
Update a single account member. Updating a member uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com). To update fields in the account member object that are arrays, set the `path` to the name of the field and then append `/<array index>`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array. For example, to add a new custom role to a member, use the following request body: ``` [ { "op": "add", "path": "/customRoles/0", "value": "some-role-id" } ] ``` You can update only an account member's role or custom role using a JSON patch. Members can update their own names and email addresses though the LaunchDarkly UI. When SAML SSO or SCIM is enabled for the account, account members are managed in the Identity Provider (IdP). Requests to update account members will succeed, but the IdP will override the update shortly afterwards.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The member ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "add",
"path": "/role",
"value": "writer"
}
]
}
},
"required": true
}
PATCH /api/v2/members/{id}
/api/v2/members/{id}/teams
Add one member to one or more teams.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The member ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MemberTeamsPostInput"
}
}
},
"required": true
}
POST /api/v2/members/{id}/teams
/api/v2/members
> ### Full use of this API resource is an Enterprise feature > > The ability to perform a partial update to multiple members is available to customers on an Enterprise plan. If you are on a Pro plan, you can update members individually. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/). Perform a partial update to multiple members. Updating members uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://apidocs.launchdarkly.com). ### Instructions Semantic patch requests support the following `kind` instructions for updating members. <details> <summary>Click to expand instructions for <strong>updating members</strong></summary> #### replaceMembersRoles Replaces the roles of the specified members. This also removes all custom roles assigned to the specified members. ##### Parameters - `value`: The new role. Must be a valid built-in role. To learn more about built-in roles, read [LaunchDarkly's built-in roles](https://docs.launchdarkly.com/home/members/built-in-roles). - `memberIDs`: List of member IDs. Here's an example: ```json { "instructions": [{ "kind": "replaceMemberRoles", "value": "reader", "memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } ``` #### replaceAllMembersRoles Replaces the roles of all members. This also removes all custom roles assigned to the specified members. Members that match any of the filters are **excluded** from the update. ##### Parameters - `value`: The new role. Must be a valid built-in role. To learn more about built-in roles, read [LaunchDarkly's built-in roles](https://docs.launchdarkly.com/home/members/built-in-roles). - `filterLastSeen`: (Optional) A JSON object with one of the following formats: - `{"never": true}` - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM. - `{"noData": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps. - `{"before": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds. - `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive. - `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`. - `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive. - `ignoredMemberIDs`: (Optional) A list of member IDs. Here's an example: ```json { "instructions": [{ "kind": "replaceAllMembersRoles", "value": "reader", "filterLastSeen": { "never": true } }] } ``` #### replaceMembersCustomRoles Replaces the custom roles of the specified members. ##### Parameters - `values`: List of new custom roles. Must be a valid custom role key or ID. - `memberIDs`: List of member IDs. Here's an example: ```json { "instructions": [{ "kind": "replaceMembersCustomRoles", "values": [ "example-custom-role" ], "memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } ``` #### replaceAllMembersCustomRoles Replaces the custom roles of all members. Members that match any of the filters are **excluded** from the update. ##### Parameters - `values`: List of new roles. Must be a valid custom role key or ID. - `filterLastSeen`: (Optional) A JSON object with one of the following formats: - `{"never": true}` - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM. - `{"noData": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps. - `{"before": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds. - `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive. - `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`. - `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive. - `ignoredMemberIDs`: (Optional) A list of member IDs. Here's an example: ```json { "instructions": [{ "kind": "replaceAllMembersCustomRoles", "values": [ "example-custom-role" ], "filterLastSeen": { "never": true } }] } ``` </details>
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/membersPatchInput"
},
"example": {
"comment": "Optional comment about the update",
"instructions": [
{
"kind": "replaceMembersRoles",
"value": "reader",
"memberIDs": [
"1234a56b7c89d012345e678f",
"507f1f77bcf86cd799439011"
]
}
]
}
}
},
"required": true
}
PATCH /api/v2/members
/api/v2/usage/data-export-events
Get a time-series array of the number of monthly data export events from your account. The granularity is always daily, with a maximum of 31 days.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| from | query | optional | string | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. |
| to | query | optional | string | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. |
GET /api/v2/usage/data-export-events
/api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey}
Get time-series arrays of the number of times a flag is evaluated, broken down by the variation that resulted from that evaluation. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| featureFlagKey | path | required | string | The feature flag key |
| from | query | optional | string | The series of data returned starts from this timestamp. Defaults to 30 days ago. |
| to | query | optional | string | The series of data returned ends at this timestamp. Defaults to the current time. |
| tz | query | optional | string | The timezone to use for breaks between days when returning daily data. |
GET /api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey}
/api/v2/usage/events/{type}
Get time-series arrays of the number of times a flag is evaluated, broken down by the variation that resulted from that evaluation. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| type | path | required | string | The type of event to retrieve. Must be either `received` or `published`. |
| from | query | optional | string | The series of data returned starts from this timestamp. Defaults to 24 hours ago. |
| to | query | optional | string | The series of data returned ends at this timestamp. Defaults to the current time. |
GET /api/v2/usage/events/{type}
/api/v2/usage/experimentation-keys
Get a time-series array of the number of monthly experimentation keys from your account. The granularity is always daily, with a maximum of 31 days.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| from | query | optional | string | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. |
| to | query | optional | string | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. |
GET /api/v2/usage/experimentation-keys
/api/v2/usage/experimentation-units
Get a time-series array of the number of monthly experimentation units from your account. The granularity is always daily, with a maximum of 31 days.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| from | query | optional | string | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. |
| to | query | optional | string | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. |
GET /api/v2/usage/experimentation-units
/api/v2/usage/mau
Get a time-series array of the number of monthly active users (MAU) seen by LaunchDarkly from your account. The granularity is always daily.<br/><br/>Endpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read [Account usage metrics](https://docs.launchdarkly.com/home/billing/usage-metrics).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| from | query | optional | string | The series of data returned starts from this timestamp. Defaults to 30 days ago. |
| to | query | optional | string | The series of data returned ends at this timestamp. Defaults to the current time. |
| project | query | optional | string | A project key to filter results to. Can be specified multiple times, one query parameter per project key, to view data for multiple projects. |
| environment | query | optional | string | An environment key to filter results to. When using this parameter, exactly one project key must also be set. Can be specified multiple times as separate query parameters to view data for multiple environments within a single project. |
| sdktype | query | optional | string | An SDK type to filter results to. Can be specified multiple times, one query parameter per SDK type. Valid values: client, server |
| sdk | query | optional | string | An SDK name to filter results to. Can be specified multiple times, one query parameter per SDK. |
| anonymous | query | optional | string | If specified, filters results to either anonymous or nonanonymous users. |
| groupby | query | optional | string | If specified, returns data for each distinct value of the given field. Can be specified multiple times to group data by multiple dimensions (for example, to group by both project and SDK). Valid values: project, environment, sdktype, sdk, anonymous |
GET /api/v2/usage/mau
/api/v2/usage/mau/bycategory
Get time-series arrays of the number of monthly active users (MAU) seen by LaunchDarkly from your account, broken down by the category of users. The category is either `browser`, `mobile`, or `backend`.<br/><br/>Endpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read [Account usage metrics](https://docs.launchdarkly.com/home/billing/usage-metrics).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| from | query | optional | string | The series of data returned starts from this timestamp. Defaults to 30 days ago. |
| to | query | optional | string | The series of data returned ends at this timestamp. Defaults to the current time. |
GET /api/v2/usage/mau/bycategory
/api/v2/usage/mau/sdks
Get a list of SDKs. These are all of the SDKs that have connected to LaunchDarkly by monthly active users (MAU) in the requested time period.<br/><br/>Endpoints for retrieving monthly active users (MAU) do not return information about active context instances. After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should not rely on this endpoint. To learn more, read [Account usage metrics](https://docs.launchdarkly.com/home/billing/usage-metrics).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| from | query | optional | string | The data returned starts from this timestamp. Defaults to seven days ago. The timestamp is in Unix milliseconds, for example, 1656694800000. |
| to | query | optional | string | The data returned ends at this timestamp. Defaults to the current time. The timestamp is in Unix milliseconds, for example, 1657904400000. |
| sdktype | query | optional | string | The type of SDK with monthly active users (MAU) to list. Must be either `client` or `server`. |
GET /api/v2/usage/mau/sdks
/api/v2/usage/service-connections
Get a time-series array of the number of monthly service connections from your account. The granularity is always daily, with a maximum of 31 days.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| from | query | optional | string | The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month. |
| to | query | optional | string | The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time. |
GET /api/v2/usage/service-connections
/api/v2/usage/streams/{source}
Get a time-series array of the number of streaming connections to LaunchDarkly in each time period. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| source | path | required | string | The source of streaming connections to describe. Must be either `client` or `server`. |
| from | query | optional | string | The series of data returned starts from this timestamp. Defaults to 30 days ago. |
| to | query | optional | string | The series of data returned ends at this timestamp. Defaults to the current time. |
| tz | query | optional | string | The timezone to use for breaks between days when returning daily data. |
GET /api/v2/usage/streams/{source}
/api/v2/usage/streams/{source}/bysdkversion
Get multiple series of the number of streaming connections to LaunchDarkly in each time period, separated by SDK type and version. Information about each series is in the metadata array. The granularity of the data depends on the age of the data requested. If the requested range is within the past 2 hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| source | path | required | string | The source of streaming connections to describe. Must be either `client` or `server`. |
| from | query | optional | string | The series of data returned starts from this timestamp. Defaults to 24 hours ago. |
| to | query | optional | string | The series of data returned ends at this timestamp. Defaults to the current time. |
| tz | query | optional | string | The timezone to use for breaks between days when returning daily data. |
| sdk | query | optional | string | If included, this filters the returned series to only those that match this SDK name. |
| version | query | optional | string | If included, this filters the returned series to only those that match this SDK version. |
GET /api/v2/usage/streams/{source}/bysdkversion
/api/v2/usage/streams/{source}/sdkversions
Get a list of SDK version objects, which contain an SDK name and version. These are all of the SDKs that have connected to LaunchDarkly from your account in the past 60 days.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| source | path | required | string | The source of streaming connections to describe. Must be either `client` or `server`. |
GET /api/v2/usage/streams/{source}/sdkversions
/api/v2/applications
Get a list of applications. ### Expanding the applications response LaunchDarkly supports expanding the "Get applications" response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `flags` includes details on the flags that have been evaluated by the application For example, use `?expand=flags` to include the `flags` field in the response. By default, this field is **not** included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| filter | query | optional | string | Accepts filter by `key`, `name`, `kind`, and `autoAdded`. Example: `filter=kind anyOf ['mobile', 'server'],key equals 'test-key'`. To learn more about the filter syntax, read [Filtering applications and application versions](https://apidocs.launchdarkly.com)#filtering-contexts-and-context-instances). |
| limit | query | optional | integer | The number of applications to return. Defaults to 10. |
| offset | query | optional | integer | 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 items in the list, up to the query `limit`. |
| sort | query | optional | string | Accepts sorting order and fields. Fields can be comma separated. Possible fields are `creationDate`, `name`. Examples: `sort=name` sort by names ascending, `sort=-name,creationDate` sort by names descending and creationDate ascending. |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. Options: `flags`. |
GET /api/v2/applications
/api/v2/applications/{applicationKey}
Delete an application.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| applicationKey | path | required | string | The application key |
DELETE /api/v2/applications/{applicationKey}
/api/v2/applications/{applicationKey}
Retrieve an application by the application key. ### Expanding the application response LaunchDarkly supports expanding the "Get application" response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `flags` includes details on the flags that have been evaluated by the application For example, use `?expand=flags` to include the `flags` field in the response. By default, this field is **not** included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| applicationKey | path | required | string | The application key |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. Options: `flags`. |
GET /api/v2/applications/{applicationKey}
/api/v2/applications/{applicationKey}
Update an application. You can update the `description` and `kind` fields. Requires a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes to the application. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| applicationKey | path | required | string | The application key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/description",
"value": "Updated description"
}
]
}
},
"required": true
}
PATCH /api/v2/applications/{applicationKey}
/api/v2/applications/{applicationKey}/versions
Get a list of versions for a specific application in an account.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| filter | query | optional | string | Accepts filter by `key`, `name`, `supported`, and `autoAdded`. Example: `filter=key equals 'test-key'`. To learn more about the filter syntax, read [Filtering applications and application versions](https://apidocs.launchdarkly.com)#filtering-contexts-and-context-instances). |
| applicationKey | path | required | string | The application key |
| limit | query | optional | integer | The number of versions to return. Defaults to 50. |
| offset | query | optional | integer | 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 items in the list, up to the query `limit`. |
| sort | query | optional | string | Accepts sorting order and fields. Fields can be comma separated. Possible fields are `creationDate`, `name`. Examples: `sort=name` sort by names ascending, `sort=-name,creationDate` sort by names descending and creationDate ascending. |
GET /api/v2/applications/{applicationKey}/versions
/api/v2/applications/{applicationKey}/versions/{versionKey}
Delete an application version.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| applicationKey | path | required | string | The application key |
| versionKey | path | required | string | The application version key |
DELETE /api/v2/applications/{applicationKey}/versions/{versionKey}
/api/v2/applications/{applicationKey}/versions/{versionKey}
Update an application version. You can update the `supported` field. Requires a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes to the application version. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| applicationKey | path | required | string | The application key |
| versionKey | path | required | string | The application version key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/supported",
"value": "false"
}
]
}
},
"required": true
}
PATCH /api/v2/applications/{applicationKey}/versions/{versionKey}
/api/v2/approval-requests
Get all approval requests. ### Filtering approvals LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf ["memberId1", "memberId2"]`. - `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`. - `resourceId` filters for only approvals that correspond to the the specified resource identifier. For example: `filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag`. - `reviewStatus` filters for only approvals which correspond to the review status in the specified list. The possible values are `approved`, `declined`, and `pending`. For example: `filter=reviewStatus anyOf ["pending", "approved"]`. - `status` filters for only approvals which correspond to the status in the specified list. The possible values are `pending`, `scheduled`, `failed`, and `completed`. For example: `filter=status anyOf ["pending", "scheduled"]`. You can also apply multiple filters at once. For example, setting `filter=projectKey equals my-project, reviewStatus anyOf ["pending","approved"]` matches approval requests which correspond to the `my-project` project key, and a review status of either `pending` or `approved`. ### Expanding approval response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `flag` includes the flag the approval request belongs to - `project` includes the project the approval request belongs to - `environments` includes the environments the approval request relates to For example, `expand=project,flag` includes the `project` and `flag` fields in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| filter | query | optional | string | A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above. |
| expand | query | optional | string | A comma-separated list of fields to expand in the response. Supported fields are explained above. |
| limit | query | optional | integer | The number of approvals to return. Defaults to 20. Maximum limit is 200. |
| offset | query | optional | integer | 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 items in the list, up to the query `limit`. |
GET /api/v2/approval-requests
/api/v2/approval-requests
Create an approval request. This endpoint currently supports creating an approval request for a flag across all environments with the following instructions: - `addVariation` - `removeVariation` - `updateVariation` - `updateDefaultVariation` For details on using these instructions, read [Update feature flag](https://apidocs.launchdarkly.com). To create an approval for a flag specific to an environment, use [Create approval request for a flag](https://apidocs.launchdarkly.com).
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/createApprovalRequestRequest"
}
}
},
"required": true
}
POST /api/v2/approval-requests
/api/v2/approval-requests/{id}
Delete an approval request.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The approval request ID |
DELETE /api/v2/approval-requests/{id}
/api/v2/approval-requests/{id}
Get an approval request by approval request ID. ### Expanding approval response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `flag` includes the flag the approval request belongs to - `project` includes the project the approval request belongs to - `environments` includes the environments the approval request relates to For example, `expand=project,flag` includes the `project` and `flag` fields in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The approval request ID |
| expand | query | optional | string | A comma-separated list of fields to expand in the response. Supported fields are explained above. |
GET /api/v2/approval-requests/{id}
/api/v2/approval-requests/{id}/apply
Apply an approval request that has been approved.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The feature flag approval request ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/postApprovalRequestApplyRequest"
}
}
},
"required": true
}
POST /api/v2/approval-requests/{id}/apply
/api/v2/approval-requests/{id}/reviews
Review an approval request by approving or denying changes.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The approval request ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/postApprovalRequestReviewRequest"
}
}
},
"required": true
}
POST /api/v2/approval-requests/{id}/reviews
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests
Get all approval requests for a feature flag.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests
Create an approval request for a feature flag.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/createFlagConfigApprovalRequestRequest"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests-flag-copy
Create an approval request to copy a feature flag's configuration across environments.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key for the target environment |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/createCopyFlagConfigApprovalRequestRequest"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests-flag-copy
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}
Delete an approval request for a feature flag.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The feature flag approval request ID |
DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}
Get a single approval request for a feature flag.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The feature flag approval request ID |
GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/apply
Apply an approval request that has been approved.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The feature flag approval request ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/postApprovalRequestApplyRequest"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/apply
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/reviews
Review an approval request by approving or denying changes.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The feature flag approval request ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/postApprovalRequestReviewRequest"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/reviews
/api/v2/auditlog
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. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [Understanding the resource specifier syntax](https://docs.launchdarkly.com/home/members/role-resources#understanding-the-resource-specifier-syntax).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| before | query | optional | integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred before the timestamp. |
| after | query | optional | integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred after the timestamp. |
| q | query | optional | string | Text to search for. You can search for the full or partial name of the resource. |
| limit | query | optional | integer | A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. |
| spec | query | optional | string | A resource specifier that lets you filter audit log listings by resource |
GET /api/v2/auditlog
/api/v2/auditlog/{id}
Fetch a detailed audit log entry representation. The detailed representation includes several fields that are not present in the summary representation, including: - `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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The ID of the audit log entry |
GET /api/v2/auditlog/{id}
/api/v2/code-refs/extinctions
Get a list of all extinctions. LaunchDarkly creates an extinction event after you remove all code references to a flag. To learn more, read [Understanding extinction events](https://docs.launchdarkly.com/home/code/code-references#understanding-extinction-events).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repoName | query | optional | string | Filter results to a specific repository |
| branchName | query | optional | string | Filter results to a specific branch. By default, only the default branch will be queried for extinctions. |
| projKey | query | optional | string | Filter results to a specific project |
| flagKey | query | optional | string | Filter results to a specific flag key |
| from | query | optional | integer | Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with `to`. |
| to | query | optional | integer | Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with `from`. |
GET /api/v2/code-refs/extinctions
/api/v2/code-refs/repositories
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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| withBranches | query | optional | string | If set to any value, the endpoint returns repositories with associated branch data |
| withReferencesForDefaultBranch | query | optional | string | If set to any value, the endpoint returns repositories with associated branch data, as well as code references for the default git branch |
| projKey | query | optional | string | A LaunchDarkly project key. If provided, this filters code reference results to the specified project. |
| flagKey | query | optional | string | If set to any value, the endpoint returns repositories with associated branch data, as well as code references for the default git branch |
GET /api/v2/code-refs/repositories
/api/v2/code-refs/repositories
Create a repository with the specified name.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/repositoryPost"
}
}
},
"required": true
}
POST /api/v2/code-refs/repositories
/api/v2/code-refs/repositories/{repo}
Delete a repository with the specified name.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repo | path | required | string | The repository name |
DELETE /api/v2/code-refs/repositories/{repo}
/api/v2/code-refs/repositories/{repo}
Get a single repository by name.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repo | path | required | string | The repository name |
GET /api/v2/code-refs/repositories/{repo}
/api/v2/code-refs/repositories/{repo}
Update a repository's settings. Updating repository settings uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repo | path | required | string | The repository name |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/defaultBranch",
"value": "main"
}
]
}
},
"required": true
}
PATCH /api/v2/code-refs/repositories/{repo}
/api/v2/code-refs/repositories/{repo}/branch-delete-tasks
Asynchronously delete a number of branches.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repo | path | required | string | The repository name to delete branches for. |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CodeReferencesAsynchronouslyDeleteBranchesRequest"
},
"example": [
"branch-to-be-deleted",
"another-branch-to-be-deleted"
]
}
},
"required": true
}
POST /api/v2/code-refs/repositories/{repo}/branch-delete-tasks
/api/v2/code-refs/repositories/{repo}/branches
Get a list of branches.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repo | path | required | string | The repository name |
GET /api/v2/code-refs/repositories/{repo}/branches
/api/v2/code-refs/repositories/{repo}/branches/{branch}
Get a specific branch in a repository.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repo | path | required | string | The repository name |
| branch | path | required | string | The url-encoded branch name |
| projKey | query | optional | string | Filter results to a specific project |
| flagKey | query | optional | string | Filter results to a specific flag key |
GET /api/v2/code-refs/repositories/{repo}/branches/{branch}
/api/v2/code-refs/repositories/{repo}/branches/{branch}
Create a new branch if it doesn't exist, or update the branch if it already exists.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repo | path | required | string | The repository name |
| branch | path | required | string | The URL-encoded branch name |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/putBranch"
}
}
},
"required": true
}
PUT /api/v2/code-refs/repositories/{repo}/branches/{branch}
/api/v2/code-refs/repositories/{repo}/branches/{branch}/extinction-events
Create a new extinction.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repo | path | required | string | The repository name |
| branch | path | required | string | The URL-encoded branch name |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExtinctionListPost"
}
}
},
"required": true
}
POST /api/v2/code-refs/repositories/{repo}/branches/{branch}/extinction-events
/api/v2/code-refs/statistics
Get links for all projects that have code references.
GET /api/v2/code-refs/statistics
/api/v2/code-refs/statistics/{projectKey}
Get statistics about all the code references across repositories for all flags in your project that have code references in the default branch, for example, `main`. Optionally, you can include the `flagKey` query parameter to limit your request to statistics about code references for a single flag. This endpoint returns the number of references to your flag keys in your repositories, as well as a link to each repository.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| flagKey | query | optional | string | Filter results to a specific flag key |
GET /api/v2/code-refs/statistics/{projectKey}
/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{contextKind}/{contextKey}/flags/{featureFlagKey}
Enable or disable a feature flag for a context based on its context kind and key. Omitting the `setting` attribute from the request body, or including a `setting` of `null`, erases the current setting for a context. If you previously patched the flag, and the patch included the context's data, LaunchDarkly continues to use that data. If LaunchDarkly has never encountered the combination of the context's key and kind before, it calculates the flag values based on the context kind and key.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| contextKind | path | required | string | The context kind |
| contextKey | path | required | string | The context key |
| featureFlagKey | path | required | string | The feature flag key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValuePut"
}
}
},
"required": true
}
PUT /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{contextKind}/{contextKey}/flags/{featureFlagKey}
/api/v2/projects/{projectKey}/context-kinds
Get all context kinds for a given project.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
GET /api/v2/projects/{projectKey}/context-kinds
/api/v2/projects/{projectKey}/context-kinds/{key}
Create or update a context kind by key. Only the included fields will be updated.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| key | path | required | string | The context kind key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpsertContextKindPayload"
}
}
},
"required": true
}
PUT /api/v2/projects/{projectKey}/context-kinds/{key}
/api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes
Get context attribute names. Returns only the first 100 attribute names per context.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| filter | query | optional | string | A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `name` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://apidocs.launchdarkly.com). |
GET /api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes
/api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes/{attributeName}
Get context attribute values.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| attributeName | path | required | string | The attribute name |
| filter | query | optional | string | A comma-separated list of context filters. This endpoint only accepts `kind` filters, with the `equals` operator, and `value` filters, with the `startsWith` operator. To learn more about the filter syntax, read [Filtering contexts and context instances](https://apidocs.launchdarkly.com). |
GET /api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes/{attributeName}
/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search
Search for context instances. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://apidocs.launchdarkly.com). To learn more about context instances, read [Understanding context instances](https://docs.launchdarkly.com/home/contexts#understanding-context-instances).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| limit | query | optional | integer | Specifies the maximum number of items in the collection to return (max: 50, default: 20) |
| continuationToken | query | optional | string | Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. |
| sort | query | optional | string | Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`. |
| filter | query | optional | string | A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://apidocs.launchdarkly.com). |
| includeTotalCount | query | optional | boolean | Specifies whether to include or omit the total count of matching context instances. Defaults to true. |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContextInstanceSearch"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search
/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}
Delete context instances by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The context instance ID |
DELETE /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}
/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}
Get context instances by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The context instance ID |
| limit | query | optional | integer | Specifies the maximum number of context instances to return (max: 50, default: 20) |
| continuationToken | query | optional | string | Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. |
| sort | query | optional | string | Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`. |
| filter | query | optional | string | A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://apidocs.launchdarkly.com). |
| includeTotalCount | query | optional | boolean | Specifies whether to include or omit the total count of matching context instances. Defaults to true. |
GET /api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}
/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/search
Search for contexts. You can use either the query parameters or the request body parameters. If both are provided, there is an error. To learn more about the filter syntax, read [Filtering contexts and context instances](https://apidocs.launchdarkly.com). To learn more about contexts, read [Understanding contexts and context kinds](https://docs.launchdarkly.com/home/contexts#understanding-contexts-and-context-kinds).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| limit | query | optional | integer | Specifies the maximum number of items in the collection to return (max: 50, default: 20) |
| continuationToken | query | optional | string | Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. |
| sort | query | optional | string | Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`. |
| filter | query | optional | string | A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts and context instances](https://apidocs.launchdarkly.com). |
| includeTotalCount | query | optional | boolean | Specifies whether to include or omit the total count of matching contexts. Defaults to true. |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContextSearch"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/search
/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{kind}/{key}
Get contexts based on kind and key.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| kind | path | required | string | The context kind |
| key | path | required | string | The context key |
| limit | query | optional | integer | Specifies the maximum number of items in the collection to return (max: 50, default: 20) |
| continuationToken | query | optional | string | Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the `next` link we provide instead. |
| sort | query | optional | string | Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying `ts` for this value, or descending order by specifying `-ts`. |
| filter | query | optional | string | A comma-separated list of context filters. This endpoint only accepts an `applicationId` filter. To learn more about the filter syntax, read [Filtering contexts and context instances](https://apidocs.launchdarkly.com). |
| includeTotalCount | query | optional | boolean | Specifies whether to include or omit the total count of matching contexts. Defaults to true. |
GET /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{kind}/{key}
/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate
Evaluate flags for a context instance, for example, to determine the expected flag variation. **Do not use this API instead of an SDK.** The LaunchDarkly SDKs are specialized for the tasks of evaluating feature flags in your application at scale and generating analytics events based on those evaluations. This API is not designed for that use case. Any evaluations you perform with this API will not be reflected in features such as flag statuses and flag insights. Context instances evaluated by this API will not appear in the Contexts list. To learn more, read [Comparing LaunchDarkly's SDKs and REST API](https://docs.launchdarkly.com/guide/api/comparing-sdk-rest-api). ### Filtering LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `query` filters for a string that matches against the flags' keys and names. It is not case sensitive. For example: `filter=query equals dark-mode`. - `tags` filters the list to flags that have all of the tags in the list. For example: `filter=tags contains ["beta","q1"]`. You can also apply multiple filters at once. For example, setting `filter=query equals dark-mode, tags contains ["beta","q1"]` matches flags which match the key or name `dark-mode` and are tagged `beta` and `q1`.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| limit | query | optional | integer | The number of feature flags to return. Defaults to -1, which returns all flags |
| offset | query | optional | integer | 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 items in the list, up to the query `limit`. |
| sort | query | optional | string | A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order |
| filter | query | optional | string | A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above. |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContextInstance"
},
"example": {
"key": "user-key-123abc",
"kind": "user",
"otherAttribute": "other attribute value"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate
/api/v2/roles
Get a complete list of custom roles. Custom roles let you create flexible policies providing fine-grained access control to everything in LaunchDarkly, from feature flags to goals, environments, and teams. With custom roles, it's possible to enforce access policies that meet your exact workflow needs. Custom roles are available to customers on our enterprise plans. If you're interested in learning more about our enterprise plans, contact sales@launchdarkly.com.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | The maximum number of custom roles to return. Defaults to 20. |
| offset | query | optional | integer | Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. |
GET /api/v2/roles
/api/v2/roles
Create a new custom role
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomRolePost"
},
"example": {
"key": "role-key-123abc",
"name": "Ops team",
"policy": [
{
"effect": "allow",
"actions": [
"updateOn"
],
"resources": [
"proj/*:env/production:flag/*"
]
}
],
"description": "An example role for members of the ops team",
"basePermissions": "reader"
}
}
},
"required": true
}
POST /api/v2/roles
/api/v2/roles/{customRoleKey}
Delete a custom role by key
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customRoleKey | path | required | string | The custom role key |
DELETE /api/v2/roles/{customRoleKey}
/api/v2/roles/{customRoleKey}
Get a single custom role by key or ID
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customRoleKey | path | required | string | The custom role key or ID |
GET /api/v2/roles/{customRoleKey}
/api/v2/roles/{customRoleKey}
Update a single custom role. Updating a custom role uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).<br/><br/>To add an element to the `policy` array, set the `path` to `/policy` and then append `/<array index>`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customRoleKey | path | required | string | The custom role key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PatchWithComment"
},
"example": {
"patch": [
{
"op": "add",
"path": "/policy/0",
"value": {
"effect": "allow",
"actions": [
"updateOn"
],
"resources": [
"proj/*:env/qa:flag/*"
]
}
}
]
}
}
},
"required": true
}
PATCH /api/v2/roles/{customRoleKey}
/api/v2/destinations
Get a list of Data Export destinations configured across all projects and environments.
GET /api/v2/destinations
/api/v2/destinations/{projectKey}/{environmentKey}
Create a new Data Export destination. In the `config` request body parameter, the fields required depend on the type of Data Export destination. <details> <summary>Click to expand <code>config</code> parameter details</summary> #### Azure Event Hubs To create a Data Export destination with a `kind` of `azure-event-hubs`, the `config` object requires the following fields: * `namespace`: The Event Hub Namespace name * `name`: The Event Hub name * `policyName`: The shared access signature policy name. You can find your policy name in the settings of your Azure Event Hubs Namespace. * `policyKey`: The shared access signature key. You can find your policy key in the settings of your Azure Event Hubs Namespace. #### Google Cloud Pub/Sub To create a Data Export destination with a `kind` of `google-pubsub`, the `config` object requires the following fields: * `project`: The Google PubSub project ID for the project to publish to * `topic`: The Google PubSub topic ID for the topic to publish to #### Amazon Kinesis To create a Data Export destination with a `kind` of `kinesis`, the `config` object requires the following fields: * `region`: The Kinesis stream's AWS region key * `roleArn`: The Amazon Resource Name (ARN) of the AWS role that will be writing to Kinesis * `streamName`: The name of the Kinesis stream that LaunchDarkly is sending events to. This is not the ARN of the stream. #### mParticle To create a Data Export destination with a `kind` of `mparticle`, the `config` object requires the following fields: * `apiKey`: The mParticle API key * `secret`: The mParticle API secret * `userIdentity`: The type of identifier you use to identify your end users in mParticle * `anonymousUserIdentity`: The type of identifier you use to identify your anonymous end users in mParticle #### Segment To create a Data Export destination with a `kind` of `segment`, the `config` object requires the following fields: * `writeKey`: The Segment write key. This is used to authenticate LaunchDarkly's calls to Segment. </details>
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DestinationPost"
},
"example": {
"kind": "google-pubsub",
"config": {
"topic": "ld-pubsub-test-192301",
"project": "test-prod"
}
}
}
},
"required": true
}
POST /api/v2/destinations/{projectKey}/{environmentKey}
/api/v2/destinations/{projectKey}/{environmentKey}/{id}
Delete a Data Export destination by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The Data Export destination ID |
DELETE /api/v2/destinations/{projectKey}/{environmentKey}/{id}
/api/v2/destinations/{projectKey}/{environmentKey}/{id}
Get a single Data Export destination by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The Data Export destination ID |
GET /api/v2/destinations/{projectKey}/{environmentKey}/{id}
/api/v2/destinations/{projectKey}/{environmentKey}/{id}
Update a Data Export destination. Updating a destination uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The Data Export destination ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/config/topic",
"value": "ld-pubsub-test-192302"
}
]
}
},
"required": true
}
PATCH /api/v2/destinations/{projectKey}/{environmentKey}/{id}
/api/v2/projects/{projectKey}/environments
Return a list of environments for the specified project. By default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, 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, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering environments LaunchDarkly supports two fields for filters: - `query` is a string that matches against the environments' names and keys. It is not case sensitive. - `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list. For example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive. The documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`. ### Sorting environments LaunchDarkly supports the following fields for sorting: - `createdOn` sorts by the creation date of the environment. - `critical` sorts by whether the environments are marked as critical. - `name` sorts by environment name. For example, `sort=name` sorts the response by environment name in ascending order.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| limit | query | optional | integer | The number of environments to return in the response. Defaults to 20. |
| offset | query | optional | integer | Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. |
| filter | query | optional | string | A comma-separated list of filters. Each filter is of the form `field:value`. |
| sort | query | optional | string | A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order. |
GET /api/v2/projects/{projectKey}/environments
/api/v2/projects/{projectKey}/environments
> ### Approval settings > > The `approvalSettings` key is only returned when the Flag Approvals feature is enabled. > > You cannot update approval settings when creating new environments. Update approval settings with the PATCH Environment API. Create a new environment in a specified project with a given name, key, swatch color, and default TTL.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EnvironmentPost"
},
"example": {
"key": "environment-key-123abc",
"name": "My Environment",
"color": "DADBEE"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/environments
/api/v2/projects/{projectKey}/environments/{environmentKey}
Delete a environment by key.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
DELETE /api/v2/projects/{projectKey}/environments/{environmentKey}
/api/v2/projects/{projectKey}/environments/{environmentKey}
> ### Approval settings > > The `approvalSettings` key is only returned when the Flag Approvals feature is enabled. Get an environment given a project and key.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
GET /api/v2/projects/{projectKey}/environments/{environmentKey}
/api/v2/projects/{projectKey}/environments/{environmentKey}
Update an environment. Updating an environment uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com). To update fields in the environment object that are arrays, set the `path` to the name of the field and then append `/<array index>`. Using `/0` appends to the beginning of the array. ### Approval settings This request only returns the `approvalSettings` key if the [Flag Approvals](https://docs.launchdarkly.com/home/feature-workflows/approvals) feature is enabled. Only the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable. If you try to patch the environment by setting both `required` and `requiredApprovalTags`, the request fails and an error appears. You can specify either required approvals for all flags in an environment or those with specific tags, but not both.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/requireComments",
"value": true
}
]
}
},
"required": true
}
PATCH /api/v2/projects/{projectKey}/environments/{environmentKey}
/api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey
Reset an environment's SDK key with an optional expiry time for the old key.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| expiry | query | optional | integer | The time at which you want the old SDK key to expire, in UNIX milliseconds. By default, the key expires immediately. During the period between this call and the time when the old SDK key expires, both the old SDK key and the new SDK key will work. |
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey
/api/v2/projects/{projectKey}/environments/{environmentKey}/mobileKey
Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/mobileKey
/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments
Get details about all experiments in an environment. ### Filtering experiments LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `flagKey` filters for only experiments that use the flag with the given key. - `metricKey` filters for only experiments that use the metric with the given key. - `status` filters for only experiments with an iteration with the given status. An iteration can have the status `not_started`, `running` or `stopped`. For example, `filter=flagKey:my-flag,status:running,metricKey:page-load-ms` filters for experiments for the given flag key and the given metric key which have a currently running iteration. ### Expanding the experiments response LaunchDarkly supports four fields for expanding the "Get experiments" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: - `previousIterations` includes all iterations prior to the current iteration. By default only the current iteration is included in the response. - `draftIteration` includes the iteration which has not been started yet, if any. - `secondaryMetrics` includes secondary metrics. By default only the primary metric is included in the response. - `treatments` includes all treatment and parameter details. By default treatment data is not included in the response. For example, `expand=draftIteration,treatments` includes the `draftIteration` and `treatments` fields in the response. If fields that you request with the `expand` query parameter are empty, they are not included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| limit | query | optional | integer | The maximum number of experiments to return. Defaults to 20. |
| offset | query | optional | integer | 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 items in the list, up to the query `limit`. |
| filter | query | optional | string | A comma-separated list of filters. Each filter is of the form `field:value`. Supported fields are explained above. |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. |
| lifecycleState | query | optional | string | A comma-separated list of experiment archived states. Supports `archived`, `active`, or both. Defaults to `active` experiments. |
GET /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments
/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments
Create an experiment. To run this experiment, you'll need to [create an iteration](https://apidocs.launchdarkly.com)#operation/createIteration) and then [update the experiment](https://apidocs.launchdarkly.com)#operation/patchExperiment) with the `startIteration` instruction. To learn more, read [Creating experiments](https://docs.launchdarkly.com/home/creating-experiments).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExperimentPost"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments
/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}
Get details about an experiment. ### Expanding the experiment response LaunchDarkly supports four fields for expanding the "Get experiment" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: - `previousIterations` includes all iterations prior to the current iteration. By default only the current iteration is included in the response. - `draftIteration` includes the iteration which has not been started yet, if any. - `secondaryMetrics` includes secondary metrics. By default only the primary metric is included in the response. - `treatments` includes all treatment and parameter details. By default treatment data is not included in the response. For example, `expand=draftIteration,treatments` includes the `draftIteration` and `treatments` fields in the response. If fields that you request with the `expand` query parameter are empty, they are not included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| experimentKey | path | required | string | The experiment key |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. |
GET /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}
/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}
Update an experiment. Updating an experiment uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://apidocs.launchdarkly.com). ### Instructions Semantic patch requests support the following `kind` instructions for updating experiments. #### updateName Updates the experiment name. ##### Parameters - `value`: The new name. Here's an example: ```json { "instructions": [{ "kind": "updateName", "value": "Example updated experiment name" }] } ``` #### updateDescription Updates the experiment description. ##### Parameters - `value`: The new description. Here's an example: ```json { "instructions": [{ "kind": "updateDescription", "value": "Example updated description" }] } ``` #### startIteration Starts a new iteration for this experiment. You must [create a new iteration](https://apidocs.launchdarkly.com)#operation/createIteration) before calling this instruction. An iteration may not be started until it meets the following criteria: * Its associated flag is toggled on and is not archived * Its `randomizationUnit` is set * At least one of its `treatments` has a non-zero `allocationPercent` ##### Parameters - `changeJustification`: The reason for starting a new iteration. Required when you call `startIteration` on an already running experiment, otherwise optional. Here's an example: ```json { "instructions": [{ "kind": "startIteration", "changeJustification": "It's time to start a new iteration" }] } ``` #### stopIteration Stops the current iteration for this experiment. ##### Parameters - `winningTreatmentId`: The ID of the winning treatment. Treatment IDs are returned as part of the [Get experiment](https://apidocs.launchdarkly.com)#operation/getExperiment) response. They are the `_id` of each element in the `treatments` array. - `winningReason`: The reason for the winner Here's an example: ```json { "instructions": [{ "kind": "stopIteration", "winningTreatmentId": "3a548ec2-72ac-4e59-8518-5c24f5609ccf", "winningReason": "Example reason to stop the iteration" }] } ``` #### archiveExperiment Archives this experiment. Archived experiments are hidden by default in the LaunchDarkly user interface. You cannot start new iterations for archived experiments. Here's an example: ```json { "instructions": [{ "kind": "archiveExperiment" }] } ``` #### restoreExperiment Restores an archived experiment. After restoring an experiment, you can start new iterations for it again. Here's an example: ```json { "instructions": [{ "kind": "restoreExperiment" }] } ```
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| experimentKey | path | required | string | The experiment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExperimentPatchInput"
},
"example": {
"comment": "Example comment describing the update",
"instructions": [
{
"kind": "updateName",
"value": "Updated experiment name"
}
]
}
}
},
"required": true
}
PATCH /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}
/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/iterations
Create an experiment iteration. Experiment iterations let you record experiments in individual blocks of time. Initially, iterations are created with a status of `not_started` and appear in the `draftIteration` field of an experiment. To start or stop an iteration, [update the experiment](https://apidocs.launchdarkly.com)#operation/patchExperiment) with the `startIteration` or `stopIteration` instruction. To learn more, read [Starting experiment iterations](https://docs.launchdarkly.com/home/creating-experiments#starting-experiment-iterations).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| experimentKey | path | required | string | The experiment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IterationInput"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/iterations
/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metric-groups/{metricGroupKey}/results
Get results from an experiment for a particular metric group.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| experimentKey | path | required | string | The experiment key |
| metricGroupKey | path | required | string | The metric group key |
| iterationId | query | optional | string | The iteration ID |
GET /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metric-groups/{metricGroupKey}/results
/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metrics/{metricKey}/results
Get results from an experiment for a particular metric. LaunchDarkly supports one field for expanding the "Get experiment results" response. By default, this field is **not** included in the response. To expand the response, append the `expand` query parameter with the following field: * `traffic` includes the total count of units for each treatment. For example, `expand=traffic` includes the `traffic` field for the project in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| experimentKey | path | required | string | The experiment key |
| metricKey | path | required | string | The metric key |
| iterationId | query | optional | string | The iteration ID |
| expand | query | optional | string | A comma-separated list of fields to expand in the response. Supported fields are explained above. |
GET /api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metrics/{metricKey}/results
/api/v2/projects/{projectKey}/experimentation-settings
Get current experimentation settings for the given project
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
GET /api/v2/projects/{projectKey}/experimentation-settings
/api/v2/projects/{projectKey}/experimentation-settings
Update experimentation settings for the given project
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RandomizationSettingsPut"
}
}
},
"required": true
}
PUT /api/v2/projects/{projectKey}/experimentation-settings
/api/v2/flag-status/{projectKey}/{featureFlagKey}
Get the status for a particular feature flag across environments.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| env | query | optional | string | Optional environment filter |
GET /api/v2/flag-status/{projectKey}/{featureFlagKey}
/api/v2/flag-statuses/{projectKey}/{environmentKey}
Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as a state, which is one of the following: - `new`: You created the flag fewer than seven days ago and it has never been requested. - `active`: LaunchDarkly is receiving requests for this flag, but there are either multiple variations configured, or it is toggled off, or there have been changes to configuration in the past seven days. - `inactive`: You created the feature flag more than seven days ago, and hasn't been requested within the past seven days. - `launched`: LaunchDarkly is receiving requests for this flag, it is toggled on, there is only one variation configured, and there have been no changes to configuration in the past seven days. To learn more, read [Flag statuses](https://docs.launchdarkly.com/home/code/flag-status).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
GET /api/v2/flag-statuses/{projectKey}/{environmentKey}
/api/v2/flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey}
Get the status for a particular feature flag.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| featureFlagKey | path | required | string | The feature flag key |
GET /api/v2/flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey}
/api/v2/flags/{projectKey}
Get a list of all feature flags in the given project. By default, each flag 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. > #### Recommended use > > This endpoint can return a large amount of information. We recommend using some or all of these query parameters to decrease response time and overall payload size: `limit`, `env`, `query`, and `filter=creationDate`. ### Filtering flags You can filter on certain fields using the `filter` query parameter. For example, setting `filter=query:dark-mode,tags:beta+test` matches flags with the string `dark-mode` in their key or name, ignoring case, which also have the tags `beta` and `test`. The `filter` query parameter supports the following arguments: | Filter argument | Description | Example | |-----------------------|-------------|----------------------| | `applicationEvaluated` | A string. It filters the list to flags that are evaluated in the application with the given key. | `filter=applicationEvaluated:com.launchdarkly.cafe` | | `archived` | (deprecated) A boolean value. It filters the list to archived flags. | Use `filter=state:archived` instead | | `contextKindsEvaluated` | A `+`-separated list of context kind keys. It filters the list to flags which have been evaluated in the past 30 days for all of the context kinds in the list. | `filter=contextKindsEvaluated:user+application` | | `codeReferences.max` | An integer value. Use `0` to return flags that do not have code references. | `filter=codeReferences.max:0` | | `codeReferences.min` | An integer value. Use `1` to return flags that do have code references. | `filter=codeReferences.min:1` | | `creationDate` | An object with an optional `before` field whose value is Unix time in milliseconds. It filters the list to flags created before the date. | `filter=creationDate:{"before":1690527600000}` | | `evaluated` | An object that contains a key of `after` and a value in Unix time in milliseconds. It filters the list to all flags that have been evaluated since the time you specify, in the environment provided. This filter requires the `filterEnv` filter. | `filter=evaluation:{"after":1690527600000}` | | `filterEnv` | A string with a list of comma-separated keys of valid environments. You must use this field for filters that are environment-specific. If there are multiple environment-specific filters, you only need to include this field once. You can filter for a maximum of three environments. | `filter=evaluated:{"after": 1590768455282},filterEnv:production,status:active` | | `hasExperiment` | A boolean value. It filters the list to flags that are used in an experiment. | `filter=hasExperiment:true` | | `maintainerId` | A valid member ID. It filters the list to flags that are maintained by this member. | `filter=maintainerId:12ab3c45de678910abc12345` | | `maintainerTeamKey` | A string. It filters the list to flags that are maintained by the team with this key. | `filter=maintainerTeamKey:example-team-key` | | `query` | A string. It filters the list to flags that include the specified string in their key or name. It is not case sensitive. | `filter=query:example` | | `state` | A string, either `live`, `deprecated`, or `archived`. It filters the list to flags in this state. | `filter=state:archived` | | `sdkAvailability` | A string, one of `client`, `mobile`, `anyClient`, `server`. Using `client` filters the list to flags whose client-side SDK availability is set to use the client-side ID. Using `mobile` filters to flags set to use the mobile key. Using `anyClient` filters to flags set to use either the client-side ID or the mobile key. Using `server` filters to flags set to use neither, that is, to flags only available in server-side SDKs. | `filter=sdkAvailability:client` | | `tags` | A `+`-separated list of tags. It filters the list to flags that have all of the tags in the list. | `filter=tags:beta+test` | | `type` | A string, either `temporary` or `permanent`. It filters the list to flags with the specified type. | `filter=type:permanent` | The documented values for the `filter` query are prior to URL encoding. For example, the `+` in `filter=tags:beta+test` must be encoded to `%2B`. By default, this endpoint 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. ### Sorting flags You can sort flags based on the following fields: - `creationDate` sorts by the creation date of the flag. - `key` sorts by the key of the flag. - `maintainerId` sorts by the flag maintainer. - `name` sorts by flag name. - `tags` sorts by tags. - `targetingModifiedDate` sorts by the date that the flag's targeting rules were last modified in a given environment. It must be used with `env` parameter and it can not be combined with any other sort. If multiple `env` values are provided, it will perform sort using the first one. For example, `sort=-targetingModifiedDate&env=production&env=staging` returns results sorted by `targetingModifiedDate` for the `production` environment. - `type` sorts by flag type All fields are sorted in ascending order by default. To sort in descending order, prefix the field with a dash ( - ). For example, `sort=-name` sorts the response by flag name in descending order. ### Expanding response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `codeReferences` includes code references for the feature flag - `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days - `migrationSettings` includes migration settings information within the flag and within returned environments. These settings are only included for migration flags, that is, where `purpose` is `migration`. For example, `expand=evaluation` includes the `evaluation` field in the response. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag's response, and default cohort information is included in the `fallthrough` property of a flag's response. To learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flag-types/migration-flags).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| env | query | optional | string | Filter configurations by environment |
| tag | query | optional | string | Filter feature flags by tag |
| limit | query | optional | integer | The number of feature flags to return. Defaults to 20. |
| offset | query | optional | integer | 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 items in the list, up to the query `limit`. |
| archived | query | optional | boolean | Deprecated, use `filter=archived:true` instead. A boolean to filter the list to archived flags. When this is absent, only unarchived flags will be returned |
| summary | query | optional | boolean | By default, flags do _not_ include their lists of prerequisites, targets, or rules for each environment. Set `summary=0` to include these fields for each flag returned. |
| filter | query | optional | string | A comma-separated list of filters. Each filter is of the form field:value. Read the endpoint description for a full list of available filter fields. |
| sort | query | optional | string | A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order. Read the endpoint description for a full list of available sort fields. |
| compare | query | optional | boolean | A boolean to filter results by only flags that have differences between environments |
| expand | query | optional | string | A comma-separated list of fields to expand in the response. Supported fields are explained above. |
GET /api/v2/flags/{projectKey}
/api/v2/flags/{projectKey}
Create a feature flag with the given name, key, and variations. <details> <summary>Click to expand instructions for <strong>creating a migration flag</strong></summary> ### Creating a migration flag When you create a migration flag, the variations are pre-determined based on the number of stages in the migration. To create a migration flag, omit the `variations` and `defaults` information. Instead, provide a `purpose` of `migration`, and `migrationSettings`. If you create a migration flag with six stages, `contextKind` is required. Otherwise, it should be omitted. Here's an example: ```json { "key": "flag-key-123", "purpose": "migration", "migrationSettings": { "stageCount": 6, "contextKind": "account" } } ``` To learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flag-types/migration-flags). </details>
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| clone | query | optional | string | 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. |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FeatureFlagBody"
},
"example": {
"key": "flag-key-123abc",
"name": "My Flag",
"clientSideAvailability": {
"usingMobileKey": true,
"usingEnvironmentId": true
}
}
}
},
"required": true
}
POST /api/v2/flags/{projectKey}
/api/v2/flags/{projectKey}/{featureFlagKey}
Delete a feature flag in all environments. Use with caution: only delete feature flags your application no longer uses.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key. The key identifies the flag in your code. |
DELETE /api/v2/flags/{projectKey}/{featureFlagKey}
/api/v2/flags/{projectKey}/{featureFlagKey}
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. > #### Recommended use > > This endpoint can return a large amount of information. Specifying one or multiple environments with the `env` parameter can decrease response time and overall payload size. We recommend using this parameter to return only the environments relevant to your query. ### Expanding response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days - `migrationSettings` includes migration settings information within the flag and within returned environments. These settings are only included for migration flags, that is, where `purpose` is `migration`. For example, `expand=evaluation` includes the `evaluation` field in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| env | query | optional | string | Filter configurations by environment |
| expand | query | optional | string | A comma-separated list of fields to expand in the response. Supported fields are explained above. |
GET /api/v2/flags/{projectKey}/{featureFlagKey}
/api/v2/flags/{projectKey}/{featureFlagKey}
Perform a partial update to a feature flag. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://apidocs.launchdarkly.com). ### Using semantic patches on a feature flag To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://apidocs.launchdarkly.com). The body of a semantic patch request for updating feature flags takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions. ### Instructions Semantic patch requests support the following `kind` instructions for updating feature flags. <details> <summary>Click to expand instructions for <strong>turning flags on and off</strong></summary> These instructions require the `environmentKey` parameter. #### turnFlagOff Sets the flag's targeting state to **Off**. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "turnFlagOff" } ] } ``` #### turnFlagOn Sets the flag's targeting state to **On**. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "turnFlagOn" } ] } ``` </details><br /> <details> <summary>Click to expand instructions for <strong>working with targeting and variations</strong></summary> These instructions require the `environmentKey` parameter. Several of the instructions for working with targeting and variations require flag rule IDs, variation IDs, or clause IDs as parameters. Each of these are returned as part of the [Get feature flag](https://apidocs.launchdarkly.com) response. The flag rule ID is the `_id` field of each element in the `rules` array within each environment listed in the `environments` object. The variation ID is the `_id` field in each element of the `variations` array. The clause ID is the `_id` field of each element of the `clauses` array within the `rules` array within each environment listed in the `environments` object. #### 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 `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "addClauses", "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29", "clauses": [{ "contextKind": "user", "attribute": "country", "op": "in", "negate": false, "values": ["USA", "Canada"] }] }] } ``` #### addPrerequisite Adds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter. ##### Parameters - `key`: Flag key of the prerequisite flag. - `variationId`: ID of a variation of the prerequisite flag. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "addPrerequisite", "key": "example-prereq-flag-key", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" }] } ``` #### addRule Adds a new targeting rule to the flag. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate. If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `beforeRuleId`: (Optional) ID of a flag rule. - Either - `variationId`: ID of a variation of the flag. or - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000). - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example that uses a `variationId`: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "addRule", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00", "clauses": [{ "contextKind": "organization", "attribute": "located_in", "op": "in", "negate": false, "values": ["Sweden", "Norway"] }] }] } ``` Here's an example that uses a percentage rollout: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "addRule", "clauses": [{ "contextKind": "organization", "attribute": "located_in", "op": "in", "negate": false, "values": ["Sweden", "Norway"] }], "rolloutContextKind": "organization", "rolloutWeights": { "2f43f67c-3e4e-4945-a18a-26559378ca00": 15000, // serve 15% this variation "e5830889-1ec5-4b0c-9cc9-c48790090c43": 85000 // serve 85% this variation } }] } ``` #### addTargets Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the flag to target the same context key in multiple variations. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a variation on the flag. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "addTargets", "values": ["context-key-123abc", "context-key-456def"], "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" }] } ``` #### addUserTargets Adds user keys to the individual user targets for the variation that `variationId` specifies. Returns an error if this causes the flag to target the same user key in multiple variations. If you are working with contexts, use `addTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. - `variationId`: ID of a variation on the flag. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "addUserTargets", "values": ["user-key-123abc", "user-key-456def"], "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "addValuesToClause", "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29", "clauseId": "10a58772-3121-400f-846b-b8a04e8944ed", "values": ["beta_testers"] }] } ``` #### addVariation Adds a variation to the flag. ##### Parameters - `value`: The variation value. - `name`: (Optional) The variation name. - `description`: (Optional) A description for the variation. Here's an example: ```json { "instructions": [ { "kind": "addVariation", "value": 20, "name": "New variation" } ] } ``` #### clearTargets Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets. ##### Parameters - `variationId`: ID of a variation on the flag. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "clearTargets", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" } ] } ``` #### clearUserTargets Removes all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction. ##### Parameters - `variationId`: ID of a variation on the flag. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "clearUserTargets", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" } ] } ``` #### 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. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "removeClauses", "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29", "clauseIds": ["10a58772-3121-400f-846b-b8a04e8944ed", "36a461dc-235e-4b08-97b9-73ce9365873e"] }] } ``` #### removePrerequisite Removes the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist. ##### Parameters - `key`: Flag key of an existing prerequisite flag. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "removePrerequisite", "key": "prereq-flag-key-123abc" } ] } ``` #### 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. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "removeRule", "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29" } ] } ``` #### removeTargets Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys. ##### Parameters - `values`: List of context keys. - `contextKind`: (Optional) Context kind to target, defaults to `user` - `variationId`: ID of a flag variation. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "removeTargets", "values": ["context-key-123abc", "context-key-456def"], "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" }] } ``` #### removeUserTargets Removes user keys from the individual user targets for the variation that `variationId` specifies. Does nothing if the flag does not target the user keys. If you are working with contexts, use `removeTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. - `variationId`: ID of a flag variation. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "removeUserTargets", "values": ["user-key-123abc", "user-key-456def"], "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the flag. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "removeValuesFromClause", "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29", "clauseId": "10a58772-3121-400f-846b-b8a04e8944ed", "values": ["beta_testers"] }] } ``` #### removeVariation Removes a variation from the flag. ##### Parameters - `variationId`: ID of a variation of the flag to remove. Here's an example: ```json { "instructions": [ { "kind": "removeVariation", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" } ] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns 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. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "reorderRules", "ruleIds": ["a902ef4a-2faf-4eaf-88e1-ecc356708a29", "63c238d1-835d-435e-8f21-c8d5e40b2a3d"] }] } ``` #### replacePrerequisites Removes all existing prerequisites and replaces them with the list you provide. ##### Parameters - `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "replacePrerequisites", "prerequisites": [ { "key": "prereq-flag-key-123abc", "variationId": "10a58772-3121-400f-846b-b8a04e8944ed" }, { "key": "another-prereq-flag-key-456def", "variationId": "e5830889-1ec5-4b0c-9cc9-c48790090c43" } ] } ] } ``` #### replaceRules Removes all targeting rules for the flag and replaces them with the list you provide. ##### Parameters - `rules`: A list of rules. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "replaceRules", "rules": [ { "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00", "description": "My new rule", "clauses": [ { "contextKind": "user", "attribute": "segmentMatch", "op": "segmentMatch", "values": ["test"] } ], "trackEvents": true } ] } ] } ``` #### replaceTargets Removes all existing targeting and replaces it with the list of targets you provide. ##### Parameters - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "replaceTargets", "targets": [ { "contextKind": "user", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00", "values": ["user-key-123abc"] }, { "contextKind": "device", "variationId": "e5830889-1ec5-4b0c-9cc9-c48790090c43", "values": ["device-key-456def"] } ] } ] } ``` #### replaceUserTargets Removes all existing user targeting and replaces it with the list of targets you provide. In the list of targets, you must include a target for each of the flag's variations. If you are working with contexts, use `replaceTargets` instead of this instruction. ##### Parameters - `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "replaceUserTargets", "targets": [ { "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00", "values": ["user-key-123abc", "user-key-456def"] }, { "variationId": "e5830889-1ec5-4b0c-9cc9-c48790090c43", "values": ["user-key-789ghi"] } ] } ] } ``` #### 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`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "updateClause", "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29", "clauseId": "10c7462a-2062-45ba-a8bb-dfb3de0f8af5", "clause": { "contextKind": "user", "attribute": "country", "op": "in", "negate": false, "values": ["Mexico", "Canada"] } }] } ``` #### updateDefaultVariation Updates the default on or off variation of the flag. ##### Parameters - `onVariationValue`: (Optional) The value of the variation of the new on variation. - `offVariationValue`: (Optional) The value of the variation of the new off variation Here's an example: ```json { "instructions": [ { "kind": "updateDefaultVariation", "OnVariationValue": true, "OffVariationValue": false } ] } ``` #### updateFallthroughVariationOrRollout Updates the default or "fallthrough" rule for the flag, which the flag serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### 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) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example that uses a `variationId`: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "updateFallthroughVariationOrRollout", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" }] } ``` Here's an example that uses a percentage rollout: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "updateFallthroughVariationOrRollout", "rolloutContextKind": "user", "rolloutWeights": { "2f43f67c-3e4e-4945-a18a-26559378ca00": 15000, // serve 15% this variation "e5830889-1ec5-4b0c-9cc9-c48790090c43": 85000 // serve 85% this variation } }] } ``` #### updateOffVariation Updates the default off variation to `variationId`. The flag serves the default off variation when the flag's targeting is **Off**. ##### Parameters - `variationId`: ID of a variation of the flag. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "updateOffVariation", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" } ] } ``` #### updatePrerequisite Changes the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist. ##### Parameters - `key`: Flag key of an existing prerequisite flag. - `variationId`: ID of a variation of the prerequisite flag. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "updatePrerequisite", "key": "example-prereq-flag-key", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" }] } ``` #### updateRuleDescription Updates the description of the feature flag rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "updateRuleDescription", "description": "New rule description", "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29" }] } ``` #### updateRuleTrackEvents Updates whether or not LaunchDarkly tracks events for the feature flag associated with this rule. ##### Parameters - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag. - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "updateRuleTrackEvents", "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29", "trackEvents": true }] } ``` #### updateRuleVariationOrRollout Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate. ##### 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) Context attribute available in the specified `rolloutContextKind`. - `rolloutContextKind`: (Optional) Context kind, defaults to `user` Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [{ "kind": "updateRuleVariationOrRollout", "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" }] } ``` #### updateTrackEvents Updates whether or not LaunchDarkly tracks events for the feature flag, for all rules. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "updateTrackEvents", "trackEvents": true } ] } ``` #### updateTrackEventsFallthrough Updates whether or not LaunchDarkly tracks events for the feature flag, for the default rule. ##### Parameters - `trackEvents`: Whether or not events are tracked. Here's an example: ```json { "environmentKey": "environment-key-123abc", "instructions": [ { "kind": "updateTrackEventsFallthrough", "trackEvents": true } ] } ``` #### updateVariation Updates a variation of the flag. ##### Parameters - `variationId`: The ID of the variation to update. - `name`: (Optional) The updated variation name. - `value`: (Optional) The updated variation value. - `description`: (Optional) The updated variation description. Here's an example: ```json { "instructions": [ { "kind": "updateVariation", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00", "value": 20 } ] } ``` </details><br /> <details> <summary>Click to expand instructions for <strong>updating flag settings</strong></summary> These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments. #### addCustomProperties Adds a new custom property to the feature flag. Custom properties are used to associate feature flags with LaunchDarkly integrations. For example, if you create an integration with an issue tracking service, you may want to associate a flag with a list of issues related to a feature's development. ##### Parameters - `key`: The custom property key. - `name`: The custom property name. - `values`: A list of the associated values for the custom property. Here's an example: ```json { "instructions": [{ "kind": "addCustomProperties", "key": "example-custom-property", "name": "Example custom property", "values": ["value1", "value2"] }] } ``` #### addTags Adds tags to the feature flag. ##### Parameters - `values`: A list of tags to add. Here's an example: ```json { "instructions": [ { "kind": "addTags", "values": ["tag1", "tag2"] } ] } ``` #### makeFlagPermanent Marks the feature flag as permanent. LaunchDarkly does not prompt you to remove permanent flags, even if one variation is rolled out to all your customers. Here's an example: ```json { "instructions": [ { "kind": "makeFlagPermanent" } ] } ``` #### makeFlagTemporary Marks the feature flag as temporary. Here's an example: ```json { "instructions": [ { "kind": "makeFlagTemporary" } ] } ``` #### removeCustomProperties Removes the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property. ##### Parameters - `key`: The custom property key. - `values`: A list of the associated values to remove from the custom property. ```json { "instructions": [{ "kind": "replaceCustomProperties", "key": "example-custom-property", "values": ["value1", "value2"] }] } ``` #### removeMaintainer Removes the flag's maintainer. To set a new maintainer, use the flag's **Settings** tab in the LaunchDarkly user interface. Here's an example: ```json { "instructions": [ { "kind": "removeMaintainer" } ] } ``` #### removeTags Removes tags from the feature flag. ##### Parameters - `values`: A list of tags to remove. Here's an example: ```json { "instructions": [ { "kind": "removeTags", "values": ["tag1", "tag2"] } ] } ``` #### replaceCustomProperties Replaces the existing associated values for a custom property with the new values. ##### Parameters - `key`: The custom property key. - `name`: The custom property name. - `values`: A list of the new associated values for the custom property. Here's an example: ```json { "instructions": [{ "kind": "replaceCustomProperties", "key": "example-custom-property", "name": "Example custom property", "values": ["value1", "value2"] }] } ``` #### turnOffClientSideAvailability Turns off client-side SDK availability for the flag. This is equivalent to unchecking the **SDKs using Mobile Key** and/or **SDKs using client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them. ##### Parameters - `value`: Use "usingMobileKey" to turn off availability for mobile SDKs. Use "usingEnvironmentId" to turn on availability for client-side SDKs. Here's an example: ```json { "instructions": [ { "kind": "turnOffClientSideAvailability", "value": "usingMobileKey" } ] } ``` #### turnOnClientSideAvailability Turns on client-side SDK availability for the flag. This is equivalent to unchecking the **SDKs using Mobile Key** and/or **SDKs using client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them. ##### Parameters - `value`: Use "usingMobileKey" to turn on availability for mobile SDKs. Use "usingEnvironmentId" to turn on availability for client-side SDKs. Here's an example: ```json { "instructions": [ { "kind": "turnOnClientSideAvailability", "value": "usingMobileKey" } ] } ``` #### updateDescription Updates the feature flag description. ##### Parameters - `value`: The new description. Here's an example: ```json { "instructions": [ { "kind": "updateDescription", "value": "Updated flag description" } ] } ``` #### updateMaintainerMember Updates the maintainer of the flag to an existing member and removes the existing maintainer. ##### Parameters - `value`: The ID of the member. Here's an example: ```json { "instructions": [ { "kind": "updateMaintainerMember", "value": "61e9b714fd47591727db558a" } ] } ``` #### updateMaintainerTeam Updates the maintainer of the flag to an existing team and removes the existing maintainer. ##### Parameters - `value`: The key of the team. Here's an example: ```json { "instructions": [ { "kind": "updateMaintainerTeam", "value": "example-team-key" } ] } ``` #### updateName Updates the feature flag name. ##### Parameters - `value`: The new name. Here's an example: ```json { "instructions": [ { "kind": "updateName", "value": "Updated flag name" } ] } ``` </details><br /> <details> <summary>Click to expand instructions for <strong>updating the flag lifecycle</strong></summary> These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments. #### archiveFlag Archives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags. ```json { "instructions": [ { "kind": "archiveFlag" } ] } ``` #### deleteFlag Deletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts. Here's an example: ```json { "instructions": [ { "kind": "deleteFlag" } ] } ``` #### deprecateFlag Deprecates the feature flag. This hides it from the live flags list without archiving or deleting it. Here's an example: ```json { "instructions": [ { "kind": "deprecateFlag" } ] } ``` #### restoreDeprecatedFlag Restores the feature flag if it was previously deprecated. Here's an example: ```json { "instructions": [ { "kind": "restoreDeprecatedFlag" } ] } ``` #### restoreFlag Restores the feature flag if it was previously archived. Here's an example: ```json { "instructions": [ { "kind": "restoreFlag" } ] } ``` </details> ### Using JSON patches on a feature flag If you do not include the semantic patch header described above, you can use a [JSON patch](https://apidocs.launchdarkly.com) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. In the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://apidocs.launchdarkly.com) endpoint to find the field you want to update. There are a few special cases to keep in mind when determining the value of the `path` element: * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is: ```json [ { "op": "add", "path": "/environments/devint/targets/0/values/-", "value": "TestClient10" } ] ``` * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is: ```json [ { "op": "add", "path": "/environments/devint/targets/-", "value": { "variation": 0, "values": ["TestClient10"] } } ] ``` * To add a flag to a release pipeline, the path for the JSON patch operation is: ```json [ { "op": "add", "path": "/releasePipelineKey", "value": "example-release-pipeline-key" } ] ``` ### Required approvals If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://apidocs.launchdarkly.com) or a [workflow](https://apidocs.launchdarkly.com). ### Conflicts If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag's response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag's response. You can update the default cohort by updating `fallthrough`. When you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`. To learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flag-types/migration-flags).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key. The key identifies the flag in your code. |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PatchWithComment"
},
"example": {
"patch": [
{
"op": "replace",
"path": "/description",
"value": "New description for this flag"
}
]
}
}
},
"required": true
}
PATCH /api/v2/flags/{projectKey}/{featureFlagKey}
/api/v2/flags/{projectKey}/{featureFlagKey}/copy
> ### Copying flag settings is an Enterprise feature > > Copying flag settings is available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/). Copy flag settings from a source environment to a target environment. By default, this operation copies the entire flag configuration. You can use the `includedActions` or `excludedActions` to specify that only part of the flag configuration is copied. If you provide the optional `currentVersion` of a flag, this operation tests to ensure that the current flag version in the environment matches the version you've specified. The operation rejects attempts to copy flag settings if the environment's current version of the flag does not match the version you've specified. You can use this to enforce optimistic locking on copy attempts.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key. The key identifies the flag in your code. |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FlagCopyConfigPost"
},
"example": {
"source": {
"key": "source-env-key-123abc",
"currentVersion": 1
},
"target": {
"key": "target-env-key-123abc",
"currentVersion": 1
},
"comment": "optional comment"
}
}
},
"required": true
}
POST /api/v2/flags/{projectKey}/{featureFlagKey}/copy
/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}
Get a list of context targets on a feature flag that are scheduled for removal.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| featureFlagKey | path | required | string | The feature flag key |
GET /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}
/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}
Schedule a context for removal from individual targeting on a feature flag. The flag must already individually target the context. You can add, update, or remove a scheduled removal date. You can only schedule a context for removal on a single variation per flag. Updating an expiring target uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://apidocs.launchdarkly.com). ### Instructions Semantic patch requests support the following `kind` instructions for updating expiring targets. <details> <summary>Click to expand instructions for <strong>updating expiring targets</strong></summary> #### addExpiringTarget Adds a date and time that LaunchDarkly will remove the context from the flag's individual targeting. ##### Parameters * `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the context from individual targeting for this flag * `variationId`: ID of a variation on the flag * `contextKey`: The context key for the context to remove from individual targeting * `contextKind`: The kind of context represented by the `contextKey` Here's an example: ```json { "instructions": [{ "kind": "addExpiringTarget", "value": 1754006460000, "variationId": "4254742c-71ae-411f-a992-43b18a51afe0", "contextKey": "user-key-123abc", "contextKind": "user" }] } ``` #### updateExpiringTarget Updates the date and time that LaunchDarkly will remove the context from the flag's individual targeting ##### Parameters * `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the context from individual targeting for this flag * `variationId`: ID of a variation on the flag * `contextKey`: The context key for the context to remove from individual targeting * `contextKind`: The kind of context represented by the `contextKey` * `version`: (Optional) The version of the expiring target to update. If included, update will fail if version doesn't match current version of the expiring target. Here's an example: ```json { "instructions": [{ "kind": "updateExpiringTarget", "value": 1754006460000, "variationId": "4254742c-71ae-411f-a992-43b18a51afe0", "contextKey": "user-key-123abc", "contextKind": "user" }] } ``` #### removeExpiringTarget Removes the scheduled removal of the context from the flag's individual targeting. The context will remain part of the flag's individual targeting until you explicitly remove it, or until you schedule another removal. ##### Parameters * `variationId`: ID of a variation on the flag * `contextKey`: The context key for the context to remove from individual targeting * `contextKind`: The kind of context represented by the `contextKey` Here's an example: ```json { "instructions": [{ "kind": "removeExpiringTarget", "variationId": "4254742c-71ae-411f-a992-43b18a51afe0", "contextKey": "user-key-123abc", "contextKind": "user" }] } ``` </details>
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| featureFlagKey | path | required | string | The feature flag key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/patchFlagsRequest"
}
}
},
"required": true
}
PATCH /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}
/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}
> ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring context targets for feature flag](https://apidocs.launchdarkly.com) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Get a list of user targets on a feature flag that are scheduled for removal.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| featureFlagKey | path | required | string | The feature flag key |
GET /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}
/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}
> ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring context targets on feature flag](https://apidocs.launchdarkly.com) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Schedule a target for removal from individual targeting on a feature flag. The flag must already serve a variation to specific targets based on their key. You can add, update, or remove a scheduled removal date. You can only schedule a target for removal on a single variation per flag. Updating an expiring target uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://apidocs.launchdarkly.com). ### Instructions Semantic patch requests support the following `kind` instructions for updating expiring user targets. <details> <summary>Click to expand instructions for <strong>updating expiring user targets</strong></summary> #### addExpireUserTargetDate Adds a date and time that LaunchDarkly will remove the user from the flag's individual targeting. ##### Parameters * `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag * `variationId`: ID of a variation on the flag * `userKey`: The user key for the user to remove from individual targeting #### updateExpireUserTargetDate Updates the date and time that LaunchDarkly will remove the user from the flag's individual targeting. ##### Parameters * `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag * `variationId`: ID of a variation on the flag * `userKey`: The user key for the user to remove from individual targeting * `version`: (Optional) The version of the expiring user target to update. If included, update will fail if version doesn't match current version of the expiring user target. #### removeExpireUserTargetDate Removes the scheduled removal of the user from the flag's individual targeting. The user will remain part of the flag's individual targeting until you explicitly remove them, or until you schedule another removal. ##### Parameters * `variationId`: ID of a variation on the flag * `userKey`: The user key for the user to remove from individual targeting </details>
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| featureFlagKey | path | required | string | The feature flag key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/patchFlagsRequest"
}
}
},
"required": true
}
PATCH /api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}
/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/migration-safety-issues
Returns the migration safety issues that are associated with the POSTed flag patch. The patch must use the semantic patch format for updating feature flags.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| flagKey | path | required | string | The migration flag key |
| environmentKey | path | required | string | The environment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/flagSempatch"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/migration-safety-issues
/api/v2/flags/{projectKey}/{environmentKey}/{featureFlagKey}/dependent-flags
> ### Flag prerequisites is an Enterprise feature > > Flag prerequisites is available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/). 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. To learn more, read [Flag prerequisites](https://docs.launchdarkly.com/home/targeting-flags/prerequisites).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| featureFlagKey | path | required | string | The feature flag key |
GET /api/v2/flags/{projectKey}/{environmentKey}/{featureFlagKey}/dependent-flags
/api/v2/flags/{projectKey}/{featureFlagKey}/dependent-flags
> ### Flag prerequisites is an Enterprise feature > > Flag prerequisites is available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/). 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. To learn more, read [Flag prerequisites](https://docs.launchdarkly.com/home/targeting-flags/prerequisites).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
GET /api/v2/flags/{projectKey}/{featureFlagKey}/dependent-flags
/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}
Get a list of all flag links.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
GET /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}
/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}
Create a new flag link. Flag links let you reference external resources and associate them with your flags.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/flagLinkPost"
},
"example": {
"key": "flag-link-key-123abc",
"title": "Example link title",
"deepLink": "https://example.com/archives/123123123",
"description": "Example link description"
}
}
},
"required": true
}
POST /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}
/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}
Delete a flag link by ID or key.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| id | path | required | string | The flag link ID or Key |
DELETE /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}
/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}
Update a flag link. Updating a flag link uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| id | path | required | string | The flag link ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/title",
"value": "Updated flag link title"
}
]
}
},
"required": true
}
PATCH /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}
/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}
Get a list of all flag triggers.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| featureFlagKey | path | required | string | The feature flag key |
GET /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}
/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}
Create a new flag trigger.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| featureFlagKey | path | required | string | The feature flag key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/triggerPost"
}
}
},
"required": true
}
POST /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}
/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}
Delete a flag trigger by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| featureFlagKey | path | required | string | The feature flag key |
| id | path | required | string | The flag trigger ID |
DELETE /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}
/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}
Get a flag trigger by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The flag trigger ID |
GET /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}
/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}
Update a flag trigger. Updating a flag trigger uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://apidocs.launchdarkly.com). ### Instructions Semantic patch requests support the following `kind` instructions for updating flag triggers. <details> <summary>Click to expand instructions for <strong>updating flag triggers</strong></summary> #### replaceTriggerActionInstructions Removes the existing trigger action and replaces it with the new instructions. ##### Parameters - `value`: An array of the new `kind`s of actions to perform when triggering. Supported flag actions are `turnFlagOn` and `turnFlagOff`. Here's an example that replaces the existing action with new instructions to turn flag targeting off: ```json { "instructions": [ { "kind": "replaceTriggerActionInstructions", "value": [ {"kind": "turnFlagOff"} ] } ] } ``` #### cycleTriggerUrl Generates a new URL for this trigger. You must update any clients using the trigger to use this new URL. Here's an example: ```json { "instructions": [{ "kind": "cycleTriggerUrl" }] } ``` #### disableTrigger Disables the trigger. This saves the trigger configuration, but the trigger stops running. To re-enable, use `enableTrigger`. Here's an example: ```json { "instructions": [{ "kind": "disableTrigger" }] } ``` #### enableTrigger Enables the trigger. If you previously disabled the trigger, it begins running again. Here's an example: ```json { "instructions": [{ "kind": "enableTrigger" }] } ``` </details>
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| featureFlagKey | path | required | string | The feature flag key |
| id | path | required | string | The flag trigger ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FlagTriggerInput"
}
}
},
"required": true
}
PATCH /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}
/api/v2/projects/{projectKey}/environments/{environmentKey}/followers
Get followers of all flags in a given environment and project
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
GET /api/v2/projects/{projectKey}/environments/{environmentKey}/followers
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers
Get a list of members following a flag in a project and environment
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId}
Remove a member as a follower to a flag in a project and environment
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| memberId | path | required | string | The memberId of the member to remove as a follower of the flag. Reader roles can only remove themselves. |
DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId}
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId}
Add a member as a follower to a flag in a project and environment
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| memberId | path | required | string | The memberId of the member to add as a follower of the flag. Reader roles can only add themselves. |
PUT /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId}
/api/v2/engineering-insights/charts/deployments/frequency
Get deployment frequency chart data. Engineering insights displays deployment frequency data in the [deployment frequency metric view](https://docs.launchdarkly.com/home/engineering-insights/metrics/deployment). ### Expanding the chart response LaunchDarkly supports expanding the chart response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `metrics` includes details on the metrics related to deployment frequency For example, use `?expand=metrics` to include the `metrics` field in the response. By default, this field is **not** included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | query | optional | string | The project key |
| environmentKey | query | optional | string | The environment key |
| applicationKey | query | optional | string | Comma separated list of application keys |
| from | query | optional | string | Unix timestamp in milliseconds. Default value is 7 days ago. |
| to | query | optional | string | Unix timestamp in milliseconds. Default value is now. |
| bucketType | query | optional | string | Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`. |
| bucketMs | query | optional | integer | Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds). |
| groupBy | query | optional | string | Options: `application`, `kind` |
| expand | query | optional | string | Options: `metrics` |
GET /api/v2/engineering-insights/charts/deployments/frequency
/api/v2/engineering-insights/charts/flags/stale
Get stale flags chart data. Engineering insights displays stale flags data in the [flag health metric view](https://docs.launchdarkly.com/home/engineering-insights/metrics/flag-health). ### Expanding the chart response LaunchDarkly supports expanding the chart response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `metrics` includes details on the metrics related to stale flags For example, use `?expand=metrics` to include the `metrics` field in the response. By default, this field is **not** included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | query | required | string | The project key |
| environmentKey | query | required | string | The environment key |
| applicationKey | query | optional | string | Comma separated list of application keys |
| groupBy | query | optional | string | Property to group results by. Options: `maintainer` |
| maintainerId | query | optional | string | Comma-separated list of individual maintainers to filter results. |
| maintainerTeamKey | query | optional | string | Comma-separated list of team maintainer keys to filter results. |
| expand | query | optional | string | Options: `metrics` |
GET /api/v2/engineering-insights/charts/flags/stale
/api/v2/engineering-insights/charts/flags/status
Get flag status chart data. To learn more, read [Using the flag status chart](https://docs.launchdarkly.com/home/engineering-insights/metrics/flag-health#using-the-flag-status-chart).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | query | required | string | The project key |
| environmentKey | query | required | string | The environment key |
| applicationKey | query | optional | string | Comma separated list of application keys |
GET /api/v2/engineering-insights/charts/flags/status
/api/v2/engineering-insights/charts/lead-time
Get lead time chart data. The engineering insights UI displays lead time data in the [lead time metric view](https://docs.launchdarkly.com/home/engineering-insights/metrics/lead-time).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | query | required | string | The project key |
| environmentKey | query | optional | string | The environment key |
| applicationKey | query | optional | string | Comma separated list of application keys |
| from | query | optional | integer | Unix timestamp in milliseconds. Default value is 7 days ago. |
| to | query | optional | integer | Unix timestamp in milliseconds. Default value is now. |
| bucketType | query | optional | string | Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`. |
| bucketMs | query | optional | integer | Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds). |
| groupBy | query | optional | string | Options: `application`, `stage`. Default: `stage`. |
| expand | query | optional | string | Options: `metrics`, `percentiles`. |
GET /api/v2/engineering-insights/charts/lead-time
/api/v2/engineering-insights/charts/releases/frequency
Get release frequency chart data. Engineering insights displays release frequency data in the [release frequency metric view](https://docs.launchdarkly.com/home/engineering-insights/metrics/release).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | query | required | string | The project key |
| environmentKey | query | required | string | The environment key |
| applicationKey | query | optional | string | Comma separated list of application keys |
| hasExperiments | query | optional | boolean | Filter events to those associated with an experiment (`true`) or without an experiment (`false`) |
| global | query | optional | string | Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude` |
| groupBy | query | optional | string | Property to group results by. Options: `impact` |
| from | query | optional | string | Unix timestamp in milliseconds. Default value is 7 days ago. |
| to | query | optional | string | Unix timestamp in milliseconds. Default value is now. |
| bucketType | query | optional | string | Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`. |
| bucketMs | query | optional | integer | Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds). |
| expand | query | optional | string | Options: `metrics` |
GET /api/v2/engineering-insights/charts/releases/frequency
/api/v2/engineering-insights/deployment-events
Create deployment event
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostDeploymentEventInput"
}
}
},
"required": true
}
POST /api/v2/engineering-insights/deployment-events
/api/v2/engineering-insights/deployments
Get a list of deployments ### Expanding the deployment collection response LaunchDarkly supports expanding the deployment collection response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `pullRequests` includes details on all of the pull requests associated with each deployment * `flagReferences` includes details on all of the references to flags in each deployment For example, use `?expand=pullRequests` to include the `pullRequests` field in the response. By default, this field is **not** included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | query | required | string | The project key |
| environmentKey | query | required | string | The environment key |
| applicationKey | query | optional | string | Comma separated list of application keys |
| limit | query | optional | integer | The number of deployments to return. Default is 20. Maximum allowed is 100. |
| expand | query | optional | string | Expand properties in response. Options: `pullRequests`, `flagReferences` |
| from | query | optional | integer | Unix timestamp in milliseconds. Default value is 7 days ago. |
| to | query | optional | integer | Unix timestamp in milliseconds. Default value is now. |
| after | query | optional | string | Identifier used for pagination |
| before | query | optional | string | Identifier used for pagination |
| kind | query | optional | string | The deployment kind |
| status | query | optional | string | The deployment status |
GET /api/v2/engineering-insights/deployments
/api/v2/engineering-insights/deployments/{deploymentID}
Get a deployment by ID. The deployment ID is returned as part of the [List deployments](https://apidocs.launchdarkly.com) response. It is the `id` field of each element in the `items` array. ### Expanding the deployment response LaunchDarkly supports expanding the deployment response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `pullRequests` includes details on all of the pull requests associated with each deployment * `flagReferences` includes details on all of the references to flags in each deployment For example, use `?expand=pullRequests` to include the `pullRequests` field in the response. By default, this field is **not** included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| deploymentID | path | required | string | The deployment ID |
| expand | query | optional | string | Expand properties in response. Options: `pullRequests`, `flagReferences` |
GET /api/v2/engineering-insights/deployments/{deploymentID}
/api/v2/engineering-insights/deployments/{deploymentID}
Update a deployment by ID. Updating a deployment uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).<br/><br/>The deployment ID is returned as part of the [List deployments](https://apidocs.launchdarkly.com) response. It is the `id` field of each element in the `items` array.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| deploymentID | path | required | string | The deployment ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/status",
"value": "finished"
}
]
}
},
"required": true
}
PATCH /api/v2/engineering-insights/deployments/{deploymentID}
/api/v2/engineering-insights/flag-events
Get a list of flag events ### Expanding the flag event collection response LaunchDarkly supports expanding the flag event collection response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `experiments` includes details on all of the experiments run on each flag For example, use `?expand=experiments` to include the `experiments` field in the response. By default, this field is **not** included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | query | required | string | The project key |
| environmentKey | query | required | string | The environment key |
| applicationKey | query | optional | string | Comma separated list of application keys |
| query | query | optional | string | Filter events by flag key |
| impactSize | query | optional | string | Filter events by impact size. A small impact created a less than 20% change in the proportion of end users receiving one or more flag variations. A medium impact created between a 20%-80% change. A large impact created a more than 80% change. Options: `none`, `small`, `medium`, `large` |
| hasExperiments | query | optional | boolean | Filter events to those associated with an experiment (`true`) or without an experiment (`false`) |
| global | query | optional | string | Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude` |
| expand | query | optional | string | Expand properties in response. Options: `experiments` |
| limit | query | optional | integer | The number of deployments to return. Default is 20. Maximum allowed is 100. |
| from | query | optional | integer | Unix timestamp in milliseconds. Default value is 7 days ago. |
| to | query | optional | integer | Unix timestamp in milliseconds. Default value is now. |
| after | query | optional | string | Identifier used for pagination |
| before | query | optional | string | Identifier used for pagination |
GET /api/v2/engineering-insights/flag-events
/api/v2/engineering-insights/pull-requests
Get a list of pull requests ### Expanding the pull request collection response LaunchDarkly supports expanding the pull request collection response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `deployments` includes details on all of the deployments associated with each pull request * `flagReferences` includes details on all of the references to flags in each pull request * `leadTime` includes details about the lead time of the pull request for each stage For example, use `?expand=deployments` to include the `deployments` field in the response. By default, this field is **not** included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | query | required | string | The project key |
| environmentKey | query | optional | string | Required if you are using the <code>sort</code> parameter's <code>leadTime</code> option to sort pull requests. |
| applicationKey | query | optional | string | Filter the results to pull requests deployed to a comma separated list of applications |
| status | query | optional | string | Filter results to pull requests with the given status. Options: `open`, `merged`, `closed`, `deployed`. |
| query | query | optional | string | Filter list of pull requests by title or author |
| limit | query | optional | integer | The number of pull requests to return. Default is 20. Maximum allowed is 100. |
| expand | query | optional | string | Expand properties in response. Options: `deployments`, `flagReferences`, `leadTime`. |
| sort | query | optional | string | Sort results. Requires the `environmentKey` to be set. Options: `leadTime` (asc) and `-leadTime` (desc). When query option is excluded, default sort is by created or merged date. |
| from | query | optional | string | Unix timestamp in milliseconds. Default value is 7 days ago. |
| to | query | optional | string | Unix timestamp in milliseconds. Default value is now. |
| after | query | optional | string | Identifier used for pagination |
| before | query | optional | string | Identifier used for pagination |
GET /api/v2/engineering-insights/pull-requests
/api/v2/engineering-insights/repositories
Get a list of repositories ### Expanding the repository collection response LaunchDarkly supports expanding the repository collection response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `projects` includes details on all of the LaunchDarkly projects associated with each repository For example, use `?expand=projects` to include the `projects` field in the response. By default, this field is **not** included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | string | Expand properties in response. Options: `projects` |
GET /api/v2/engineering-insights/repositories
/api/v2/engineering-insights/repositories/projects
Associate repositories with projects
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InsightsRepositoryProjectMappings"
}
}
},
"required": true
}
PUT /api/v2/engineering-insights/repositories/projects
/api/v2/engineering-insights/repositories/{repositoryKey}/projects/{projectKey}
Remove repository project association
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repositoryKey | path | required | string | The repository key |
| projectKey | path | required | string | The project key |
DELETE /api/v2/engineering-insights/repositories/{repositoryKey}/projects/{projectKey}
/api/v2/engineering-insights/insights/group
Create insight group
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostInsightGroupParams"
}
}
},
"required": true
}
POST /api/v2/engineering-insights/insights/group
/api/v2/engineering-insights/insights/groups
List groups for which you are collecting insights ### Expanding the insight groups collection response LaunchDarkly supports expanding the insight groups collection response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `scores` includes details on all of the scores used in the engineering insights metrics views for each group * `environment` includes details on each environment associated with each group * `metadata` includes counts of the number of insight groups with particular indicators, such as "execellent," "good," "fair," and so on. For example, use `?expand=scores` to include the `scores` field in the response. By default, this field is **not** included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | The number of insight groups to return. Default is 20. Must be between 1 and 20 inclusive. |
| offset | query | optional | integer | 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 items in the list, up to the query `limit`. |
| sort | query | optional | string | Sort flag list by field. Prefix field with <code>-</code> to sort in descending order. Allowed fields: name |
| query | query | optional | string | Filter list of insights groups by name. |
| expand | query | optional | string | Options: `scores`, `environment`, `metadata` |
GET /api/v2/engineering-insights/insights/groups
/api/v2/engineering-insights/insights/groups/{insightGroupKey}
Delete insight group
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| insightGroupKey | path | required | string | The insight group key |
DELETE /api/v2/engineering-insights/insights/groups/{insightGroupKey}
/api/v2/engineering-insights/insights/groups/{insightGroupKey}
Get insight group ### Expanding the insight group response LaunchDarkly supports expanding the insight group response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `scores` includes details on all of the scores used in the engineering insights metrics views for this group * `environment` includes details on each environment associated with this group For example, use `?expand=scores` to include the `scores` field in the response. By default, this field is **not** included in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| insightGroupKey | path | required | string | The insight group key |
| expand | query | optional | string | Options: `scores`, `environment` |
GET /api/v2/engineering-insights/insights/groups/{insightGroupKey}
/api/v2/engineering-insights/insights/groups/{insightGroupKey}
Update an insight group. Updating an insight group uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| insightGroupKey | path | required | string | The insight group key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/name",
"value": "Prod group"
}
]
}
},
"required": true
}
PATCH /api/v2/engineering-insights/insights/groups/{insightGroupKey}
/api/v2/engineering-insights/insights/scores
Return insights scores, based on the given parameters. This data is also used in engineering insights metrics views.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | query | required | string | The project key |
| environmentKey | query | required | string | The environment key |
| applicationKey | query | optional | string | Comma separated list of application keys |
GET /api/v2/engineering-insights/insights/scores
/api/v2/integrations/{integrationKey}
Get all audit log subscriptions associated with a given integration.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| integrationKey | path | required | string | The integration key |
GET /api/v2/integrations/{integrationKey}
/api/v2/integrations/{integrationKey}
Create an audit log subscription.<br /><br />For each subscription, you must specify the set of resources you wish to subscribe to audit log notifications for. You can describe these resources using a custom role policy. To learn more, read [Custom role concepts](https://docs.launchdarkly.com/home/members/role-concepts).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| integrationKey | path | required | string | The integration key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/subscriptionPost"
},
"example": {
"on": false,
"name": "Example audit log subscription.",
"tags": [
"testing-tag"
],
"config": {
"url": "https://example.com",
"optional": "an optional property",
"required": "the required property"
},
"statements": [
{
"effect": "allow",
"actions": [
"*"
],
"resources": [
"proj/*:env/*:flag/*;testing-tag"
]
}
]
}
}
},
"required": true
}
POST /api/v2/integrations/{integrationKey}
/api/v2/integrations/{integrationKey}/{id}
Delete an audit log subscription.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| integrationKey | path | required | string | The integration key |
| id | path | required | string | The subscription ID |
DELETE /api/v2/integrations/{integrationKey}/{id}
/api/v2/integrations/{integrationKey}/{id}
Get an audit log subscription by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| integrationKey | path | required | string | The integration key |
| id | path | required | string | The subscription ID |
GET /api/v2/integrations/{integrationKey}/{id}
/api/v2/integrations/{integrationKey}/{id}
Update an audit log subscription configuration. Updating an audit log subscription uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| integrationKey | path | required | string | The integration key |
| id | path | required | string | The ID of the audit log subscription |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/on",
"value": false
}
]
}
},
"required": true
}
PATCH /api/v2/integrations/{integrationKey}/{id}
/api/v2/integration-capabilities/featureStore
List all delivery configurations.
GET /api/v2/integration-capabilities/featureStore
/api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}
Get delivery configurations by environment.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
GET /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}
/api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}
Create a delivery configuration.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| integrationKey | path | required | string | The integration key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IntegrationDeliveryConfigurationPost"
},
"example": {
"on": false,
"name": "Sample integration",
"tags": [
"example-tag"
],
"config": {
"optional": "example value for optional formVariables property for sample-integration",
"required": "example value for required formVariables property for sample-integration"
}
}
}
},
"required": true
}
POST /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}
/api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}
Delete a delivery configuration.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| integrationKey | path | required | string | The integration key |
| id | path | required | string | The configuration ID |
DELETE /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}
/api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}
Get delivery configuration by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| integrationKey | path | required | string | The integration key |
| id | path | required | string | The configuration ID |
GET /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}
/api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}
Update an integration delivery configuration. Updating an integration delivery configuration uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| integrationKey | path | required | string | The integration key |
| id | path | required | string | The configuration ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/on",
"value": true
}
]
}
},
"required": true
}
PATCH /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}
/api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}/validate
Validate the saved delivery configuration, using the `validationRequest` in the integration's `manifest.json` file.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| integrationKey | path | required | string | The integration key |
| id | path | required | string | The configuration ID |
POST /api/v2/integration-capabilities/featureStore/{projectKey}/{environmentKey}/{integrationKey}/{id}/validate
/api/v2/integration-capabilities/big-segment-store
List all big segment store integrations.
GET /api/v2/integration-capabilities/big-segment-store
/api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}
Create a persistent store integration. If you are using server-side SDKs, segments synced from external tools and larger list-based segments require a persistent store within your infrastructure. LaunchDarkly keeps the persistent store up to date and consults it during flag evaluation. You can use either Redis or DynamoDB as your persistent store. When you create a persistent store integration, the fields in the `config` object in the request vary depending on which persistent store you use. If you are using Redis to create your persistent store integration, you will need to know: * Your Redis host * Your Redis port * Your Redis username * Your Redis password * Whether or not LaunchDarkly should connect using TLS If you are using DynamoDB to create your persistent store integration, you will need to know: * Your DynamoDB table name. The table must have the following schema: * Partition key: `namespace` (string) * Sort key: `key` (string) * Your DynamoDB Amazon Web Services (AWS) region. * Your AWS role Amazon Resource Name (ARN). This is the role that LaunchDarkly will assume to manage your DynamoDB table. * The External ID you specified when creating your Amazon Resource Name (ARN). To learn more, read [Segment configuration](https://docs.launchdarkly.com/home/segments/big-segment-configuration).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| integrationKey | path | required | string | The integration key, either `redis` or `dynamodb` |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IntegrationDeliveryConfigurationPost"
},
"example": {
"on": false,
"name": "Example persistent store integration",
"tags": [
"example-tag"
],
"config": {
"optional": "example value for optional formVariables property for sample-integration",
"required": "example value for required formVariables property for sample-integration"
}
}
}
},
"required": true
}
POST /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}
/api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}
Delete a persistent store integration. Each integration uses either Redis or DynamoDB.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| integrationKey | path | required | string | The integration key, either `redis` or `dynamodb` |
| integrationId | path | required | string | The integration ID |
DELETE /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}
/api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}
Get a big segment store integration by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| integrationKey | path | required | string | The integration key, either `redis` or `dynamodb` |
| integrationId | path | required | string | The integration ID |
GET /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}
/api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}
Update a big segment store integration. Updating a big segment store requires a [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| integrationKey | path | required | string | The integration key, either `redis` or `dynamodb` |
| integrationId | path | required | string | The integration ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
}
}
},
"required": true
}
PATCH /api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}
/api/v2/metrics/{projectKey}
Get a list of all metrics for the specified project. ### Expanding the metric list response LaunchDarkly supports expanding the "List metrics" response. By default, the expandable field is **not** included in the response. To expand the response, append the `expand` query parameter and add the following supported field: - `experimentCount` includes the number of experiments from the specific project that use the metric For example, `expand=experimentCount` includes the `experimentCount` field for each metric in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. |
GET /api/v2/metrics/{projectKey}
/api/v2/metrics/{projectKey}
Create a new metric in the specified project. The expected `POST` body differs depending on the specified `kind` property.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MetricPost"
},
"example": {
"key": "metric-key-123abc",
"kind": "custom",
"eventKey": "trackedClick",
"isActive": true,
"isNumeric": false
}
}
},
"required": true
}
POST /api/v2/metrics/{projectKey}
/api/v2/metrics/{projectKey}/{metricKey}
Delete a metric by key.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| metricKey | path | required | string | The metric key |
DELETE /api/v2/metrics/{projectKey}/{metricKey}
/api/v2/metrics/{projectKey}/{metricKey}
Get information for a single metric from the specific project. ### Expanding the metric response LaunchDarkly supports four fields for expanding the "Get metric" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: - `experiments` includes all experiments from the specific project that use the metric - `experimentCount` includes the number of experiments from the specific project that use the metric - `metricGroups` includes all metric groups from the specific project that use the metric - `metricGroupCount` includes the number of metric groups from the specific project that use the metric For example, `expand=experiments` includes the `experiments` field in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| metricKey | path | required | string | The metric key |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. |
| versionId | query | optional | string | The specific version ID of the metric |
GET /api/v2/metrics/{projectKey}/{metricKey}
/api/v2/metrics/{projectKey}/{metricKey}
Patch a metric by key. Updating a metric uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| metricKey | path | required | string | The metric key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/name",
"value": "my-updated-metric"
}
]
}
},
"required": true
}
PATCH /api/v2/metrics/{projectKey}/{metricKey}
/api/v2/projects/{projectKey}/metric-groups
Get a list of all metric groups for the specified project. ### Expanding the metric groups response LaunchDarkly supports one field for expanding the "Get metric groups" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with the following field: - `experiments` includes all experiments from the specific project that use the metric group For example, `expand=experiments` includes the `experiments` field in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. |
GET /api/v2/projects/{projectKey}/metric-groups
/api/v2/projects/{projectKey}/metric-groups
Create a new metric group in the specified project
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MetricGroupPost"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/metric-groups
/api/v2/projects/{projectKey}/metric-groups/{metricGroupKey}
Delete a metric group by key.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| metricGroupKey | path | required | string | The metric group key |
DELETE /api/v2/projects/{projectKey}/metric-groups/{metricGroupKey}
/api/v2/projects/{projectKey}/metric-groups/{metricGroupKey}
Get information for a single metric group from the specific project. ### Expanding the metric group response LaunchDarkly supports two fields for expanding the "Get metric group" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with either or both of the following fields: - `experiments` includes all experiments from the specific project that use the metric group - `experimentCount` includes the number of experiments from the specific project that use the metric group For example, `expand=experiments` includes the `experiments` field in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| metricGroupKey | path | required | string | The metric group key |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. |
GET /api/v2/projects/{projectKey}/metric-groups/{metricGroupKey}
/api/v2/projects/{projectKey}/metric-groups/{metricGroupKey}
Patch a metric group by key. Updating a metric group uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| metricGroupKey | path | required | string | The metric group key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/name",
"value": "my-updated-metric-group"
}
]
}
},
"required": true
}
PATCH /api/v2/projects/{projectKey}/metric-groups/{metricGroupKey}
/api/v2/oauth/clients
Get all OAuth 2.0 clients registered by your account.
GET /api/v2/oauth/clients
/api/v2/oauth/clients
Create (register) a LaunchDarkly OAuth2 client. OAuth2 clients allow you to build custom integrations using LaunchDarkly as your identity provider.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/oauthClientPost"
}
}
},
"required": true
}
POST /api/v2/oauth/clients
/api/v2/oauth/clients/{clientId}
Delete an existing OAuth 2.0 client by unique client ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| clientId | path | required | string | The client ID |
DELETE /api/v2/oauth/clients/{clientId}
/api/v2/oauth/clients/{clientId}
Get a registered OAuth 2.0 client by unique client ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| clientId | path | required | string | The client ID |
GET /api/v2/oauth/clients/{clientId}
/api/v2/oauth/clients/{clientId}
Patch an existing OAuth 2.0 client by client ID. Updating an OAuth2 client uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com). Only `name`, `description`, and `redirectUri` may be patched.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| clientId | path | required | string | The client ID |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/name",
"value": "Example Client V2"
}
]
}
},
"required": true
}
PATCH /api/v2/oauth/clients/{clientId}
/api/v2
Get all of the resource categories the API supports. In the sandbox, click 'Try it' and enter any string in the 'Authorization' field to test this endpoint.
GET /api/v2
/api/v2/openapi.json
Get the latest version of the OpenAPI specification for LaunchDarkly's API in JSON format. In the sandbox, click 'Try it' and enter any string in the 'Authorization' field to test this endpoint.
GET /api/v2/openapi.json
/api/v2/public-ip-list
Get a list of IP ranges the LaunchDarkly service uses. You can use this list to allow LaunchDarkly through your firewall. We post upcoming changes to this list in advance on our [status page](https://status.launchdarkly.com/). <br /><br />In the sandbox, click 'Try it' and enter any string in the 'Authorization' field to test this endpoint.
GET /api/v2/public-ip-list
/api/v2/versions
Get the latest API version, the list of valid API versions in ascending order, and the version being used for this request. These are all in the external, date-based format.
GET /api/v2/versions
/api/v2/projects
Return a list of projects. By default, this returns the first 20 projects. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, 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, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering projects LaunchDarkly supports two fields for filters: - `query` is a string that matches against the projects' names and keys. It is not case sensitive. - `tags` is a `+`-separated list of project tags. It filters the list of projects that have all of the tags in the list. For example, the filter `filter=query:abc,tags:tag-1+tag-2` matches projects with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive. The documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`. ### Sorting projects LaunchDarkly supports two fields for sorting: - `name` sorts by project name. - `createdOn` sorts by the creation date of the project. For example, `sort=name` sorts the response by project name in ascending order. ### Expanding the projects response LaunchDarkly supports one field for expanding the "List projects" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with the `environments` field. `Environments` includes a paginated list of the project environments. * `environments` includes a paginated list of the project environments. For example, `expand=environments` includes the `environments` field for each project in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | The number of projects to return in the response. Defaults to 20. |
| offset | query | optional | integer | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items. |
| filter | query | optional | string | A comma-separated list of filters. Each filter is constructed as `field:value`. |
| sort | query | optional | string | A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order. |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. |
GET /api/v2/projects
/api/v2/projects
Create a new project with the given key and name. Project keys must be unique within an account.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectPost"
},
"example": {
"key": "project-key-123abc",
"name": "My Project"
}
}
},
"required": true
}
POST /api/v2/projects
/api/v2/projects/{projectKey}
Delete a project by key. Use this endpoint with caution. Deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
DELETE /api/v2/projects/{projectKey}
/api/v2/projects/{projectKey}
Get a single project by key. ### Expanding the project response LaunchDarkly supports one field for expanding the "Get project" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `environments` includes a paginated list of the project environments. For example, `expand=environments` includes the `environments` field for the project in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key. |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. |
GET /api/v2/projects/{projectKey}
/api/v2/projects/{projectKey}
Update a project. Updating a project uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).<br/><br/>To add an element to the project fields that are arrays, set the `path` to the name of the field and then append `/<array index>`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "add",
"path": "/tags/0",
"value": "another-tag"
}
]
}
},
"required": true
}
PATCH /api/v2/projects/{projectKey}
/api/v2/projects/{projectKey}/flag-defaults
Get the flag defaults for a specific project.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
GET /api/v2/projects/{projectKey}/flag-defaults
/api/v2/projects/{projectKey}/flag-defaults
Update a flag default. Updating a flag default uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
}
}
},
"required": true
}
PATCH /api/v2/projects/{projectKey}/flag-defaults
/api/v2/projects/{projectKey}/flag-defaults
Create or update flag defaults for a project.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpsertFlagDefaultsPayload"
}
}
},
"required": true
}
PUT /api/v2/projects/{projectKey}/flag-defaults
/api/v2/account/relay-auto-configs
Get a list of Relay Proxy configurations in the account.
GET /api/v2/account/relay-auto-configs
/api/v2/account/relay-auto-configs
Create a Relay Proxy config.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RelayAutoConfigPost"
},
"example": {
"name": "Sample Relay Proxy config for all proj and env",
"policy": [
{
"effect": "allow",
"actions": [
"*"
],
"resources": [
"proj/*:env/*"
]
}
]
}
}
},
"required": true
}
POST /api/v2/account/relay-auto-configs
/api/v2/account/relay-auto-configs/{id}
Delete a Relay Proxy config.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The relay auto config id |
DELETE /api/v2/account/relay-auto-configs/{id}
/api/v2/account/relay-auto-configs/{id}
Get a single Relay Proxy auto config by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The relay auto config id |
GET /api/v2/account/relay-auto-configs/{id}
/api/v2/account/relay-auto-configs/{id}
Update a Relay Proxy configuration. Updating a configuration uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The relay auto config id |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PatchWithComment"
},
"example": {
"patch": [
{
"op": "replace",
"path": "/policy/0",
"value": {
"effect": "allow",
"actions": [
"*"
],
"resources": [
"proj/*:env/qa"
]
}
}
]
}
}
},
"required": true
}
PATCH /api/v2/account/relay-auto-configs/{id}
/api/v2/account/relay-auto-configs/{id}/reset
Reset a Relay Proxy configuration's secret key with an optional expiry time for the old key.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The Relay Proxy configuration ID |
| expiry | query | optional | integer | 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. |
POST /api/v2/account/relay-auto-configs/{id}/reset
/api/v2/projects/{projectKey}/release-pipelines
Get all release pipelines for a project. ### Filtering release pipelines LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the release pipeline `key`, `name`, and `description`. It is not case sensitive. For example: `?filter=query:examplePipeline`.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| filter | query | optional | string | A comma-separated list of filters. Each filter is of the form field:value. Read the endpoint description for a full list of available filter fields. |
| limit | query | optional | integer | The maximum number of items to return. Defaults to 20. |
| offset | query | optional | integer | Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. |
GET /api/v2/projects/{projectKey}/release-pipelines
/api/v2/projects/{projectKey}/release-pipelines
Creates a new release pipeline. The first release pipeline you create is automatically set as the default release pipeline for your project. To change the default release pipeline, use the [Update project](https://apidocs.launchdarkly.com) API to set the `defaultReleasePipelineKey`. You can create up to 20 release pipelines per project.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateReleasePipelineInput"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/release-pipelines
/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}
Deletes a release pipeline. You cannot delete the default release pipeline. If you want to delete a release pipeline that is currently the default, create a second release pipeline and set it as the default. Then delete the first release pipeline. To change the default release pipeline, use the [Update project](https://apidocs.launchdarkly.com) API to set the `defaultReleasePipelineKey`.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| pipelineKey | path | required | string | The release pipeline key |
DELETE /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}
/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}
Get a release pipeline by key
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| pipelineKey | path | required | string | The release pipeline key |
GET /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}
/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}
Updates a release pipeline. Updating a release pipeline uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| pipelineKey | path | required | string | The release pipeline key |
PATCH /api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}
/api/v2/flags/{projectKey}/{flagKey}/release
Get currently active release for a flag
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| flagKey | path | required | string | The flag key |
GET /api/v2/flags/{projectKey}/{flagKey}/release
/api/v2/flags/{projectKey}/{flagKey}/release
Update currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://apidocs.launchdarkly.com). You can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body: ``` [ { "op": "replace", "path": "/phase/0/complete", "value": true } ] ```
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| flagKey | path | required | string | The flag key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/phases/0/complete",
"value": true
}
]
}
},
"required": true
}
PATCH /api/v2/flags/{projectKey}/{flagKey}/release
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes
Get a list of scheduled changes that will be applied to the feature flag.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes
Create scheduled changes for a feature flag. If the `ignoreConficts` query parameter is false and there are conflicts between these instructions and existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| ignoreConflicts | query | optional | boolean | Whether to succeed (`true`) or fail (`false`) when these instructions conflict with existing scheduled changes |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostFlagScheduledChangesInput"
},
"example": {
"comment": "Optional comment describing the scheduled changes",
"instructions": [
{
"kind": "turnFlagOn"
}
],
"executionDate": 1718467200000
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}
Delete a scheduled changes workflow.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The scheduled change id |
DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}
Get a scheduled change that will be applied to the feature flag by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The scheduled change id |
GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}
Update a scheduled change, overriding existing instructions with the new ones. Updating a scheduled change uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://apidocs.launchdarkly.com). ### Instructions Semantic patch requests support the following `kind` instructions for updating scheduled changes. <details> <summary>Click to expand instructions for <strong>updating scheduled changes</strong></summary> #### deleteScheduledChange Removes the scheduled change. Here's an example: ```json { "instructions": [{ "kind": "deleteScheduledChange" }] } ``` #### replaceScheduledChangesInstructions Removes the existing scheduled changes and replaces them with the new instructions. ##### Parameters - `value`: An array of the new actions to perform when the execution date for these scheduled changes arrives. Supported scheduled actions are `turnFlagOn` and `turnFlagOff`. Here's an example that replaces the scheduled changes with new instructions to turn flag targeting off: ```json { "instructions": [ { "kind": "replaceScheduledChangesInstructions", "value": [ {"kind": "turnFlagOff"} ] } ] } ``` #### updateScheduledChangesExecutionDate Updates the execution date for the scheduled changes. ##### Parameters - `value`: the new execution date, in Unix milliseconds. Here's an example: ```json { "instructions": [ { "kind": "updateScheduledChangesExecutionDate", "value": 1754092860000 } ] } ``` </details>
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| id | path | required | string | The scheduled change ID |
| ignoreConflicts | query | optional | boolean | Whether to succeed (`true`) or fail (`false`) when these new instructions conflict with existing scheduled changes |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FlagScheduledChangesInput"
},
"example": {
"comment": "Optional comment describing the update to the scheduled changes",
"instructions": [
{
"kind": "replaceScheduledChangesInstructions",
"value": [
{
"kind": "turnFlagOff"
}
]
}
]
}
}
},
"required": true
}
PATCH /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}
/api/v2/projects/{projectKey}/environments/{environmentKey}/segments/evaluate
For a given context instance with attributes, get membership details for all segments. In the request body, pass in the context instance.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContextInstance"
},
"example": {
"key": "context-key-123abc",
"kind": "user",
"name": "Sandy",
"address": {
"city": "Springfield",
"street": "123 Main Street"
},
"jobFunction": "doctor"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/environments/{environmentKey}/segments/evaluate
/api/v2/segments/{projectKey}/{environmentKey}
Get a list of all segments in the given project.<br/><br/>Segments can be rule-based, list-based, or synced. Big segments include larger list-based segments and synced segments. Some fields in the response only apply to big segments.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| limit | query | optional | integer | The number of segments to return. Defaults to 20. |
| offset | query | optional | integer | 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 items in the list, up to the query `limit`. |
| sort | query | optional | string | Accepts sorting order and fields. Fields can be comma separated. Possible fields are 'creationDate', 'name', 'lastModified'. Example: `sort=name` sort by names ascending or `sort=-name,creationDate` sort by names descending and creationDate ascending. |
| filter | query | optional | string | Accepts filter by kind, query, tags, unbounded, or external. To filter by kind or query, use the `equals` operator. To filter by tags, use the `anyOf` operator. Query is a 'fuzzy' search across segment key, name, and description. Example: `filter=tags anyOf ['enterprise', 'beta'],query equals 'toggle'` returns segments with 'toggle' in their key, name, or description that also have 'enterprise' or 'beta' as a tag. To filter by unbounded, use the `equals` operator. Example: `filter=unbounded equals true`. To filter by external, use the `exists` operator. Example: `filter=external exists true`. |
GET /api/v2/segments/{projectKey}/{environmentKey}
/api/v2/segments/{projectKey}/{environmentKey}
Create a new segment.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SegmentBody"
}
}
},
"required": true
}
POST /api/v2/segments/{projectKey}/{environmentKey}
/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}
Delete a segment.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
DELETE /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}
/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}
Get a single segment by key.<br/><br/>Segments can be rule-based, list-based, or synced. Big segments include larger list-based segments and synced segments. Some fields in the response only apply to big segments.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}
/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}
Update a segment. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://apidocs.launchdarkly.com). ### Using semantic patches on a segment To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://apidocs.launchdarkly.com). The body of a semantic patch request for updating segments requires an `environmentKey` in addition to `instructions` and an optional `comment`. The body of the request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. ### Instructions Semantic patch requests support the following `kind` instructions for updating segments. <details> <summary>Click to expand instructions for <strong>updating segments</strong></summary> #### addIncludedTargets Adds context keys to the individual context targets included in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. Here's an example: ```json { "instructions": [{ "kind": "addIncludedTargets", "contextKind": "org", "values": [ "org-key-123abc", "org-key-456def" ] }] } ``` #### addIncludedUsers Adds user keys to the individual user targets included in the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { "instructions": [{ "kind": "addIncludedUsers", "values": [ "user-key-123abc", "user-key-456def" ] }] } ``` #### addExcludedTargets Adds context keys to the individual context targets excluded in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. Here's an example: ```json { "instructions": [{ "kind": "addExcludedTargets", "contextKind": "org", "values": [ "org-key-123abc", "org-key-456def" ] }] } ``` #### addExcludedUsers Adds user keys to the individual user targets excluded from the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { "instructions": [{ "kind": "addExcludedUsers", "values": [ "user-key-123abc", "user-key-456def" ] }] } ``` #### removeIncludedTargets Removes context keys from the individual context targets included in the segment for the specified `contextKind`. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. Here's an example: ```json { "instructions": [{ "kind": "removeIncludedTargets", "contextKind": "org", "values": [ "org-key-123abc", "org-key-456def" ] }] } ``` #### removeIncludedUsers Removes user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { "instructions": [{ "kind": "removeIncludedUsers", "values": [ "user-key-123abc", "user-key-456def" ] }] } ``` #### removeExcludedTargets Removes context keys from the individual context targets excluded from the segment for the specified `contextKind`. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. Here's an example: ```json { "instructions": [{ "kind": "removeExcludedTargets", "contextKind": "org", "values": [ "org-key-123abc", "org-key-456def" ] }] } ``` #### removeExcludedUsers Removes user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { "instructions": [{ "kind": "removeExcludedUsers", "values": [ "user-key-123abc", "user-key-456def" ] }] } ``` #### updateName Updates the name of the segment. ##### Parameters - `value`: Name of the segment. Here's an example: ```json { "instructions": [{ "kind": "updateName", "value": "Updated segment name" }] } ``` </details> ## Using JSON patches on a segment If you do not include the header described above, you can use a [JSON patch](https://apidocs.launchdarkly.com) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. For example, to update the description for a segment with a JSON patch, use the following request body: ```json { "patch": [ { "op": "replace", "path": "/description", "value": "new description" } ] } ``` To update fields in the segment that are arrays, set the `path` to the name of the field and then append `/<array index>`. Use `/0` to add the new entry to the beginning of the array. Use `/-` to add the new entry to the end of the array. For example, to add a rule to a segment, use the following request body: ```json { "patch":[ { "op": "add", "path": "/rules/0", "value": { "clauses": [{ "contextKind": "user", "attribute": "email", "op": "endsWith", "values": [".edu"], "negate": false }] } } ] } ``` To add or remove targets from segments, we recommend using semantic patch. Semantic patch for segments includes specific instructions for adding and removing both included and excluded targets.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PatchWithComment"
},
"example": {
"patch": [
{
"op": "replace",
"path": "/description",
"value": "New description for this segment"
},
{
"op": "add",
"path": "/tags/0",
"value": "example"
}
]
}
}
},
"required": true
}
PATCH /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}
/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts
Update context targets included or excluded in a big segment. Big segments include larger list-based segments and synced segments. This operation does not support standard segments.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SegmentUserState"
}
}
},
"required": true
}
POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts
/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts/{contextKey}
Get the membership status (included/excluded) for a given context in this big segment. Big segments include larger list-based segments and synced segments. This operation does not support standard segments.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
| contextKey | path | required | string | The context key |
GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts/{contextKey}
/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users
Update user context targets included or excluded in a big segment. Big segments include larger list-based segments and synced segments. This operation does not support standard segments.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SegmentUserState"
}
}
},
"required": true
}
POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users
/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users/{userKey}
> ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://apidocs.launchdarkly.com) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Get the membership status (included/excluded) for a given user in this big segment. This operation does not support standard segments.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
| userKey | path | required | string | The user key |
GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users/{userKey}
/api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey}
Get a list of a segment's context targets that are scheduled for removal.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
GET /api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey}
/api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey}
Update expiring context targets for a segment. Updating a context target expiration uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://apidocs.launchdarkly.com). If the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty. ### Instructions Semantic patch requests support the following `kind` instructions for updating expiring context targets. <details> <summary>Click to expand instructions for <strong>updating expiring context targets</strong></summary> #### addExpiringTarget Schedules a date and time when LaunchDarkly will remove a context from segment targeting. The segment must already have the context as an individual target. ##### Parameters - `targetType`: The type of individual target for this context. Must be either `included` or `excluded`. - `contextKey`: The context key. - `contextKind`: The kind of context being targeted. - `value`: The date when the context should expire from the segment targeting, in Unix milliseconds. Here's an example: ```json { "instructions": [{ "kind": "addExpiringTarget", "targetType": "included", "contextKey": "user-key-123abc", "contextKind": "user", "value": 1754092860000 }] } ``` #### updateExpiringTarget Updates the date and time when LaunchDarkly will remove a context from segment targeting. ##### Parameters - `targetType`: The type of individual target for this context. Must be either `included` or `excluded`. - `contextKey`: The context key. - `contextKind`: The kind of context being targeted. - `value`: The new date when the context should expire from the segment targeting, in Unix milliseconds. - `version`: (Optional) The version of the expiring target to update. If included, update will fail if version doesn't match current version of the expiring target. Here's an example: ```json { "instructions": [{ "kind": "updateExpiringTarget", "targetType": "included", "contextKey": "user-key-123abc", "contextKind": "user", "value": 1754179260000 }] } ``` #### removeExpiringTarget Removes the scheduled expiration for the context in the segment. ##### Parameters - `targetType`: The type of individual target for this context. Must be either `included` or `excluded`. - `contextKey`: The context key. - `contextKind`: The kind of context being targeted. Here's an example: ```json { "instructions": [{ "kind": "removeExpiringTarget", "targetType": "included", "contextKey": "user-key-123abc", "contextKind": "user", }] } ``` </details>
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/patchSegmentExpiringTargetInputRep"
}
}
},
"required": true
}
PATCH /api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey}
/api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey}
> ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://apidocs.launchdarkly.com) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Get a list of a segment's user targets that are scheduled for removal.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
GET /api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey}
/api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey}
> ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](https://apidocs.launchdarkly.com) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Update expiring user targets for a segment. Updating a user target expiration uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://apidocs.launchdarkly.com). If the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty. ### Instructions Semantic patch requests support the following `kind` instructions for updating expiring user targets. <details> <summary>Click to expand instructions for <strong>updating expiring user targets</strong></summary> #### addExpireUserTargetDate Schedules a date and time when LaunchDarkly will remove a user from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `userKey`: The user key. - `value`: The date when the user should expire from the segment targeting, in Unix milliseconds. #### updateExpireUserTargetDate Updates the date and time when LaunchDarkly will remove a user from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `userKey`: The user key. - `value`: The new date when the user should expire from the segment targeting, in Unix milliseconds. - `version`: The segment version. #### removeExpireUserTargetDate Removes the scheduled expiration for the user in the segment. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `userKey`: The user key. </details>
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/patchSegmentRequest"
}
}
},
"required": true
}
PATCH /api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey}
/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports
Starts a new export process for a big segment. This is an export for a synced segment or a list-based segment that can include more than 15,000 entries.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports
/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID}
Returns information about a big segment export process. This is an export for a synced segment or a list-based segment that can include more than 15,000 entries.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
| exportID | path | required | string | The export ID |
GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID}
/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports
Start a new import process for a big segment. This is an import for a list-based segment that can include more than 15,000 entries.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
{
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/SegmentsBetaStartBigSegmentImportRequest"
}
}
},
"required": true
}
POST /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports
/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID}
Returns information about a big segment import process. This is the import of a list-based segment that can include more than 15,000 entries.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| environmentKey | path | required | string | The environment key |
| segmentKey | path | required | string | The segment key |
| importID | path | required | string | The import ID |
GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID}
/api/v2/tags
Get a list of tags.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| kind | query | optional | string | Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`. Returns all types by default. |
| pre | query | optional | string | Return tags with the specified prefix |
| archived | query | optional | boolean | Whether or not to return archived flags |
GET /api/v2/tags
/api/v2/teams
Return a list of teams. By default, this returns the first 20 teams. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, 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, because there is no previous page and you cannot return to the first page when you are already on the first page. ### Filtering teams LaunchDarkly supports the following fields for filters: - `query` is a string that matches against the teams' names and keys. It is not case-sensitive. - A request with `query:abc` returns teams with the string `abc` in their name or key. - `nomembers` is a boolean that filters the list of teams who have 0 members - A request with `nomembers:true` returns teams that have 0 members - A request with `nomembers:false` returns teams that have 1 or more members ### Expanding the teams response LaunchDarkly supports expanding several fields in the "List teams" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | integer | The number of teams to return in the response. Defaults to 20. |
| offset | query | optional | integer | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items. |
| filter | query | optional | string | A comma-separated list of filters. Each filter is constructed as `field:value`. |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. |
GET /api/v2/teams
/api/v2/teams
Create a team. To learn more, read [Creating a team](https://docs.launchdarkly.com/home/teams/creating). ### Expanding the teams response LaunchDarkly supports four fields for expanding the "Create team" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,roles` includes the `members` and `roles` fields in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/teamPostInput"
},
"example": {
"key": "team-key-123abc",
"name": "Example team",
"memberIDs": [
"12ab3c45de678910fgh12345"
],
"description": "An example team",
"customRoleKeys": [
"example-role1",
"example-role2"
]
}
}
},
"required": true
}
POST /api/v2/teams
/api/v2/teams/{teamKey}
Delete a team by key. To learn more, read [Deleting a team](https://docs.launchdarkly.com/home/teams/managing#deleting-a-team).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamKey | path | required | string | The team key |
DELETE /api/v2/teams/{teamKey}
/api/v2/teams/{teamKey}
Fetch a team by key. ### Expanding the teams response LaunchDarkly supports four fields for expanding the "Get team" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,roles` includes the `members` and `roles` fields in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamKey | path | required | string | The team key. |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. |
GET /api/v2/teams/{teamKey}
/api/v2/teams/{teamKey}
Perform a partial update to a team. Updating a team uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://apidocs.launchdarkly.com). ### Instructions Semantic patch requests support the following `kind` instructions for updating teams. <details> <summary>Click to expand instructions for <strong>updating teams</strong></summary> #### addCustomRoles Adds custom roles to the team. Team members will have these custom roles granted to them. ##### Parameters - `values`: List of custom role keys. Here's an example: ```json { "instructions": [{ "kind": "addCustomRoles", "values": [ "example-custom-role" ] }] } ``` #### removeCustomRoles Removes custom roles from the team. The app will no longer grant these custom roles to the team members. ##### Parameters - `values`: List of custom role keys. Here's an example: ```json { "instructions": [{ "kind": "removeCustomRoles", "values": [ "example-custom-role" ] }] } ``` #### addMembers Adds members to the team. ##### Parameters - `values`: List of member IDs to add. Here's an example: ```json { "instructions": [{ "kind": "addMembers", "values": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } ``` #### removeMembers Removes members from the team. ##### Parameters - `values`: List of member IDs to remove. Here's an example: ```json { "instructions": [{ "kind": "removeMembers", "values": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } ``` #### replaceMembers Replaces the existing members of the team with the new members. ##### Parameters - `values`: List of member IDs of the new members. Here's an example: ```json { "instructions": [{ "kind": "replaceMembers", "values": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } ``` #### addPermissionGrants Adds permission grants to members for the team. For example, a permission grant could allow a member to act as a team maintainer. A permission grant may have either an `actionSet` or a list of `actions` but not both at the same time. The members do not have to be team members to have a permission grant for the team. ##### Parameters - `actionSet`: Name of the action set. - `actions`: List of actions. - `memberIDs`: List of member IDs. Here's an example: ```json { "instructions": [{ "kind": "addPermissionGrants", "actions": [ "updateTeamName", "updateTeamDescription" ], "memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } ``` #### removePermissionGrants Removes permission grants from members for the team. A permission grant may have either an `actionSet` or a list of `actions` but not both at the same time. The `actionSet` and `actions` must match an existing permission grant. ##### Parameters - `actionSet`: Name of the action set. - `actions`: List of actions. - `memberIDs`: List of member IDs. Here's an example: ```json { "instructions": [{ "kind": "removePermissionGrants", "actions": [ "updateTeamName", "updateTeamDescription" ], "memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } ``` #### updateDescription Updates the description of the team. ##### Parameters - `value`: The new description. Here's an example: ```json { "instructions": [{ "kind": "updateDescription", "value": "Updated team description" }] } ``` #### updateName Updates the name of the team. ##### Parameters - `value`: The new name. Here's an example: ```json { "instructions": [{ "kind": "updateName", "value": "Updated team name" }] } ``` </details> ### Expanding the teams response LaunchDarkly supports four fields for expanding the "Update team" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: * `members` includes the total count of members that belong to the team. * `roles` includes a paginated list of the custom roles that you have assigned to the team. * `projects` includes a paginated list of the projects that the team has any write access to. * `maintainers` includes a paginated list of the maintainers that you have assigned to the team. For example, `expand=members,roles` includes the `members` and `roles` fields in the response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamKey | path | required | string | The team key |
| expand | query | optional | string | A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/teamPatchInput"
},
"example": {
"comment": "Optional comment about the update",
"instructions": [
{
"kind": "updateDescription",
"value": "New description for the team"
}
]
}
}
},
"required": true
}
PATCH /api/v2/teams/{teamKey}
/api/v2/teams/{teamKey}/maintainers
Fetch the maintainers that have been assigned to the team. To learn more, read [Managing team maintainers](https://docs.launchdarkly.com/home/teams/managing#managing-team-maintainers).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamKey | path | required | string | The team key |
| limit | query | optional | integer | The number of maintainers to return in the response. Defaults to 20. |
| offset | query | optional | integer | Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. |
GET /api/v2/teams/{teamKey}/maintainers
/api/v2/teams/{teamKey}/members
Add multiple members to an existing team by uploading a CSV file of member email addresses. Your CSV file must include email addresses in the first column. You can include data in additional columns, but LaunchDarkly ignores all data outside the first column. Headers are optional. To learn more, read [Managing team members](https://docs.launchdarkly.com/home/teams/managing#managing-team-members). **Members are only added on a `201` response.** A `207` indicates the CSV file contains a combination of valid and invalid entries. A `207` results in no members being added to the team. On a `207` response, if an entry contains bad input, the `message` field contains the row number as well as the reason for the error. The `message` field is omitted if the entry is valid. Example `207` response: ```json { "items": [ { "status": "success", "value": "new-team-member@acme.com" }, { "message": "Line 2: empty row", "status": "error", "value": "" }, { "message": "Line 3: email already exists in the specified team", "status": "error", "value": "existing-team-member@acme.com" }, { "message": "Line 4: invalid email formatting", "status": "error", "value": "invalid email format" } ] } ``` Message | Resolution --- | --- Empty row | This line is blank. Add an email address and try again. Duplicate entry | This email address appears in the file twice. Remove the email from the file and try again. Email already exists in the specified team | This member is already on your team. Remove the email from the file and try again. Invalid formatting | This email address is not formatted correctly. Fix the formatting and try again. Email does not belong to a LaunchDarkly member | The email address doesn't belong to a LaunchDarkly account member. Invite them to LaunchDarkly, then re-add them to the team. On a `400` response, the `message` field may contain errors specific to this endpoint. Example `400` response: ```json { "code": "invalid_request", "message": "Unable to process file" } ``` Message | Resolution --- | --- Unable to process file | LaunchDarkly could not process the file for an unspecified reason. Review your file for errors and try again. File exceeds 25mb | Break up your file into multiple files of less than 25mbs each. All emails have invalid formatting | None of the email addresses in the file are in the correct format. Fix the formatting and try again. All emails belong to existing team members | All listed members are already on this team. Populate the file with member emails that do not belong to the team and try again. File is empty | The CSV file does not contain any email addresses. Populate the file and try again. No emails belong to members of your LaunchDarkly organization | None of the email addresses belong to members of your LaunchDarkly account. Invite these members to LaunchDarkly, then re-add them to the team.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamKey | path | required | string | The team key |
{
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/TeamsAddMultipleMembersToTeamRequest"
}
}
},
"required": true
}
POST /api/v2/teams/{teamKey}/members
/api/v2/teams/{teamKey}/roles
Fetch the custom roles that have been assigned to the team. To learn more, read [Managing team permissions](https://docs.launchdarkly.com/home/teams/managing#managing-team-permissions).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| teamKey | path | required | string | The team key |
| limit | query | optional | integer | The number of roles to return in the response. Defaults to 20. |
| offset | query | optional | integer | Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. |
GET /api/v2/teams/{teamKey}/roles
/api/v2/teams
Perform a partial update to multiple teams. Updating teams uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://apidocs.launchdarkly.com). ### Instructions Semantic patch requests support the following `kind` instructions for updating teams. <details> <summary>Click to expand instructions for <strong>updating teams</strong></summary> #### addMembersToTeams Add the members to teams. ##### Parameters - `memberIDs`: List of member IDs to add. - `teamKeys`: List of teams to update. Here's an example: ```json { "instructions": [{ "kind": "addMembersToTeams", "memberIDs": [ "1234a56b7c89d012345e678f" ], "teamKeys": [ "example-team-1", "example-team-2" ] }] } ``` #### addAllMembersToTeams Add all members to the team. Members that match any of the filters are **excluded** from the update. ##### Parameters - `teamKeys`: List of teams to update. - `filterLastSeen`: (Optional) A JSON object with one of the following formats: - `{"never": true}` - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM. - `{"noData": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps. - `{"before": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds. - `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive. - `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`. - `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive. - `ignoredMemberIDs`: (Optional) A list of member IDs. Here's an example: ```json { "instructions": [{ "kind": "addAllMembersToTeams", "teamKeys": [ "example-team-1", "example-team-2" ], "filterLastSeen": { "never": true } }] } ``` </details>
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/teamsPatchInput"
},
"example": {
"comment": "Optional comment about the update",
"instructions": [
{
"kind": "addMembersToTeams",
"teamKeys": [
"example-team-1",
"example-team-2"
],
"memberIDs": [
"1234a56b7c89d012345e678f"
]
}
]
}
}
},
"required": true
}
PATCH /api/v2/teams
/api/v2/webhooks
Fetch a list of all webhooks.
GET /api/v2/webhooks
/api/v2/webhooks
Create a new webhook.
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhookPost"
},
"example": {
"on": true,
"url": "https://example.com",
"name": "apidocs test webhook",
"sign": false,
"tags": [
"example-tag"
],
"statements": [
{
"effect": "allow",
"actions": [
"*"
],
"resources": [
"proj/test"
]
}
]
}
}
},
"required": true
}
POST /api/v2/webhooks
/api/v2/webhooks/{id}
Delete a webhook by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The ID of the webhook to delete |
DELETE /api/v2/webhooks/{id}
/api/v2/webhooks/{id}
Get a single webhook by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The ID of the webhook |
GET /api/v2/webhooks/{id}
/api/v2/webhooks/{id}
Update a webhook's settings. Updating webhook settings uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://apidocs.launchdarkly.com).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The ID of the webhook to update |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JSONPatch"
},
"example": [
{
"op": "replace",
"path": "/on",
"value": false
}
]
}
},
"required": true
}
PATCH /api/v2/webhooks/{id}
/api/v2/templates
Get workflow templates belonging to an account, or can optionally return templates_endpoints.workflowTemplateSummariesListingOutputRep when summary query param is true
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| summary | query | optional | boolean | Whether the entire template object or just a summary should be returned |
| search | query | optional | string | The substring in either the name or description of a template |
GET /api/v2/templates
/api/v2/templates
Create a template for a feature flag workflow
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateWorkflowTemplateInput"
}
}
},
"required": true
}
POST /api/v2/templates
/api/v2/templates/{templateKey}
Delete a workflow template
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| templateKey | path | required | string | The template key |
DELETE /api/v2/templates/{templateKey}
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows
Display workflows associated with a feature flag.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| status | query | optional | string | Filter results by workflow status. Valid status filters are `active`, `completed`, and `failed`. |
| sort | query | optional | string | A field to sort the items by. Prefix field by a dash ( - ) to sort in descending order. This endpoint supports sorting by `creationDate` or `stopDate`. |
| limit | query | optional | integer | The maximum number of workflows to return. Defaults to 20. |
| offset | query | optional | integer | Where to start in the list. Defaults to 0. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. |
GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows
Create a workflow for a feature flag. You can create a workflow directly, or you can apply a template to create a new workflow. ### Creating a workflow You can use the create workflow endpoint to create a workflow directly by adding a `stages` array to the request body. For each stage, define the `name`, `conditions` when the stage should be executed, and `action` that describes the stage. <details> <summary>Click to expand example</summary> _Example request body_ ```json { "name": "Progressive rollout starting in two days", "description": "Turn flag targeting on and increase feature rollout in 10% increments each day", "stages": [ { "name": "10% rollout on day 1", "conditions": [ { "kind": "schedule", "scheduleKind": "relative", // or "absolute" // If "scheduleKind" is "absolute", set "executionDate"; // "waitDuration" and "waitDurationUnit" will be ignored "waitDuration": 2, "waitDurationUnit": "calendarDay" }, { "kind": "ld-approval", "notifyMemberIds": [ "507f1f77bcf86cd799439011" ], "notifyTeamKeys": [ "team-key-123abc" ] } ], "action": { "instructions": [ { "kind": "turnFlagOn" }, { "kind": "updateFallthroughVariationOrRollout", "rolloutWeights": { "452f5fb5-7320-4ba3-81a1-8f4324f79d49": 90000, "fc15f6a4-05d3-4aa4-a997-446be461345d": 10000 } } ] } } ] } ``` </details> ### Creating a workflow by applying a workflow template You can also create a workflow by applying a workflow template. If you pass a valid workflow template key as the `templateKey` query parameter with the request, the API will attempt to create a new workflow with the stages defined in the workflow template with the corresponding key. #### Applicability of stages Templates are created in the context of a particular flag in a particular environment in a particular project. However, because workflows created from a template can be applied to any project, environment, and flag, some steps of the workflow may need to be updated in order to be applicable for the target resource. You can pass a `dryRun` query parameter to tell the API to return a report of which steps of the workflow template are applicable in the target project/environment/flag, and which will need to be updated. When the `dryRun` query parameter is present the response body includes a `meta` property that holds a list of parameters that could potentially be inapplicable for the target resource. Each of these parameters will include a `valid` field. You will need to update any invalid parameters in order to create the new workflow. You can do this using the `parameters` property, which overrides the workflow template parameters. #### Overriding template parameters You can use the `parameters` property in the request body to tell the API to override the specified workflow template parameters with new values that are specific to your target project/environment/flag. <details> <summary>Click to expand example</summary> _Example request body_ ```json { "name": "workflow created from my-template", "description": "description of my workflow", "parameters": [ { "_id": "62cf2bc4cadbeb7697943f3b", "path": "/clauses/0/values", "default": { "value": ["updated-segment"] } }, { "_id": "62cf2bc4cadbeb7697943f3d", "path": "/variationId", "default": { "value": "abcd1234-abcd-1234-abcd-1234abcd12" } } ] } ``` </details> If there are any steps in the template that are not applicable to the target resource, the workflow will not be created, and the `meta` property will be included in the response body detailing which parameters need to be updated.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| templateKey | query | optional | string | The template key to apply as a starting point for the new workflow |
| dryRun | query | optional | boolean | Whether to call the endpoint in dry-run mode |
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomWorkflowInput"
},
"example": {
"name": "Progressive rollout starting in two days",
"stages": [
{
"name": "10% rollout on day 1",
"action": {
"instructions": [
{
"kind": "turnFlagOn"
},
{
"kind": "updateFallthroughVariationOrRollout",
"rolloutWeights": {
"452f5fb5-7320-4ba3-81a1-8f4324f79d49": 90000,
"fc15f6a4-05d3-4aa4-a997-446be461345d": 10000
}
}
]
},
"conditions": [
{
"kind": "schedule",
"scheduleKind": "relative",
"waitDuration": 2,
"waitDurationUnit": "calendarDay"
}
]
}
],
"description": "Turn flag on for 10% of customers each day"
}
}
},
"required": true
}
POST /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}
Delete a workflow from a feature flag.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| workflowId | path | required | string | The workflow id |
DELETE /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}
/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}
Get a specific workflow by ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| projectKey | path | required | string | The project key |
| featureFlagKey | path | required | string | The feature flag key |
| environmentKey | path | required | string | The environment key |
| workflowId | path | required | string | The workflow ID |
GET /api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}
Access
{
"type": "object",
"required": [
"denied",
"allowed"
],
"properties": {
"denied": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AccessDenied"
}
},
"allowed": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AccessAllowedRep"
}
}
}
}
AccessAllowedReason
{
"type": "object",
"required": [
"effect"
],
"properties": {
"effect": {
"enum": [
"allow",
"deny"
],
"type": "string",
"example": "allow",
"description": "Whether this statement should allow or deny actions on the resources."
},
"actions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ActionSpecifier"
},
"example": [
"*"
],
"description": "Actions to perform on a resource"
},
"resources": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"proj/*:env/*;qa_*:/flag/*"
],
"description": "Resource specifier strings"
},
"role_name": {
"type": "string"
},
"notActions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ActionSpecifier"
},
"description": "Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field."
},
"notResources": {
"type": "array",
"items": {
"type": "string"
},
"description": "Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field."
}
}
}
AccessAllowedRep
{
"type": "object",
"required": [
"action",
"reason"
],
"properties": {
"action": {
"$ref": "#/components/schemas/ActionIdentifier"
},
"reason": {
"$ref": "#/components/schemas/AccessAllowedReason"
}
}
}
AccessDenied
{
"type": "object",
"required": [
"action",
"reason"
],
"properties": {
"action": {
"$ref": "#/components/schemas/ActionIdentifier"
},
"reason": {
"$ref": "#/components/schemas/AccessDeniedReason"
}
}
}
AccessDeniedReason
{
"type": "object",
"required": [
"effect"
],
"properties": {
"effect": {
"enum": [
"allow",
"deny"
],
"type": "string",
"example": "allow",
"description": "Whether this statement should allow or deny actions on the resources."
},
"actions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ActionSpecifier"
},
"example": [
"*"
],
"description": "Actions to perform on a resource"
},
"resources": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"proj/*:env/*;qa_*:/flag/*"
],
"description": "Resource specifier strings"
},
"role_name": {
"type": "string"
},
"notActions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ActionSpecifier"
},
"description": "Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field."
},
"notResources": {
"type": "array",
"items": {
"type": "string"
},
"description": "Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field."
}
}
}
AccessTokenPost
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "A human-friendly name for the access token"
},
"role": {
"enum": [
"reader",
"writer",
"admin"
],
"type": "string",
"description": "Built-in role for the token"
},
"inlineRole": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatementPost"
},
"description": "A JSON array of statements represented as JSON objects with three attributes: effect, resources, actions. May be used in place of a built-in or custom role."
},
"description": {
"type": "string",
"description": "A description for the access token"
},
"serviceToken": {
"type": "boolean",
"description": "Whether the token is a service token https://docs.launchdarkly.com/home/account-security/api-access-tokens#service-tokens"
},
"customRoleIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of custom role IDs to use as access limits for the access token"
},
"defaultApiVersion": {
"type": "integer",
"description": "The default API version for this token"
}
}
}
ActionIdentifier
{
"type": "string"
}
ActionInput
{
"type": "object",
"properties": {
"instructions": {
"example": "{\"instructions\": [{ \"kind\": \"turnFlagOn\"}]}",
"description": "An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag."
}
}
}
ActionOutput
{
"type": "object",
"required": [
"kind",
"instructions"
],
"properties": {
"kind": {
"type": "string",
"example": "patch",
"description": "The type of action for this stage"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[{\"kind\": \"turnFlagOn\"}]",
"description": "An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag."
}
}
}
ActionSpecifier
{
"type": "string"
}
AllVariationsSummary
{
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/VariationSummary"
}
}
ApplicationCollectionRep
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ApplicationRep"
},
"description": "A list of applications"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "The number of applications"
}
}
}
ApplicationFlagCollectionRep
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FlagListingRep"
},
"description": "A list of the flags that have been evaluated by the application"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "The number of flags that have been evaluated by the application"
}
}
}
ApplicationRep
{
"type": "object",
"required": [
"autoAdded",
"key",
"kind",
"name"
],
"properties": {
"key": {
"type": "string",
"example": "com.launchdarkly.cafe",
"description": "The unique identifier of this application"
},
"kind": {
"enum": [
"browser",
"mobile",
"server"
],
"type": "string",
"example": "mobile",
"description": "To distinguish the kind of application"
},
"name": {
"type": "string",
"example": "LaunchDarklyCafe",
"description": "The name of the application"
},
"flags": {
"$ref": "#/components/schemas/ApplicationFlagCollectionRep",
"description": "Details about the flags that have been evaluated by the application"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this application"
},
"_version": {
"type": "integer",
"description": "Version of the application"
},
"autoAdded": {
"type": "boolean",
"example": true,
"description": "Whether the application was automatically created because it was included in a context when a LaunchDarkly SDK evaluated a feature flag, or was created through the LaunchDarkly UI or REST API."
},
"_maintainer": {
"$ref": "#/components/schemas/MaintainerRep",
"description": "Associated maintainer member or team info for the application"
},
"description": {
"type": "string",
"example": "The LaunchDarkly Cafe app",
"description": "The application description"
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the application version was created"
}
}
}
ApplicationVersionRep
{
"type": "object",
"required": [
"autoAdded",
"key",
"name"
],
"properties": {
"key": {
"type": "string",
"example": "2",
"description": "The unique identifier of this application version"
},
"name": {
"type": "string",
"example": "01.02.03",
"description": "The name of this version"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this application version"
},
"_version": {
"type": "integer",
"description": "Version of the application version"
},
"autoAdded": {
"type": "boolean",
"example": true,
"description": "Whether the application version was automatically created, because it was included in a context when a LaunchDarkly SDK evaluated a feature flag, or if the application version was created through the LaunchDarkly UI or REST API. "
},
"supported": {
"type": "boolean",
"example": true,
"description": "Whether this version is supported. Only applicable if the application <code>kind</code> is <code>mobile</code>."
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the application version was created"
}
}
}
ApplicationVersionsCollectionRep
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ApplicationVersionRep"
},
"description": "A list of the versions for this application"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "The number of versions for this application"
}
}
}
ApprovalRequestResponse
{
"type": "object",
"required": [
"_id",
"_version",
"creationDate",
"serviceKind",
"reviewStatus",
"allReviews",
"notifyMemberIds",
"status",
"instructions",
"conflicts",
"_links"
],
"properties": {
"_id": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "The ID of this approval request"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {}
},
"source": {
"$ref": "#/components/schemas/CopiedFromEnv",
"description": "Details about the source feature flag, if copied"
},
"status": {
"enum": [
"pending",
"completed",
"failed",
"scheduled"
],
"type": "string",
"example": "pending",
"description": "Current status of the approval request"
},
"_version": {
"type": "integer",
"example": 1,
"description": "Version of the approval request"
},
"conflicts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Conflict"
},
"description": "Details on any conflicting approval requests"
},
"allReviews": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReviewResponse"
},
"description": "An array of individual reviews of this approval request"
},
"resourceId": {
"type": "string",
"description": "String representation of a resource"
},
"appliedDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the approval request was applied"
},
"description": {
"type": "string",
"example": "example: request approval from someone",
"description": "A human-friendly name for the approval request"
},
"requestorId": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "The ID of the member who requested the approval"
},
"serviceKind": {
"$ref": "#/components/schemas/ApprovalRequestServiceKind",
"example": "launchdarkly",
"description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA."
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the approval request was created"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[{\"kind\": \"turnFlagOn\"}]",
"description": "List of instructions in semantic patch format to be applied to the feature flag"
},
"reviewStatus": {
"enum": [
"approved",
"declined",
"pending"
],
"type": "string",
"example": "pending",
"description": "Current status of the review of this approval request"
},
"executionDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp for when instructions will be executed"
},
"operatingOnId": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "ID of scheduled change to edit or delete"
},
"notifyMemberIds": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"1234a56b7c89d012345e678f"
],
"description": "An array of member IDs. These members are notified to review the approval request."
},
"approvalSettings": {
"$ref": "#/components/schemas/ApprovalSettings",
"description": "The settings for this approval"
},
"appliedByMemberId": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The member ID of the member who applied the approval request"
},
"integrationMetadata": {
"$ref": "#/components/schemas/IntegrationMetadata",
"description": "Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used"
},
"customWorkflowMetadata": {
"$ref": "#/components/schemas/CustomWorkflowMeta",
"description": "Details about the custom workflow, if this approval request is part of a custom workflow"
},
"appliedByServiceTokenId": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The service token ID of the service token which applied the approval request"
}
}
}
ApprovalRequestServiceKind
{
"type": "string"
}
ApprovalSettings
{
"type": "object",
"required": [
"required",
"bypassApprovalsForPendingChanges",
"minNumApprovals",
"canReviewOwnRequest",
"canApplyDeclinedChanges",
"serviceKind",
"serviceConfig",
"requiredApprovalTags"
],
"properties": {
"required": {
"type": "boolean",
"example": true,
"description": "If approvals are required for this environment"
},
"serviceKind": {
"type": "string",
"example": "launchdarkly",
"description": "Which service to use for managing approvals"
},
"serviceConfig": {
"type": "object",
"example": {},
"additionalProperties": {}
},
"minNumApprovals": {
"type": "integer",
"example": 1,
"description": "Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five."
},
"canReviewOwnRequest": {
"type": "boolean",
"example": false,
"description": "Allow someone who makes an approval request to apply their own change"
},
"requiredApprovalTags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"require-approval"
],
"description": "Require approval only on flags with the provided tags. Otherwise all flags will require approval."
},
"canApplyDeclinedChanges": {
"type": "boolean",
"example": true,
"description": "Allow applying the change as long as at least one person has approved"
},
"bypassApprovalsForPendingChanges": {
"type": "boolean",
"example": false,
"description": "Whether to skip approvals for pending changes"
}
}
}
Audience
{
"type": "object",
"required": [
"environment",
"name"
],
"properties": {
"name": {
"type": "string",
"example": "Phase 1 - Testing",
"description": "The release phase name"
},
"environment": {
"$ref": "#/components/schemas/EnvironmentSummary",
"description": "Details about the environment"
}
}
}
AudiencePost
{
"type": "object",
"required": [
"environmentKey",
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The audience name"
},
"environmentKey": {
"type": "string",
"description": "A project-unique key for the environment."
}
}
}
Audiences
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Audience"
}
}
AuditLogEntryListingRep
{
"type": "object",
"required": [
"_links",
"_id",
"_accountId",
"date",
"accesses",
"kind",
"name",
"description",
"shortDescription"
],
"properties": {
"_id": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The ID of the audit log entry"
},
"app": {
"$ref": "#/components/schemas/AuthorizedAppDataRep",
"description": "Details of the authorized application that initiated the action described in the audit log entry"
},
"date": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of the audit log entry"
},
"kind": {
"$ref": "#/components/schemas/ResourceKind",
"example": "flag",
"description": "The type of resource this audit log entry refers to"
},
"name": {
"type": "string",
"example": "Example feature flag",
"description": "The name of the resource this audit log entry refers to"
},
"title": {
"type": "string",
"description": "A description of what occurred, in the format <code>member</code> <code>titleVerb</code> <code>target</code>"
},
"token": {
"$ref": "#/components/schemas/TokenSummary",
"description": "Details of the access token that initiated the action described in the audit log entry"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"member": {
"$ref": "#/components/schemas/MemberDataRep",
"description": "Details of the member who initiated the action described in the audit log entry"
},
"parent": {
"$ref": "#/components/schemas/ParentResourceRep"
},
"target": {
"$ref": "#/components/schemas/TargetResourceRep",
"example": "[Ariel Flores](mailto:ariel@acme.com) turned on the flag [example-flag](https://app.launchdarkly.com/example-project/production/features/example-flag) in Production",
"description": "Details of the resource acted upon in this audit log entry"
},
"comment": {
"type": "string",
"example": "This is an automated test",
"description": "Optional comment for the audit log entry"
},
"subject": {
"$ref": "#/components/schemas/SubjectDataRep",
"description": "Details of the subject who initiated the action described in the audit log entry"
},
"accesses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceAccess"
},
"description": "Details on the actions performed and resources acted on in this audit log entry"
},
"titleVerb": {
"type": "string",
"example": "turned on the flag",
"description": "The action and resource recorded in this audit log entry"
},
"_accountId": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The ID of the account to which this audit log entry belongs"
},
"description": {
"type": "string",
"example": "Example, turning on the flag for testing",
"description": "Description of the change recorded in the audit log entry"
},
"shortDescription": {
"type": "string",
"example": "Example, turning on the flag",
"description": "Shorter version of the change recorded in the audit log entry"
}
}
}
AuditLogEntryListingRepCollection
{
"type": "object",
"required": [
"items",
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AuditLogEntryListingRep"
},
"description": "An array of audit log entries"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
AuditLogEntryRep
{
"type": "object",
"required": [
"_links",
"_id",
"_accountId",
"date",
"accesses",
"kind",
"name",
"description",
"shortDescription"
],
"properties": {
"_id": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The ID of the audit log entry"
},
"app": {
"$ref": "#/components/schemas/AuthorizedAppDataRep",
"description": "Details of the authorized application that initiated the action described in the audit log entry"
},
"date": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of the audit log entry"
},
"kind": {
"$ref": "#/components/schemas/ResourceKind",
"example": "flag",
"description": "The type of resource this audit log entry refers to"
},
"name": {
"type": "string",
"example": "Example feature flag",
"description": "The name of the resource this audit log entry refers to"
},
"delta": {
"description": "If the audit log entry has been updated, this is the JSON patch body that was used in the request to update the entity"
},
"merge": {
"description": "A JSON representation of the merge information for this audit log entry, if any"
},
"title": {
"type": "string",
"description": "A description of what occurred, in the format <code>member</code> <code>titleVerb</code> <code>target</code>"
},
"token": {
"$ref": "#/components/schemas/TokenSummary",
"description": "Details of the access token that initiated the action described in the audit log entry"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"member": {
"$ref": "#/components/schemas/MemberDataRep",
"description": "Details of the member who initiated the action described in the audit log entry"
},
"parent": {
"$ref": "#/components/schemas/ParentResourceRep"
},
"target": {
"$ref": "#/components/schemas/TargetResourceRep",
"example": "[Ariel Flores](mailto:ariel@acme.com) turned on the flag [example-flag](https://app.launchdarkly.com/example-project/production/features/example-flag) in Production",
"description": "Details of the resource acted upon in this audit log entry"
},
"comment": {
"type": "string",
"example": "This is an automated test",
"description": "Optional comment for the audit log entry"
},
"subject": {
"$ref": "#/components/schemas/SubjectDataRep",
"description": "Details of the subject who initiated the action described in the audit log entry"
},
"accesses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResourceAccess"
},
"description": "Details on the actions performed and resources acted on in this audit log entry"
},
"titleVerb": {
"type": "string",
"example": "turned on the flag",
"description": "The action and resource recorded in this audit log entry"
},
"_accountId": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The ID of the account to which this audit log entry belongs"
},
"subentries": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AuditLogEntryListingRep"
}
},
"description": {
"type": "string",
"example": "Example, turning on the flag for testing",
"description": "Description of the change recorded in the audit log entry"
},
"triggerBody": {
"description": "A JSON representation of the external trigger for this audit log entry, if any"
},
"currentVersion": {
"description": "If the audit log entry has been updated, this is a JSON representation of the current version of the entity"
},
"previousVersion": {
"description": "If the audit log entry has been updated, this is a JSON representation of the previous version of the entity"
},
"shortDescription": {
"type": "string",
"example": "Example, turning on the flag",
"description": "Shorter version of the change recorded in the audit log entry"
}
}
}
AuthorizedAppDataRep
{
"type": "object",
"properties": {
"_id": {
"type": "string",
"description": "The ID of the authorized application"
},
"name": {
"type": "string",
"description": "The authorized application name"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"isScim": {
"type": "boolean",
"description": "Whether the application is authorized through SCIM"
},
"maintainerName": {
"type": "string",
"description": "The name of the maintainer for this authorized application"
}
}
}
BigSegmentStoreIntegration
{
"type": "object",
"required": [
"_links",
"_id",
"integrationKey",
"projectKey",
"environmentKey",
"config",
"on",
"tags",
"name",
"version",
"_status"
],
"properties": {
"on": {
"type": "boolean",
"example": true,
"description": "Whether the configuration is turned on"
},
"_id": {
"type": "string",
"example": "12ab3c4d5ef1a2345bcde67f",
"description": "The integration ID"
},
"name": {
"type": "string",
"example": "Development environment configuration",
"description": "Name of the configuration"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [],
"description": "List of tags for this configuration"
},
"_links": {
"$ref": "#/components/schemas/BigSegmentStoreIntegrationLinks",
"description": "The location and content type of related resources"
},
"config": {
"$ref": "#/components/schemas/FormVariableConfig",
"description": "The delivery configuration for the given integration provider. Only included when requesting a single integration by ID. Refer to the <code>formVariables</code> field in the corresponding <code>manifest.json</code> for a full list of fields for each integration."
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this configuration"
},
"_status": {
"$ref": "#/components/schemas/BigSegmentStoreStatus",
"description": "Details on the connection status of the persistent store integration"
},
"version": {
"type": "integer",
"example": 1,
"description": "Version of the current configuration"
},
"projectKey": {
"type": "string",
"example": "default",
"description": "The project key"
},
"environmentKey": {
"type": "string",
"example": "development",
"description": "The environment key"
},
"integrationKey": {
"enum": [
"redis",
"dynamodb"
],
"type": "string",
"example": "redis",
"description": "The integration key"
}
}
}
BigSegmentStoreIntegrationCollection
{
"type": "object",
"required": [
"_links",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BigSegmentStoreIntegration"
},
"description": "An array of persistent store integration configurations"
},
"_links": {
"$ref": "#/components/schemas/BigSegmentStoreIntegrationCollectionLinks",
"description": "The location and content type of related resources"
}
}
}
BigSegmentStoreIntegrationCollectionLinks
{
"type": "object",
"required": [
"self"
],
"properties": {
"self": {
"$ref": "#/components/schemas/Link"
},
"parent": {
"$ref": "#/components/schemas/Link"
}
}
}
BigSegmentStoreIntegrationLinks
{
"type": "object",
"required": [
"self",
"parent",
"project",
"environment"
],
"properties": {
"self": {
"$ref": "#/components/schemas/Link"
},
"parent": {
"$ref": "#/components/schemas/Link"
},
"project": {
"$ref": "#/components/schemas/Link"
},
"environment": {
"$ref": "#/components/schemas/Link"
}
}
}
BigSegmentStoreStatus
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StoreIntegrationError"
}
},
"lastSync": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1717263000000",
"description": "Timestamp of when the most recent successful sync occurred between the persistent store integration and the LaunchDarkly environment."
},
"available": {
"type": "boolean",
"example": true,
"description": "Whether the persistent store integration is fully synchronized with the LaunchDarkly environment, and the <code>lastSync</code> occurred within a few minutes"
},
"lastError": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1714584600000",
"description": "Timestamp of when the most recent synchronization error occurred, if any"
},
"potentiallyStale": {
"type": "boolean",
"example": false,
"description": "Whether the persistent store integration may not be fully synchronized with the LaunchDarkly environment. <code>true</code> if the integration could be stale."
}
}
}
BigSegmentTarget
{
"type": "object",
"required": [
"userKey",
"included",
"excluded"
],
"properties": {
"userKey": {
"type": "string",
"description": "The target key"
},
"excluded": {
"type": "boolean",
"description": "Indicates whether the target is excluded.<br />Segment rules bypass excluded targets, so they will never be included based on rules. Excluded targets may still be included explicitly."
},
"included": {
"type": "boolean",
"description": "Indicates whether the target is included.<br />Included targets are always segment members, regardless of segment rules."
}
}
}
BooleanDefaults
{
"type": "object",
"properties": {
"onVariation": {
"type": "integer",
"example": 0,
"description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is on and the target did not match any rules"
},
"offVariation": {
"type": "integer",
"example": 1,
"description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off"
},
"trueDescription": {
"type": "string",
"example": "serve true",
"description": "The description for the true variation"
},
"trueDisplayName": {
"type": "string",
"example": "True",
"description": "The display name for the true variation, displayed in the LaunchDarkly user interface"
},
"falseDescription": {
"type": "string",
"example": "serve false",
"description": "The description for the false variation"
},
"falseDisplayName": {
"type": "string",
"example": "False",
"description": "The display name for the false variation, displayed in the LaunchDarkly user interface"
}
}
}
BooleanFlagDefaults
{
"type": "object",
"required": [
"trueDisplayName",
"falseDisplayName",
"trueDescription",
"falseDescription",
"onVariation",
"offVariation"
],
"properties": {
"onVariation": {
"type": "integer",
"example": 0,
"description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is on and the target did not match any rules"
},
"offVariation": {
"type": "integer",
"example": 1,
"description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off"
},
"trueDescription": {
"type": "string",
"example": "serve true",
"description": "The description for the true variation"
},
"trueDisplayName": {
"type": "string",
"example": "True",
"description": "The display name for the true variation, displayed in the LaunchDarkly user interface"
},
"falseDescription": {
"type": "string",
"example": "serve false",
"description": "The description for the false variation"
},
"falseDisplayName": {
"type": "string",
"example": "False",
"description": "The display name for the false variation, displayed in the LaunchDarkly user interface"
}
}
}
BranchCollectionRep
{
"type": "object",
"required": [
"_links",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BranchRep"
},
"description": "An array of branches"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
BranchRep
{
"type": "object",
"required": [
"name",
"head",
"syncTime",
"_links"
],
"properties": {
"head": {
"type": "string",
"example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
"description": "An ID representing the branch HEAD. For example, a commit SHA."
},
"name": {
"type": "string",
"example": "main",
"description": "The branch name"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {}
},
"syncTime": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1636558831870",
"description": "A timestamp indicating when the branch was last synced"
},
"references": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReferenceRep"
},
"description": "An array of flag references found on the branch"
},
"updateSequenceId": {
"type": "integer",
"format": "int64",
"example": 25,
"description": "An optional ID used to prevent older data from overwriting newer data"
}
}
}
BulkEditMembersRep
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"example": [
{
"507f1f77bcf86cd799439011": "you cannot modify your own role"
}
],
"description": "A list of member IDs and errors for the members whose updates failed."
},
"members": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"1234a56b7c89d012345e678f"
],
"description": "A list of members IDs of the members who were successfully updated."
}
}
}
BulkEditTeamsRep
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"example": [
{
"example-team-2": "example failure message"
}
],
"description": "A list of team keys and errors for the teams whose updates failed."
},
"teamKeys": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-team-1"
],
"description": "A list of team keys of the teams that were successfully updated."
},
"memberIDs": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"1234a56b7c89d012345e678f"
],
"description": "A list of member IDs of the members who were added to the teams."
}
}
}
Clause
{
"type": "object",
"required": [
"attribute",
"op",
"values",
"negate"
],
"properties": {
"op": {
"$ref": "#/components/schemas/Operator"
},
"_id": {
"type": "string"
},
"negate": {
"type": "boolean"
},
"values": {
"type": "array",
"items": {}
},
"attribute": {
"type": "string"
},
"contextKind": {
"type": "string"
}
}
}
Client
{
"type": "object",
"required": [
"_links",
"name",
"_accountId",
"_clientId",
"redirectUri",
"_creationDate"
],
"properties": {
"name": {
"type": "string",
"description": "Client name"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/oauth/clients/50666563-9144-4125-b822-33f308227e45",
"type": "application/json"
},
"parent": {
"href": "/api/v2/oauth/clients",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_clientId": {
"type": "string",
"description": "The client's unique ID"
},
"_accountId": {
"type": "string",
"description": "The account ID the client is registered under"
},
"description": {
"type": "string",
"description": "Client description"
},
"redirectUri": {
"type": "string",
"description": "The client's redirect URI"
},
"_clientSecret": {
"type": "string",
"description": "The client secret. This will only be shown upon creation."
},
"_creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1494437420312",
"description": "Timestamp of client creation date"
}
}
}
ClientCollection
{
"type": "object",
"required": [
"_links",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Client"
},
"description": "List of client objects"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/oauth/clients",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
ClientSideAvailability
{
"type": "object",
"properties": {
"usingMobileKey": {
"type": "boolean"
},
"usingEnvironmentId": {
"type": "boolean"
}
}
}
ClientSideAvailabilityPost
{
"type": "object",
"required": [
"usingEnvironmentId",
"usingMobileKey"
],
"properties": {
"usingMobileKey": {
"type": "boolean",
"example": true,
"description": "Whether to enable availability for mobile SDKs. Defaults to <code>true</code>."
},
"usingEnvironmentId": {
"type": "boolean",
"example": true,
"description": "Whether to enable availability for client-side SDKs. Defaults to <code>false</code>."
}
}
}
CodeReferencesAsynchronouslyDeleteBranchesRequest
{
"type": "array",
"items": {
"type": "string"
}
}
CompletedBy
{
"type": "object",
"properties": {
"token": {
"$ref": "#/components/schemas/TokenSummary",
"description": "The service token used to mark this phase as complete"
},
"member": {
"$ref": "#/components/schemas/MemberSummary",
"description": "The LaunchDarkly member who marked this phase as complete"
}
}
}
ConditionInput
{
"type": "object",
"properties": {
"kind": {
"$ref": "#/components/schemas/ConditionKind",
"example": "schedule",
"description": "The type of condition to meet before executing this stage of the workflow. Use <code>schedule</code> to schedule a workflow stage. Use <code>ld-approval</code> to add an approval request to a workflow stage."
},
"executeNow": {
"type": "boolean",
"example": false,
"description": "Whether the workflow stage should be executed immediately"
},
"description": {
"type": "string",
"example": "Require example-team approval for final stage",
"description": "A description of the approval required for this stage"
},
"scheduleKind": {
"$ref": "#/components/schemas/ScheduleKind",
"enum": [
"absolute",
"relative"
],
"example": "relative",
"description": "Whether the scheduled execution of the workflow stage is relative or absolute. If relative, the <code>waitDuration</code> and <code>waitDurationUnit</code> specify when the execution occurs. If absolute, the <code>executionDate</code> specifies when the execution occurs."
},
"waitDuration": {
"type": "integer",
"example": 2,
"description": "For workflow stages whose scheduled execution is relative, how far in the future the stage should start."
},
"executionDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1706810400000",
"description": "For workflow stages whose scheduled execution is absolute, the time, in Unix milliseconds, when the stage should start."
},
"notifyTeamKeys": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-team"
],
"description": "A list of team keys for the teams to request approval from for this stage"
},
"notifyMemberIds": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"507f1f77bcf86cd799439011"
],
"description": "A list of member IDs for the members to request approval from for this stage"
},
"waitDurationUnit": {
"$ref": "#/components/schemas/DurationUnit",
"enum": [
"minute",
"hour",
"calendarDay",
"calendarWeek"
],
"example": "calendarDay",
"description": "For workflow stages whose scheduled execution is relative, the unit of measure for the <code>waitDuration</code>."
}
}
}
ConditionKind
{
"type": "string"
}
ConditionOutput
{
"type": "object",
"required": [
"_id",
"_execution",
"description",
"notifyMemberIds",
"allReviews",
"reviewStatus"
],
"properties": {
"_id": {
"type": "string"
},
"kind": {
"type": "string"
},
"_execution": {
"$ref": "#/components/schemas/ExecutionOutput"
},
"allReviews": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReviewOutput"
}
},
"appliedDate": {
"$ref": "#/components/schemas/UnixMillis"
},
"description": {
"type": "string"
},
"reviewStatus": {
"type": "string"
},
"scheduleKind": {
"$ref": "#/components/schemas/ScheduleKind"
},
"waitDuration": {
"type": "integer"
},
"executionDate": {
"$ref": "#/components/schemas/UnixMillis"
},
"notifyMemberIds": {
"type": "array",
"items": {
"type": "string"
}
},
"waitDurationUnit": {
"$ref": "#/components/schemas/DurationUnit"
}
}
}
ConfidenceIntervalRep
{
"type": "object",
"properties": {
"lower": {
"type": "number"
},
"upper": {
"type": "number"
}
}
}
Conflict
{
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Reason why the conflict exists"
},
"instruction": {
"$ref": "#/components/schemas/Instruction",
"description": "Instruction in semantic patch format to be applied to the feature flag"
}
}
}
ConflictOutput
{
"type": "object",
"required": [
"stageId",
"message"
],
"properties": {
"message": {
"type": "string",
"description": "Message about the conflict"
},
"stageId": {
"type": "string",
"example": "12ab3c4d5ef1a2345bcde67f",
"description": "The stage ID"
}
}
}
ContextAttributeName
{
"type": "object",
"required": [
"name",
"weight"
],
"properties": {
"name": {
"type": "string",
"example": "/firstName",
"description": "A context attribute's name."
},
"weight": {
"type": "integer",
"example": 2225,
"description": "A relative estimate of the number of contexts seen recently that have an attribute with the associated name."
},
"redacted": {
"type": "boolean",
"example": false,
"description": "Whether or not the attribute has one or more redacted values."
}
}
}
ContextAttributeNames
{
"type": "object",
"required": [
"kind",
"names"
],
"properties": {
"kind": {
"type": "string",
"example": "user",
"description": "The kind associated with this collection of context attribute names."
},
"names": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContextAttributeName"
},
"description": "A collection of context attribute names."
}
}
}
ContextAttributeNamesCollection
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContextAttributeNames"
},
"description": "A collection of context attribute name data grouped by kind."
}
}
}
ContextAttributeValue
{
"type": "object",
"required": [
"name",
"weight"
],
"properties": {
"name": {
"example": "Sandy",
"description": "A value for a context attribute."
},
"weight": {
"type": "integer",
"example": 35,
"description": "A relative estimate of the number of contexts seen recently that have a matching value for a given attribute."
}
}
}
ContextAttributeValues
{
"type": "object",
"required": [
"kind",
"values"
],
"properties": {
"kind": {
"type": "string",
"example": "user",
"description": "The kind associated with this collection of context attribute values."
},
"values": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContextAttributeValue"
},
"description": "A collection of context attribute values."
}
}
}
ContextAttributeValuesCollection
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContextAttributeValues"
},
"description": "A collection of context attribute value data grouped by kind."
}
}
}
ContextInstance
{
"type": "object",
"additionalProperties": {}
}
ContextInstanceEvaluation
{
"type": "object",
"required": [
"name",
"key",
"_value",
"_links"
],
"properties": {
"key": {
"type": "string",
"example": "flag-key-123abc",
"description": "Key of the flag."
},
"name": {
"type": "string",
"example": "My Flag",
"description": "Name of the flag."
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate",
"type": "application/json"
},
"site": {
"href": "/my-project/my-environment/features/sort.order/targeting",
"type": "text/html"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_value": {
"example": "true",
"description": "The value of the flag variation that the context receives. If there is no defined default rule, this is null."
},
"reason": {
"$ref": "#/components/schemas/ContextInstanceEvaluationReason",
"example": "{\"kind\": \"RULE_MATCH\"}",
"description": "Contains information about why that variation was selected."
}
}
}
ContextInstanceEvaluationReason
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"example": "OFF",
"description": "Describes the general reason that LaunchDarkly selected this variation."
},
"ruleID": {
"type": "string",
"example": "1234567890",
"description": "The unique identifier of the matching rule if the kind is 'RULE_MATCH'."
},
"errorKind": {
"type": "string",
"example": "tried to use uninitialized Context",
"description": "The specific error type if the kind is 'ERROR'."
},
"ruleIndex": {
"type": "integer",
"example": 3,
"description": "The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based."
},
"inExperiment": {
"type": "boolean",
"example": true,
"description": "Indicates whether the context was evaluated as part of an experiment."
},
"prerequisiteKey": {
"type": "string",
"example": "someotherflagkey",
"description": "The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'."
}
}
}
ContextInstanceEvaluations
{
"type": "object",
"required": [
"items",
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContextInstanceEvaluation"
},
"example": [
{
"key": "sort.order",
"name": "SortOrder",
"_links": {
"self": {
"href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate",
"type": "application/json"
},
"site": {
"href": "/my-project/my-environment/features/sort.order/targeting",
"type": "text/html"
}
},
"_value": true,
"reason": {
"kind": "FALLTHROUGH"
}
},
{
"key": "alternate.page",
"name": "AlternatePage",
"_links": {
"self": {
"href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate",
"type": "application/json"
},
"site": {
"href": "/my-project/my-environment/features/alternate.page/targeting",
"type": "text/html"
}
},
"_value": false,
"reason": {
"kind": "RULE_MATCH",
"ruleID": "b2530cdf-14c6-4e16-b660-00239e08f19b",
"ruleIndex": 1
}
}
],
"description": "Details on the flag evaluations for this context instance"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 2,
"description": "The number of flags"
}
}
}
ContextInstanceRecord
{
"type": "object",
"required": [
"id",
"context"
],
"properties": {
"id": {
"type": "string",
"example": "b3JnOmxhdW5jaGRhcmtseQ",
"description": "The context instance ID"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-env/context-instances/organization:launch-darkly:user:henry?filter=applicationId:\"GoSDK/1.2\"",
"type": "application/json"
},
"site": {
"href": "/my-project/my-environment/context-instances/organization:launch-darkly:user:henry",
"type": "text/html"
},
"parent": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this context instance"
},
"context": {
"example": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}",
"description": "The context, including its kind and attributes"
},
"lastSeen": {
"type": "string",
"format": "date-time",
"example": "2022-04-15T15:00:57.526470334Z",
"description": "Timestamp of the last time an evaluation occurred for this context instance"
},
"applicationId": {
"type": "string",
"example": "GoSDK/1.2",
"description": "An identifier representing the application where the LaunchDarkly SDK is running"
},
"anonymousKinds": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"device",
"privateKind"
],
"description": "A list of the context kinds this context was associated with that the SDK removed because they were marked as anonymous at flag evaluation"
}
}
}
ContextInstanceSearch
{
"type": "object",
"properties": {
"sort": {
"type": "string",
"example": "-ts",
"description": "Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying <code>ts</code> for this value, or descending order by specifying <code>-ts</code>."
},
"limit": {
"type": "integer",
"example": 10,
"description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)"
},
"filter": {
"type": "string",
"example": "{\"filter\": \"kindKeys:{\"contains\": [\"user:Henry\"]},\"sort\": \"-ts\",\"limit\": 50}",
"description": "A collection of context instance filters"
},
"continuationToken": {
"type": "string",
"example": "QAGFKH1313KUGI2351",
"description": "Limits results to context instances with sort values after the value specified. You can use this for pagination, however, we recommend using the <code>next</code> link instead, because this value is an obfuscated string."
}
}
}
ContextInstanceSegmentMembership
{
"type": "object",
"required": [
"name",
"key",
"description",
"unbounded",
"external",
"isMember",
"isIndividuallyTargeted",
"isRuleTargeted",
"_links"
],
"properties": {
"key": {
"type": "string",
"example": "segment-key-123abc",
"description": "A unique key used to reference the segment"
},
"name": {
"type": "string",
"example": "Segment Name",
"description": "A human-friendly name for the segment"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"external": {
"type": "string",
"example": "https://amplitude.com/myCohort",
"description": "If the segment is a synced segment, the name of the external source"
},
"isMember": {
"type": "boolean",
"example": true,
"description": "Whether the context is a member of this segment, either by explicit inclusion or by rule matching"
},
"unbounded": {
"type": "boolean",
"example": false,
"description": "Whether this is an unbounded segment. Unbounded segments, also called big segments, may be list-based segments with more than 15,000 entries, or synced segments."
},
"description": {
"type": "string",
"example": "Segment description",
"description": "A description of the segment's purpose"
},
"isRuleTargeted": {
"type": "boolean",
"example": false,
"description": "Whether the context is captured by this segment's rules. The value of this field is undefined if the context is also explicitly included (<code>isIndividuallyTargeted</code> is <code>true</code>)."
},
"isIndividuallyTargeted": {
"type": "boolean",
"example": true,
"description": "Whether the context is explicitly included in this segment"
}
}
}
ContextInstanceSegmentMemberships
{
"type": "object",
"required": [
"items",
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContextInstanceSegmentMembership"
}
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
ContextInstances
{
"type": "object",
"required": [
"_environmentId",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContextInstanceRecord"
},
"description": "A collection of context instances. Can include multiple versions of context instances that have the same <code>id</code>, but different <code>applicationId</code>s."
},
"_links": {
"type": "object",
"example": {
"next": {
"href": "/api/v2/projects/my-project/environments/my-env/context-instances/organization:launch-darkly:user:henry?limit=2&continuationToken=2022-04-15T15:00:57.526470334Z",
"type": "application/json"
},
"self": {
"href": "/api/v2/projects/my-proj/environments/my-env/context-instances/organization:launch-darkly:user:henry-jacobs?limit=2",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 100,
"description": "The number of unique context instances"
},
"_environmentId": {
"type": "string",
"example": "57be1db38b75bf0772d11384",
"description": "The environment ID"
},
"continuationToken": {
"type": "string",
"example": "QAGFKH1313KUGI2351",
"description": "An obfuscated string that references the last context instance on the previous page of results. You can use this for pagination, however, we recommend using the <code>next</code> link instead."
}
}
}
ContextKindCreatedFrom
{
"type": "string"
}
ContextKindRep
{
"type": "object",
"required": [
"key",
"name",
"description",
"version",
"creationDate",
"lastModified",
"createdFrom"
],
"properties": {
"key": {
"type": "string",
"example": "organization-key-123abc",
"description": "The context kind key"
},
"name": {
"type": "string",
"example": "Organization",
"description": "The context kind name"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"version": {
"type": "integer",
"example": 4,
"description": "The context kind version"
},
"archived": {
"type": "boolean",
"example": false,
"description": "Whether the context kind is archived. Archived context kinds are unavailable for targeting."
},
"lastSeen": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1671563538193",
"description": "Timestamp of when a context of this context kind was most recently evaluated"
},
"createdFrom": {
"$ref": "#/components/schemas/ContextKindCreatedFrom",
"enum": [
"default",
"auto-add",
"manual"
],
"example": "auto-add",
"description": "How the context kind was created"
},
"description": {
"type": "string",
"example": "An example context kind, to enable targeting based on organization",
"description": "The context kind description"
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1668530155141",
"description": "Timestamp of when the context kind was created"
},
"lastModified": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1670341705251",
"description": "Timestamp of when the context kind was most recently changed"
},
"hideInTargeting": {
"type": "boolean",
"example": false,
"description": "Alias for archived."
}
}
}
ContextKindsCollectionRep
{
"type": "object",
"required": [
"items",
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContextKindRep"
},
"description": "An array of context kinds"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
ContextRecord
{
"type": "object",
"required": [
"context"
],
"properties": {
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-env/contexts/organization:launch-darkly:user:henry?filter=applicationId:\"GoSDK/1.2\"",
"type": "application/json"
},
"site": {
"href": "/my-project/my-environment/context/organization:launch-darkly:user:henry",
"type": "text/html"
},
"parent": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this context instance"
},
"context": {
"example": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}",
"description": "The context, including its kind and attributes"
},
"lastSeen": {
"type": "string",
"format": "date-time",
"example": "2022-04-15T15:00:57.526470334Z",
"description": "Timestamp of the last time an evaluation occurred for this context"
},
"applicationId": {
"type": "string",
"example": "GoSDK/1.2",
"description": "An identifier representing the application where the LaunchDarkly SDK is running"
},
"associatedContexts": {
"type": "integer",
"example": 0,
"description": "The total number of associated contexts. Associated contexts are contexts that have appeared in the same context instance, that is, they were part of the same flag evaluation."
}
}
}
ContextSearch
{
"type": "object",
"properties": {
"sort": {
"type": "string",
"example": "-ts",
"description": "Specifies a field by which to sort. LaunchDarkly supports sorting by timestamp in ascending order by specifying <code>ts</code> for this value, or descending order by specifying <code>-ts</code>."
},
"limit": {
"type": "integer",
"example": 10,
"description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)"
},
"filter": {
"type": "string",
"example": "*.name startsWith Jo,kind anyOf [\"user\",\"organization\"]",
"description": "A collection of context filters"
},
"continuationToken": {
"type": "string",
"example": "QAGFKH1313KUGI2351",
"description": "Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the <code>next</code> link instead, because this value is an obfuscated string."
}
}
}
Contexts
{
"type": "object",
"required": [
"_environmentId",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContextRecord"
},
"description": "A collection of contexts. Can include multiple versions of contexts that have the same <code>kind</code> and <code>key</code>, but different <code>applicationId</code>s."
},
"_links": {
"type": "object",
"example": {
"next": {
"href": "/app.launchdarkly.com/api/v2/projects/my-project/environments/my-environment/contexts?filter=kind:{\"equals\": [\"organization\"]}&limit=2&continuationToken=QAGFKH1313KUGI2351",
"type": "application/json"
},
"self": {
"href": "/api/v2/projects/my-proj/environments/my-env/contexts?filter=kind:{\"equals\": [\"organization\"]}&limit=2&continuationToken=QAGFKH1313KUGI2351",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 100,
"description": "The number of contexts"
},
"_environmentId": {
"type": "string",
"example": "57be1db38b75bf0772d11384",
"description": "The environment ID where the context was evaluated"
},
"continuationToken": {
"type": "string",
"example": "QAGFKH1313KUGI2351",
"description": "An obfuscated string that references the last context instance on the previous page of results. You can use this for pagination, however, we recommend using the <code>next</code> link instead."
}
}
}
CopiedFromEnv
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"example": "source-flag-key-123abc",
"description": "Key of feature flag copied"
},
"version": {
"type": "integer",
"example": 1,
"description": "Version of feature flag copied"
}
}
}
CreatePhaseInput
{
"type": "object",
"required": [
"audiences",
"name"
],
"properties": {
"name": {
"type": "string",
"example": "Phase 1 - Testing",
"description": "The release phase name"
},
"audiences": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AudiencePost"
},
"description": "An ordered list of the audiences for this release phase. Each audience corresponds to a LaunchDarkly environment."
}
}
}
CreateReleasePipelineInput
{
"type": "object",
"required": [
"key",
"name",
"phases"
],
"properties": {
"key": {
"type": "string",
"example": "standard-pipeline",
"description": "The unique identifier of this release pipeline"
},
"name": {
"type": "string",
"example": "Standard Pipeline",
"description": "The name of the release pipeline"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-tag"
],
"description": "A list of tags for this release pipeline"
},
"phases": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CreatePhaseInput"
},
"description": "A logical grouping of one or more environments that share attributes for rolling out changes"
},
"description": {
"type": "string",
"example": "Standard pipeline to roll out to production",
"description": "The release pipeline description"
}
}
}
CreateWorkflowTemplateInput
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"stages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StageInput"
}
},
"flagKey": {
"type": "string"
},
"projectKey": {
"type": "string"
},
"workflowId": {
"$ref": "#/components/schemas/FeatureWorkflowId"
},
"description": {
"type": "string"
},
"environmentKey": {
"type": "string"
}
}
}
CredibleIntervalRep
{
"type": "object",
"properties": {
"lower": {
"type": "number",
"example": 0.4060771673663068,
"description": "The lower bound"
},
"upper": {
"type": "number",
"example": 0.6713222134386467,
"description": "The upper bound"
}
}
}
CustomProperties
{
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/customProperty"
}
}
CustomRole
{
"type": "object",
"required": [
"_id",
"_links",
"key",
"name",
"policy"
],
"properties": {
"_id": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The ID of the custom role"
},
"key": {
"type": "string",
"example": "example-custom-role",
"description": "The key of the custom role"
},
"name": {
"type": "string",
"example": "Example custom role",
"description": "The name of the custom role"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"policy": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Statement"
},
"description": "An array of the policies that comprise this custom role"
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this custom role"
},
"description": {
"type": "string",
"example": "This custom role is just an example",
"description": "The description of the custom role"
},
"basePermissions": {
"$ref": "#/components/schemas/RoleType",
"example": "reader",
"description": "Base permissions to use for this role"
}
}
}
CustomRolePost
{
"type": "object",
"required": [
"name",
"key",
"policy"
],
"properties": {
"key": {
"type": "string",
"example": "role-key-123abc",
"description": "The custom role key"
},
"name": {
"type": "string",
"example": "Ops team",
"description": "A human-friendly name for the custom role"
},
"policy": {
"$ref": "#/components/schemas/StatementPostList",
"description": "Resource statements for custom role"
},
"description": {
"type": "string",
"example": "An example role for members of the ops team",
"description": "Description of custom role"
},
"basePermissions": {
"$ref": "#/components/schemas/RoleType",
"enum": [
"reader",
"no_access"
],
"example": "reader",
"description": "Base permissions to use for this role."
}
}
}
CustomRoles
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomRole"
},
"description": "An array of custom roles"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
CustomWorkflowInput
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"example": "Progressive rollout starting in two days",
"description": "The workflow name"
},
"stages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StageInput"
},
"description": "A list of the workflow stages"
},
"description": {
"type": "string",
"example": "Turn flag on for 10% of users each day",
"description": "The workflow description"
},
"templateKey": {
"type": "string",
"description": "The template key"
},
"maintainerId": {
"$ref": "#/components/schemas/ObjectId",
"example": "12ab3c45de678910abc12345",
"description": "The ID of the workflow maintainer. Defaults to the workflow creator."
}
}
}
CustomWorkflowMeta
{
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "Example workflow name",
"description": "The name of the workflow stage that required this approval request"
},
"stage": {
"$ref": "#/components/schemas/CustomWorkflowStageMeta",
"description": "Details on the stage of the workflow where this approval request is required"
}
}
}
CustomWorkflowOutput
{
"type": "object",
"required": [
"_id",
"_version",
"_conflicts",
"_creationDate",
"_maintainerId",
"_links",
"name",
"_execution"
],
"properties": {
"_id": {
"type": "string",
"example": "12ab3c4d5ef1a2345bcde67f",
"description": "The ID of the workflow"
},
"kind": {
"type": "string",
"example": "custom",
"description": "The kind of workflow"
},
"meta": {
"$ref": "#/components/schemas/WorkflowTemplateMetadata",
"description": "For workflows being created from a workflow template, this value holds any parameters that could potentially be incompatible with the current project, environment, or flag"
},
"name": {
"type": "string",
"example": "Progressive rollout starting in two days",
"description": "The name of the workflow"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"stages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StageOutput"
},
"description": "The stages that make up the workflow. Each stage contains conditions and actions."
},
"_version": {
"type": "integer",
"example": 1,
"description": "The version of the workflow"
},
"_conflicts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ConflictOutput"
},
"description": "Any conflicts that are present in the workflow stages"
},
"_execution": {
"$ref": "#/components/schemas/ExecutionOutput",
"example": "{\"status\": \"completed\"}",
"description": "The current execution status of the workflow"
},
"description": {
"type": "string",
"example": "Turn flag on for 10% of customers each day",
"description": "A brief description of the workflow"
},
"templateKey": {
"type": "string",
"example": "example-workflow-template",
"description": "For workflows being created from a workflow template, this value is the template's key"
},
"_creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the workflow was created"
},
"_maintainerId": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "The member ID of the maintainer of the workflow. Defaults to the workflow creator."
}
}
}
CustomWorkflowStageMeta
{
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "Stage 1",
"description": "The name of the workflow stage"
},
"index": {
"type": "integer",
"example": 0,
"description": "The zero-based index of the workflow stage"
}
}
}
CustomWorkflowsListingOutput
{
"type": "object",
"required": [
"items",
"totalCount",
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomWorkflowOutput"
},
"description": "An array of workflows"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "Total number of workflows"
}
}
}
DateVersion
{
"type": "integer"
}
DefaultClientSideAvailability
{
"type": "object",
"required": [
"usingMobileKey",
"usingEnvironmentId"
],
"properties": {
"usingMobileKey": {
"type": "boolean",
"example": true,
"description": "Whether to enable availability for mobile SDKs"
},
"usingEnvironmentId": {
"type": "boolean",
"example": true,
"description": "Whether to enable availability for client-side SDKs"
}
}
}
DefaultClientSideAvailabilityPost
{
"type": "object",
"required": [
"usingEnvironmentId",
"usingMobileKey"
],
"properties": {
"usingMobileKey": {
"type": "boolean",
"example": true,
"description": "Whether to enable availability for mobile SDKs."
},
"usingEnvironmentId": {
"type": "boolean",
"example": true,
"description": "Whether to enable availability for client-side SDKs."
}
}
}
Defaults
{
"type": "object",
"required": [
"onVariation",
"offVariation"
],
"properties": {
"onVariation": {
"type": "integer",
"example": 0,
"description": "The index, from the array of variations for this flag, of the variation to serve by default when targeting is on."
},
"offVariation": {
"type": "integer",
"example": 1,
"description": "The index, from the array of variations for this flag, of the variation to serve by default when targeting is off."
}
}
}
DependentExperimentListRep
{
"type": "array",
"items": {
"$ref": "#/components/schemas/DependentExperimentRep"
}
}
DependentExperimentRep
{
"type": "object",
"required": [
"key",
"name",
"environmentId",
"environmentKey",
"creationDate",
"_links"
],
"properties": {
"key": {
"type": "string",
"example": "experiment-key-123abc",
"description": "The experiment key"
},
"name": {
"type": "string",
"example": "Example experiment",
"description": "The experiment name"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment/experiments/example-experiment",
"type": "application/json"
},
"parent": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"archivedDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the experiment was archived"
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the experiment was created"
},
"environmentId": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The environment ID"
},
"environmentKey": {
"type": "string",
"example": "production",
"description": "The environment key"
}
}
}
DependentFlag
{
"type": "object",
"required": [
"key",
"_links",
"_site"
],
"properties": {
"key": {
"type": "string",
"example": "dependent-flag-key-123abc",
"description": "The flag key"
},
"name": {
"type": "string",
"example": "Example dependent flag",
"description": "The flag name"
},
"_site": {
"$ref": "#/components/schemas/Link",
"example": "{ \"href\": \"/example-project/example-environment/features/example-dependent-flag\", \"type\": \"text/html\" }",
"description": "Details on how to access the dependent flag in the LaunchDarkly UI"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
DependentFlagEnvironment
{
"type": "object",
"required": [
"key",
"_links",
"_site"
],
"properties": {
"key": {
"type": "string",
"example": "environment-key-123abc",
"description": "The environment key"
},
"name": {
"type": "string",
"example": "Example environment",
"description": "The environment name"
},
"_site": {
"$ref": "#/components/schemas/Link",
"example": "{ \"href\": \"/example-project/example-environment/features/example-dependent-flag\", \"type\": \"text/html\" }",
"description": "Details on how to access the dependent flag in this environment in the LaunchDarkly UI"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
DependentFlagsByEnvironment
{
"type": "object",
"required": [
"items",
"_links",
"_site"
],
"properties": {
"_site": {
"$ref": "#/components/schemas/Link",
"example": "{ \"href\": \"/example-project/~/features/example-prereq-flag\", \"type\": \"text/html\" }",
"description": "Details on how to access the prerequisite flag in the LaunchDarkly UI"
},
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DependentFlag"
},
"description": "A list of dependent flags, which are flags that use the requested flag as a prerequisite"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
DependentMetricGroupRep
{
"type": "object",
"required": [
"key",
"name",
"kind",
"_links"
],
"properties": {
"key": {
"type": "string",
"example": "metric-group-key-123abc",
"description": "A unique key to reference the metric group"
},
"kind": {
"enum": [
"funnel"
],
"type": "string",
"example": "funnel",
"description": "The type of the metric group"
},
"name": {
"type": "string",
"example": "My metric group",
"description": "A human-friendly name for the metric group"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project/metric-groups/my-metric-group",
"type": "application/json"
},
"parent": {
"href": "/api/v2/projects/my-project",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
DependentMetricGroupRepWithMetrics
{
"type": "object",
"required": [
"key",
"name",
"kind",
"_links"
],
"properties": {
"key": {
"type": "string",
"example": "metric-group-key-123abc",
"description": "A unique key to reference the metric group"
},
"kind": {
"enum": [
"funnel"
],
"type": "string",
"example": "funnel",
"description": "The type of the metric group"
},
"name": {
"type": "string",
"example": "My metric group",
"description": "A human-friendly name for the metric group"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project/metric-groups/my-metric-group",
"type": "application/json"
},
"parent": {
"href": "/api/v2/projects/my-project",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"metrics": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetricInGroupRep"
},
"description": "The metrics in the metric group"
}
}
}
DependentMetricOrMetricGroupRep
{
"type": "object",
"required": [
"key",
"_versionId",
"name",
"kind",
"_links",
"isGroup"
],
"properties": {
"key": {
"type": "string",
"example": "metric-key-123abc",
"description": "A unique key to reference the metric or metric group"
},
"kind": {
"enum": [
"pageview",
"click",
"custom",
"funnel",
"standard"
],
"type": "string",
"example": "custom",
"description": "If this is a metric, then it represents the kind of event the metric tracks. If this is a metric group, then it represents the group type"
},
"name": {
"type": "string",
"example": "My metric",
"description": "A human-friendly name for the metric or metric group"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/metrics/my-project/my-metric",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"isGroup": {
"type": "boolean",
"description": "Whether this is a metric group or a metric"
},
"metrics": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetricInGroupRep"
},
"description": "An ordered list of the metrics in this metric group"
},
"isNumeric": {
"type": "boolean",
"example": true,
"description": "For custom metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>)."
},
"_versionId": {
"type": "string",
"description": "The version ID of the metric or metric group"
}
}
}
DeploymentCollectionRep
{
"type": "object",
"required": [
"totalCount",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DeploymentRep"
},
"description": "A list of deployments"
},
"_links": {
"type": "object",
"example": {
"next": {
"href": "/api/v2/engineering-insights/deployments?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",
"type": "application/json"
},
"self": {
"href": "/api/v2/engineering-insights/deployments",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 25,
"description": "The total number of deployments"
}
}
}
DeploymentKind
{
"type": "string"
}
DeploymentRep
{
"type": "object",
"required": [
"id",
"applicationKey",
"applicationVersion",
"startedAt",
"status",
"kind",
"active",
"archived",
"environmentKey",
"numberOfContributors",
"numberOfPullRequests",
"linesAdded",
"linesDeleted",
"leadTime"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"example": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"description": "The deployment ID"
},
"kind": {
"$ref": "#/components/schemas/DeploymentKind",
"example": "redeployment",
"description": "The kind of deployment"
},
"active": {
"type": "boolean",
"example": true,
"description": "Whether the deployment is active"
},
"status": {
"$ref": "#/components/schemas/DeploymentStatus",
"example": "finished",
"description": "The status of the deployment"
},
"endedAt": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1706712518000",
"description": "The time the deployment ended"
},
"archived": {
"type": "boolean",
"example": false,
"description": "Whether the deployment is archived"
},
"leadTime": {
"type": "integer",
"format": "int64",
"example": 20237000,
"description": "The total lead time from first commit to deployment end in milliseconds"
},
"metadata": {
"type": "object",
"example": {
"buildNumber": "1234"
},
"description": "The metadata associated with the deployment",
"additionalProperties": {}
},
"startedAt": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1706701522000",
"description": "The time the deployment started"
},
"durationMs": {
"type": "integer",
"format": "int64",
"example": 10996000,
"description": "The duration of the deployment in milliseconds"
},
"linesAdded": {
"type": "integer",
"format": "int64",
"example": 100,
"description": "The number of lines added"
},
"linesDeleted": {
"type": "integer",
"format": "int64",
"example": 50,
"description": "The number of lines deleted"
},
"pullRequests": {
"$ref": "#/components/schemas/PullRequestCollectionRep",
"description": "The pull requests contained in the deployment"
},
"applicationKey": {
"type": "string",
"example": "billing-service",
"description": "The application key"
},
"environmentKey": {
"type": "string",
"example": "production",
"description": "The environment key"
},
"flagReferences": {
"$ref": "#/components/schemas/FlagReferenceCollectionRep",
"description": "The flag references contained in the deployment"
},
"leadTimeStages": {
"$ref": "#/components/schemas/LeadTimeStagesRep",
"description": "The lead time stages for the deployment"
},
"applicationVersion": {
"type": "string",
"example": "a90a8a2",
"description": "The application version"
},
"numberOfContributors": {
"type": "integer",
"example": 1,
"description": "The number of contributors"
},
"numberOfPullRequests": {
"type": "integer",
"example": 2,
"description": "The number of pull requests"
}
}
}
DeploymentStatus
{
"type": "string"
}
Destination
{
"type": "object",
"properties": {
"on": {
"type": "boolean",
"example": true,
"description": "Whether the export is on, that is, the status of the integration"
},
"_id": {
"type": "string",
"example": "610addeadbeefaa86ec9a7d4",
"description": "The ID of this Data Export destination"
},
"kind": {
"enum": [
"google-pubsub",
"kinesis",
"mparticle",
"segment",
"azure-event-hubs"
],
"type": "string",
"example": "google-pubsub",
"description": "The type of Data Export destination"
},
"name": {
"type": "string",
"example": "example-destination",
"description": "A human-readable name for your Data Export destination"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/destinations/my-project/my-environment/610addeadbeefaa86ec9a7d4",
"type": "application/json"
},
"parent": {
"href": "/api/v2/destinations",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"config": {
"example": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}",
"description": "An object with the configuration parameters required for the destination type"
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this Data Export destination"
},
"version": {
"type": "number",
"example": 1
}
}
}
DestinationPost
{
"type": "object",
"properties": {
"on": {
"type": "boolean",
"example": true,
"description": "Whether the export is on. Displayed as the integration status in the LaunchDarkly UI."
},
"kind": {
"enum": [
"google-pubsub",
"kinesis",
"mparticle",
"segment",
"azure-event-hubs"
],
"type": "string",
"example": "google-pubsub",
"description": "The type of Data Export destination"
},
"name": {
"type": "string",
"example": "example-destination",
"description": "A human-readable name for your Data Export destination"
},
"config": {
"example": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}",
"description": "An object with the configuration parameters required for the destination type"
}
}
}
Destinations
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Destination"
},
"description": "An array of Data Export destinations"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/destinations",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
Distribution
{
"type": "object",
"properties": {
"kind": {
"enum": [
"normal",
"beta"
],
"type": "string",
"example": "normal",
"description": "The type of distribution."
},
"parameters": {
"type": "object",
"description": "The parameters of the distribution. The parameters are different for each distribution type. When <code>kind</code> is <code>normal</code>, the parameters of the distribution are 'mu' and 'sigma'. When <code>kind</code> is <code>beta</code>, the parameters of the distribution are 'alpha' and 'beta.'",
"additionalProperties": {}
}
}
}
DurationUnit
{
"type": "string"
}
Environment
{
"type": "object",
"required": [
"_links",
"_id",
"key",
"name",
"apiKey",
"mobileKey",
"color",
"defaultTtl",
"secureMode",
"defaultTrackEvents",
"requireComments",
"confirmChanges",
"tags",
"critical"
],
"properties": {
"_id": {
"type": "string",
"example": "57be1db38b75bf0772d11384",
"description": "The ID for the environment. Use this as the client-side ID for authorization in some client-side SDKs, and to associate LaunchDarkly environments with CDN integrations in edge SDKs."
},
"key": {
"type": "string",
"example": "environment-key-123abc",
"description": "A project-unique key for the new environment"
},
"name": {
"type": "string",
"example": "My Environment",
"description": "A human-friendly name for the new environment"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"ops"
],
"description": "A list of tags for this environment"
},
"color": {
"type": "string",
"example": "F5A623",
"description": "The color used to indicate this environment in the UI"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"apiKey": {
"type": "string",
"example": "sdk-xxx",
"description": "The SDK key for the environment. Use this for authorization in server-side SDKs."
},
"critical": {
"type": "boolean",
"example": true,
"description": "Whether the environment is critical"
},
"mobileKey": {
"type": "string",
"example": "mob-xxx",
"description": "The mobile key for the environment. Use this for authorization in mobile SDKs."
},
"defaultTtl": {
"type": "integer",
"example": 5,
"description": "The default time (in minutes) that the PHP SDK can cache feature flag rules locally"
},
"secureMode": {
"type": "boolean",
"example": true,
"description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user"
},
"confirmChanges": {
"type": "boolean",
"example": true,
"description": "Whether members who modify flags and segments through the LaunchDarkly user interface are required to confirm those changes"
},
"requireComments": {
"type": "boolean",
"example": true,
"description": "Whether members who modify flags and segments through the LaunchDarkly user interface are required to add a comment"
},
"approvalSettings": {
"$ref": "#/components/schemas/ApprovalSettings",
"description": "Details on the approval settings for this environment"
},
"defaultTrackEvents": {
"type": "boolean",
"example": false,
"description": "Enables tracking detailed information for new flags by default"
}
}
}
EnvironmentPost
{
"type": "object",
"required": [
"name",
"key",
"color"
],
"properties": {
"key": {
"type": "string",
"example": "environment-key-123abc",
"description": "A project-unique key for the new environment"
},
"name": {
"type": "string",
"example": "My Environment",
"description": "A human-friendly name for the new environment"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"ops"
],
"description": "Tags to apply to the new environment"
},
"color": {
"type": "string",
"example": "F5A623",
"description": "A color to indicate this environment in the UI"
},
"source": {
"$ref": "#/components/schemas/SourceEnv",
"description": "Indicates that the new environment created will be cloned from the provided source environment"
},
"critical": {
"type": "boolean",
"example": true,
"description": "Whether the environment is critical"
},
"defaultTtl": {
"type": "integer",
"example": 5,
"description": "The default time (in minutes) that the PHP SDK can cache feature flag rules locally"
},
"secureMode": {
"type": "boolean",
"example": true,
"description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user"
},
"confirmChanges": {
"type": "boolean",
"example": false,
"description": "Requires confirmation for all flag and segment changes via the UI in this environment"
},
"requireComments": {
"type": "boolean",
"example": false,
"description": "Requires comments for all flag and segment changes via the UI in this environment"
},
"defaultTrackEvents": {
"type": "boolean",
"example": false,
"description": "Enables tracking detailed information for new flags by default"
}
}
}
EnvironmentSummary
{
"type": "object",
"required": [
"_links",
"key",
"name",
"color"
],
"properties": {
"key": {
"type": "string",
"example": "environment-key-123abc",
"description": "A project-unique key for the environment"
},
"name": {
"type": "string",
"example": "My Environment",
"description": "A human-friendly name for the environment"
},
"color": {
"type": "string",
"example": "F5A623",
"description": "The color used to indicate this environment in the UI"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
Environments
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Environment"
},
"description": "An array of environments"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 2,
"description": "The number of environments returned"
}
}
}
EvaluationReason
{
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"example": "OFF",
"description": "Describes the general reason that LaunchDarkly selected this variation."
},
"ruleID": {
"type": "string",
"example": "1234567890",
"description": "The unique identifier of the matching rule if the kind is 'RULE_MATCH'."
},
"errorKind": {
"type": "string",
"example": "USER_NOT_SPECIFIED",
"description": "The specific error type if the kind is 'ERROR'."
},
"ruleIndex": {
"type": "integer",
"example": 3,
"description": "The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based."
},
"inExperiment": {
"type": "boolean",
"example": true,
"description": "Indicates whether the evaluation occurred as part of an experiment."
},
"prerequisiteKey": {
"type": "string",
"example": "someotherflagkey",
"description": "The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'."
}
}
}
EvaluationsSummary
{
"type": "object",
"properties": {
"variations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/VariationEvalSummary"
},
"description": "A list of variation evaluations"
}
}
}
EventType
{
"type": "string"
}
ExecutionOutput
{
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"example": "completed",
"description": "The status of the execution of this workflow stage"
},
"stopDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1718467200000",
"description": "Timestamp of when the workflow was completed."
}
}
}
ExpandableApprovalRequestResponse
{
"type": "object",
"required": [
"_id",
"_version",
"creationDate",
"serviceKind",
"reviewStatus",
"allReviews",
"notifyMemberIds",
"status",
"instructions",
"conflicts",
"_links"
],
"properties": {
"_id": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "The ID of this approval request"
},
"flag": {
"$ref": "#/components/schemas/ExpandedFlagRep",
"description": "Flag the approval request belongs to"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {}
},
"source": {
"$ref": "#/components/schemas/CopiedFromEnv",
"description": "Details about the source feature flag, if copied"
},
"status": {
"enum": [
"pending",
"completed",
"failed",
"scheduled"
],
"type": "string",
"example": "pending",
"description": "Current status of the approval request"
},
"project": {
"$ref": "#/components/schemas/Project",
"description": "Project the approval request belongs to"
},
"_version": {
"type": "integer",
"example": 1,
"description": "Version of the approval request"
},
"conflicts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Conflict"
},
"description": "Details on any conflicting approval requests"
},
"allReviews": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReviewResponse"
},
"description": "An array of individual reviews of this approval request"
},
"resourceId": {
"type": "string",
"description": "String representation of a resource"
},
"appliedDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the approval request was applied"
},
"description": {
"type": "string",
"example": "example: request approval from someone",
"description": "A human-friendly name for the approval request"
},
"requestorId": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "The ID of the member who requested the approval"
},
"serviceKind": {
"$ref": "#/components/schemas/ApprovalRequestServiceKind",
"example": "launchdarkly",
"description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA."
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the approval request was created"
},
"environments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Environment"
},
"description": "List of environments the approval impacts"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[{\"kind\": \"turnFlagOn\"}]",
"description": "List of instructions in semantic patch format to be applied to the feature flag"
},
"reviewStatus": {
"enum": [
"approved",
"declined",
"pending"
],
"type": "string",
"example": "pending",
"description": "Current status of the review of this approval request"
},
"executionDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp for when instructions will be executed"
},
"operatingOnId": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "ID of scheduled change to edit or delete"
},
"notifyMemberIds": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"1234a56b7c89d012345e678f"
],
"description": "An array of member IDs. These members are notified to review the approval request."
},
"approvalSettings": {
"$ref": "#/components/schemas/ApprovalSettings",
"description": "The settings for this approval"
},
"appliedByMemberId": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The member ID of the member who applied the approval request"
},
"integrationMetadata": {
"$ref": "#/components/schemas/IntegrationMetadata",
"description": "Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used"
},
"customWorkflowMetadata": {
"$ref": "#/components/schemas/CustomWorkflowMeta",
"description": "Details about the custom workflow, if this approval request is part of a custom workflow"
},
"appliedByServiceTokenId": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The service token ID of the service token which applied the approval request"
}
}
}
ExpandableApprovalRequestsResponse
{
"type": "object",
"required": [
"items",
"totalCount",
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExpandableApprovalRequestResponse"
},
"description": "An array of approval requests"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "Total number of approval requests"
}
}
}
ExpandedFlagRep
{
"type": "object",
"required": [
"name",
"kind",
"key",
"_version",
"creationDate",
"variations",
"temporary",
"tags",
"_links",
"customProperties",
"archived"
],
"properties": {
"key": {
"type": "string",
"example": "flag-key-123abc",
"description": "A unique key used to reference the flag in your code"
},
"kind": {
"enum": [
"boolean",
"multivariate"
],
"type": "string",
"example": "boolean",
"description": "Kind of feature flag"
},
"name": {
"type": "string",
"example": "My Flag",
"description": "A human-friendly name for the feature flag"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-tag"
],
"description": "Tags for the feature flag"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/flags/my-project/my-flag",
"type": "application/json"
},
"parent": {
"href": "/api/v2/flags/my-project",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_version": {
"type": "integer",
"example": 1,
"description": "Version of the feature flag"
},
"archived": {
"type": "boolean",
"example": false,
"description": "Boolean indicating if the feature flag is archived"
},
"defaults": {
"$ref": "#/components/schemas/Defaults",
"example": "{\"onVariation\":0,\"offVariation\":1}",
"description": "The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used."
},
"temporary": {
"type": "boolean",
"example": true,
"description": "Whether the flag is a temporary flag"
},
"variations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Variation"
},
"example": [
{
"_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
"value": true
},
{
"_id": "a00bf58d-d252-476c-b915-15a74becacb4",
"value": false
}
],
"description": "An array of possible variations for the flag"
},
"_maintainer": {
"$ref": "#/components/schemas/MemberSummary",
"description": "Details on the member who maintains this feature flag"
},
"description": {
"type": "string",
"example": "This flag controls the example widgets",
"description": "Description of the feature flag"
},
"archivedDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1494437420312",
"description": "If archived is true, date of archive"
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1494437420312",
"description": "Timestamp of flag creation date"
},
"maintainerId": {
"type": "string",
"example": "569f183514f4432160000007",
"description": "The ID of the member who maintains the flag"
},
"customProperties": {
"$ref": "#/components/schemas/CustomProperties",
"example": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}",
"description": "Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration."
},
"includeInSnippet": {
"type": "boolean",
"example": true,
"deprecated": true,
"description": "Deprecated, use <code>clientSideAvailability</code>. Whether this flag should be made available to the client-side JavaScript SDK"
},
"clientSideAvailability": {
"$ref": "#/components/schemas/ClientSideAvailability",
"example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}",
"description": "Which type of client-side SDKs the feature flag is available to"
}
}
}
Experiment
{
"type": "object",
"required": [
"key",
"name",
"_maintainerId",
"_creationDate",
"_links"
],
"properties": {
"_id": {
"type": "string",
"example": "12ab3c45de678910fgh12345",
"description": "The experiment ID"
},
"key": {
"type": "string",
"example": "experiment-key-123abc",
"description": "The experiment key"
},
"name": {
"type": "string",
"example": "Example experiment",
"description": "The experiment name"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment/experiments/my-experiment",
"type": "application/json"
},
"parent": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"description": {
"type": "string",
"example": "An example experiment, used in testing",
"description": "The experiment description"
},
"archivedDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the experiment was archived"
},
"_creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the experiment was created"
},
"_maintainerId": {
"type": "string",
"example": "12ab3c45de678910fgh12345",
"description": "The ID of the member who maintains this experiment."
},
"draftIteration": {
"$ref": "#/components/schemas/IterationRep",
"description": "Details on the current iteration. This iteration may be already started, or may still be a draft."
},
"environmentKey": {
"type": "string"
},
"currentIteration": {
"$ref": "#/components/schemas/IterationRep",
"description": "Details on the current iteration"
},
"previousIterations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/IterationRep"
},
"description": "Details on the previous iterations for this experiment."
}
}
}
ExperimentAllocationRep
{
"type": "object",
"required": [
"defaultVariation",
"canReshuffle"
],
"properties": {
"canReshuffle": {
"type": "boolean"
},
"defaultVariation": {
"type": "integer"
}
}
}
ExperimentBayesianResultsRep
{
"type": "object",
"properties": {
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SlicedResultsRep"
},
"description": "A list of attribute values and their corresponding treatment results"
},
"metricSeen": {
"$ref": "#/components/schemas/MetricSeen"
},
"treatmentResults": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TreatmentResultRep"
},
"deprecated": true,
"description": "Deprecated, use <code>results</code> instead. Only populated when response does not contain results sliced by multiple attributes."
},
"probabilityOfMismatch": {
"type": "number",
"example": 0.9999999999999738,
"description": "The probability of a Sample Ratio Mismatch"
}
}
}
ExperimentCollectionRep
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Experiment"
},
"description": "An array of experiments"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"total_count": {
"type": "integer",
"description": "The total number of experiments in this project and environment. Does not include legacy experiments."
}
}
}
ExperimentEnabledPeriodRep
{
"type": "object",
"properties": {
"stopDate": {
"$ref": "#/components/schemas/UnixMillis"
},
"startDate": {
"$ref": "#/components/schemas/UnixMillis"
}
}
}
ExperimentEnvironmentSettingRep
{
"type": "object",
"properties": {
"stopDate": {
"$ref": "#/components/schemas/UnixMillis"
},
"startDate": {
"$ref": "#/components/schemas/UnixMillis"
},
"enabledPeriods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExperimentEnabledPeriodRep"
}
}
}
}
ExperimentInfoRep
{
"type": "object",
"required": [
"baselineIdx",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LegacyExperimentRep"
}
},
"baselineIdx": {
"type": "integer"
}
}
}
ExperimentMetadataRep
{
"type": "object",
"properties": {
"key": {}
}
}
ExperimentPatchInput
{
"type": "object",
"required": [
"instructions"
],
"properties": {
"comment": {
"type": "string",
"example": "Optional comment",
"description": "Optional comment describing the update"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[{\"kind\": \"updateName\", \"value\": \"Updated experiment name\"}]",
"description": "The instructions to perform when updating. This should be an array with objects that look like <code>{\"kind\": \"update_action\"}</code>. Some instructions also require a <code>value</code> field in the array element."
}
}
}
ExperimentPost
{
"type": "object",
"required": [
"name",
"key",
"iteration"
],
"properties": {
"key": {
"type": "string",
"example": "experiment-key-123abc",
"description": "The experiment key"
},
"name": {
"type": "string",
"example": "Example experiment",
"description": "The experiment name"
},
"iteration": {
"$ref": "#/components/schemas/IterationInput",
"description": "Details on the construction of the initial iteration"
},
"description": {
"type": "string",
"example": "An example experiment, used in testing",
"description": "The experiment description"
},
"maintainerId": {
"type": "string",
"example": "12ab3c45de678910fgh12345",
"description": "The ID of the member who maintains this experiment"
}
}
}
ExperimentResults
{
"type": "object",
"properties": {
"stats": {
"$ref": "#/components/schemas/ExperimentStatsRep"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"series": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExperimentTimeSeriesSlice"
}
},
"totals": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExperimentTotalsRep"
}
},
"metadata": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExperimentMetadataRep"
}
},
"metricSeen": {
"$ref": "#/components/schemas/MetricSeen"
},
"granularity": {
"type": "string"
}
}
}
ExperimentStatsRep
{
"type": "object",
"properties": {
"chi2": {
"type": "number"
},
"pValue": {
"type": "number"
},
"minSampleSizeMet": {
"type": "boolean"
},
"winningVariationIdx": {
"type": "integer"
}
}
}
ExperimentTimeSeriesSlice
{
"type": "object",
"properties": {
"Time": {
"$ref": "#/components/schemas/UnixMillis"
},
"VariationData": {
"$ref": "#/components/schemas/ExperimentTimeSeriesVariationSlices"
}
}
}
ExperimentTimeSeriesVariationSlice
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"format": "int64"
},
"value": {
"type": "number"
},
"conversionRate": {
"type": "number"
},
"cumulativeCount": {
"type": "integer",
"format": "int64"
},
"cumulativeValue": {
"type": "number"
},
"confidenceInterval": {
"$ref": "#/components/schemas/ConfidenceIntervalRep"
},
"cumulativeConversionRate": {
"type": "number"
},
"cumulativeConfidenceInterval": {
"$ref": "#/components/schemas/ConfidenceIntervalRep"
}
}
}
ExperimentTimeSeriesVariationSlices
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ExperimentTimeSeriesVariationSlice"
}
}
ExperimentTotalsRep
{
"type": "object",
"properties": {
"pValue": {
"type": "number"
},
"improvement": {
"type": "number"
},
"minSampleSize": {
"type": "integer",
"format": "int64"
},
"cumulativeCount": {
"type": "integer",
"format": "int64"
},
"cumulativeValue": {
"type": "number"
},
"cumulativeConversionRate": {
"type": "number"
},
"cumulativeImpressionCount": {
"type": "integer",
"format": "int64"
},
"cumulativeConfidenceInterval": {
"$ref": "#/components/schemas/ConfidenceIntervalRep"
}
}
}
ExpiringTarget
{
"type": "object",
"required": [
"_id",
"_version",
"expirationDate",
"contextKind",
"contextKey",
"_resourceId"
],
"properties": {
"_id": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "The ID of this expiring target"
},
"_version": {
"type": "integer",
"example": 1,
"description": "The version of this expiring target"
},
"contextKey": {
"type": "string",
"example": "context-key-123abc",
"description": "A unique key used to represent the context to be removed"
},
"targetType": {
"type": "string",
"example": "included",
"description": "A segment's target type, <code>included</code> or <code>excluded</code>. Included when expiring targets are updated on a segment."
},
"_resourceId": {
"$ref": "#/components/schemas/ResourceId",
"description": "Details on the segment or flag this expiring target belongs to, its environment, and its project"
},
"contextKind": {
"type": "string",
"example": "user",
"description": "The context kind of the context to be removed"
},
"variationId": {
"type": "string",
"example": "cc4332e2-bd4d-4fe0-b509-dfd2caf8dd73",
"description": "A unique ID used to represent the flag variation. Included when expiring targets are updated on a feature flag."
},
"expirationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1672358400000",
"description": "A timestamp for when the target expires"
}
}
}
ExpiringTargetError
{
"type": "object",
"required": [
"instructionIndex",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "example error message",
"description": "The error message related to a failed PATCH instruction"
},
"instructionIndex": {
"type": "integer",
"example": 1,
"description": "The index of the PATCH instruction where the error occurred"
}
}
}
ExpiringTargetGetResponse
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExpiringTarget"
},
"description": "A list of expiring targets"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
ExpiringTargetPatchResponse
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExpiringTarget"
},
"description": "A list of the results from each instruction"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExpiringTargetError"
}
},
"totalInstructions": {
"type": "integer"
},
"failedInstructions": {
"type": "integer"
},
"successfulInstructions": {
"type": "integer"
}
}
}
ExpiringUserTargetGetResponse
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExpiringUserTargetItem"
},
"description": "An array of expiring user targets"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
ExpiringUserTargetItem
{
"type": "object",
"required": [
"_id",
"_version",
"expirationDate",
"userKey",
"_resourceId"
],
"properties": {
"_id": {
"type": "string",
"example": "12ab3c45de678910fgh12345",
"description": "The ID of this expiring user target"
},
"userKey": {
"type": "string",
"example": "example-user-key",
"description": "A unique key used to represent the user"
},
"_version": {
"type": "integer",
"example": 1,
"description": "The version of this expiring user target"
},
"targetType": {
"type": "string",
"example": "included",
"description": "A segment's target type. Included when expiring user targets are updated on a segment."
},
"_resourceId": {
"$ref": "#/components/schemas/ResourceIDResponse",
"description": "Details on the resource from which the user is expiring"
},
"variationId": {
"type": "string",
"example": "ce67d625-a8b9-4fb5-a344-ab909d9d4f4d",
"description": "A unique key used to represent the flag variation. Included when expiring user targets are updated on a feature flag."
},
"expirationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1658192820000",
"description": "A timestamp for when the user target expires"
}
}
}
ExpiringUserTargetPatchResponse
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExpiringUserTargetItem"
},
"description": "An array of expiring user targets"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ExpiringTargetError"
},
"description": "An array of error messages for the failed instructions"
},
"totalInstructions": {
"type": "integer",
"example": 1,
"description": "The total count of instructions sent in the PATCH request"
},
"failedInstructions": {
"type": "integer",
"example": 0,
"description": "The total count of the failed instructions sent in the PATCH request"
},
"successfulInstructions": {
"type": "integer",
"example": 1,
"description": "The total count of successful instructions sent in the PATCH request"
}
}
}
Export
{
"type": "object",
"required": [
"id",
"segmentKey",
"creationTime",
"status",
"sizeBytes",
"size",
"initiator",
"_links"
],
"properties": {
"id": {
"type": "string",
"example": "1234a567-bcd8-9123-4567-abcd1234567f",
"description": "The export ID"
},
"size": {
"type": "string",
"example": "18 B",
"description": "The export size, with units"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources, including the location of the exported file",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"status": {
"type": "string",
"example": "complete",
"description": "The export status"
},
"initiator": {
"$ref": "#/components/schemas/InitiatorRep",
"example": "{\"name\": \"Ariel Flores\", \"email\": \"ariel@acme.com\"}",
"description": "Details on the member who initiated the export"
},
"sizeBytes": {
"type": "integer",
"format": "int64",
"example": 18,
"description": "The export size, in bytes"
},
"segmentKey": {
"type": "string",
"example": "example-big-segment",
"description": "The segment key"
},
"creationTime": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when this export was created"
}
}
}
Extinction
{
"type": "object",
"required": [
"revision",
"message",
"time",
"flagKey",
"projKey"
],
"properties": {
"time": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1636558831870",
"description": "Time of extinction"
},
"flagKey": {
"type": "string",
"example": "enable-feature",
"description": "The feature flag key"
},
"message": {
"type": "string",
"example": "Remove flag for launched feature",
"description": "Description of the extinction. For example, the commit message for the revision."
},
"projKey": {
"type": "string",
"example": "default",
"description": "The project key"
},
"revision": {
"type": "string",
"example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
"description": "The identifier for the revision where flag became extinct. For example, a commit SHA."
}
}
}
ExtinctionCollectionRep
{
"type": "object",
"required": [
"_links",
"items"
],
"properties": {
"items": {
"type": "object",
"description": "An array of extinction events",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Extinction"
}
}
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
ExtinctionListPost
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Extinction"
}
}
FailureReasonRep
{
"type": "object",
"required": [
"attribute",
"reason"
],
"properties": {
"reason": {
"type": "string",
"example": "must be present",
"description": "The reason the attribute failed validation"
},
"attribute": {
"type": "string",
"example": "projectKey",
"description": "The attribute that failed validation"
}
}
}
FeatureFlag
{
"type": "object",
"required": [
"name",
"kind",
"key",
"_version",
"creationDate",
"variations",
"temporary",
"tags",
"_links",
"experiments",
"customProperties",
"archived",
"deprecated",
"environments"
],
"properties": {
"key": {
"type": "string",
"example": "flag-key-123abc",
"description": "A unique key used to reference the flag in your code"
},
"kind": {
"enum": [
"boolean",
"multivariate"
],
"type": "string",
"example": "boolean",
"description": "Kind of feature flag"
},
"name": {
"type": "string",
"example": "My Flag",
"description": "A human-friendly name for the feature flag"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-tag"
],
"description": "Tags for the feature flag"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/flags/my-project/my-flag",
"type": "application/json"
},
"parent": {
"href": "/api/v2/flags/my-project",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"goalIds": {
"type": "array",
"items": {
"type": "string"
},
"example": [],
"deprecated": true,
"description": "Deprecated, use <code>experiments</code> instead"
},
"_purpose": {
"type": "string"
},
"_version": {
"type": "integer",
"example": 1,
"description": "Version of the feature flag"
},
"archived": {
"type": "boolean",
"example": false,
"description": "Boolean indicating if the feature flag is archived"
},
"defaults": {
"$ref": "#/components/schemas/Defaults",
"example": "{\"onVariation\":0,\"offVariation\":1}",
"description": "The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used."
},
"temporary": {
"type": "boolean",
"example": true,
"description": "Whether the flag is a temporary flag"
},
"deprecated": {
"type": "boolean",
"example": false,
"description": "Boolean indicating if the feature flag is deprecated"
},
"variations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Variation"
},
"example": [
{
"_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
"value": true
},
{
"_id": "a00bf58d-d252-476c-b915-15a74becacb4",
"value": false
}
],
"description": "An array of possible variations for the flag"
},
"_maintainer": {
"$ref": "#/components/schemas/MemberSummary",
"description": "Associated maintainer member info for the feature flag"
},
"description": {
"type": "string",
"example": "This flag controls the example widgets",
"description": "Description of the feature flag"
},
"experiments": {
"$ref": "#/components/schemas/ExperimentInfoRep",
"example": "{\"baselineIdx\": 0,\"items\": []}",
"description": "Experimentation data for the feature flag"
},
"archivedDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1494437420312",
"description": "If archived is true, date of archive"
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1494437420312",
"description": "Timestamp of flag creation date"
},
"environments": {
"type": "object",
"example": {
"my-environment": {
"on": false,
"sel": "810edeadbeef4844facecafe438f2999492",
"salt": "61eddeadbeef4da1facecafe3a60a397",
"_site": {
"href": "/default/my-environment/features/client-side-flag",
"type": "text/html"
},
"rules": [],
"targets": [
{
"values": [
"user-key-123abc"
],
"variation": 0,
"contextKind": "user"
}
],
"version": 1,
"_summary": {
"variations": {
"0": {
"rules": 0,
"targets": 1,
"nullRules": 0,
"isFallthrough": true,
"contextTargets": 1
},
"1": {
"isOff": true,
"rules": 0,
"targets": 0,
"nullRules": 0
}
},
"prerequisites": 0
},
"archived": false,
"fallthrough": {
"variation": 0
},
"trackEvents": false,
"lastModified": 1627071171347,
"offVariation": 1,
"prerequisites": [],
"contextTargets": [
{
"values": [
"device-key-123abc"
],
"variation": 0,
"contextKind": "device"
}
],
"_environmentName": "My Environment",
"trackEventsFallthrough": false
}
},
"description": "Details on the environments for this flag. Only returned if the request is filtered by environment, using the <code>filterEnv</code> query parameter.",
"additionalProperties": {
"$ref": "#/components/schemas/FeatureFlagConfig"
}
},
"maintainerId": {
"type": "string",
"example": "569f183514f4432160000007",
"description": "Associated maintainerId for the feature flag"
},
"deprecatedDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1494437420312",
"description": "If deprecated is true, date of deprecation"
},
"_maintainerTeam": {
"$ref": "#/components/schemas/MaintainerTeam",
"description": "Associated maintainer team info for the feature flag"
},
"customProperties": {
"$ref": "#/components/schemas/CustomProperties",
"example": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}",
"description": "Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration."
},
"includeInSnippet": {
"type": "boolean",
"example": true,
"deprecated": true,
"description": "Deprecated, use <code>clientSideAvailability</code>. Whether this flag should be made available to the client-side JavaScript SDK"
},
"maintainerTeamKey": {
"type": "string",
"example": "team-1",
"description": "The key of the associated team that maintains this feature flag"
},
"migrationSettings": {
"$ref": "#/components/schemas/FlagMigrationSettingsRep",
"description": "Migration-related settings for the flag"
},
"clientSideAvailability": {
"$ref": "#/components/schemas/ClientSideAvailability",
"example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}",
"description": "Which type of client-side SDKs the feature flag is available to"
}
}
}
FeatureFlagBody
{
"type": "object",
"required": [
"name",
"key"
],
"properties": {
"key": {
"type": "string",
"example": "flag-key-123abc",
"description": "A unique key used to reference the flag in your code"
},
"name": {
"type": "string",
"example": "My flag",
"description": "A human-friendly name for the feature flag"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-tag"
],
"description": "Tags for the feature flag. Defaults to an empty array."
},
"purpose": {
"enum": [
"migration"
],
"type": "string",
"example": "migration",
"description": "Purpose of the flag"
},
"defaults": {
"$ref": "#/components/schemas/Defaults",
"example": "{\"onVariation\":0, \"offVariation\":1}",
"description": "The indices, from the array of variations, for the variations to serve by default when targeting is on and when targeting is off. These variations will be used for this flag in new environments. If omitted, the first and last variation will be used."
},
"temporary": {
"type": "boolean",
"example": false,
"description": "Whether the flag is a temporary flag. Defaults to <code>true</code>."
},
"variations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Variation"
},
"example": [
{
"value": true
},
{
"value": false
}
],
"description": "An array of possible variations for the flag. The variation values must be unique. If omitted, two boolean variations of <code>true</code> and <code>false</code> will be used."
},
"description": {
"type": "string",
"example": "This flag controls the example widgets",
"description": "Description of the feature flag. Defaults to an empty string."
},
"maintainerId": {
"type": "string",
"example": "12ab3c45de678910fgh12345",
"description": "The ID of the member who maintains this feature flag"
},
"customProperties": {
"$ref": "#/components/schemas/CustomProperties",
"example": "{ \"jira.issues\": {\"name\": \"Jira issues\", \"value\": [\"is-123\", \"is-456\"]} }",
"description": "Metadata attached to the feature flag, in the form of the property key associated with a name and array of values for the metadata to associate with this flag. Typically used to store data related to an integration."
},
"includeInSnippet": {
"type": "boolean",
"deprecated": true,
"description": "Deprecated, use <code>clientSideAvailability</code>. Whether this flag should be made available to the client-side JavaScript SDK. Defaults to <code>false</code>."
},
"maintainerTeamKey": {
"type": "string",
"example": "team-1",
"description": "The key of the team that maintains this feature flag"
},
"migrationSettings": {
"$ref": "#/components/schemas/MigrationSettingsPost",
"description": "Settings relevant to flags where <code>purpose</code> is <code>migration</code>"
},
"clientSideAvailability": {
"$ref": "#/components/schemas/ClientSideAvailabilityPost",
"example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}",
"description": "Which type of client-side SDKs the feature flag is available to"
}
}
}
FeatureFlagConfig
{
"type": "object",
"required": [
"on",
"archived",
"salt",
"sel",
"lastModified",
"version",
"_site",
"_environmentName",
"trackEvents",
"trackEventsFallthrough"
],
"properties": {
"on": {
"type": "boolean",
"description": "Whether the flag is on"
},
"sel": {
"type": "string"
},
"salt": {
"type": "string"
},
"_site": {
"$ref": "#/components/schemas/Link",
"description": "Details on how to access the flag configuration in the LaunchDarkly UI"
},
"rules": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Rule"
},
"description": "An array of the rules for how to serve a variation to specific targets based on their attributes"
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this flag"
},
"targets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Target"
},
"description": "An array of the individual targets that will receive a specific variation based on their key. Individual targets with a context kind of 'user' are included here."
},
"version": {
"type": "integer",
"description": "Version of the feature flag"
},
"_summary": {
"$ref": "#/components/schemas/FlagSummary",
"description": "A summary of the prerequisites and variations for this flag"
},
"archived": {
"type": "boolean",
"description": "Boolean indicating if the feature flag is archived"
},
"evaluation": {
"$ref": "#/components/schemas/FlagConfigEvaluation",
"description": "Evaluation information for the flag"
},
"fallthrough": {
"$ref": "#/components/schemas/VariationOrRolloutRep",
"description": "Details on the variation or rollout to serve as part of the flag's default rule"
},
"trackEvents": {
"type": "boolean",
"description": "Whether LaunchDarkly tracks events for the feature flag, for all rules"
},
"lastModified": {
"$ref": "#/components/schemas/UnixMillis",
"description": "Timestamp of when the flag configuration was most recently modified"
},
"offVariation": {
"type": "integer",
"description": "The ID of the variation to serve when the flag is off"
},
"prerequisites": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Prerequisite"
},
"description": "An array of the prerequisite flags and their variations that are required before this flag takes effect"
},
"contextTargets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Target"
},
"description": "An array of the individual targets that will receive a specific variation based on their key. Individual targets with context kinds other than 'user' are included here."
},
"_environmentName": {
"type": "string",
"description": "The environment name"
},
"migrationSettings": {
"$ref": "#/components/schemas/FlagConfigMigrationSettingsRep",
"description": "Migration-related settings for the flag configuration"
},
"_debugEventsUntilDate": {
"$ref": "#/components/schemas/UnixMillis"
},
"trackEventsFallthrough": {
"type": "boolean",
"description": "Whether LaunchDarkly tracks events for the feature flag, for the default rule"
}
}
}
FeatureFlagScheduledChange
{
"type": "object",
"required": [
"_id",
"_creationDate",
"_maintainerId",
"_version",
"executionDate",
"instructions"
],
"properties": {
"_id": {
"$ref": "#/components/schemas/FeatureWorkflowId",
"example": "12ab3c45de678910abc12345",
"description": "The ID of this scheduled change"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_version": {
"type": "integer",
"example": 1,
"description": "Version of the scheduled change"
},
"conflicts": {
"description": "Details on any conflicting scheduled changes"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[ { \"kind\": \"turnFlagOn\" }]",
"description": "The actions to perform on the execution date for these scheduled changes"
},
"_creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654123897062",
"description": "Timestamp of when the scheduled change was created"
},
"_maintainerId": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "The ID of the scheduled change maintainer"
},
"executionDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1636558831870",
"description": "When the scheduled changes should be executed"
}
}
}
FeatureFlagScheduledChanges
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FeatureFlagScheduledChange"
},
"description": "Array of scheduled changes"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
FeatureFlagStatus
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"example": "inactive",
"description": "Status of the flag"
},
"default": {
"description": "Default value seen from code"
},
"lastRequested": {
"type": "string",
"format": "date-time",
"example": "2020-02-05T18:17:01.514Z",
"description": "Timestamp of last time flag was requested"
}
}
}
FeatureFlagStatusAcrossEnvironments
{
"type": "object",
"required": [
"environments",
"key",
"_links"
],
"properties": {
"key": {
"type": "string",
"example": "flag-key-123abc",
"description": "feature flag key"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/flag-status/my-project/my-flag",
"type": "application/json"
},
"parent": {
"href": "/api/v2/flag-status",
"type": "application/json"
}
},
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"environments": {
"type": "object",
"example": {
"production": {
"name": "inactive",
"lastRequested": "2020-02-05T18:17:01.514Z"
}
},
"description": "Flag status for environment.",
"additionalProperties": {
"$ref": "#/components/schemas/FeatureFlagStatus"
}
}
}
}
FeatureFlagStatuses
{
"type": "object",
"required": [
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FlagStatusRep"
}
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/flag-statuses/my-project/my-environment",
"type": "application/json"
}
},
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
FeatureFlags
{
"type": "object",
"required": [
"items",
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FeatureFlag"
},
"description": "An array of feature flags"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/flags/default",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "The total number of flags"
},
"totalCountWithDifferences": {
"type": "integer",
"example": 0,
"description": "The number of flags that have differences between environments. Only shown when query parameter <code>compare</code> is <code>true</code>."
}
}
}
FeatureFlagsBetaGetMigrationSafetyIssuesResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/MigrationSafetyIssueRep"
}
}
FeatureWorkflowId
{
"type": "string"
}
FileRep
{
"type": "object",
"properties": {
"status": {
"type": "string",
"example": "complete",
"description": "The imported file status"
},
"filename": {
"type": "string",
"example": "bigsegimport.csv",
"description": "The imported file name, including the extension"
}
}
}
FlagConfigApprovalRequestResponse
{
"type": "object",
"required": [
"_id",
"_version",
"creationDate",
"serviceKind",
"reviewStatus",
"allReviews",
"notifyMemberIds",
"status",
"instructions",
"conflicts",
"_links"
],
"properties": {
"_id": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "The ID of this approval request"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {}
},
"source": {
"$ref": "#/components/schemas/CopiedFromEnv",
"description": "Details about the source feature flag, if copied"
},
"status": {
"enum": [
"pending",
"completed",
"failed",
"scheduled"
],
"type": "string",
"example": "pending",
"description": "Current status of the approval request"
},
"_version": {
"type": "integer",
"example": 1,
"description": "Version of the approval request"
},
"conflicts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Conflict"
},
"description": "Details on any conflicting approval requests"
},
"allReviews": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReviewResponse"
},
"description": "An array of individual reviews of this approval request"
},
"appliedDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the approval request was applied"
},
"description": {
"type": "string",
"example": "example: request approval from someone",
"description": "A human-friendly name for the approval request"
},
"requestorId": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "The ID of the member who requested the approval"
},
"serviceKind": {
"$ref": "#/components/schemas/ApprovalRequestServiceKind",
"example": "launchdarkly",
"description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA."
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the approval request was created"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[{\"kind\": \"turnFlagOn\"}]",
"description": "List of instructions in semantic patch format to be applied to the feature flag"
},
"reviewStatus": {
"enum": [
"approved",
"declined",
"pending"
],
"type": "string",
"example": "pending",
"description": "Current status of the review of this approval request"
},
"executionDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp for when instructions will be executed"
},
"operatingOnId": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "ID of scheduled change to edit or delete"
},
"notifyMemberIds": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"1234a56b7c89d012345e678f"
],
"description": "An array of member IDs. These members are notified to review the approval request."
},
"appliedByMemberId": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The member ID of the member who applied the approval request"
},
"integrationMetadata": {
"$ref": "#/components/schemas/IntegrationMetadata",
"description": "Details about the object in an external service corresponding to this approval request, such as a ServiceNow change request or a JIRA ticket, if an external approval service is being used"
},
"customWorkflowMetadata": {
"$ref": "#/components/schemas/CustomWorkflowMeta",
"description": "Details about the custom workflow, if this approval request is part of a custom workflow"
},
"appliedByServiceTokenId": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The service token ID of the service token which applied the approval request"
}
}
}
FlagConfigApprovalRequestsResponse
{
"type": "object",
"required": [
"items",
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FlagConfigApprovalRequestResponse"
},
"description": "An array of approval requests"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
FlagConfigEvaluation
{
"type": "object",
"properties": {
"contextKinds": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
FlagConfigMigrationSettingsRep
{
"type": "object",
"properties": {
"checkRatio": {
"type": "integer"
}
}
}
FlagCopyConfigEnvironment
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The environment key"
},
"currentVersion": {
"type": "integer",
"description": "Optional flag version. If you include this, the operation only succeeds if the current flag version in the environment matches this version."
}
}
}
FlagCopyConfigPost
{
"type": "object",
"required": [
"source",
"target"
],
"properties": {
"source": {
"$ref": "#/components/schemas/FlagCopyConfigEnvironment",
"example": "{\"key\": \"source-env-key-123abc\", \"currentVersion\": 1}",
"description": "The source environment"
},
"target": {
"$ref": "#/components/schemas/FlagCopyConfigEnvironment",
"example": "{\"key\": \"target-env-key-123abc\", \"currentVersion\": 1}",
"description": "The target environment"
},
"comment": {
"type": "string",
"description": "Optional comment"
},
"excludedActions": {
"type": "array",
"items": {
"enum": [
"updateOn",
"updateRules",
"updateFallthrough",
"updateOffVariation",
"updatePrerequisites",
"updateTargets",
"updateFlagConfigMigrationSettings"
],
"type": "string"
},
"example": [
"updateOn"
],
"description": "Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either <code>includedActions</code> or <code>excludedActions</code>, but not both. If you include neither, then all flag changes will be copied."
},
"includedActions": {
"type": "array",
"items": {
"enum": [
"updateOn",
"updateRules",
"updateFallthrough",
"updateOffVariation",
"updatePrerequisites",
"updateTargets",
"updateFlagConfigMigrationSettings"
],
"type": "string"
},
"example": [
"updateOn"
],
"description": "Optional list of the flag changes to copy from the source environment to the target environment. You may include either <code>includedActions</code> or <code>excludedActions</code>, but not both. If you include neither, then all flag changes will be copied."
}
}
}
FlagEventCollectionRep
{
"type": "object",
"required": [
"totalCount",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FlagEventRep"
},
"description": "A list of flag events"
},
"_links": {
"type": "object",
"example": {
"next": {
"href": "/api/v2/engineering-insights/flag-events?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",
"type": "application/json"
},
"self": {
"href": "/api/v2/engineering-insights/flag-events",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 1200,
"description": "The total number of flag events"
}
}
}
FlagEventExperiment
{
"type": "object",
"required": [
"key",
"name",
"iteration"
],
"properties": {
"key": {
"type": "string",
"example": "experiment-1",
"description": "The experiment key"
},
"name": {
"type": "string",
"example": "Experiment 1",
"description": "The experiment name"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"iteration": {
"$ref": "#/components/schemas/FlagEventExperimentIteration",
"description": "The experiment iteration"
}
}
}
FlagEventExperimentCollection
{
"type": "object",
"required": [
"totalCount",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FlagEventExperiment"
},
"description": "A list of experiments"
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "The total number of experiments"
}
}
}
FlagEventExperimentIteration
{
"type": "object",
"required": [
"id",
"status",
"startedAt"
],
"properties": {
"id": {
"type": "string",
"example": "65baa44ecc4b5bce113bb4f7",
"description": "The experiment iteration ID"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"status": {
"$ref": "#/components/schemas/IterationStatus",
"enum": [
"running",
"stopped"
],
"example": "running",
"description": "The experiment iteration status"
},
"endedAt": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1656610200000",
"description": "Timestamp of when the iteration ended"
},
"startedAt": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1655314200000",
"description": "Timestamp of when the iteration started"
}
}
}
FlagEventImpactRep
{
"type": "object",
"properties": {
"size": {
"enum": [
"none",
"small",
"medium",
"large"
],
"type": "string",
"example": "medium",
"description": "The size of the flag event impact. Sizes are defined as: none (0%), small (0-20%), medium (20-80%), large (>80%)"
},
"reason": {
"$ref": "#/components/schemas/ImpactReason",
"enum": [
"evaluations",
"global",
"waiting"
],
"example": "evaluations",
"description": "The reason for the flag event impact"
},
"percentage": {
"type": "number",
"example": 50,
"description": "The percentage of the flag event impact"
},
"evaluationsSummary": {
"$ref": "#/components/schemas/EvaluationsSummary",
"description": "A summary of the change in variation evaluations after the flag event"
}
}
}
FlagEventMemberRep
{
"type": "object",
"required": [
"id",
"email",
"firstName",
"lastName"
],
"properties": {
"id": {
"type": "string",
"example": "65baa44ecc4b5bce113bb4f7",
"description": "The member ID"
},
"email": {
"type": "string",
"example": "test@launchdarkly.com",
"description": "The member email"
},
"lastName": {
"type": "string",
"description": "The member last name"
},
"firstName": {
"type": "string",
"description": "The member first name"
}
}
}
FlagEventRep
{
"type": "object",
"required": [
"id",
"projectId",
"projectKey",
"flagKey",
"eventType",
"eventTime",
"description",
"impact"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"example": "e3b2b0e0-9e9b-4c9a-8e9a-0e0e0e0e0e0e",
"description": "The flag event ID"
},
"impact": {
"$ref": "#/components/schemas/FlagEventImpactRep",
"description": "The flag event evaluation impact"
},
"member": {
"$ref": "#/components/schemas/FlagEventMemberRep",
"description": "The member data"
},
"actions": {
"type": "array",
"items": {
"type": "string"
},
"description": "The resource actions"
},
"flagKey": {
"type": "string",
"example": "enable-new-payment-method",
"description": "The flag key"
},
"eventTime": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1616425200000",
"description": "A Unix timestamp in milliseconds"
},
"eventType": {
"$ref": "#/components/schemas/EventType",
"example": "enabled_targeting",
"description": "The event type"
},
"projectId": {
"type": "string",
"example": "65baa44ecc4b5bce113bb4f7",
"description": "The project ID"
},
"projectKey": {
"type": "string",
"example": "default",
"description": "The project key"
},
"description": {
"type": "string",
"example": "Targeting rule enabled",
"description": "The event description"
},
"experiments": {
"$ref": "#/components/schemas/FlagEventExperimentCollection",
"description": "A list of experiment iterations related to the flag event"
},
"environmentId": {
"type": "string",
"example": "65baa44ecc4b5bce113bb4f7",
"description": "The environment ID"
},
"environmentKey": {
"type": "string",
"example": "production",
"description": "The environment key"
},
"auditLogEntryId": {
"type": "string",
"example": "e3b2b0e0-9e9b-4c9a-8e9a-0e0e0e0e0e0e",
"description": "The audit log entry ID"
}
}
}
FlagFollowersByProjEnvGetRep
{
"type": "object",
"required": [
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/followersPerFlag"
},
"description": "An array of flags and their followers"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project/flags/my-flay/environments/my-environment/followers",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
FlagFollowersGetRep
{
"type": "object",
"required": [
"_links",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FollowFlagMember"
},
"description": "An array of members who are following this flag"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project/flags/my-flay/environments/my-environment/followers",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
FlagInput
{
"type": "object",
"required": [
"ruleId",
"flagConfigVersion"
],
"properties": {
"ruleId": {
"type": "string",
"example": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
"description": "The ID of the variation or rollout of the flag to use. Use \"fallthrough\" for the default targeting behavior when the flag is on."
},
"flagConfigVersion": {
"type": "integer",
"example": 12,
"description": "The flag version"
}
}
}
FlagLinkCollectionRep
{
"type": "object",
"required": [
"items",
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FlagLinkRep"
},
"description": "An array of flag links"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
FlagLinkMember
{
"type": "object",
"required": [
"_links",
"_id"
],
"properties": {
"_id": {
"type": "string"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"lastName": {
"type": "string"
},
"firstName": {
"type": "string"
}
}
}
FlagLinkRep
{
"type": "object",
"required": [
"_links",
"_id",
"_deepLink",
"_timestamp",
"_createdAt"
],
"properties": {
"_id": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The ID of this flag link"
},
"_key": {
"type": "string",
"example": "flag-link-key-123abc",
"description": "The flag link key"
},
"title": {
"type": "string",
"example": "Example link title",
"description": "The title of the flag link"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_member": {
"$ref": "#/components/schemas/FlagLinkMember",
"description": "Details on the member associated with this flag link"
},
"_deepLink": {
"type": "string",
"example": "https://example.com/archives/123123123",
"description": "The URL for the external resource the flag is linked to"
},
"_metadata": {
"type": "object",
"description": "The metadata required by this integration in order to create a flag link, if this is a flag link for an existing integration. Defined in the integration's <code>manifest.json</code> file under <code>flagLink</code>.",
"additionalProperties": {
"type": "string"
}
},
"_createdAt": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the flag link was created"
},
"_timestamp": {
"$ref": "#/components/schemas/TimestampRep",
"example": "{\"milliseconds\": 1655342199935, \"seconds\": 1655342199, \"rfc3339\": \"2022-06-16T01:16:39Z\", \"simple\": \"2022-06-16 01:16:39\"}",
"description": "The time to mark this flag link as associated with the external URL. Defaults to the creation time of the flag link, but can be set to another time during creation."
},
"description": {
"type": "string",
"example": "Example link description",
"description": "The description of the flag link"
},
"_integrationKey": {
"type": "string",
"description": "The integration key for an integration whose <code>manifest.json</code> includes the <code>flagLink</code> capability, if this is a flag link for an existing integration"
}
}
}
FlagListingRep
{
"type": "object",
"required": [
"name",
"key"
],
"properties": {
"key": {
"type": "string",
"example": "flag-key-123abc",
"description": "The flag key"
},
"name": {
"type": "string",
"example": "Example flag",
"description": "The flag name"
},
"_site": {
"$ref": "#/components/schemas/Link"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
FlagMigrationSettingsRep
{
"type": "object",
"properties": {
"stageCount": {
"type": "integer",
"example": 6,
"description": "The number of stages for this migration flag"
},
"contextKind": {
"type": "string",
"example": "device",
"description": "The context kind targeted by this migration flag. Only applicable for six-stage migrations."
}
}
}
FlagReferenceCollectionRep
{
"type": "object",
"required": [
"totalCount",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FlagReferenceRep"
},
"description": "A list of flag references"
},
"totalCount": {
"type": "integer",
"example": 25,
"description": "The total number of flag references"
}
}
}
FlagReferenceRep
{
"type": "object",
"required": [
"projectKey",
"flagKey",
"referencesAdded",
"referencesRemoved"
],
"properties": {
"flagKey": {
"type": "string",
"example": "enable-new-payment-structure",
"description": "The flag key"
},
"projectKey": {
"type": "string",
"example": "default",
"description": "The project key"
},
"referencesAdded": {
"type": "integer",
"example": 2,
"description": "The number of references added"
},
"referencesRemoved": {
"type": "integer",
"example": 5,
"description": "The number of references removed"
}
}
}
FlagRep
{
"type": "object",
"required": [
"_links"
],
"properties": {
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/flags/my-project/my-flag",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"targetingRule": {
"type": "string",
"example": "fallthrough",
"description": "The targeting rule"
},
"flagConfigVersion": {
"type": "integer",
"example": 12,
"description": "The flag version"
},
"targetingRuleClauses": {
"type": "array",
"items": {},
"description": "An array of clauses used for individual targeting based on attributes"
},
"targetingRuleDescription": {
"type": "string",
"example": "Customers who live in Canada",
"description": "The rule description"
}
}
}
FlagScheduledChangesInput
{
"type": "object",
"required": [
"instructions"
],
"properties": {
"comment": {
"type": "string",
"example": "optional comment",
"description": "Optional comment describing the update to the scheduled changes"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[ { \"kind\": \"replaceScheduledChangesInstructions\", \"value\": [ { \"kind\": \"turnFlagOff\" } ] } ]",
"description": "The instructions to perform when updating. This should be an array with objects that look like <code>{\"kind\": \"update_action\"}</code>. Some instructions also require a <code>value</code> field in the array element."
}
}
}
FlagStatusRep
{
"type": "object",
"required": [
"_links"
],
"properties": {
"name": {
"type": "string",
"example": "inactive",
"description": "Status of the flag"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/flag-statuses/my-project/my-flag",
"type": "application/json"
},
"parent": {
"href": "/api/v2/flags/my-project/my-flag",
"type": "application/json"
}
},
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"default": {
"description": "Default value seen from code"
},
"lastRequested": {
"type": "string",
"format": "date-time",
"example": "2020-02-05T18:17:01.514Z",
"description": "Timestamp of last time flag was requested"
}
}
}
FlagSummary
{
"type": "object",
"required": [
"variations",
"prerequisites"
],
"properties": {
"variations": {
"$ref": "#/components/schemas/AllVariationsSummary",
"description": "A summary of the variations for this flag"
},
"prerequisites": {
"type": "integer",
"description": "The number of prerequisites for this flag"
}
}
}
FlagTriggerInput
{
"type": "object",
"properties": {
"comment": {
"type": "string",
"example": "optional comment",
"description": "Optional comment describing the update"
},
"instructions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Instruction"
},
"example": [
{
"kind": "disableTrigger"
}
],
"description": "The instructions to perform when updating. This should be an array with objects that look like <code>{\"kind\": \"trigger_action\"}</code>."
}
}
}
FlagsInput
{
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/FlagInput"
}
}
FollowFlagMember
{
"type": "object",
"required": [
"_links",
"_id",
"role",
"email"
],
"properties": {
"_id": {
"type": "string",
"example": "569f183514f4432160000007",
"description": "The member's ID"
},
"role": {
"type": "string",
"example": "admin",
"description": "The member's built-in role. If the member has no custom roles, this role will be in effect."
},
"email": {
"type": "string",
"example": "ariel@acme.com",
"description": "The member's email address"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"lastName": {
"type": "string",
"example": "Flores",
"description": "The member's last name"
},
"firstName": {
"type": "string",
"example": "Ariel",
"description": "The member's first name"
}
}
}
ForbiddenErrorRep
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"example": "forbidden",
"description": "Specific error code encountered"
},
"message": {
"type": "string",
"example": "Forbidden. Access to the requested resource was denied.",
"description": "Description of the error"
}
}
}
FormVariableConfig
{
"type": "object",
"additionalProperties": {}
}
HunkRep
{
"type": "object",
"required": [
"startingLineNumber"
],
"properties": {
"lines": {
"type": "string",
"example": "var enableFeature = 'enable-feature';",
"description": "Contextual lines of code that include the referenced feature flag"
},
"aliases": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"enableFeature",
"EnableFeature"
],
"description": "An array of flag key aliases"
},
"flagKey": {
"type": "string",
"example": "enable-feature",
"description": "The feature flag key"
},
"projKey": {
"type": "string",
"example": "default",
"description": "The project key"
},
"startingLineNumber": {
"type": "integer",
"example": 45,
"description": "Line number of beginning of code reference hunk"
}
}
}
ImpactReason
{
"type": "string"
}
Import
{
"type": "object",
"required": [
"id",
"segmentKey",
"creationTime",
"mode",
"status",
"_links"
],
"properties": {
"id": {
"type": "string",
"example": "1234a567-bcd8-9123-4567-abcd1234567f",
"description": "The import ID"
},
"mode": {
"type": "string",
"example": "replace",
"description": "The import mode used, either <code>merge</code> or <code>replace</code>"
},
"files": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FileRep"
},
"example": [
{
"status": "complete",
"filename": "bigsegimport.csv"
}
],
"description": "The imported files and their status"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"status": {
"type": "string",
"example": "complete",
"description": "The import status"
},
"segmentKey": {
"type": "string",
"example": "example-big-segment",
"description": "The segment key"
},
"creationTime": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when this import was created"
}
}
}
InitiatorRep
{
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "Bob Loblaw",
"description": "The name of the member who initiated the export"
},
"email": {
"type": "string",
"example": "ariel@acme.com",
"description": "The email address of the member who initiated the export"
}
}
}
InsightGroup
{
"type": "object",
"required": [
"key",
"name",
"projectKey",
"environmentKey",
"createdAt"
],
"properties": {
"key": {
"type": "string",
"example": "default-production-all-apps",
"description": "The insight group key"
},
"name": {
"type": "string",
"example": "Production - All Apps",
"description": "The insight group name"
},
"scores": {
"$ref": "#/components/schemas/InsightGroupScores",
"description": "The scores for the insight group"
},
"createdAt": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1706701522000",
"description": "The time the insight group was created"
},
"projectKey": {
"type": "string",
"example": "default",
"description": "The project key"
},
"environment": {
"$ref": "#/components/schemas/Environment",
"description": "Expanded details about the environment"
},
"scoreMetadata": {
"$ref": "#/components/schemas/InsightGroupCollectionScoreMetadata",
"description": "Metadata about the insight scores, when expanded"
},
"environmentKey": {
"type": "string",
"example": "production",
"description": "The environment key"
},
"applicationKeys": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"billing-service",
"inventory-service"
],
"description": "The application keys"
}
}
}
InsightGroupCollection
{
"type": "object",
"required": [
"totalCount",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InsightGroup"
},
"description": "A list of insight groups"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"metadata": {
"$ref": "#/components/schemas/InsightGroupCollectionMetadata",
"description": "Metadata about the insight groups"
},
"totalCount": {
"type": "integer",
"example": 15,
"description": "The total number of insight groups"
},
"scoreMetadata": {
"$ref": "#/components/schemas/InsightGroupCollectionScoreMetadata",
"description": "Metadata about the insight scores, when expanded"
}
}
}
InsightGroupCollectionMetadata
{
"type": "object",
"required": [
"countByIndicator"
],
"properties": {
"countByIndicator": {
"$ref": "#/components/schemas/InsightGroupsCountByIndicator"
}
}
}
InsightGroupCollectionScoreMetadata
{
"type": "object",
"required": [
"period",
"lastPeriod"
],
"properties": {
"period": {
"$ref": "#/components/schemas/InsightPeriod",
"description": "The time period for the score calculations"
},
"lastPeriod": {
"$ref": "#/components/schemas/InsightPeriod",
"description": "The time period for the score calculations in the last period"
}
}
}
InsightGroupScores
{
"type": "object",
"required": [
"overall",
"deploymentFrequency",
"deploymentFailureRate",
"leadTime",
"impactSize",
"experimentationCoverage",
"flagHealth",
"velocity",
"risk",
"efficiency"
],
"properties": {
"risk": {
"$ref": "#/components/schemas/InsightsMetricScore",
"description": "The risk score for the insight group"
},
"overall": {
"$ref": "#/components/schemas/InsightsMetricScore",
"description": "The overall score for the insight group"
},
"leadTime": {
"$ref": "#/components/schemas/InsightsMetricScore",
"description": "The lead time score for the insight group"
},
"velocity": {
"$ref": "#/components/schemas/InsightsMetricScore",
"description": "The velocity score for the insight group"
},
"efficiency": {
"$ref": "#/components/schemas/InsightsMetricScore",
"description": "The efficiency score for the insight group"
},
"flagHealth": {
"$ref": "#/components/schemas/InsightsMetricScore",
"description": "The flag health score for the insight group"
},
"impactSize": {
"$ref": "#/components/schemas/InsightsMetricScore",
"description": "The impact size score for the insight group"
},
"creationRatio": {
"$ref": "#/components/schemas/InsightsMetricScore",
"description": "The creation ratio score for the insight group"
},
"deploymentFrequency": {
"$ref": "#/components/schemas/InsightsMetricScore",
"description": "The deployment frequency score for the insight group"
},
"deploymentFailureRate": {
"$ref": "#/components/schemas/InsightsMetricScore",
"description": "The deployment failure rate score for the insight group"
},
"experimentationCoverage": {
"$ref": "#/components/schemas/InsightsMetricScore",
"description": "The Experimentation coverage score for the insight group"
}
}
}
InsightGroupsCountByIndicator
{
"type": "object",
"required": [
"excellent",
"good",
"fair",
"needsAttention",
"notCalculated",
"unknown",
"total"
],
"properties": {
"fair": {
"type": "integer",
"example": 1,
"description": "The number of insight groups with a fair indicator"
},
"good": {
"type": "integer",
"example": 1,
"description": "The number of insight groups with a good indicator"
},
"total": {
"type": "integer",
"example": 6,
"description": "The total number of insight groups"
},
"unknown": {
"type": "integer",
"example": 1,
"description": "The number of insight groups with an unknown indicator"
},
"excellent": {
"type": "integer",
"example": 1,
"description": "The number of insight groups with an excellent indicator"
},
"notCalculated": {
"type": "integer",
"example": 1,
"description": "The number of insight groups with a not calculated indicator"
},
"needsAttention": {
"type": "integer",
"example": 1,
"description": "The number of insight groups with a needs attention indicator"
}
}
}
InsightPeriod
{
"type": "object",
"required": [
"startTime",
"endTime"
],
"properties": {
"endTime": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1706701522000",
"description": "The end time of the period"
},
"startTime": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1706701522000",
"description": "The start time of the period"
}
}
}
InsightScores
{
"type": "object",
"required": [
"period",
"lastPeriod",
"scores"
],
"properties": {
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"period": {
"$ref": "#/components/schemas/InsightPeriod",
"description": "The time period for the scores"
},
"scores": {
"$ref": "#/components/schemas/InsightGroupScores",
"description": "The scores for the insight groups"
},
"lastPeriod": {
"$ref": "#/components/schemas/InsightPeriod",
"description": "The time period for the scores in the last period"
}
}
}
InsightsChart
{
"type": "object",
"required": [
"metadata",
"series"
],
"properties": {
"series": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InsightsChartSeries"
},
"description": "Series data for the chart"
},
"metadata": {
"$ref": "#/components/schemas/InsightsChartMetadata",
"description": "Metadata for the chart"
}
}
}
InsightsChartBounds
{
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string",
"example": "equal",
"description": "Name of the bound"
},
"value": {
"type": "integer",
"format": "int64",
"example": 100,
"description": "Value of the bound"
}
}
}
InsightsChartMetadata
{
"type": "object",
"required": [
"summary",
"xAxis",
"yAxis"
],
"properties": {
"name": {
"type": "string",
"example": "deploymentFrequency",
"description": "Name of the chart"
},
"xAxis": {
"$ref": "#/components/schemas/InsightsChartSeriesMetadataAxis",
"example": "timestamp",
"description": "X-axis metadata"
},
"yAxis": {
"$ref": "#/components/schemas/InsightsChartSeriesMetadataAxis",
"example": "count",
"description": "Y-axis metadata"
},
"metrics": {
"$ref": "#/components/schemas/InsightsChartMetrics",
"description": "Metrics for the given chart data, included when expanded"
},
"summary": {
"$ref": "#/components/schemas/InsightsChartMetadataCustomValues",
"description": "Metadata values"
}
}
}
InsightsChartMetadataCustomValues
{
"type": "object",
"additionalProperties": {}
}
InsightsChartMetric
{
"type": "object",
"required": [
"indicator",
"value",
"unit",
"modifier",
"tiers"
],
"properties": {
"unit": {
"type": "string",
"example": "count",
"description": "Metric unit"
},
"tiers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InsightsMetricTierDefinition"
},
"description": "Metric indicator tiers"
},
"value": {
"type": "number",
"example": 5,
"description": "Metric value"
},
"modifier": {
"type": "string",
"example": "per day",
"description": "Metric modifier"
},
"indicator": {
"type": "string",
"example": "excellent",
"description": "Metric indicator tier"
}
}
}
InsightsChartMetrics
{
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/InsightsChartMetric"
}
}
InsightsChartSeries
{
"type": "object",
"required": [
"metadata",
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InsightsChartSeriesDataPoint"
},
"description": "Data points for the series"
},
"metadata": {
"$ref": "#/components/schemas/InsightsChartSeriesMetadata",
"description": "Metadata for the series"
}
}
}
InsightsChartSeriesDataPoint
{
"type": "object",
"required": [
"x",
"y"
],
"properties": {
"x": {
"type": "integer",
"format": "int64",
"example": 1617225600000,
"description": "X-axis value"
},
"y": {
"type": "integer",
"format": "int64",
"example": 100,
"description": "Y-axis value"
},
"values": {
"type": "object",
"description": "Additional values for the data point",
"additionalProperties": {}
}
}
}
InsightsChartSeriesMetadata
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the series"
},
"count": {
"type": "integer",
"format": "int64",
"description": "Aggregate count of the series values"
},
"bounds": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InsightsChartBounds"
},
"description": "Bounds for the series data"
}
}
}
InsightsChartSeriesMetadataAxis
{
"type": "object",
"required": [
"unit"
],
"properties": {
"unit": {
"type": "string",
"example": "count",
"description": "Unit of the axis"
}
}
}
InsightsMetricIndicatorRange
{
"type": "object",
"required": [
"min",
"max"
],
"properties": {
"max": {
"type": "integer",
"example": 100,
"description": "The maximum value for the indicator range"
},
"min": {
"type": "integer",
"example": 0,
"description": "The minimum value for the indicator range"
}
}
}
InsightsMetricScore
{
"type": "object",
"required": [
"score",
"indicator",
"indicatorRange"
],
"properties": {
"score": {
"type": "integer",
"example": 100,
"description": "The score for the metric"
},
"indicator": {
"$ref": "#/components/schemas/InsightsMetricScoreIndicator",
"enum": [
"excellent",
"good",
"fair",
"needsAttention",
"notCalculated",
"unknown"
],
"example": "excellent",
"description": "The indicator for the score"
},
"lastPeriod": {
"$ref": "#/components/schemas/InsightsMetricScore",
"description": "The score for the metric in the last period"
},
"aggregateOf": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"deploymentFrequency",
"leadTime"
],
"description": "The keys of the metrics that were aggregated to calculate this score"
},
"indicatorRange": {
"$ref": "#/components/schemas/InsightsMetricIndicatorRange",
"description": "The indicator range for the score"
},
"diffVsLastPeriod": {
"type": "integer"
}
}
}
InsightsMetricScoreIndicator
{
"type": "string"
}
InsightsMetricTierDefinition
{
"type": "object",
"required": [
"indicator",
"description"
],
"properties": {
"indicator": {
"type": "string",
"example": "excellent",
"description": "Metric indicator tier"
},
"description": {
"type": "string",
"example": "at least 1 per day",
"description": "Metric indicator description"
}
}
}
InsightsRepository
{
"type": "object",
"required": [
"_id",
"version",
"key",
"type",
"url",
"mainBranch"
],
"properties": {
"_id": {
"type": "string",
"format": "uuid",
"example": "5f9a9b1a-5b9a-4b9a-9a9a-9a9a9a9a9a9a",
"description": "The repository ID"
},
"key": {
"type": "string",
"example": "launchdarkly/LaunchDarkly-Docs",
"description": "The repository key"
},
"url": {
"type": "string",
"example": "https://github.com/launchdarkly/LaunchDarkly-Docs",
"description": "The repository URL"
},
"type": {
"type": "string",
"example": "github",
"description": "The repository type"
},
"version": {
"type": "integer",
"example": 1,
"description": "The repository version"
},
"projects": {
"$ref": "#/components/schemas/ProjectSummaryCollection"
},
"mainBranch": {
"type": "string",
"example": "main",
"description": "The repository main branch"
}
}
}
InsightsRepositoryCollection
{
"type": "object",
"required": [
"totalCount",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InsightsRepository"
},
"description": "List of repositories"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "Total number of repositories"
}
}
}
InsightsRepositoryProject
{
"type": "object",
"required": [
"repositoryKey",
"projectKey"
],
"properties": {
"projectKey": {
"type": "string",
"example": "default",
"description": "The project key"
},
"repositoryKey": {
"type": "string",
"example": "launchdarkly/LaunchDarkly-Docs",
"description": "The repository key"
}
}
}
InsightsRepositoryProjectCollection
{
"type": "object",
"required": [
"totalCount",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InsightsRepositoryProject"
},
"description": "List of repository project associations"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "Total number of repository project associations"
}
}
}
InsightsRepositoryProjectMappings
{
"type": "object",
"required": [
"mappings"
],
"properties": {
"mappings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InsightsRepositoryProject"
}
}
}
}
Instruction
{
"type": "object",
"additionalProperties": {}
}
Instructions
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Instruction"
}
}
Integration
{
"type": "object",
"properties": {
"on": {
"type": "boolean",
"example": true,
"description": "Whether the integration is currently active"
},
"_id": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The ID for this integration audit log subscription"
},
"url": {
"type": "string",
"description": "Slack webhook receiver URL. Only used for legacy Slack webhook integrations."
},
"kind": {
"type": "string",
"example": "datadog",
"description": "The type of integration"
},
"name": {
"type": "string",
"example": "Example Datadog integration",
"description": "A human-friendly name for the integration"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"testing"
],
"description": "An array of tags for this integration"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"apiKey": {
"type": "string",
"description": "Datadog API key. Only used for legacy Datadog webhook integrations."
},
"config": {
"type": "object",
"description": "Details on configuration for an integration of this type. Refer to the <code>formVariables</code> field in the corresponding <code>manifest.json</code> for a full list of fields for each integration.",
"additionalProperties": {}
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this subscription"
},
"_status": {
"$ref": "#/components/schemas/IntegrationSubscriptionStatusRep",
"description": "Details on the most recent successes and errors for this integration"
},
"statements": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Statement"
},
"description": "Represents a Custom role policy, defining a resource kinds filter the integration audit log subscription responds to."
}
}
}
IntegrationDeliveryConfiguration
{
"type": "object",
"required": [
"_links",
"_id",
"integrationKey",
"projectKey",
"environmentKey",
"config",
"on",
"tags",
"name",
"version"
],
"properties": {
"on": {
"type": "boolean",
"example": true,
"description": "Whether the configuration is turned on"
},
"_id": {
"type": "string",
"example": "12ab3c4d5ef1a2345bcde67f",
"description": "The integration ID"
},
"name": {
"type": "string",
"example": "Development environment configuration",
"description": "Name of the configuration"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [],
"description": "List of tags for this configuration"
},
"_links": {
"$ref": "#/components/schemas/IntegrationDeliveryConfigurationLinks",
"description": "The location and content type of related resources"
},
"config": {
"$ref": "#/components/schemas/FormVariableConfig",
"description": "The delivery configuration for the given integration provider. Only included when requesting a single integration by ID. Refer to the <code>formVariables</code> field in the corresponding <code>manifest.json</code> for a full list of fields for each integration."
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this configuration"
},
"version": {
"type": "integer",
"example": 1,
"description": "Version of the current configuration"
},
"projectKey": {
"type": "string",
"example": "default",
"description": "The project key"
},
"environmentKey": {
"type": "string",
"example": "development",
"description": "The environment key"
},
"integrationKey": {
"type": "string",
"example": "example-integration-key",
"description": "The integration key"
}
}
}
IntegrationDeliveryConfigurationCollection
{
"type": "object",
"required": [
"_links",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/IntegrationDeliveryConfiguration"
},
"description": "An array of integration delivery configurations"
},
"_links": {
"$ref": "#/components/schemas/IntegrationDeliveryConfigurationCollectionLinks",
"description": "The location and content type of related resources"
}
}
}
IntegrationDeliveryConfigurationCollectionLinks
{
"type": "object",
"required": [
"self"
],
"properties": {
"self": {
"$ref": "#/components/schemas/Link"
},
"parent": {
"$ref": "#/components/schemas/Link"
}
}
}
IntegrationDeliveryConfigurationLinks
{
"type": "object",
"required": [
"self",
"parent",
"project",
"environment"
],
"properties": {
"self": {
"$ref": "#/components/schemas/Link"
},
"parent": {
"$ref": "#/components/schemas/Link"
},
"project": {
"$ref": "#/components/schemas/Link"
},
"environment": {
"$ref": "#/components/schemas/Link"
}
}
}
IntegrationDeliveryConfigurationPost
{
"type": "object",
"required": [
"config"
],
"properties": {
"on": {
"type": "boolean",
"example": false,
"description": "Whether the integration configuration is active. Default value is false."
},
"name": {
"type": "string",
"example": "Sample integration",
"description": "Name to identify the integration"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-tag"
],
"description": "Tags to associate with the integration"
},
"config": {
"$ref": "#/components/schemas/FormVariableConfig",
"example": "{\"required\": \"example value for required formVariables property for sample-integration\", \"optional\": \"example value for optional formVariables property for sample-integration\"}",
"description": "The global integration settings, as specified by the <code>formVariables</code> in the <code>manifest.json</code> for this integration."
}
}
}
IntegrationDeliveryConfigurationResponse
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"timestamp": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the validation was performed"
},
"statusCode": {
"type": "integer",
"example": 200,
"description": "The status code returned by the validation"
},
"responseBody": {
"type": "string",
"description": "JSON response to the validation request"
}
}
}
IntegrationMetadata
{
"type": "object",
"required": [
"externalId",
"externalStatus",
"externalUrl",
"lastChecked"
],
"properties": {
"externalId": {
"type": "string"
},
"externalUrl": {
"type": "string"
},
"lastChecked": {
"$ref": "#/components/schemas/UnixMillis"
},
"externalStatus": {
"$ref": "#/components/schemas/IntegrationStatus"
}
}
}
IntegrationStatus
{
"type": "object",
"required": [
"display",
"value"
],
"properties": {
"value": {
"type": "string"
},
"display": {
"type": "string"
}
}
}
IntegrationStatusRep
{
"type": "object",
"properties": {
"timestamp": {
"$ref": "#/components/schemas/UnixMillis"
},
"statusCode": {
"type": "integer"
},
"responseBody": {
"type": "string"
}
}
}
IntegrationSubscriptionStatusRep
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/IntegrationStatusRep"
}
},
"lastError": {
"$ref": "#/components/schemas/UnixMillis"
},
"errorCount": {
"type": "integer"
},
"lastSuccess": {
"$ref": "#/components/schemas/UnixMillis"
},
"successCount": {
"type": "integer"
}
}
}
Integrations
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Integration"
}
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
InvalidRequestErrorRep
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"example": "invalid_request",
"description": "Specific error code encountered"
},
"message": {
"type": "string",
"example": "Invalid request body",
"description": "Description of the error"
}
}
}
IterationInput
{
"type": "object",
"required": [
"hypothesis",
"metrics",
"treatments",
"flags"
],
"properties": {
"flags": {
"$ref": "#/components/schemas/FlagsInput",
"description": "Details on the feature flag and targeting rules for this iteration"
},
"metrics": {
"$ref": "#/components/schemas/MetricsInput",
"description": "Details on the metrics for this experiment"
},
"hypothesis": {
"type": "string",
"example": "Example hypothesis, the new button placement will increase conversion",
"description": "The expected outcome of this experiment"
},
"treatments": {
"$ref": "#/components/schemas/TreatmentsInput",
"description": "Details on the variations you are testing in the experiment. You establish these variations in feature flags, and then reuse them in experiments."
},
"primaryFunnelKey": {
"type": "string",
"example": "metric-group-key-123abc",
"description": "The key of the primary funnel group for this experiment. Either <code>primarySingleMetricKey</code> or <code>primaryFunnelKey</code> must be present."
},
"randomizationUnit": {
"type": "string",
"example": "user",
"description": "The unit of randomization for this iteration. Defaults to user."
},
"canReshuffleTraffic": {
"type": "boolean",
"example": true,
"description": "Whether to allow the experiment to reassign traffic to different variations when you increase or decrease the traffic in your experiment audience (true) or keep all traffic assigned to its initial variation (false). Defaults to true."
},
"primarySingleMetricKey": {
"type": "string",
"example": "metric-key-123abc",
"description": "The key of the primary metric for this experiment. Either <code>primarySingleMetricKey</code> or <code>primaryFunnelKey</code> must be present."
}
}
}
IterationRep
{
"type": "object",
"required": [
"hypothesis",
"status",
"createdAt"
],
"properties": {
"_id": {
"type": "string",
"example": "12ab3c45de678910fgh12345",
"description": "The iteration ID"
},
"flags": {
"type": "object",
"description": "Details on the flag used in this experiment",
"additionalProperties": {
"$ref": "#/components/schemas/FlagRep"
}
},
"status": {
"type": "string",
"example": "running",
"description": "The status of the iteration: <code>not_started</code>, <code>running</code>, <code>stopped</code>"
},
"endedAt": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1656610200000",
"description": "Timestamp of when the iteration ended"
},
"metrics": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DependentMetricOrMetricGroupRep"
},
"description": "Details on the metrics for this experiment"
},
"createdAt": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the iteration was created"
},
"startedAt": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1655314200000",
"description": "Timestamp of when the iteration started"
},
"hypothesis": {
"type": "string",
"example": "The new button placement will increase conversion",
"description": "The expected outcome of this experiment"
},
"treatments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TreatmentRep"
},
"description": "Details on the variations you are testing in the experiment"
},
"primaryFunnel": {
"$ref": "#/components/schemas/DependentMetricGroupRepWithMetrics",
"description": "Details on the primary funnel group for this experiment"
},
"primaryMetric": {
"$ref": "#/components/schemas/DependentMetricOrMetricGroupRep",
"deprecated": true,
"description": "Deprecated, use <code>primarySingleMetric</code> and <code>primaryFunnel</code> instead. Details on the primary metric for this experiment."
},
"winningReason": {
"type": "string",
"example": "We ran this iteration for two weeks and the winning variation was clear",
"description": "The reason you stopped the experiment"
},
"secondaryMetrics": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetricV2Rep"
},
"deprecated": true,
"description": "Deprecated, use <code>metrics</code> instead. Details on the secondary metrics for this experiment."
},
"randomizationUnit": {
"type": "string",
"example": "user",
"description": "The unit of randomization for this iteration"
},
"winningTreatmentId": {
"type": "string",
"example": "122c9f3e-da26-4321-ba68-e0fc02eced58",
"description": "The ID of the treatment chosen when the experiment stopped"
},
"canReshuffleTraffic": {
"type": "boolean",
"example": true,
"description": "Whether the experiment may reassign traffic to different variations when the experiment audience changes (true) or must keep all traffic assigned to its initial variation (false)."
},
"primarySingleMetric": {
"$ref": "#/components/schemas/MetricV2Rep",
"description": "Details on the primary metric for this experiment"
}
}
}
IterationStatus
{
"type": "string"
}
JSONPatch
{
"type": "array",
"items": {
"$ref": "#/components/schemas/PatchOperation"
}
}
LastSeenMetadata
{
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"example": "5b52207f8ca8e631d31fdb2b",
"description": "The ID of the token used in the member's last session"
}
}
}
LeadTimeStagesRep
{
"type": "object",
"required": [
"codingDurationMs"
],
"properties": {
"waitDurationMs": {
"type": "integer",
"format": "int64",
"example": 100000,
"description": "The wait duration between merge time and deploy start time in milliseconds"
},
"totalLeadTimeMs": {
"type": "integer",
"format": "int64",
"example": 1600000,
"description": "The total lead time in milliseconds"
},
"codingDurationMs": {
"type": "integer",
"format": "int64",
"example": 1000000,
"description": "The coding duration in milliseconds"
},
"deployDurationMs": {
"type": "integer",
"format": "int64",
"example": 100000,
"description": "The deploy duration in milliseconds"
},
"reviewDurationMs": {
"type": "integer",
"format": "int64",
"example": 500000,
"description": "The review duration in milliseconds"
}
}
}
LegacyExperimentRep
{
"type": "object",
"properties": {
"_metric": {
"$ref": "#/components/schemas/MetricListingRep"
},
"metricKey": {
"type": "string",
"example": "my-metric"
},
"environments": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"production",
"test",
"my-environment"
]
},
"_environmentSettings": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/ExperimentEnvironmentSettingRep"
}
}
}
}
Link
{
"type": "object",
"properties": {
"href": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
MaintainerRep
{
"type": "object",
"properties": {
"team": {
"$ref": "#/components/schemas/MemberTeamSummaryRep",
"description": "Details on the team that maintains this resource"
},
"member": {
"$ref": "#/components/schemas/MemberSummary",
"description": "Details on the member who maintains this resource"
}
}
}
MaintainerTeam
{
"type": "object",
"required": [
"key",
"name"
],
"properties": {
"key": {
"type": "string",
"example": "team-key-123abc",
"description": "The key of the maintainer team"
},
"name": {
"type": "string",
"example": "Example team",
"description": "A human-friendly name for the maintainer team"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/teams/example-team",
"type": "application/json"
},
"roles": {
"href": "/api/v2/teams/example-team/roles",
"type": "application/json"
},
"parent": {
"href": "/api/v2/teams",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
Member
{
"type": "object",
"required": [
"_links",
"_id",
"role",
"email",
"_pendingInvite",
"_verified",
"customRoles",
"mfa",
"_lastSeen",
"creationDate"
],
"properties": {
"_id": {
"type": "string",
"example": "507f1f77bcf86cd799439011",
"description": "The member's ID"
},
"mfa": {
"type": "string",
"description": "Whether multi-factor authentication is enabled for this member"
},
"role": {
"type": "string",
"example": "reader",
"description": "The member's built-in role. If the member has no custom roles, this role will be in effect."
},
"email": {
"type": "string",
"example": "ariel@acme.com",
"description": "The member's email address"
},
"teams": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MemberTeamSummaryRep"
},
"description": "Details on the teams this member is assigned to"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"lastName": {
"type": "string",
"example": "Flores",
"description": "The member's last name"
},
"_lastSeen": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1608260796147",
"description": "The member's last session date (as Unix milliseconds since epoch)"
},
"_verified": {
"type": "boolean",
"example": true,
"description": "Whether the member's email address has been verified"
},
"firstName": {
"type": "string",
"example": "Ariel",
"description": "The member's first name"
},
"customRoles": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"devOps",
"backend-devs"
],
"description": "The set of custom roles (as keys) assigned to the member"
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1628001602644",
"description": "Timestamp of when the member was created"
},
"_pendingEmail": {
"type": "string",
"description": "The member's email address before it has been verified, for accounts where email verification is required"
},
"_pendingInvite": {
"type": "boolean",
"example": false,
"description": "Whether the member has a pending invitation"
},
"oauthProviders": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OAuthProviderKind"
},
"description": "A list of OAuth providers"
},
"permissionGrants": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MemberPermissionGrantSummaryRep"
},
"description": "A list of permission grants. Permission grants allow a member to have access to a specific action, without having to create or update a custom role."
},
"_lastSeenMetadata": {
"$ref": "#/components/schemas/LastSeenMetadata",
"description": "Additional metadata associated with the member's last session, for example, whether a token was used"
},
"excludedDashboards": {
"type": "array",
"items": {
"type": "string"
},
"description": "Default dashboards that the member has chosen to ignore"
},
"_integrationMetadata": {
"$ref": "#/components/schemas/IntegrationMetadata",
"description": "Details on the member account in an external source, if this member is provisioned externally"
}
}
}
MemberDataRep
{
"type": "object",
"properties": {
"_id": {
"type": "string",
"example": "507f1f77bcf86cd799439011",
"description": "The member ID"
},
"email": {
"type": "string",
"example": "ariel@acme.com",
"description": "The member email"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"lastName": {
"type": "string",
"example": "Flores",
"description": "The member last name"
},
"firstName": {
"type": "string",
"example": "Ariel",
"description": "The member first name"
}
}
}
MemberImportItem
{
"type": "object",
"required": [
"status",
"value"
],
"properties": {
"value": {
"type": "string",
"example": "new-team-member@acme.com",
"description": "The email address for the member requested to be added to this team. May be blank or an error, such as 'invalid email format', if the email address cannot be found or parsed."
},
"status": {
"type": "string",
"example": "error",
"description": "Whether this member can be successfully imported (<code>success</code>) or not (<code>error</code>). Even if the status is <code>success</code>, members are only added to a team on a <code>201</code> response."
},
"message": {
"type": "string",
"description": "An error message, including CSV line number, if the <code>status</code> is <code>error</code>"
}
}
}
MemberPermissionGrantSummaryRep
{
"type": "object",
"required": [
"resource"
],
"properties": {
"actions": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"maintainTeam"
],
"description": "A list of actions to allow. A permission grant may have either an <code>actionSet</code> or a list of <code>actions</code> but not both at the same time."
},
"resource": {
"type": "string",
"example": "team/qa-team",
"description": "The resource for which the actions are allowed"
},
"actionSet": {
"type": "string",
"description": "The name of the group of related actions to allow. A permission grant may have either an <code>actionSet</code> or a list of <code>actions</code> but not both at the same time."
}
}
}
MemberSummary
{
"type": "object",
"required": [
"_links",
"_id",
"role",
"email"
],
"properties": {
"_id": {
"type": "string",
"example": "569f183514f4432160000007",
"description": "The member's ID"
},
"role": {
"type": "string",
"example": "admin",
"description": "The member's built-in role. If the member has no custom roles, this role will be in effect."
},
"email": {
"type": "string",
"example": "ariel@acme.com",
"description": "The member's email address"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"lastName": {
"type": "string",
"example": "Flores",
"description": "The member's last name"
},
"firstName": {
"type": "string",
"example": "Ariel",
"description": "The member's first name"
}
}
}
MemberTeamSummaryRep
{
"type": "object",
"required": [
"customRoleKeys",
"key",
"name"
],
"properties": {
"key": {
"type": "string",
"example": "team-key-123abc",
"description": "The team key"
},
"name": {
"type": "string",
"example": "QA Team",
"description": "The team name"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"customRoleKeys": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"access-to-test-projects"
],
"description": "A list of keys of the custom roles this team has access to"
}
}
}
MemberTeamsPostInput
{
"type": "object",
"required": [
"teamKeys"
],
"properties": {
"teamKeys": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"team1",
"team2"
],
"description": "List of team keys"
}
}
}
Members
{
"type": "object",
"required": [
"items",
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Member"
},
"description": "An array of members"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"description": "The number of members returned"
}
}
}
MethodNotAllowedErrorRep
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"example": "method_not_allowed",
"description": "Specific error code encountered"
},
"message": {
"type": "string",
"example": "Method not allowed",
"description": "Description of the error"
}
}
}
MetricCollectionRep
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetricListingRep"
},
"description": "An array of metrics"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/metrics/my-project?limit=20",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
MetricEventDefaultRep
{
"type": "object",
"properties": {
"value": {
"type": "number",
"description": "The default value applied to missing unit events. Only available when <code>disabled</code> is false. Defaults to 0"
},
"disabled": {
"type": "boolean",
"description": "Whether to disable defaulting missing unit events when calculating results. Defaults to false"
}
}
}
MetricGroupCollectionRep
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetricGroupRep"
},
"description": "An array of metric groups"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project/metric-groups",
"type": "application/json"
},
"parent": {
"href": "/api/v2/projects/my-project",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
MetricGroupPost
{
"type": "object",
"required": [
"key",
"name",
"kind",
"maintainerId",
"tags",
"metrics"
],
"properties": {
"key": {
"type": "string",
"example": "metric-group-key-123abc",
"description": "A unique key to reference the metric group"
},
"kind": {
"enum": [
"funnel"
],
"type": "string",
"example": "funnel",
"description": "The type of the metric group"
},
"name": {
"type": "string",
"example": "My metric group",
"description": "A human-friendly name for the metric group"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"ops"
],
"description": "Tags for the metric group"
},
"metrics": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetricInMetricGroupInput"
},
"description": "An ordered list of the metrics in this metric group"
},
"description": {
"type": "string",
"example": "Description of the metric group",
"description": "Description of the metric group"
},
"maintainerId": {
"type": "string",
"example": "569fdeadbeef1644facecafe",
"description": "The ID of the member who maintains this metric group"
}
}
}
MetricGroupRep
{
"type": "object",
"required": [
"_id",
"key",
"name",
"kind",
"_links",
"tags",
"_creationDate",
"_lastModified",
"maintainer",
"metrics",
"_version"
],
"properties": {
"_id": {
"type": "string",
"example": "bc3e5be1-02d2-40c7-9926-26d0aacd7aab",
"description": "The ID of this metric group"
},
"key": {
"type": "string",
"example": "metric-group-key-123abc",
"description": "A unique key to reference the metric group"
},
"kind": {
"enum": [
"funnel",
"standard"
],
"type": "string",
"example": "funnel",
"description": "The type of the metric group"
},
"name": {
"type": "string",
"example": "My metric group",
"description": "A human-friendly name for the metric group"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"ops"
],
"description": "Tags for the metric group"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project/metric-groups/my-metric-group",
"type": "application/json"
},
"parent": {
"href": "/api/v2/projects/my-project",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this metric group"
},
"metrics": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetricInGroupRep"
},
"description": "An ordered list of the metrics in this metric group"
},
"_version": {
"type": "integer",
"example": 1,
"description": "The version of this metric group"
},
"maintainer": {
"$ref": "#/components/schemas/MaintainerRep",
"description": "The maintainer of this metric"
},
"description": {
"type": "string",
"example": "Description of the metric group",
"description": "Description of the metric group"
},
"experiments": {
"$ref": "#/components/schemas/DependentExperimentListRep",
"description": "Experiments that use this metric group. Only included if specified in the <code>expand</code> query parameter in a <code>getMetricGroup</code> request."
},
"_creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1628192791148",
"description": "Timestamp of when the metric group was created"
},
"_lastModified": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1628192791148",
"description": "Timestamp of when the metric group was last modified"
},
"experimentCount": {
"type": "integer",
"example": 0,
"description": "The number of experiments using this metric group"
}
}
}
MetricGroupResultsRep
{
"type": "object",
"required": [
"_links",
"metrics"
],
"properties": {
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"metrics": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetricInGroupResultsRep"
},
"description": "An ordered list of the metrics in this metric group, and each of their results"
}
}
}
MetricInGroupRep
{
"type": "object",
"required": [
"key",
"name",
"kind",
"_links"
],
"properties": {
"key": {
"type": "string",
"example": "metric-key-123abc",
"description": "The metric key"
},
"kind": {
"enum": [
"pageview",
"click",
"custom"
],
"type": "string",
"example": "custom",
"description": "The kind of event the metric tracks"
},
"name": {
"type": "string",
"example": "Example metric",
"description": "The metric name"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/metrics/my-project/my-metric",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"isNumeric": {
"type": "boolean",
"example": true,
"description": "For custom metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>)."
},
"_versionId": {
"type": "string",
"example": "version-id-123abc",
"description": "The version ID of the metric"
},
"nameInGroup": {
"type": "string",
"example": "Step 1",
"description": "Name of the metric when used within the associated metric group. Can be different from the original name of the metric. Required if and only if the metric group is a <code>funnel</code>."
},
"randomizationUnits": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"user"
],
"description": "The randomization units for the metric"
}
}
}
MetricInGroupResultsRep
{
"type": "object",
"required": [
"metric",
"results"
],
"properties": {
"metric": {
"$ref": "#/components/schemas/MetricInGroupRep",
"description": "Metric metadata"
},
"results": {
"$ref": "#/components/schemas/ExperimentBayesianResultsRep",
"description": "The results of this metric"
}
}
}
MetricInMetricGroupInput
{
"type": "object",
"required": [
"key",
"nameInGroup"
],
"properties": {
"key": {
"type": "string",
"example": "metric-key-123abc",
"description": "The metric key"
},
"nameInGroup": {
"type": "string",
"example": "Step 1",
"description": "Name of the metric when used within the associated metric group. Can be different from the original name of the metric"
}
}
}
MetricInput
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"example": "metric-key-123abc",
"description": "The metric key"
},
"isGroup": {
"type": "boolean",
"example": true,
"description": "Whether this is a metric group (true) or a metric (false). Defaults to false"
},
"primary": {
"type": "boolean",
"example": true,
"deprecated": true,
"description": "Deprecated, use <code>primarySingleMetricKey</code> and <code>primaryFunnelKey</code>. Whether this is a primary metric (true) or a secondary metric (false)"
}
}
}
MetricListingRep
{
"type": "object",
"required": [
"_id",
"_versionId",
"key",
"name",
"kind",
"_links",
"tags",
"_creationDate"
],
"properties": {
"_id": {
"type": "string",
"example": "5902deadbeef667524a01290",
"description": "The ID of this metric"
},
"key": {
"type": "string",
"example": "metric-key-123abc",
"description": "A unique key to reference the metric"
},
"kind": {
"enum": [
"pageview",
"click",
"custom"
],
"type": "string",
"example": "custom",
"description": "The kind of event the metric tracks"
},
"name": {
"type": "string",
"example": "My metric",
"description": "A human-friendly name for the metric"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [],
"description": "Tags for the metric"
},
"unit": {
"type": "string",
"description": "For numeric custom metrics, the unit of measure"
},
"_site": {
"$ref": "#/components/schemas/Link",
"example": "{\"href\":\"/experiments/metrics/my-metric/edit\",\"type\":\"text/html\"}",
"description": "Details on how to access the metric in the LaunchDarkly UI"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/metrics/my-project/my-metric",
"type": "application/json"
},
"parent": {
"href": "/api/v2/metrics/my-project",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this metric"
},
"eventKey": {
"type": "string",
"description": "For custom metrics, the event key to use in your code"
},
"isNumeric": {
"type": "boolean",
"example": true,
"description": "For custom metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>)."
},
"_versionId": {
"type": "string",
"example": "version-id-123abc",
"description": "The version ID of the metric"
},
"_maintainer": {
"$ref": "#/components/schemas/MemberSummary",
"example": "{\"_links\":{\"self\":{\"href\":\"/api/v2/members/569fdeadbeef1644facecafe\",\"type\":\"application/json\"}},\"_id\":\"569fdeadbeef1644facecafe\",\"firstName\":\"Ariel\",\"lastName\":\"Flores\",\"role\":\"owner\",\"email\":\"ariel@acme.com\"}",
"description": "Details on the member who maintains this metric"
},
"description": {
"type": "string",
"description": "Description of the metric"
},
"analysisType": {
"enum": [
"mean",
"percentile"
],
"type": "string",
"example": "mean",
"description": "The method for analyzing metric events"
},
"eventDefault": {
"$ref": "#/components/schemas/MetricEventDefaultRep"
},
"lastModified": {
"$ref": "#/components/schemas/Modification"
},
"maintainerId": {
"type": "string",
"example": "569fdeadbeef1644facecafe",
"description": "The ID of the member who maintains this metric"
},
"_creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1628192791148",
"description": "Timestamp of when the metric was created"
},
"experimentCount": {
"type": "integer",
"example": 0,
"description": "The number of experiments using this metric"
},
"percentileValue": {
"type": "integer",
"example": 95,
"description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>."
},
"successCriteria": {
"enum": [
"HigherThanBaseline",
"LowerThanBaseline"
],
"type": "string",
"description": "For custom metrics, the success criteria"
},
"metricGroupCount": {
"type": "integer",
"example": 0,
"description": "The number of metric groups using this metric"
},
"_attachedFlagCount": {
"type": "integer",
"example": 0,
"description": "The number of feature flags currently attached to this metric"
},
"randomizationUnits": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"user"
],
"description": "An array of randomization units allowed for this metric"
},
"unitAggregationType": {
"enum": [
"average",
"sum"
],
"type": "string",
"example": "average",
"description": "The method by which multiple unit event values are aggregated"
}
}
}
MetricPost
{
"type": "object",
"required": [
"key",
"kind"
],
"properties": {
"key": {
"type": "string",
"example": "metric-key-123abc",
"description": "A unique key to reference the metric"
},
"kind": {
"enum": [
"pageview",
"click",
"custom"
],
"type": "string",
"example": "custom",
"description": "The kind of event your metric will track"
},
"name": {
"type": "string",
"example": "Example metric",
"description": "A human-friendly name for the metric"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-tag"
],
"description": "Tags for the metric"
},
"unit": {
"type": "string",
"example": "orders",
"description": "The unit of measure. Applicable for numeric custom metrics only."
},
"urls": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UrlPost"
},
"example": "invalid example",
"description": "One or more target URLs. Required for click and pageview metrics only."
},
"eventKey": {
"type": "string",
"example": "sales generated",
"description": "The event key to use in your code. Required for custom conversion/binary and custom numeric metrics only."
},
"isActive": {
"type": "boolean",
"example": true,
"description": "Whether the metric is active. Set to <code>true</code> to record click or pageview metrics. Not applicable for custom metrics."
},
"selector": {
"type": "string",
"example": ".dropdown-toggle",
"description": "One or more CSS selectors. Required for click metrics only."
},
"isNumeric": {
"type": "boolean",
"example": false,
"description": "Whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>). Required for custom metrics only."
},
"description": {
"type": "string",
"example": "optional description",
"description": "Description of the metric"
},
"analysisType": {
"type": "string",
"example": "mean",
"description": "The method for analyzing metric events"
},
"eventDefault": {
"$ref": "#/components/schemas/MetricEventDefaultRep"
},
"percentileValue": {
"type": "integer",
"example": 95,
"description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>."
},
"successCriteria": {
"enum": [
"HigherThanBaseline",
"LowerThanBaseline"
],
"type": "string",
"example": "HigherThanBaseline",
"description": "Success criteria. Required for custom numeric metrics, optional for custom conversion metrics."
},
"randomizationUnits": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"user"
],
"description": "An array of randomization units allowed for this metric"
},
"unitAggregationType": {
"enum": [
"average",
"sum"
],
"type": "string",
"example": "average",
"description": "The method by which multiple unit event values are aggregated"
}
}
}
MetricRep
{
"type": "object",
"required": [
"_id",
"_versionId",
"key",
"name",
"kind",
"_links",
"tags",
"_creationDate"
],
"properties": {
"_id": {
"type": "string",
"example": "5902deadbeef667524a01290",
"description": "The ID of this metric"
},
"key": {
"type": "string",
"example": "metric-key-123abc",
"description": "A unique key to reference the metric"
},
"kind": {
"enum": [
"pageview",
"click",
"custom"
],
"type": "string",
"example": "custom",
"description": "The kind of event the metric tracks"
},
"name": {
"type": "string",
"example": "My metric",
"description": "A human-friendly name for the metric"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [],
"description": "Tags for the metric"
},
"unit": {
"type": "string",
"description": "For numeric custom metrics, the unit of measure"
},
"urls": {
"$ref": "#/components/schemas/UrlMatchers",
"description": "For click and pageview metrics, the target URLs"
},
"_site": {
"$ref": "#/components/schemas/Link",
"example": "{\"href\":\"/experiments/metrics/my-metric/edit\",\"type\":\"text/html\"}",
"description": "Details on how to access the metric in the LaunchDarkly UI"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/metrics/my-project/my-metric",
"type": "application/json"
},
"parent": {
"href": "/api/v2/metrics/my-project",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this metric"
},
"_version": {
"type": "integer",
"example": 1,
"description": "Version of the metric"
},
"eventKey": {
"type": "string",
"description": "For custom metrics, the event key to use in your code"
},
"isActive": {
"type": "boolean",
"example": true,
"description": "Whether the metric is active"
},
"selector": {
"type": "string",
"description": "For click metrics, the CSS selectors"
},
"isNumeric": {
"type": "boolean",
"example": true,
"description": "For custom metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>)."
},
"_versionId": {
"type": "string",
"example": "version-id-123abc",
"description": "The version ID of the metric"
},
"_maintainer": {
"$ref": "#/components/schemas/MemberSummary",
"example": "{\"_links\":{\"self\":{\"href\":\"/api/v2/members/569fdeadbeef1644facecafe\",\"type\":\"application/json\"}},\"_id\":\"569fdeadbeef1644facecafe\",\"firstName\":\"Ariel\",\"lastName\":\"Flores\",\"role\":\"owner\",\"email\":\"ariel@acme.com\"}",
"description": "Details on the member who maintains this metric"
},
"description": {
"type": "string",
"description": "Description of the metric"
},
"experiments": {
"$ref": "#/components/schemas/DependentExperimentListRep",
"description": "Experiments that use this metric, including those using a metric group that contains this metric"
},
"analysisType": {
"enum": [
"mean",
"percentile"
],
"type": "string",
"example": "mean",
"description": "The method for analyzing metric events"
},
"eventDefault": {
"$ref": "#/components/schemas/MetricEventDefaultRep"
},
"lastModified": {
"$ref": "#/components/schemas/Modification"
},
"maintainerId": {
"type": "string",
"example": "569fdeadbeef1644facecafe",
"description": "The ID of the member who maintains this metric"
},
"metricGroups": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DependentMetricGroupRep"
},
"description": "Metric groups that use this metric"
},
"_creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1628192791148",
"description": "Timestamp of when the metric was created"
},
"experimentCount": {
"type": "integer",
"example": 0,
"description": "The number of experiments using this metric"
},
"percentileValue": {
"type": "integer",
"example": 95,
"description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>."
},
"successCriteria": {
"enum": [
"HigherThanBaseline",
"LowerThanBaseline"
],
"type": "string",
"description": "For custom metrics, the success criteria"
},
"metricGroupCount": {
"type": "integer",
"example": 0,
"description": "The number of metric groups using this metric"
},
"_attachedFeatures": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FlagListingRep"
},
"description": "Details on the flags attached to this metric"
},
"_attachedFlagCount": {
"type": "integer",
"example": 0,
"description": "The number of feature flags currently attached to this metric"
},
"randomizationUnits": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"user"
],
"description": "An array of randomization units allowed for this metric"
},
"unitAggregationType": {
"enum": [
"average",
"sum"
],
"type": "string",
"example": "average",
"description": "The method by which multiple unit event values are aggregated"
}
}
}
MetricSeen
{
"type": "object",
"properties": {
"ever": {
"type": "boolean",
"example": true,
"description": "Whether the metric has received an event for this iteration"
},
"timestamp": {
"type": "integer",
"format": "int64",
"example": 1657129307,
"description": "Timestamp of when the metric most recently received an event for this iteration"
}
}
}
MetricV2Rep
{
"type": "object",
"required": [
"key",
"name",
"kind",
"_links"
],
"properties": {
"key": {
"type": "string",
"example": "metric-key-123abc",
"description": "The metric key"
},
"kind": {
"enum": [
"pageview",
"click",
"custom"
],
"type": "string",
"example": "custom",
"description": "The kind of event the metric tracks"
},
"name": {
"type": "string",
"example": "Example metric",
"description": "The metric name"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/metrics/my-project/my-metric",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"isNumeric": {
"type": "boolean",
"example": true,
"description": "For custom metrics, whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>)."
},
"_versionId": {
"type": "string",
"example": "version-id-123abc",
"description": "The version ID of the metric"
}
}
}
MetricsInput
{
"type": "array",
"items": {
"$ref": "#/components/schemas/MetricInput"
}
}
MigrationFlagStageCount
{
"type": "integer"
}
MigrationSafetyIssueRep
{
"type": "object",
"properties": {
"issue": {
"type": "string",
"description": "A description of the issue that <code>causingRuleId</code> has caused for <code>affectedRuleIds</code>."
},
"causingRuleId": {
"type": "string",
"description": "The ID of the rule which caused this issue"
},
"affectedRuleIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of the IDs of the rules which are affected by this issue. <code>fallthrough</code> is a sentinel value for the default rule."
},
"oldSystemAffected": {
"type": "boolean",
"description": "Whether the changes caused by <code>causingRuleId</code> bring inconsistency to the old system"
}
}
}
MigrationSettingsPost
{
"type": "object",
"required": [
"stageCount"
],
"properties": {
"stageCount": {
"$ref": "#/components/schemas/MigrationFlagStageCount",
"enum": [
"2",
"4",
"6"
]
},
"contextKind": {
"type": "string",
"description": "Context kind for a migration with 6 stages, where data is being moved"
}
}
}
Modification
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date-time",
"example": "2021-08-05T19:46:31.148082Z"
}
}
}
MultiEnvironmentDependentFlag
{
"type": "object",
"required": [
"key",
"environments"
],
"properties": {
"key": {
"type": "string",
"example": "dependent-flag-key-123abc",
"description": "The flag key"
},
"name": {
"type": "string",
"example": "Example dependent flag",
"description": "The flag name"
},
"environments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DependentFlagEnvironment"
},
"description": "A list of environments in which the dependent flag appears"
}
}
}
MultiEnvironmentDependentFlags
{
"type": "object",
"required": [
"items",
"_links",
"_site"
],
"properties": {
"_site": {
"$ref": "#/components/schemas/Link",
"example": "{ \"href\": \"/example-project/~/features/example-prereq-flag\", \"type\": \"text/html\" }",
"description": "Details on how to access the prerequisite flag in the LaunchDarkly UI"
},
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MultiEnvironmentDependentFlag"
},
"description": "An array of dependent flags with their environment information"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
NewMemberForm
{
"type": "object",
"required": [
"email"
],
"properties": {
"role": {
"enum": [
"reader",
"writer",
"admin",
"no_access"
],
"type": "string",
"example": "reader",
"description": "The member's built-in role"
},
"email": {
"type": "string",
"example": "sandy@acme.com",
"description": "The member's email"
},
"lastName": {
"type": "string",
"example": "Flores",
"description": "The member's last name"
},
"password": {
"type": "string",
"example": "***",
"description": "The member's password"
},
"teamKeys": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"team-1",
"team-2"
],
"description": "An array of the member's teams"
},
"firstName": {
"type": "string",
"example": "Ariel",
"description": "The member's first name"
},
"customRoles": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"customRole1",
"customRole2"
],
"description": "An array of the member's custom roles"
}
}
}
NewMemberFormListPost
{
"type": "array",
"items": {
"$ref": "#/components/schemas/NewMemberForm"
}
}
NotFoundErrorRep
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"example": "not_found",
"description": "Specific error code encountered"
},
"message": {
"type": "string",
"example": "Invalid resource identifier",
"description": "Description of the error"
}
}
}
OAuthProviderKind
{
"type": "string"
}
ObjectId
{
"type": "string"
}
Operator
{
"type": "string"
}
ParameterDefault
{
"type": "object",
"properties": {
"value": {
"description": "The default value for the given parameter"
},
"ruleClause": {
"$ref": "#/components/schemas/RuleClause",
"description": "Metadata related to add rule instructions"
},
"booleanVariationValue": {
"type": "boolean",
"description": "Variation value for boolean flags. Not applicable for non-boolean flags."
}
}
}
ParameterRep
{
"type": "object",
"properties": {
"flagKey": {
"type": "string"
},
"variationId": {
"type": "string"
}
}
}
ParentResourceRep
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the parent resource"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"resource": {
"type": "string",
"description": "The parent's resource specifier"
}
}
}
PatchFailedErrorRep
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"example": "patch_failed",
"description": "Specific error code encountered"
},
"message": {
"type": "string",
"example": "Unprocessable entity. Could not apply patch.",
"description": "Description of the error"
}
}
}
PatchOperation
{
"type": "object",
"required": [
"op",
"path",
"value"
],
"properties": {
"op": {
"type": "string",
"example": "replace",
"description": "The type of operation to perform"
},
"path": {
"type": "string",
"example": "/exampleField",
"description": "A JSON Pointer string specifying the part of the document to operate on"
},
"value": {
"example": "new example value",
"description": "A JSON value used in \"add\", \"replace\", and \"test\" operations"
}
}
}
PatchWithComment
{
"type": "object",
"required": [
"patch"
],
"properties": {
"patch": {
"$ref": "#/components/schemas/JSONPatch",
"description": "A JSON patch representation of the change to make"
},
"comment": {
"type": "string",
"description": "Optional comment"
}
}
}
Phase
{
"type": "object",
"required": [
"id",
"audiences",
"name"
],
"properties": {
"id": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The phase ID"
},
"name": {
"type": "string",
"example": "Phase 1 - Testing",
"description": "The release phase name"
},
"audiences": {
"$ref": "#/components/schemas/Audiences",
"description": "An ordered list of the audiences for this release phase. Each audience corresponds to a LaunchDarkly environment."
}
}
}
PostDeploymentEventInput
{
"type": "object",
"required": [
"projectKey",
"environmentKey",
"applicationKey",
"version",
"eventType"
],
"properties": {
"version": {
"type": "string",
"example": "a90a8a2",
"description": "The application version. You can set the application version to any string that includes only letters, numbers, periods (<code>.</code>), hyphens (<code>-</code>), or underscores (<code>_</code>).<br/><br/>We recommend setting the application version to at least the first seven characters of the SHA or to the tag of the GitHub commit for this deployment."
},
"eventTime": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1706701522000",
"description": "The time, in Unix milliseconds, when the event occurred. If not included, the time will default to when the event is processed and stored in LaunchDarkly."
},
"eventType": {
"enum": [
"started",
"failed",
"finished",
"custom"
],
"type": "string",
"example": "started",
"description": "The event type"
},
"projectKey": {
"type": "string",
"example": "default",
"description": "The project key"
},
"versionName": {
"type": "string",
"example": "v1.0.0",
"description": "The version name. This defines how the version is displayed"
},
"eventMetadata": {
"type": "object",
"example": {
"buildSystemVersion": "v1.2.3"
},
"description": "A JSON object containing metadata about the event",
"additionalProperties": {}
},
"applicationKey": {
"type": "string",
"example": "billing-service",
"description": "The application key. This defines the granularity at which you want to view your insights metrics. Typically it is the name of one of the GitHub repositories that you use in this project.<br/><br/>LaunchDarkly automatically creates a new application each time you send a unique application key."
},
"environmentKey": {
"type": "string",
"example": "production",
"description": "The environment key"
},
"applicationKind": {
"enum": [
"server",
"browser",
"mobile"
],
"type": "string",
"example": "server",
"description": "The kind of application. Default: <code>server</code>"
},
"applicationName": {
"type": "string",
"example": "Billing Service",
"description": "The application name. This defines how the application is displayed"
},
"deploymentMetadata": {
"type": "object",
"example": {
"buildNumber": "1234"
},
"description": "A JSON object containing metadata about the deployment",
"additionalProperties": {}
}
}
}
PostFlagScheduledChangesInput
{
"type": "object",
"required": [
"executionDate",
"instructions"
],
"properties": {
"comment": {
"type": "string",
"example": "optional comment",
"description": "Optional comment describing the scheduled changes"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[ { \"kind\": \"turnFlagOn\" }]",
"description": "The actions to perform on the execution date for these scheduled changes. This should be an array with a single object that looks like <code>{\"kind\": \"scheduled_action\"}</code>. Supported scheduled actions are <code>turnFlagOn</code> and <code>turnFlagOff</code>."
},
"executionDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1636558831870",
"description": "When the scheduled changes should be executed"
}
}
}
PostInsightGroupParams
{
"type": "object",
"required": [
"name",
"key",
"projectKey",
"environmentKey"
],
"properties": {
"key": {
"type": "string",
"example": "default-production-all-apps",
"description": "The key of the insight group"
},
"name": {
"type": "string",
"example": "Production - All Apps",
"description": "The name of the insight group"
},
"projectKey": {
"type": "string",
"example": "default",
"description": "The projectKey to be associated with the insight group"
},
"environmentKey": {
"type": "string",
"example": "production",
"description": "The environmentKey to be associated with the insight group"
},
"applicationKeys": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"billing-service",
"inventory-service"
],
"description": "The application keys to associate with the insight group. If not provided, the insight group will include data from all applications."
}
}
}
Prerequisite
{
"type": "object",
"required": [
"key",
"variation"
],
"properties": {
"key": {
"type": "string"
},
"variation": {
"type": "integer"
}
}
}
Project
{
"type": "object",
"required": [
"_links",
"_id",
"key",
"includeInSnippetByDefault",
"name",
"tags"
],
"properties": {
"_id": {
"type": "string",
"example": "57be1db38b75bf0772d11383",
"description": "The ID of this project"
},
"key": {
"type": "string",
"example": "project-key-123abc",
"description": "The key of this project"
},
"name": {
"type": "string",
"example": "My Project",
"description": "A human-friendly name for the project"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"ops"
],
"description": "A list of tags for the project"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project",
"type": "application/json"
},
"environments": {
"href": "/api/v2/projects/my-project/environments",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this project"
},
"environments": {
"$ref": "#/components/schemas/Environments",
"description": "A paginated list of environments for the project. By default this field is omitted unless expanded by the client."
},
"defaultReleasePipelineKey": {
"type": "string",
"description": "The key of the default release pipeline for this project"
},
"includeInSnippetByDefault": {
"type": "boolean",
"example": true,
"description": "Whether or not flags created in this project are made available to the client-side JavaScript SDK by default"
},
"defaultClientSideAvailability": {
"$ref": "#/components/schemas/ClientSideAvailability",
"description": "Describes which client-side SDKs can use new flags by default"
}
}
}
ProjectPost
{
"type": "object",
"required": [
"name",
"key"
],
"properties": {
"key": {
"type": "string",
"example": "project-key-123abc",
"description": "A unique key used to reference the project in your code."
},
"name": {
"type": "string",
"example": "My Project",
"description": "A human-friendly name for the project."
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"ops"
],
"description": "Tags for the project"
},
"environments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EnvironmentPost"
},
"description": "Creates the provided environments for this project. If omitted default environments will be created instead."
},
"includeInSnippetByDefault": {
"type": "boolean",
"example": true,
"description": "Whether or not flags created in this project are made available to the client-side JavaScript SDK by default."
},
"defaultClientSideAvailability": {
"$ref": "#/components/schemas/DefaultClientSideAvailabilityPost",
"description": "Controls which client-side SDKs can use new flags by default."
}
}
}
ProjectRep
{
"type": "object",
"required": [
"_links",
"_id",
"key",
"includeInSnippetByDefault",
"name",
"tags",
"environments"
],
"properties": {
"_id": {
"type": "string",
"example": "57be1db38b75bf0772d11383",
"description": "The ID of this project"
},
"key": {
"type": "string",
"example": "project-key-123abc",
"description": "The key of this project"
},
"name": {
"type": "string",
"example": "My Project",
"description": "A human-friendly name for the project"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"ops"
],
"description": "A list of tags for the project"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/my-project",
"type": "application/json"
},
"environments": {
"href": "/api/v2/projects/my-project/environments",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this project"
},
"environments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Environment"
},
"description": "A list of environments for the project"
},
"defaultReleasePipelineKey": {
"type": "string",
"description": "The key of the default release pipeline for this project"
},
"includeInSnippetByDefault": {
"type": "boolean",
"example": true,
"description": "Whether or not flags created in this project are made available to the client-side JavaScript SDK by default"
},
"defaultClientSideAvailability": {
"$ref": "#/components/schemas/ClientSideAvailability",
"description": "Describes which client-side SDKs can use new flags by default"
}
}
}
ProjectSummary
{
"type": "object",
"required": [
"_id",
"_links",
"key",
"name"
],
"properties": {
"_id": {
"type": "string",
"example": "57be1db38b75bf0772d11383",
"description": "The ID of this project"
},
"key": {
"type": "string",
"example": "project-key-123abc",
"description": "The project key"
},
"name": {
"type": "string",
"example": "Example project",
"description": "The project name"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects/example-project",
"type": "application/json"
},
"environments": {
"href": "/api/v2/projects/example-project/environments",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
ProjectSummaryCollection
{
"type": "object",
"required": [
"totalCount",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProjectSummary"
}
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer"
}
}
}
Projects
{
"type": "object",
"required": [
"_links",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Project"
},
"description": "List of projects."
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/projects",
"type": "application/json"
}
},
"description": "A link to this resource.",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer"
}
}
}
PullRequestCollectionRep
{
"type": "object",
"required": [
"totalCount",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PullRequestRep"
},
"description": "A list of pull requests"
},
"_links": {
"type": "object",
"example": {
"next": {
"href": "/api/v2/engineering-insights/pull-requests?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",
"type": "application/json"
},
"self": {
"href": "/api/v2/engineering-insights/pull-requests",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 25,
"description": "The total number of pull requests"
}
}
}
PullRequestLeadTimeRep
{
"type": "object",
"required": [
"codingDurationMs"
],
"properties": {
"codingDurationMs": {
"type": "integer",
"format": "int64",
"example": 1000000,
"description": "The coding duration in milliseconds"
},
"reviewDurationMs": {
"type": "integer",
"format": "int64",
"example": 500000,
"description": "The review duration in milliseconds"
},
"avgWaitDurationMs": {
"type": "integer",
"format": "int64",
"example": 100000,
"description": "The average wait duration between merge time and deploy start time in milliseconds"
},
"maxWaitDurationMs": {
"type": "integer",
"format": "int64",
"example": 100000,
"description": "The max wait duration between merge time and deploy start time in milliseconds"
},
"avgTotalLeadTimeMs": {
"type": "integer",
"format": "int64",
"example": 1600000,
"description": "The average total lead time in milliseconds"
},
"maxTotalLeadTimeMs": {
"type": "integer",
"format": "int64",
"example": 1600000,
"description": "The max total lead time in milliseconds"
},
"avgDeployDurationMs": {
"type": "integer",
"format": "int64",
"example": 100000,
"description": "The average deploy duration in milliseconds"
},
"maxDeployDurationMs": {
"type": "integer",
"format": "int64",
"example": 100000,
"description": "The max deploy duration in milliseconds"
}
}
}
PullRequestRep
{
"type": "object",
"required": [
"id",
"externalId",
"title",
"status",
"author",
"createTime",
"baseCommitKey",
"headCommitKey",
"filesChanged",
"linesAdded",
"linesDeleted",
"url"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"example": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"description": "The pull request internal ID"
},
"url": {
"type": "string",
"example": "https://github.com/launchdarkly/LaunchDarkly-Docs/pull/406",
"description": "The pull request URL"
},
"title": {
"type": "string",
"example": "Enable new payment structure",
"description": "The pull request title"
},
"author": {
"type": "string",
"example": "jane.doe",
"description": "The pull request author"
},
"status": {
"type": "string",
"example": "merged",
"description": "The pull request status"
},
"leadTime": {
"$ref": "#/components/schemas/PullRequestLeadTimeRep",
"description": "The lead time for the pull request in a given environment"
},
"mergeTime": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1706712518000",
"description": "The pull request merge time"
},
"createTime": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1706701522000",
"description": "The pull request create time"
},
"externalId": {
"type": "string",
"example": "1234",
"description": "The pull request number"
},
"linesAdded": {
"type": "integer",
"example": 100,
"description": "The number of lines added"
},
"deployments": {
"$ref": "#/components/schemas/DeploymentCollectionRep",
"description": "A list of deployments associated with the pull request"
},
"filesChanged": {
"type": "integer",
"example": 2,
"description": "The number of files changed"
},
"linesDeleted": {
"type": "integer",
"example": 50,
"description": "The number of lines deleted"
},
"baseCommitKey": {
"type": "string",
"example": "a90a8a2",
"description": "The pull request base commit key"
},
"headCommitKey": {
"type": "string",
"example": "a90a8a2",
"description": "The pull request head commit key"
},
"flagReferences": {
"$ref": "#/components/schemas/FlagReferenceCollectionRep",
"description": "A list of flag references associated with the pull request"
},
"mergeCommitKey": {
"type": "string",
"example": "a90a8a2",
"description": "The pull request merge commit key"
}
}
}
RandomizationSettingsPut
{
"type": "object",
"required": [
"randomizationUnits"
],
"properties": {
"randomizationUnits": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RandomizationUnitInput"
},
"description": "An array of randomization units allowed for this project."
}
}
}
RandomizationSettingsRep
{
"type": "object",
"properties": {
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_projectId": {
"type": "string",
"example": "12345abcde67890fghij",
"description": "The project ID"
},
"_projectKey": {
"type": "string",
"example": "project-key-123abc",
"description": "The project key"
},
"_creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the experiment was created"
},
"randomizationUnits": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RandomizationUnitRep"
},
"description": "An array of the randomization units in this project"
}
}
}
RandomizationUnitInput
{
"type": "object",
"required": [
"randomizationUnit",
"default",
"standardRandomizationUnit"
],
"properties": {
"default": {
"type": "boolean",
"example": true,
"description": "If true, any experiment iterations created within this project will default to using this randomization unit. A project can only have one default randomization unit."
},
"randomizationUnit": {
"type": "string",
"example": "user",
"description": "The unit of randomization. Must match the key of an existing context kind in this project."
},
"standardRandomizationUnit": {
"enum": [
"guest",
"guestTime",
"organization",
"request",
"user",
"userTime"
],
"type": "string",
"description": "One of LaunchDarkly's fixed set of standard randomization units."
}
}
}
RandomizationUnitRep
{
"type": "object",
"properties": {
"_hidden": {
"type": "boolean"
},
"default": {
"type": "boolean",
"example": true,
"description": "Whether this randomization unit is the default for experiments"
},
"_displayName": {
"type": "string",
"example": "User",
"description": "The display name for the randomization unit, displayed in the LaunchDarkly user interface."
},
"randomizationUnit": {
"type": "string",
"example": "user",
"description": "The unit of randomization. Defaults to user."
},
"standardRandomizationUnit": {
"type": "string",
"example": "user",
"description": "One of LaunchDarkly's fixed set of standard randomization units."
}
}
}
RateLimitedErrorRep
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"example": "rate_limited",
"description": "Specific error code encountered"
},
"message": {
"type": "string",
"example": "You've exceeded the API rate limit. Try again later.",
"description": "Description of the error"
}
}
}
RecentTriggerBody
{
"type": "object",
"properties": {
"jsonBody": {
"type": "object",
"description": "The marshalled JSON request body for the incoming trigger webhook. If this is empty or contains invalid JSON, the timestamp is recorded but this field will be empty.",
"additionalProperties": {}
},
"timestamp": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of the incoming trigger webhook"
}
}
}
ReferenceRep
{
"type": "object",
"required": [
"path",
"hunks"
],
"properties": {
"hint": {
"type": "string",
"example": "javascript",
"description": "Programming language used in the file"
},
"path": {
"type": "string",
"example": "/main/index.js",
"description": "File path of the reference"
},
"hunks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/HunkRep"
}
}
}
}
RelativeDifferenceRep
{
"type": "object",
"properties": {
"lower": {
"type": "number",
"example": -0.13708601934659803,
"description": "A lower bound of the relative difference between the treatment and the <code>fromTreatmentId</code>"
},
"upper": {
"type": "number",
"example": 0.42655970355712425,
"description": "An upper bound of the relative difference between the treatment and the <code>fromTreatmentId</code>"
},
"fromTreatmentId": {
"type": "string",
"example": "92b8354e-360e-4d67-8f13-fa6a46ca8077",
"description": "The treatment ID of the treatment against which the relative difference is calculated"
}
}
}
RelayAutoConfigCollectionRep
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RelayAutoConfigRep"
},
"description": "An array of Relay Proxy configurations"
}
}
}
RelayAutoConfigPost
{
"type": "object",
"required": [
"name",
"policy"
],
"properties": {
"name": {
"type": "string",
"description": "A human-friendly name for the Relay Proxy configuration"
},
"policy": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Statement"
},
"description": "A description of what environments and projects the Relay Proxy should include or exclude. To learn more, read [Writing an inline policy](https://docs.launchdarkly.com/home/relay-proxy/automatic-configuration#writing-an-inline-policy)."
}
}
}
RelayAutoConfigRep
{
"type": "object",
"required": [
"_id",
"name",
"policy",
"fullKey",
"displayKey",
"creationDate",
"lastModified"
],
"properties": {
"_id": {
"$ref": "#/components/schemas/ObjectId",
"example": "12ab3c45de678910abc12345",
"description": "The ID of the Relay Proxy configuration"
},
"name": {
"type": "string",
"example": "Relay Proxy Demo Config",
"description": "A human-friendly name for the Relay Proxy configuration"
},
"policy": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Statement"
},
"description": "A description of what environments and projects the Relay Proxy should include or exclude"
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this Relay Proxy configuration"
},
"fullKey": {
"type": "string",
"description": "The Relay Proxy configuration key"
},
"_creator": {
"$ref": "#/components/schemas/MemberSummary",
"description": "Details on the member who created this Relay Proxy configuration"
},
"displayKey": {
"type": "string",
"example": "7f30",
"description": "The last few characters of the Relay Proxy configuration key, displayed in the LaunchDarkly UI"
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1628001602644",
"description": "Timestamp of when the Relay Proxy configuration was created"
},
"lastModified": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1628001602644",
"description": "Timestamp of when the Relay Proxy configuration was most recently modified"
}
}
}
Release
{
"type": "object",
"required": [
"name",
"releasePipelineKey",
"releasePipelineDescription",
"phases",
"_version"
],
"properties": {
"name": {
"type": "string",
"example": "Example release pipeline",
"description": "The release pipeline name"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"phases": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReleasePhase"
},
"description": "An ordered list of the release pipeline phases"
},
"_version": {
"type": "integer",
"example": 1,
"description": "The release version"
},
"releasePipelineKey": {
"type": "string",
"example": "example-release-pipeline",
"description": "The release pipeline key"
},
"releasePipelineDescription": {
"type": "string",
"example": "Our release pipeline for typical testing and deployment",
"description": "The release pipeline description"
}
}
}
ReleaseAudience
{
"type": "object",
"required": [
"environment",
"name"
],
"properties": {
"name": {
"type": "string",
"example": "Phase 1 - Testing",
"description": "The release phase name"
},
"environment": {
"$ref": "#/components/schemas/EnvironmentSummary",
"description": "Details about the environment"
}
}
}
ReleasePhase
{
"type": "object",
"required": [
"_id",
"_name",
"complete",
"_creationDate",
"_audiences"
],
"properties": {
"_id": {
"type": "string",
"example": "1234a56b7c89d012345e678f",
"description": "The phase ID"
},
"_name": {
"type": "string",
"example": "Phase 1 - Testing",
"description": "The release phase name"
},
"complete": {
"type": "boolean",
"example": true,
"description": "Whether this phase is complete"
},
"_audiences": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReleaseAudience"
},
"description": "A logical grouping of one or more environments that share attributes for rolling out changes"
},
"_completedBy": {
"$ref": "#/components/schemas/CompletedBy",
"description": "Details about how this phase was marked as complete"
},
"_creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1684262711507",
"description": "Timestamp of when the release phase was created"
},
"_completionDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1684262711509",
"description": "Timestamp of when the release phase was completed"
}
}
}
ReleasePipeline
{
"type": "object",
"required": [
"createdAt",
"key",
"name",
"phases"
],
"properties": {
"key": {
"type": "string",
"example": "standard-pipeline",
"description": "The release pipeline key"
},
"name": {
"type": "string",
"example": "Standard Pipeline",
"description": "The release pipeline name"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-tag"
],
"description": "A list of the release pipeline's tags"
},
"phases": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Phase"
},
"description": "An ordered list of the release pipeline phases. Each phase is a logical grouping of one or more environments that share attributes for rolling out changes."
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this release pipeline"
},
"_version": {
"type": "integer",
"example": 1,
"description": "The release pipeline version"
},
"createdAt": {
"type": "string",
"format": "date-time",
"example": "1684262711507",
"description": "Timestamp of when the release pipeline was created"
},
"description": {
"type": "string",
"example": "Standard pipeline to roll out to production",
"description": "The release pipeline description"
}
}
}
ReleasePipelineCollection
{
"type": "object",
"required": [
"items",
"totalCount"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReleasePipeline"
},
"description": "An array of release pipelines"
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "Total number of release pipelines"
}
}
}
RepositoryCollectionRep
{
"type": "object",
"required": [
"_links",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RepositoryRep"
},
"description": "An array of repositories"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
RepositoryRep
{
"type": "object",
"required": [
"name",
"type",
"defaultBranch",
"enabled",
"version",
"_links"
],
"properties": {
"name": {
"type": "string",
"example": "LaunchDarkly-Docs",
"description": "The repository name"
},
"type": {
"enum": [
"bitbucket",
"custom",
"github",
"gitlab"
],
"type": "string",
"example": "github",
"description": "The type of repository"
},
"_links": {
"type": "object",
"additionalProperties": {}
},
"_access": {
"$ref": "#/components/schemas/Access"
},
"enabled": {
"type": "boolean",
"example": true,
"description": "Whether or not a repository is enabled for code reference scanning"
},
"version": {
"type": "integer",
"example": 3,
"description": "The version of the repository's saved information"
},
"branches": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BranchRep"
},
"description": "An array of the repository's branches that have been scanned for code references"
},
"sourceLink": {
"type": "string",
"example": "https://github.com/launchdarkly/LaunchDarkly-Docs",
"description": "A URL to access the repository"
},
"defaultBranch": {
"type": "string",
"example": "main",
"description": "The repository's default branch"
},
"hunkUrlTemplate": {
"type": "string",
"example": "https://github.com/launchdarkly/LaunchDarkly-Docs/blob/${sha}/${filePath}#L${lineNumber}",
"description": "A template for constructing a valid URL to view the hunk"
},
"commitUrlTemplate": {
"type": "string",
"example": "https://github.com/launchdarkly/LaunchDarkly-Docs/commit/${sha}",
"description": "A template for constructing a valid URL to view the commit"
}
}
}
ResourceAccess
{
"type": "object",
"properties": {
"action": {
"$ref": "#/components/schemas/ActionIdentifier"
},
"resource": {
"type": "string"
}
}
}
ResourceIDResponse
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"kind": {
"type": "string"
},
"flagKey": {
"type": "string"
},
"projectKey": {
"type": "string"
},
"environmentKey": {
"type": "string"
}
}
}
ResourceId
{
"type": "object",
"properties": {
"key": {
"type": "string",
"example": "segment-key-123abc",
"description": "The key of the flag or segment"
},
"kind": {
"$ref": "#/components/schemas/ResourceKind",
"example": "segment",
"description": "The type of resource, <code>flag</code> or <code>segment</code>"
},
"flagKey": {
"type": "string",
"deprecated": true,
"description": "Deprecated, use <code>key</code> instead"
},
"projectKey": {
"type": "string",
"example": "project-key-123abc",
"description": "The project key"
},
"environmentKey": {
"type": "string",
"example": "environment-key-123abc",
"description": "The environment key"
}
}
}
ResourceKind
{
"type": "string"
}
ReviewOutput
{
"type": "object",
"required": [
"_id",
"kind"
],
"properties": {
"_id": {
"type": "string"
},
"kind": {
"type": "string"
},
"comment": {
"type": "string"
},
"memberId": {
"type": "string"
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis"
},
"serviceTokenId": {
"type": "string"
}
}
}
ReviewResponse
{
"type": "object",
"required": [
"_id",
"kind"
],
"properties": {
"_id": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "The approval request ID"
},
"kind": {
"enum": [
"approve",
"decline",
"comment"
],
"type": "string",
"example": "approve",
"description": "The type of review action to take"
},
"comment": {
"type": "string",
"example": "Approved!",
"description": "A comment describing the approval response"
},
"memberId": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "ID of account member that reviewed request"
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1653606981113",
"description": "Timestamp of when the request was created"
},
"serviceTokenId": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "ID of account service token that reviewed request"
}
}
}
RoleType
{
"type": "string"
}
Rollout
{
"type": "object",
"required": [
"variations"
],
"properties": {
"seed": {
"type": "integer"
},
"bucketBy": {
"type": "string"
},
"variations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WeightedVariation"
}
},
"contextKind": {
"type": "string"
},
"experimentAllocation": {
"$ref": "#/components/schemas/ExperimentAllocationRep"
}
}
}
RootResponse
{
"type": "object",
"required": [
"links"
],
"properties": {
"links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
Rule
{
"type": "object",
"required": [
"clauses",
"trackEvents"
],
"properties": {
"_id": {
"type": "string",
"description": "The flag rule ID"
},
"ref": {
"type": "string"
},
"clauses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Clause"
},
"description": "An array of clauses used for individual targeting based on attributes"
},
"rollout": {
"$ref": "#/components/schemas/Rollout",
"description": "Details on the percentage rollout, if it exists"
},
"variation": {
"type": "integer",
"description": "The index of the variation, from the array of variations for this flag"
},
"description": {
"type": "string",
"description": "The rule description"
},
"trackEvents": {
"type": "boolean",
"description": "Whether LaunchDarkly tracks events for this rule"
}
}
}
RuleClause
{
"type": "object",
"properties": {
"op": {
"enum": [
"in",
"endsWith",
"startsWith",
"matches",
"contains",
"lessThan",
"lessThanOrEqual",
"greaterThan",
"greaterThanOrEqual",
"before",
"after",
"segmentMatch",
"semVerEqual",
"semVerLessThan",
"semVerGreaterThan"
],
"type": "string",
"description": "The operator to apply to the given attribute"
},
"negate": {
"type": "boolean",
"description": "Whether the operator should be negated"
},
"attribute": {
"type": "string",
"description": "The attribute the rule applies to, for example, last name or email address"
}
}
}
ScheduleKind
{
"type": "string"
}
SdkListRep
{
"type": "object",
"required": [
"_links",
"sdks"
],
"properties": {
"sdks": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"Android",
"Java",
"Node.js"
],
"description": "The list of SDK names"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {}
}
}
}
SdkVersionListRep
{
"type": "object",
"required": [
"_links",
"sdkVersions"
],
"properties": {
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {}
},
"sdkVersions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SdkVersionRep"
},
"example": [
{
"sdk": "Android",
"version": "3.1.2"
},
{
"sdk": "Android",
"version": "3.1.5"
},
{
"sdk": "C",
"version": "2.4.6"
}
],
"description": "The list of SDK names and versions"
}
}
}
SdkVersionRep
{
"type": "object",
"required": [
"sdk",
"version"
],
"properties": {
"sdk": {
"type": "string",
"description": "The SDK name, or \"Unknown\""
},
"version": {
"type": "string",
"description": "The version number, or \"Unknown\""
}
}
}
SegmentBody
{
"type": "object",
"required": [
"name",
"key"
],
"properties": {
"key": {
"type": "string",
"example": "segment-key-123abc",
"description": "A unique key used to reference the segment"
},
"name": {
"type": "string",
"example": "Example segment",
"description": "A human-friendly name for the segment"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"testing"
],
"description": "Tags for the segment"
},
"unbounded": {
"type": "boolean",
"example": false,
"description": "Whether to create a standard segment (<code>false</code>) or a big segment (<code>true</code>). Standard segments include rule-based and smaller list-based segments. Big segments include larger list-based segments and synced segments. Only use a big segment if you need to add more than 15,000 individual targets."
},
"description": {
"type": "string",
"example": "Bundle our sample customers together",
"description": "A description of the segment's purpose"
},
"unboundedContextKind": {
"type": "string",
"example": "device",
"description": "For big segments, the targeted context kind."
}
}
}
SegmentId
{
"type": "string"
}
SegmentMetadata
{
"type": "object",
"properties": {
"envId": {
"type": "string"
},
"deleted": {
"type": "boolean"
},
"version": {
"type": "integer"
},
"segmentId": {
"$ref": "#/components/schemas/SegmentId"
},
"lastModified": {
"$ref": "#/components/schemas/UnixMillis"
},
"excludedCount": {
"type": "integer"
},
"includedCount": {
"type": "integer"
}
}
}
SegmentTarget
{
"type": "object",
"properties": {
"values": {
"type": "array",
"items": {
"type": "string"
}
},
"contextKind": {
"type": "string"
}
}
}
SegmentUserList
{
"type": "object",
"properties": {
"add": {
"type": "array",
"items": {
"type": "string"
}
},
"remove": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
SegmentUserState
{
"type": "object",
"properties": {
"excluded": {
"$ref": "#/components/schemas/SegmentUserList"
},
"included": {
"$ref": "#/components/schemas/SegmentUserList"
}
}
}
SegmentsBetaStartBigSegmentImportRequest
{
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "CSV file containing keys"
},
"mode": {
"type": "string",
"format": "string",
"description": "Import mode. Use either `merge` or `replace`"
}
}
}
Series
{
"type": "object",
"required": [
"time",
"value"
],
"properties": {
"time": {
"type": "integer",
"format": "int64",
"example": 1676332800000,
"description": "The timestamp"
},
"value": {
"type": "number",
"example": 92,
"description": "The value for the given timestamp"
}
}
}
SeriesIntervalsRep
{
"type": "object",
"required": [
"series",
"_links"
],
"properties": {
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {}
},
"series": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Series"
},
"description": "An array of timestamps and values for a given meter"
}
}
}
SeriesListRep
{
"type": "object",
"required": [
"_links",
"metadata",
"series"
],
"properties": {
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {}
},
"series": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SeriesTimeSliceRep"
},
"example": [
{
"0": 11,
"1": 15,
"time": 1677888000000
}
],
"description": "An array of data points with timestamps. Each element of the array is an object with a 'time' field, whose value is the timestamp, and one or more key fields. If there are multiple key fields, they are labeled '0', '1', and so on, and are explained in the <code>metadata</code>."
},
"metadata": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SeriesMetadataRep"
},
"description": "Metadata about each series"
}
}
}
SeriesMetadataRep
{
"type": "object",
"additionalProperties": {}
}
SeriesTimeSliceRep
{
"type": "object",
"additionalProperties": {
"type": "integer"
}
}
SlicedResultsRep
{
"type": "object",
"properties": {
"attribute": {
"type": "string",
"example": "country",
"description": "An attribute that results are sliced by"
},
"attributeValue": {
"type": "string",
"example": "Canada",
"description": "Attribute Value for 'attribute'"
},
"treatmentResults": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TreatmentResultRep"
},
"description": "A list of the results for each treatment"
}
}
}
SourceEnv
{
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "The key of the source environment to clone from"
},
"version": {
"type": "integer",
"description": "(Optional) The version number of the source environment to clone from. Used for optimistic locking"
}
}
}
StageInput
{
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "10% rollout on day 1",
"description": "The stage name"
},
"action": {
"$ref": "#/components/schemas/ActionInput",
"example": "{\"instructions\": [{ \"kind\": \"turnFlagOn\"}]}",
"description": "An <code>instructions</code> field containing an array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag."
},
"conditions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ConditionInput"
},
"example": [
{
"kind": "schedule",
"scheduleKind": "relative",
"waitDuration": 2,
"waitDurationUnit": "calendarDay"
}
],
"description": "An array of conditions for the stage"
},
"executeConditionsInSequence": {
"type": "boolean",
"example": true,
"description": "Whether to execute the conditions in sequence for the given stage"
}
}
}
StageOutput
{
"type": "object",
"required": [
"_id",
"conditions",
"action",
"_execution"
],
"properties": {
"_id": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "The ID of this stage"
},
"name": {
"type": "string",
"example": "10% rollout on day 1",
"description": "The stage name"
},
"action": {
"$ref": "#/components/schemas/ActionOutput",
"example": "{ \"kind\": \"patch\", \"instructions\": [{ \"kind\": \"turnFlagOn\"}] }",
"description": "The type of instruction, and an array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag."
},
"_execution": {
"$ref": "#/components/schemas/ExecutionOutput",
"example": "{ \"status\": \"completed\" }",
"description": "Details on the execution of this stage"
},
"conditions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ConditionOutput"
},
"example": [
{
"id": "12ab3c45de678910abc12345",
"kind": "schedule",
"_execution": {
"status": "completed"
},
"scheduleKind": "relative",
"waitDuration": 2,
"waitDurationUnit": "calendarDay"
}
],
"description": "An array of conditions for the stage"
}
}
}
Statement
{
"type": "object",
"required": [
"effect"
],
"properties": {
"effect": {
"enum": [
"allow",
"deny"
],
"type": "string",
"example": "allow",
"description": "Whether this statement should allow or deny actions on the resources."
},
"actions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ActionSpecifier"
},
"example": [
"*"
],
"description": "Actions to perform on a resource"
},
"resources": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"proj/*:env/*;qa_*:/flag/*"
],
"description": "Resource specifier strings"
},
"notActions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ActionSpecifier"
},
"description": "Targeted actions are the actions NOT in this list. The <code>actions</code> and <code>notResources</code> fields must be empty to use this field."
},
"notResources": {
"type": "array",
"items": {
"type": "string"
},
"description": "Targeted resources are the resources NOT in this list. The <code>resources</code> and <code>notActions</code> fields must be empty to use this field."
}
}
}
StatementPost
{
"type": "object",
"required": [
"effect"
],
"properties": {
"effect": {
"enum": [
"allow",
"deny"
],
"type": "string",
"example": "allow",
"description": "Whether this statement should allow or deny actions on the resources."
},
"actions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ActionSpecifier"
},
"example": [
"*"
],
"description": "Actions to perform on a resource"
},
"resources": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"proj/*:env/*:flag/*;testing-tag"
],
"description": "Resource specifier strings"
},
"notActions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ActionSpecifier"
},
"description": "Targeted actions are the actions NOT in this list. The <code>actions</code> field must be empty to use this field."
},
"notResources": {
"type": "array",
"items": {
"type": "string"
},
"description": "Targeted resources are the resources NOT in this list. The <code>resources</code> field must be empty to use this field."
}
}
}
StatementPostList
{
"type": "array",
"items": {
"$ref": "#/components/schemas/StatementPost"
}
}
StatisticCollectionRep
{
"type": "object",
"required": [
"flags",
"_links"
],
"properties": {
"flags": {
"type": "object",
"description": "A map of flag keys to a list of code reference statistics for each code repository in which the flag key appears",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StatisticRep"
}
}
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
StatisticRep
{
"type": "object",
"required": [
"name",
"type",
"sourceLink",
"defaultBranch",
"enabled",
"version",
"hunkCount",
"fileCount",
"_links"
],
"properties": {
"name": {
"type": "string",
"example": "LaunchDarkly-Docs",
"description": "The repository name"
},
"type": {
"enum": [
"bitbucket",
"custom",
"github",
"gitlab"
],
"type": "string",
"example": "github",
"description": "The type of repository"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"enabled": {
"type": "boolean",
"example": true,
"description": "Whether or not a repository is enabled for code reference scanning"
},
"version": {
"type": "integer",
"example": 3,
"description": "The version of the repository's saved information"
},
"fileCount": {
"type": "integer",
"description": "The number of files in which the flag appears in this repository"
},
"hunkCount": {
"type": "integer",
"description": "The number of code reference hunks in which the flag appears in this repository"
},
"sourceLink": {
"type": "string",
"example": "https://github.com/launchdarkly/LaunchDarkly-Docs",
"description": "A URL to access the repository"
},
"defaultBranch": {
"type": "string",
"example": "main",
"description": "The repository's default branch"
}
}
}
StatisticsRoot
{
"type": "object",
"properties": {
"self": {
"$ref": "#/components/schemas/Link",
"example": "{\"href\": \"/api/v2/code-refs/statistics\", \"type\": \"application/json\"}",
"description": "The location and content type for accessing this resource"
},
"projects": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Link"
},
"example": [
{
"href": "/api/v2/code-refs/statistics/example-project-with-code-refs",
"type": "application/json"
}
],
"description": "The location and content type of all projects that have code references"
}
}
}
StatusConflictErrorRep
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"example": "optimistic_locking_error",
"description": "Specific error code encountered"
},
"message": {
"type": "string",
"example": "Conflict. Optimistic lock error. Try again later.",
"description": "Description of the error"
}
}
}
StatusServiceUnavailable
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"example": "service_unavailable",
"description": "Specific error code encountered"
},
"message": {
"type": "string",
"example": "Requested service unavailable",
"description": "Description of the error"
}
}
}
StoreIntegrationError
{
"type": "object",
"properties": {
"message": {
"type": "string"
},
"timestamp": {
"$ref": "#/components/schemas/UnixMillis"
},
"statusCode": {
"type": "integer"
}
}
}
SubjectDataRep
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The subject's name"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"avatarUrl": {
"type": "string",
"description": "The subject's avatar"
}
}
}
TagCollection
{
"type": "object",
"required": [
"items",
"_links"
],
"properties": {
"items": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"ops",
"pro"
],
"description": "List of tags"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 103,
"description": "The total number of tags"
}
}
}
Target
{
"type": "object",
"required": [
"values",
"variation"
],
"properties": {
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of the keys for targets that will receive this variation because of individual targeting"
},
"variation": {
"type": "integer",
"description": "The index, from the array of variations for this flag, of the variation to serve this list of targets"
},
"contextKind": {
"type": "string",
"description": "The context kind of the individual target"
}
}
}
TargetResourceRep
{
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "Example flag name",
"description": "The name of the resource"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"resources": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"proj/example-project:env/production:flag/example-flag"
],
"description": "The resource specifier"
}
}
}
Team
{
"type": "object",
"properties": {
"key": {
"type": "string",
"example": "team-key-123abc",
"description": "The team key"
},
"name": {
"type": "string",
"example": "Example team",
"description": "A human-friendly name for the team"
},
"roles": {
"$ref": "#/components/schemas/TeamCustomRoles",
"description": "Paginated list of the custom roles assigned to this team. Only included if specified in the <code>expand</code> query parameter."
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/teams/example-team",
"type": "application/json"
},
"roles": {
"href": "/api/v2/teams/example-team/roles",
"type": "application/json"
},
"parent": {
"href": "/api/v2/teams",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this team"
},
"members": {
"$ref": "#/components/schemas/TeamMembers",
"description": "Details on the total count of members that belong to the team. Only included if specified in the <code>expand</code> query parameter."
},
"_version": {
"type": "integer",
"example": 3,
"description": "The team version"
},
"projects": {
"$ref": "#/components/schemas/TeamProjects",
"description": "Paginated list of the projects that the team has any write access to. Only included if specified in the <code>expand</code> query parameter."
},
"_idpSynced": {
"type": "boolean",
"example": true,
"description": "Whether the team has been synced with an external identity provider (IdP). Team sync is available to customers on an Enterprise plan."
},
"description": {
"type": "string",
"example": "Description for this team.",
"description": "A description of the team"
},
"maintainers": {
"$ref": "#/components/schemas/TeamMaintainers",
"description": "Paginated list of the maintainers assigned to this team. Only included if specified in the <code>expand</code> query parameter."
},
"_creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1648671956143",
"description": "Timestamp of when the team was created"
},
"_lastModified": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1648672446072",
"description": "Timestamp of when the team was most recently updated"
}
}
}
TeamCustomRole
{
"type": "object",
"properties": {
"key": {
"type": "string",
"example": "role-key-123abc",
"description": "The key of the custom role"
},
"name": {
"type": "string",
"example": "Example role",
"description": "The name of the custom role"
},
"projects": {
"$ref": "#/components/schemas/TeamProjects",
"description": "Details on the projects where team members have write privileges on at least one resource type (e.g. flags)"
},
"appliedOn": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1648672018410",
"description": "Timestamp of when the custom role was assigned to this team"
}
}
}
TeamCustomRoles
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TeamCustomRole"
},
"description": "An array of the custom roles that have been assigned to this team"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/teams/example-team/roles?limit=25",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "The number of custom roles assigned to this team"
}
}
}
TeamImportsRep
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MemberImportItem"
},
"description": "An array of details about the members requested to be added to this team"
}
}
}
TeamMaintainers
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MemberSummary"
},
"example": [
{
"_id": "569f183514f4432160000007",
"role": "reader",
"email": "ariel@acme.com",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"lastName": "Flores",
"firstName": "Ariel"
}
],
"description": "Details on the members that have been assigned as maintainers of the team"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/teams/example-team/maintainers?limit=5",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "The number of maintainers of the team"
}
}
}
TeamMembers
{
"type": "object",
"properties": {
"totalCount": {
"type": "integer",
"example": 15,
"description": "The total count of members that belong to the team"
}
}
}
TeamProjects
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProjectSummary"
},
"example": [
{
"key": "project-key-123abc",
"name": "Example project",
"_links": {
"self": {
"href": "/api/v2/projects/example-project",
"type": "application/json"
},
"environments": {
"href": "/api/v2/projects/example-project/environments",
"type": "application/json"
}
}
}
],
"description": "Details on each project where team members have write privileges on at least one resource type (e.g. flags)"
},
"totalCount": {
"type": "integer",
"example": 1
}
}
}
Teams
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Team"
},
"description": "An array of teams"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/teams?expand=maintainers%2Cmembers%2Croles%2Cprojects&limit=20",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 1,
"description": "The number of teams"
}
}
}
TeamsAddMultipleMembersToTeamRequest
{
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "CSV file containing email addresses"
}
}
}
TimestampRep
{
"type": "object",
"properties": {
"simple": {
"type": "string"
},
"rfc3339": {
"type": "string"
},
"seconds": {
"type": "integer",
"format": "int64"
},
"milliseconds": {
"$ref": "#/components/schemas/UnixMillis"
}
}
}
Token
{
"type": "object",
"required": [
"_id",
"ownerId",
"memberId",
"creationDate",
"lastModified",
"_links"
],
"properties": {
"_id": {
"$ref": "#/components/schemas/ObjectId",
"example": "61095542756dba551110ae21",
"description": "The ID of the access token"
},
"name": {
"type": "string",
"example": "Example reader token",
"description": "A human-friendly name for the access token"
},
"role": {
"type": "string",
"example": "reader",
"description": "Built-in role for the token"
},
"token": {
"type": "string",
"example": "1234",
"description": "The token value. When creating or resetting, contains the entire token value. Otherwise, contains the last four characters."
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/tokens/61095542756dba551110ae21",
"type": "application/json"
},
"parent": {
"href": "/api/v2/tokens",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_member": {
"$ref": "#/components/schemas/MemberSummary",
"description": "Details on the member who created the access token"
},
"ownerId": {
"$ref": "#/components/schemas/ObjectId",
"example": "569f514156e003339cfd3917",
"description": "The ID of the owner of the account for the access token"
},
"lastUsed": {
"$ref": "#/components/schemas/UnixMillis",
"example": "0",
"description": "Timestamp of when the access token was last used"
},
"memberId": {
"$ref": "#/components/schemas/ObjectId",
"example": "569f514183f2164430000002",
"description": "The ID of the member who created the access token"
},
"inlineRole": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Statement"
},
"example": [],
"description": "An array of policy statements, with three attributes: effect, resources, actions. May be used in place of a built-in or custom role."
},
"description": {
"type": "string",
"example": "A reader token used in testing and examples",
"description": "A description for the access token"
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1628001602644",
"description": "Timestamp of when the access token was created"
},
"lastModified": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1628001602644",
"description": "Timestamp of the last modification of the access token"
},
"serviceToken": {
"type": "boolean",
"example": false,
"description": "Whether this is a service token or a personal token"
},
"customRoleIds": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ObjectId"
},
"example": [],
"description": "A list of custom role IDs to use as access limits for the access token"
},
"defaultApiVersion": {
"type": "integer",
"example": 20220603,
"description": "The default API version for this token"
}
}
}
TokenSummary
{
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string",
"example": "DevOps token",
"description": "The name of the token"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"ending": {
"type": "string",
"example": "2345",
"description": "The last few characters of the token"
},
"serviceToken": {
"type": "boolean",
"example": false,
"description": "Whether this is a service token"
}
}
}
Tokens
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Token"
},
"description": "An array of access tokens"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"description": "The number of access tokens returned"
}
}
}
TreatmentInput
{
"type": "object",
"required": [
"name",
"baseline",
"allocationPercent",
"parameters"
],
"properties": {
"name": {
"type": "string",
"example": "Treatment 1",
"description": "The treatment name"
},
"baseline": {
"type": "boolean",
"example": true,
"description": "Whether this treatment is the baseline to compare other treatments against"
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TreatmentParameterInput"
},
"description": "Details on the flag and variation to use for this treatment"
},
"allocationPercent": {
"type": "string",
"example": "10",
"description": "The percentage of traffic allocated to this treatment during the iteration"
}
}
}
TreatmentParameterInput
{
"type": "object",
"required": [
"flagKey",
"variationId"
],
"properties": {
"flagKey": {
"type": "string",
"example": "example-flag-for-experiment",
"description": "The flag key"
},
"variationId": {
"type": "string",
"example": "e432f62b-55f6-49dd-a02f-eb24acf39d05",
"description": "The ID of the flag variation"
}
}
}
TreatmentRep
{
"type": "object",
"required": [
"name",
"allocationPercent"
],
"properties": {
"_id": {
"type": "string",
"example": "122c9f3e-da26-4321-ba68-e0fc02eced58",
"description": "The treatment ID. This is the variation ID from the flag."
},
"name": {
"type": "string",
"example": "Treatment 1",
"description": "The treatment name. This is the variation name from the flag."
},
"baseline": {
"type": "boolean",
"example": true,
"description": "Whether this treatment is the baseline to compare other treatments against"
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ParameterRep"
},
"description": "Details on the flag and variation used for this treatment"
},
"allocationPercent": {
"type": "string",
"example": "10",
"description": "The percentage of traffic allocated to this treatment during the iteration"
}
}
}
TreatmentResultRep
{
"type": "object",
"properties": {
"mean": {
"type": "number",
"example": 0.5432525951557093,
"description": "The average value of the variation in this sample. It doesn’t capture the uncertainty in the measurement, so it should not be the only measurement you use to make decisions."
},
"pBest": {
"type": "number",
"example": 0.6083,
"description": "The likelihood that this variation has the biggest effect on the primary metric. The variation with the highest probability is likely the best of the variations you're testing"
},
"units": {
"type": "integer",
"format": "int64",
"example": 76,
"description": "The number of units exposed to this treatment that have event values, including those that are configured to default to 0"
},
"traffic": {
"type": "integer",
"format": "int64",
"example": 332,
"description": "The number of units exposed to this treatment."
},
"treatmentId": {
"type": "string",
"example": "92b8354e-360e-4d67-8f13-fa6a46ca8077",
"description": "The ID of the treatment"
},
"distribution": {
"$ref": "#/components/schemas/Distribution",
"description": "The posterior distribution of the mean of the metric in this variation."
},
"treatmentName": {
"type": "string",
"example": "variation 25% off",
"description": "The name of the treatment"
},
"credibleInterval": {
"$ref": "#/components/schemas/CredibleIntervalRep",
"example": "{\"lower\": 0.4060771673663068, \"upper\": 0.6713222134386467}",
"description": "The range of the metric's values that you should have 90% confidence in."
},
"relativeDifferences": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RelativeDifferenceRep"
},
"example": [
{
"lower": -0.13708601934659803,
"upper": 0.42655970355712425,
"fromTreatmentId": "92b8354e-360e-4d67-8f13-fa6a46ca8077"
}
],
"description": "Estimates of the relative difference between this treatment's mean and the mean of each other treatment"
}
}
}
TreatmentsInput
{
"type": "array",
"items": {
"$ref": "#/components/schemas/TreatmentInput"
}
}
TriggerWorkflowCollectionRep
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TriggerWorkflowRep"
},
"description": "An array of flag triggers"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
TriggerWorkflowRep
{
"type": "object",
"properties": {
"_id": {
"$ref": "#/components/schemas/FeatureWorkflowId",
"example": "12ab3c45de678910abc12345",
"description": "The ID of this flag trigger"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"enabled": {
"type": "boolean",
"example": true,
"description": "Whether the flag trigger is currently enabled"
},
"_version": {
"type": "integer",
"example": 1,
"description": "The flag trigger version"
},
"triggerURL": {
"type": "string",
"description": "The unguessable URL for this flag trigger"
},
"_maintainer": {
"$ref": "#/components/schemas/MemberSummary",
"description": "Details on the member who maintains this flag trigger"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[ { \"kind\": \"turnFlagOn\" }]",
"description": "Details on the action to perform when triggering"
},
"_creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the flag trigger was created"
},
"_maintainerId": {
"type": "string",
"example": "12ab3c45de678910abc12345",
"description": "The ID of the flag trigger maintainer"
},
"_triggerCount": {
"type": "integer",
"example": 3,
"description": "Number of times the trigger has been executed"
},
"_integrationKey": {
"type": "string",
"example": "generic-trigger",
"description": "The unique identifier of the integration for your trigger"
},
"_lastTriggeredAt": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654114600000",
"description": "Timestamp of when the trigger was most recently executed"
},
"_recentTriggerBodies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RecentTriggerBody"
},
"description": "Details on recent flag trigger requests."
}
}
}
UnauthorizedErrorRep
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"example": "unauthorized",
"description": "Specific error code encountered"
},
"message": {
"type": "string",
"example": "Invalid access token",
"description": "Description of the error"
}
}
}
UnixMillis
{
"type": "integer",
"format": "int64"
}
UpsertContextKindPayload
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"example": "organization",
"description": "The context kind name"
},
"version": {
"type": "integer",
"example": 1,
"description": "The context kind version. If not specified when the context kind is created, defaults to 1."
},
"archived": {
"type": "boolean",
"example": false,
"description": "Whether the context kind is archived. Archived context kinds are unavailable for targeting."
},
"description": {
"type": "string",
"example": "An example context kind for organizations",
"description": "The context kind description"
},
"hideInTargeting": {
"type": "boolean",
"example": false,
"description": "Alias for archived."
}
}
}
UpsertFlagDefaultsPayload
{
"type": "object",
"required": [
"tags",
"temporary",
"booleanDefaults",
"defaultClientSideAvailability"
],
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"tag-1",
"tag-2"
],
"description": "A list of default tags for each flag"
},
"temporary": {
"type": "boolean",
"example": true,
"description": "Whether the flag should be temporary by default"
},
"booleanDefaults": {
"$ref": "#/components/schemas/BooleanFlagDefaults"
},
"defaultClientSideAvailability": {
"$ref": "#/components/schemas/DefaultClientSideAvailability",
"description": "Which client-side SDK types can use this flag by default."
}
}
}
UpsertResponseRep
{
"type": "object",
"properties": {
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"status": {
"type": "string",
"example": "success",
"description": "The status of the create or update operation"
}
}
}
UrlMatcher
{
"type": "object",
"additionalProperties": {}
}
UrlMatchers
{
"type": "array",
"items": {
"$ref": "#/components/schemas/UrlMatcher"
}
}
UrlPost
{
"type": "object",
"properties": {
"url": {
"type": "string"
},
"kind": {
"enum": [
"exact",
"canonical",
"substring",
"regex"
],
"type": "string"
},
"pattern": {
"type": "string"
},
"substring": {
"type": "string"
}
}
}
User
{
"type": "object",
"properties": {
"ip": {
"type": "string",
"example": "10.10.10.10",
"description": "The user's IP address"
},
"key": {
"type": "string",
"example": "user-key-123abc",
"description": "The user key. This is the only mandatory user attribute."
},
"name": {
"type": "string",
"example": "Sandy Smith",
"description": "The user's full name"
},
"email": {
"type": "string",
"example": "sandy@example.com",
"description": "The user's email"
},
"avatar": {
"type": "string",
"example": "http://example.com/avatar.png",
"description": "An absolute URL to an avatar image."
},
"custom": {
"type": "object",
"description": "Any other custom attributes for this user. Custom attributes contain any other user data that you would like to use to conditionally target your users.",
"additionalProperties": {}
},
"country": {
"type": "string",
"example": "United States",
"description": "The user's country"
},
"lastName": {
"type": "string",
"example": "Smith",
"description": "The user's last name"
},
"anonymous": {
"type": "boolean",
"example": false,
"description": "Whether the user is anonymous. If true, this user does not appear on the Contexts list in the LaunchDarkly user interface."
},
"firstName": {
"type": "string",
"example": "Sandy",
"description": "The user's first name"
},
"secondary": {
"type": "string",
"example": "2398127",
"description": "If provided, used with the user key to generate a variation in percentage rollouts"
},
"privateAttrs": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of attribute names that are marked as private. You can use these attributes in targeting rules and segments. If you are using a server-side SDK, the SDK will not send the private attribute back to LaunchDarkly. If you are using a client-side SDK, the SDK will send the private attribute back to LaunchDarkly for evaluation. However, the SDK won't send the attribute to LaunchDarkly in events data, LaunchDarkly won't store the private attribute, and the private attribute will not appear on the Contexts list."
}
}
}
UserAttributeNamesRep
{
"type": "object",
"properties": {
"custom": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"Age",
"FavoriteFood",
"FavoriteColor"
],
"description": "custom attributes"
},
"private": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"SSN",
"credit_card_number"
],
"description": "private attributes"
},
"standard": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"key",
"ip",
"firstName",
"lastName",
"country",
"anonymous"
],
"description": "standard attributes"
}
}
}
UserFlagSetting
{
"type": "object",
"required": [
"_links",
"_value",
"setting"
],
"properties": {
"_links": {
"type": "object",
"example": {
"sort.order": {
"href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order",
"type": "application/json"
}
},
"description": "The location and content type of related resources.",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_value": {
"example": "true",
"description": "The value of the flag variation that the user receives. If there is no defined default rule, this is null."
},
"reason": {
"$ref": "#/components/schemas/EvaluationReason",
"example": "{\"kind\": \"RULE_MATCH\"}",
"description": "Contains information about why that variation was selected."
},
"setting": {
"example": "null",
"description": "Whether the user is explicitly targeted to receive a particular variation. The setting is false if you have turned off a feature flag for a user. It is null if you haven't assigned that user to a specific variation."
}
}
}
UserFlagSettings
{
"type": "object",
"required": [
"items",
"_links"
],
"properties": {
"items": {
"type": "object",
"example": {
"sort.order": {
"_links": {
"self": {
"href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order",
"type": "application/json"
}
},
"_value": true,
"setting": null
},
"alternate.page": {
"_links": {
"self": {
"href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/alternate.page",
"type": "application/json"
}
},
"_value": false,
"setting": null
}
},
"description": "An array of flag settings for the user",
"additionalProperties": {
"$ref": "#/components/schemas/UserFlagSetting"
}
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/users/lacuna/production/Abbie_Braun/flags",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
UserRecord
{
"type": "object",
"properties": {
"user": {
"$ref": "#/components/schemas/User",
"description": "Details on the user"
},
"_links": {
"type": "object",
"example": {
"self": {
"href": "/api/v2/users/my-project/my-environment/my-user",
"type": "application/json"
},
"site": {
"href": "/my-project/my-environment/users/my-user",
"type": "text/html"
},
"parent": {
"href": "/api/v2/users/my-project/my-environment",
"type": "application/json"
},
"settings": {
"href": "/api/v2/users/my-project/my-environment/my-user/flags",
"type": "text/html"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this user"
},
"ownerId": {
"$ref": "#/components/schemas/ObjectId",
"example": "12ab3c45de678910abc12345",
"description": "The ID of the member who is the owner for this account"
},
"lastPing": {
"type": "string",
"format": "date-time",
"example": "2022-06-28T23:21:29.176609596Z",
"description": "Timestamp of the last time this user was seen"
},
"sortValue": {
"example": "user-key-123abc",
"description": "If this record is returned as part of a list, the value used to sort the list. This is only included when the <code>sort</code> query parameter is specified. It is a time, in Unix milliseconds, if the sort is by <code>lastSeen</code>. It is a user key if the sort is by <code>userKey</code>."
},
"environmentId": {
"$ref": "#/components/schemas/ObjectId",
"example": "1234a56b7c89d012345e678f",
"description": "The environment ID"
}
}
}
UserSegment
{
"type": "object",
"required": [
"name",
"tags",
"creationDate",
"lastModifiedDate",
"key",
"_links",
"rules",
"version",
"deleted",
"generation"
],
"properties": {
"key": {
"type": "string",
"example": "segment-key-123abc",
"description": "A unique key used to reference the segment"
},
"name": {
"type": "string",
"example": "Example segment",
"description": "A human-friendly name for the segment."
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"testing"
],
"description": "Tags for the segment. Defaults to an empty array."
},
"rules": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserSegmentRule"
},
"example": [
{
"_id": "1234a56b7c89d012345e678f",
"clauses": [
{
"op": "endsWith",
"_id": "12ab3c45de678910fab12345",
"negate": false,
"values": [
".edu"
],
"attribute": "email"
}
]
}
],
"description": "An array of the targeting rules for this segment."
},
"_flags": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FlagListingRep"
},
"description": "A list of flags targeting this segment. Only included when getting a single segment, using the <code>getSegment</code> endpoint."
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"_access": {
"$ref": "#/components/schemas/Access"
},
"deleted": {
"type": "boolean",
"example": false,
"description": "Whether the segment has been deleted"
},
"version": {
"type": "integer",
"example": 1,
"description": "Version of the segment"
},
"excluded": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"user-key-123abc"
],
"description": "An array of keys for excluded targets. Segment rules bypass individual excluded targets, so they will never be included based on rules. Excluded targets may still be included explicitly. This value is omitted for list-based segments over 15,000 entries, also called big segments."
},
"included": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"user-key-123abc"
],
"description": "An array of keys for included targets. Included individual targets are always segment members, regardless of segment rules. For list-based segments over 15,000 entries, also called big segments, this array is either empty or omitted."
},
"_external": {
"type": "string",
"example": "amplitude",
"description": "The external data store backing this segment. Only applies to synced segments."
},
"unbounded": {
"type": "boolean",
"example": false,
"description": "Whether this is a standard segment (<code>false</code>) or a big segment (<code>true</code>). Standard segments include rule-based segments and smaller list-based segments. Big segments include larger list-based segments and synced segments. If omitted, the segment is a standard segment."
},
"generation": {
"type": "integer",
"description": "For big segments, how many times this segment has been created."
},
"description": {
"type": "string",
"example": "Bundle our sample customers together",
"description": "A description of the segment's purpose. Defaults to <code>null</code> and is omitted in the response if not provided."
},
"creationDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the segment was created"
},
"_externalLink": {
"type": "string",
"example": "https://analytics.amplitude.com/org/1234/cohort/123abc",
"description": "The URL for the external data store backing this segment. Only applies to synced segments."
},
"excludedContexts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SegmentTarget"
}
},
"includedContexts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SegmentTarget"
}
},
"lastModifiedDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1654104600000",
"description": "Timestamp of when the segment was last modified"
},
"_importInProgress": {
"type": "boolean",
"example": false,
"description": "Whether an import is currently in progress for the specified segment. Only applies to big segments."
},
"_unboundedMetadata": {
"$ref": "#/components/schemas/SegmentMetadata",
"description": "Details on the external data store backing this segment. Only applies to big segments."
},
"unboundedContextKind": {
"type": "string",
"description": "For big segments, the targeted context kind."
}
}
}
UserSegmentRule
{
"type": "object",
"required": [
"clauses"
],
"properties": {
"_id": {
"type": "string"
},
"weight": {
"type": "integer"
},
"clauses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Clause"
}
},
"bucketBy": {
"type": "string"
},
"description": {
"type": "string"
},
"rolloutContextKind": {
"type": "string"
}
}
}
UserSegments
{
"type": "object",
"required": [
"items",
"_links",
"totalCount"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserSegment"
},
"description": "An array of segments"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"description": "The total number of segments"
}
}
}
Users
{
"type": "object",
"required": [
"totalCount",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserRecord"
},
"description": "Details on the users"
},
"_links": {
"type": "object",
"example": {
"next": {
"href": "/api/v2/user-search/my-project/my-environment?after=1647993600000&limit=20&searchAfter=my-user&sort=userKey",
"type": "application/json"
},
"self": {
"href": "/api/v2/user-search/my-project/my-environment?after=1647993600000&limit=20&sort=userKey",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 245,
"description": "The total number of users in the environment"
}
}
}
UsersRep
{
"type": "object",
"required": [
"totalCount",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserRecord"
},
"description": "Details on the users"
},
"_links": {
"type": "object",
"example": {
"next": {
"href": "/api/v2/users/my-project/my-environment?after=1647993600000&limit=20&searchAfter=my-user",
"type": "application/json"
},
"self": {
"href": "/api/v2/users/my-project/my-environment?after=1647993600000&limit=20",
"type": "application/json"
}
},
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"totalCount": {
"type": "integer",
"example": 245,
"description": "The total number of users in the environment"
}
}
}
ValidationFailedErrorRep
{
"type": "object",
"required": [
"code",
"message",
"errors"
],
"properties": {
"code": {
"type": "string",
"example": "invalid_request",
"description": "Specific error code encountered"
},
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FailureReasonRep"
},
"description": "List of validation errors"
},
"message": {
"type": "string",
"example": "validation failed",
"description": "Description of the error"
}
}
}
ValuePut
{
"type": "object",
"properties": {
"comment": {
"type": "string",
"example": "make sure this context experiences a specific variation",
"description": "Optional comment describing the change"
},
"setting": {
"example": "existing_variation_value_to_use",
"description": "The variation value to set for the context. Must match the flag's variation type."
}
}
}
Variation
{
"type": "object",
"required": [
"value"
],
"properties": {
"_id": {
"type": "string",
"description": "The ID of the variation. Leave empty when you are creating a flag."
},
"name": {
"type": "string",
"description": "A human-friendly name for the variation. Defaults to an empty string, but is omitted from the response if not set."
},
"value": {
"description": "The value of the variation. For boolean flags, this must be <code>true</code> or <code>false</code>. For multivariate flags, this may be a string, number, or JSON object."
},
"description": {
"type": "string",
"description": "Description of the variation. Defaults to an empty string, but is omitted from the response if not set."
}
}
}
VariationEvalSummary
{
"type": "object",
"properties": {
"after": {
"type": "integer",
"format": "int64",
"example": 500,
"description": "The number of evaluations in the ten minutes after the flag event"
},
"value": {
"example": "true",
"description": "The variation value"
},
"before": {
"type": "integer",
"format": "int64",
"example": 1000,
"description": "The number of evaluations in the ten minutes before the flag event"
}
}
}
VariationOrRolloutRep
{
"type": "object",
"properties": {
"rollout": {
"$ref": "#/components/schemas/Rollout",
"description": "Details on the percentage rollout, if it exists"
},
"variation": {
"type": "integer",
"description": "The index of the variation, from the array of variations for this flag"
}
}
}
VariationSummary
{
"type": "object",
"required": [
"rules",
"nullRules",
"targets",
"contextTargets"
],
"properties": {
"isOff": {
"type": "boolean"
},
"rules": {
"type": "integer"
},
"rollout": {
"type": "integer"
},
"targets": {
"type": "integer"
},
"bucketBy": {
"type": "string"
},
"nullRules": {
"type": "integer"
},
"isFallthrough": {
"type": "boolean"
},
"contextTargets": {
"type": "integer"
}
}
}
VersionsRep
{
"type": "object",
"required": [
"validVersions",
"latestVersion",
"currentVersion"
],
"properties": {
"beta": {
"type": "boolean",
"example": false,
"description": "Whether the version of the API currently is use is a beta version. This is always <code>true</code> if you add the <code>LD-API-Version: beta</code> header to your request."
},
"latestVersion": {
"$ref": "#/components/schemas/DateVersion",
"example": "20220603",
"description": "The most recently released version of the API"
},
"validVersions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DateVersion"
},
"description": "A list of all valid API versions. To learn more about our versioning, read [Versioning](https://apidocs.launchdarkly.com/#section/Overview/Versioning)."
},
"currentVersion": {
"$ref": "#/components/schemas/DateVersion",
"example": "20220603",
"description": "The version of the API currently in use. Typically this is the API version specified for your access token. If you add the <code>LD-API-Version: beta</code> header to your request, this will be equal to the <code>latestVersion</code>."
}
}
}
Webhook
{
"type": "object",
"required": [
"_links",
"_id",
"url",
"on",
"tags"
],
"properties": {
"on": {
"type": "boolean",
"example": true,
"description": "Whether or not this webhook is enabled"
},
"_id": {
"type": "string",
"example": "57be1db38b75bf0772d11384",
"description": "The ID of this webhook"
},
"url": {
"type": "string",
"example": "http://www.example.com",
"description": "The URL to which LaunchDarkly sends an HTTP POST payload for this webhook"
},
"name": {
"type": "string",
"example": "Example hook",
"description": "A human-readable name for this webhook"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"examples"
],
"description": "List of tags for this webhook"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"secret": {
"type": "string",
"example": "frobozz",
"description": "The secret for this webhook"
},
"_access": {
"$ref": "#/components/schemas/Access",
"description": "Details on the allowed and denied actions for this webhook"
},
"statements": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Statement"
},
"description": "Represents a Custom role policy, defining a resource kinds filter the webhook responds to."
}
}
}
Webhooks
{
"type": "object",
"required": [
"_links",
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Webhook"
},
"description": "An array of webhooks"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
}
}
}
WeightedVariation
{
"type": "object",
"required": [
"variation",
"weight"
],
"properties": {
"weight": {
"type": "integer"
},
"variation": {
"type": "integer"
},
"_untracked": {
"type": "boolean"
}
}
}
WorkflowTemplateMetadata
{
"type": "object",
"properties": {
"parameters": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WorkflowTemplateParameter"
}
}
}
}
WorkflowTemplateOutput
{
"type": "object",
"required": [
"_id",
"_key",
"_creationDate",
"_ownerId",
"_maintainerId",
"_links"
],
"properties": {
"_id": {
"type": "string"
},
"_key": {
"type": "string"
},
"name": {
"type": "string"
},
"_links": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"stages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StageOutput"
}
},
"_ownerId": {
"type": "string"
},
"description": {
"type": "string"
},
"_creationDate": {
"$ref": "#/components/schemas/UnixMillis"
},
"_maintainerId": {
"type": "string"
}
}
}
WorkflowTemplateParameter
{
"type": "object",
"properties": {
"_id": {
"$ref": "#/components/schemas/ObjectId",
"description": "The ID of the condition or instruction referenced by this parameter"
},
"path": {
"type": "string",
"description": "The path of the property to parameterize, relative to its parent condition or instruction"
},
"valid": {
"type": "boolean",
"description": "Whether the default value is valid for the target flag and environment"
},
"default": {
"$ref": "#/components/schemas/ParameterDefault",
"description": "The default value of the parameter and other relevant metadata"
}
}
}
WorkflowTemplatesListingOutputRep
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WorkflowTemplateOutput"
}
}
}
}
createApprovalRequestRequest
{
"type": "object",
"required": [
"resourceId",
"description",
"instructions"
],
"properties": {
"comment": {
"type": "string",
"example": "optional comment",
"description": "Optional comment describing the approval request"
},
"resourceId": {
"type": "string",
"description": "String representation of a resource"
},
"description": {
"type": "string",
"example": "Requesting to update targeting",
"description": "A brief description of the changes you're requesting"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[{\"kind\": \"addUserTargets\", \"values\": [ \"user-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]",
"description": "List of instructions in semantic patch format to be applied to the feature flag. Review the [Update feature flag](https://apidocs.launchdarkly.com) documentation for details on available instructions."
},
"notifyTeamKeys": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-reviewer-team"
],
"description": "An array of team keys. The members of these teams are notified to review the approval request."
},
"notifyMemberIds": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"1234a56b7c89d012345e678f"
],
"description": "An array of member IDs. These members are notified to review the approval request."
},
"integrationConfig": {
"$ref": "#/components/schemas/FormVariableConfig",
"description": "Additional approval request fields for third-party integration approval systems. If you are using a third-party integration to manage approval requests, these additional fields will be described in the <code>manifest.json</code> for that integration, at https://github.com/launchdarkly/integration-framework."
}
}
}
createCopyFlagConfigApprovalRequestRequest
{
"type": "object",
"required": [
"description",
"source"
],
"properties": {
"source": {
"$ref": "#/components/schemas/sourceFlag",
"description": "The flag to copy"
},
"comment": {
"type": "string",
"example": "optional comment",
"description": "Optional comment describing the approval request"
},
"description": {
"type": "string",
"example": "copy flag settings to another environment",
"description": "A brief description of your changes"
},
"notifyTeamKeys": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-reviewer-team"
],
"description": "An array of team keys. The members of these teams are notified to review the approval request."
},
"excludedActions": {
"type": "array",
"items": {
"enum": [
"updateOn",
"updateFallthrough",
"updateOffVariation",
"updateRules",
"updateTargets",
"updatePrerequisites"
],
"type": "string"
},
"example": [
"updateOn"
],
"description": "Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either <code>includedActions</code> or <code>excludedActions</code>, but not both. If neither are included, then all flag changes will be copied."
},
"includedActions": {
"type": "array",
"items": {
"enum": [
"updateOn",
"updateFallthrough",
"updateOffVariation",
"updateRules",
"updateTargets",
"updatePrerequisites"
],
"type": "string"
},
"example": [
"updateOn"
],
"description": "Optional list of the flag changes to copy from the source environment to the target environment. You may include either <code>includedActions</code> or <code>excludedActions</code>, but not both. If neither are included, then all flag changes will be copied."
},
"notifyMemberIds": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"1234a56b7c89d012345e678f"
],
"description": "An array of member IDs. These members are notified to review the approval request."
}
}
}
createFlagConfigApprovalRequestRequest
{
"type": "object",
"required": [
"description",
"instructions"
],
"properties": {
"comment": {
"type": "string",
"example": "optional comment",
"description": "Optional comment describing the approval request"
},
"description": {
"type": "string",
"example": "Requesting to update targeting",
"description": "A brief description of the changes you're requesting"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[{\"kind\": \"addTargets\", \"values\": [ \"context-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]",
"description": "List of instructions in semantic patch format to be applied to the feature flag. Review the [Update feature flag](https://apidocs.launchdarkly.com) documentation for details on available instructions."
},
"executionDate": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1653926400000",
"description": "Timestamp for when instructions will be executed"
},
"operatingOnId": {
"type": "string",
"example": "6297ed79dee7dc14e1f9a80c",
"description": "The ID of a scheduled change. Include this if your <code>instructions</code> include editing or deleting a scheduled change."
},
"notifyTeamKeys": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-reviewer-team"
],
"description": "An array of team keys. The members of these teams are notified to review the approval request."
},
"notifyMemberIds": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"1234a56b7c89d012345e678f"
],
"description": "An array of member IDs. These members are notified to review the approval request."
},
"integrationConfig": {
"$ref": "#/components/schemas/FormVariableConfig",
"description": "Additional approval request fields for third-party integration approval systems. If you are using a third-party integration to manage approval requests, these additional fields will be described in the <code>manifest.json</code> for that integration, at https://github.com/launchdarkly/integration-framework."
}
}
}
customProperty
{
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string",
"example": "Jira issues",
"description": "The name of the custom property of this type."
},
"value": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"is-123",
"is-456"
],
"description": "An array of values for the custom property data to associate with this flag."
}
}
}
flagDefaultsRep
{
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "A unique key for the flag default"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"tag-1",
"tag-2"
],
"description": "A list of default tags for each flag"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"temporary": {
"type": "boolean",
"example": true,
"description": "Whether the flag should be temporary by default"
},
"booleanDefaults": {
"$ref": "#/components/schemas/BooleanDefaults",
"description": "Defaults for boolean flags within this project"
},
"defaultClientSideAvailability": {
"$ref": "#/components/schemas/ClientSideAvailability",
"example": "{\"usingMobileKey\": true, \"usingEnvironmentId\": false}",
"description": "Which client-side SDK types can use this flag by default. Set <code>usingMobileKey</code> to make the flag available for mobile SDKs. Set <code>usingEnvironmentId</code> to make the flag available for client-side SDKs."
}
}
}
flagLinkPost
{
"type": "object",
"properties": {
"key": {
"type": "string",
"example": "flag-link-key-123abc",
"description": "The flag link key"
},
"title": {
"type": "string",
"example": "Example link title",
"description": "The title of the flag link"
},
"deepLink": {
"type": "string",
"example": "https://example.com/archives/123123123",
"description": "The URL for the external resource you are linking the flag to"
},
"metadata": {
"type": "object",
"description": "The metadata required by this integration in order to create a flag link, if this is a flag link for an existing integration. Defined in the integration's <code>manifest.json</code> file under <code>flagLink</code>.",
"additionalProperties": {
"type": "string"
}
},
"timestamp": {
"$ref": "#/components/schemas/UnixMillis",
"description": "The time, in Unix milliseconds, to mark this flag link as associated with the external URL. If omitted, defaults to the creation time of this flag link."
},
"description": {
"type": "string",
"example": "Example link description",
"description": "The description of the flag link"
},
"integrationKey": {
"type": "string",
"description": "The integration key for an integration whose <code>manifest.json</code> includes the <code>flagLink</code> capability, if this is a flag link for an existing integration. Do not include for URL flag links."
}
}
}
flagSempatch
{
"type": "object",
"required": [
"instructions"
],
"properties": {
"comment": {
"type": "string"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"description": "Semantic patch instructions. The same ones that are valid for flags are valid here."
}
}
}
followersPerFlag
{
"type": "object",
"properties": {
"flagKey": {
"type": "string",
"example": "example-flag-key",
"description": "The flag key"
},
"followers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FollowFlagMember"
},
"description": "A list of members who are following this flag"
}
}
}
instructionUserRequest
{
"type": "object",
"required": [
"kind",
"flagKey",
"variationId"
],
"properties": {
"kind": {
"enum": [
"addExpireUserTargetDate",
"updateExpireUserTargetDate",
"removeExpireUserTargetDate"
],
"type": "string",
"example": "addExpireUserTargetDate",
"description": "The type of change to make to the removal date for this user from individual targeting for this flag."
},
"value": {
"type": "integer",
"example": 1653469200000,
"description": "The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag. Required if <code>kind</code> is <code>addExpireUserTargetDate</code> or <code>updateExpireUserTargetDate</code>."
},
"flagKey": {
"type": "string",
"example": "sample-flag-key",
"description": "The flag key"
},
"version": {
"type": "integer",
"example": 1,
"description": "The version of the expiring user target to update. Optional and only used if <code>kind</code> is <code>updateExpireUserTargetDate</code>. If included, update will fail if version doesn't match current version of the expiring user target."
},
"variationId": {
"type": "string",
"example": "ce12d345-a1b2-4fb5-a123-ab123d4d5f5d",
"description": "ID of a variation on the flag"
}
}
}
ipList
{
"type": "object",
"required": [
"addresses",
"outboundAddresses"
],
"properties": {
"addresses": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"104.156.80.0/20",
"151.101.0.0/16"
],
"description": "A list of the IP addresses LaunchDarkly's service uses"
},
"outboundAddresses": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"52.21.152.96/32"
],
"description": "A list of the IP addresses outgoing webhook notifications use"
}
}
}
membersPatchInput
{
"type": "object",
"required": [
"instructions"
],
"properties": {
"comment": {
"type": "string",
"example": "Optional comment about the update",
"description": "Optional comment describing the update"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[ { \"kind\": \"replaceMemberRoles\", \"value\": \"reader\" } ]",
"description": "The instructions to perform when updating. This should be an array with objects that look like <code>{\"kind\": \"update_action\"}</code>. Some instructions also require additional parameters as part of this object."
}
}
}
oauthClientPost
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of your new LaunchDarkly OAuth 2.0 client."
},
"description": {
"type": "string",
"description": "Description of your OAuth 2.0 client."
},
"redirectUri": {
"type": "string",
"description": "The redirect URI for your new OAuth 2.0 application. This should be an absolute URL conforming with the standard HTTPS protocol."
}
}
}
patchFlagsRequest
{
"type": "object",
"required": [
"instructions"
],
"properties": {
"comment": {
"type": "string",
"example": "optional comment",
"description": "Optional comment describing the change"
},
"instructions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Instruction"
},
"example": [
{
"kind": "addExpireUserTargetDate",
"value": 1686412800000,
"userKey": "sandy",
"variationId": "ce12d345-a1b2-4fb5-a123-ab123d4d5f5d"
}
],
"description": "The instructions to perform when updating"
}
}
}
patchSegmentExpiringTargetInputRep
{
"type": "object",
"required": [
"instructions"
],
"properties": {
"comment": {
"type": "string",
"example": "optional comment",
"description": "Optional description of changes"
},
"instructions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/patchSegmentExpiringTargetInstruction"
},
"example": [
{
"kind": "updateExpiringTarget",
"value": 1587582000000,
"version": 0,
"contextKey": "user@email.com",
"targetType": "included",
"contextKind": "user"
}
],
"description": "Semantic patch instructions for the desired changes to the resource"
}
}
}
patchSegmentExpiringTargetInstruction
{
"type": "object",
"required": [
"kind",
"contextKey",
"contextKind",
"targetType"
],
"properties": {
"kind": {
"enum": [
"addExpiringTarget",
"updateExpiringTarget",
"removeExpiringTarget"
],
"type": "string",
"example": "addExpiringTarget",
"description": "The type of change to make to the context's removal date from this segment"
},
"value": {
"type": "integer",
"example": 1653469200000,
"description": "The time, in Unix milliseconds, when the context should be removed from this segment. Required if <code>kind</code> is <code>addExpiringTarget</code> or <code>updateExpiringTarget</code>."
},
"version": {
"type": "integer",
"example": 1,
"description": "The version of the expiring target to update. Optional and only used if <code>kind</code> is <code>updateExpiringTarget</code>. If included, update will fail if version doesn't match current version of the expiring target."
},
"contextKey": {
"type": "string",
"description": "A unique key used to represent the context"
},
"targetType": {
"enum": [
"included",
"excluded"
],
"type": "string",
"description": "The segment's target type"
},
"contextKind": {
"type": "string",
"example": "user",
"description": "The kind of context"
}
}
}
patchSegmentInstruction
{
"type": "object",
"required": [
"kind",
"userKey",
"targetType"
],
"properties": {
"kind": {
"enum": [
"addExpireUserTargetDate",
"updateExpireUserTargetDate",
"removeExpireUserTargetDate"
],
"type": "string",
"example": "addExpireUserTargetDate",
"description": "The type of change to make to the user's removal date from this segment"
},
"value": {
"type": "integer",
"example": 1653469200000,
"description": "The time, in Unix milliseconds, when the user should be removed from this segment. Required if <code>kind</code> is <code>addExpireUserTargetDate</code> or <code>updateExpireUserTargetDate</code>."
},
"userKey": {
"type": "string",
"description": "A unique key used to represent the user"
},
"version": {
"type": "integer",
"example": 1,
"description": "The version of the segment to update. Required if <code>kind</code> is <code>updateExpireUserTargetDate</code>."
},
"targetType": {
"enum": [
"included",
"excluded"
],
"type": "string",
"description": "The segment's target type"
}
}
}
patchSegmentRequest
{
"type": "object",
"required": [
"instructions"
],
"properties": {
"comment": {
"type": "string",
"example": "optional comment",
"description": "Optional description of changes"
},
"instructions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/patchSegmentInstruction"
},
"example": [
{
"kind": "updateExpiringTarget",
"value": 1587582000000,
"version": 0,
"contextKey": "contextKey",
"targetType": "included",
"contextKind": "user"
}
],
"description": "Semantic patch instructions for the desired changes to the resource"
}
}
}
patchUsersRequest
{
"type": "object",
"required": [
"instructions"
],
"properties": {
"comment": {
"type": "string",
"example": "optional comment",
"description": "Optional comment describing the change"
},
"instructions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/instructionUserRequest"
},
"description": "The instructions to perform when updating"
}
}
}
permissionGrantInput
{
"type": "object",
"properties": {
"actions": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"updateTeamMembers"
],
"description": "A list of actions to allow. Specify either <code>actionSet</code> or <code>actions</code>. To learn more, read [Role actions](https://docs.launchdarkly.com/home/members/role-actions)."
},
"actionSet": {
"enum": [
"maintainTeam"
],
"type": "string",
"example": "maintainTeam",
"description": "A group of related actions to allow. Specify either <code>actionSet</code> or <code>actions</code>. Use <code>maintainTeam</code> to add team maintainers."
},
"memberIDs": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"12ab3c45de678910fgh12345"
],
"description": "A list of member IDs who receive the permission grant."
}
}
}
postApprovalRequestApplyRequest
{
"type": "object",
"properties": {
"comment": {
"type": "string",
"example": "Looks good, thanks for updating",
"description": "Optional comment about the approval request"
}
}
}
postApprovalRequestReviewRequest
{
"type": "object",
"properties": {
"kind": {
"enum": [
"approve",
"comment",
"decline"
],
"type": "string",
"example": "approve",
"description": "The type of review for this approval request"
},
"comment": {
"type": "string",
"example": "Looks good, thanks for updating",
"description": "Optional comment about the approval request"
}
}
}
putBranch
{
"type": "object",
"required": [
"name",
"head",
"syncTime"
],
"properties": {
"head": {
"type": "string",
"example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
"description": "An ID representing the branch HEAD. For example, a commit SHA."
},
"name": {
"type": "string",
"example": "main",
"description": "The branch name"
},
"syncTime": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1636558831870",
"description": "A timestamp indicating when the branch was last synced"
},
"commitTime": {
"$ref": "#/components/schemas/UnixMillis",
"example": "1636558831870",
"description": "A timestamp of the current commit"
},
"references": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReferenceRep"
},
"description": "An array of flag references found on the branch"
},
"updateSequenceId": {
"type": "integer",
"format": "int64",
"example": 25,
"description": "An optional ID used to prevent older data from overwriting newer data. If no sequence ID is included, the newly submitted data will always be saved."
}
}
}
repositoryPost
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"example": "LaunchDarkly-Docs",
"description": "The repository name"
},
"type": {
"enum": [
"bitbucket",
"custom",
"github",
"gitlab"
],
"type": "string",
"example": "github",
"description": "The type of repository. If not specified, the default value is <code>custom</code>."
},
"sourceLink": {
"type": "string",
"example": "https://github.com/launchdarkly/LaunchDarkly-Docs",
"description": "A URL to access the repository"
},
"defaultBranch": {
"type": "string",
"example": "main",
"description": "The repository's default branch. If not specified, the default value is <code>main</code>."
},
"hunkUrlTemplate": {
"type": "string",
"example": "https://github.com/launchdarkly/LaunchDarkly-Docs/blob/${sha}/${filePath}#L${lineNumber}",
"description": "A template for constructing a valid URL to view the hunk"
},
"commitUrlTemplate": {
"type": "string",
"example": "https://github.com/launchdarkly/LaunchDarkly-Docs/commit/${sha}",
"description": "A template for constructing a valid URL to view the commit"
}
}
}
sourceFlag
{
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"example": "environment-key-123abc",
"description": "The environment key for the source environment"
},
"version": {
"type": "integer",
"example": 1,
"description": "The version of the source flag from which to copy"
}
}
}
subscriptionPost
{
"type": "object",
"required": [
"name",
"config"
],
"properties": {
"on": {
"type": "boolean",
"example": false,
"description": "Whether or not you want your subscription to actively send events."
},
"url": {
"type": "string",
"description": "Slack webhook receiver URL. Only necessary for legacy Slack webhook integrations."
},
"name": {
"type": "string",
"example": "Example audit log subscription.",
"description": "A human-friendly name for your audit log subscription."
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"testing-tag"
],
"description": "An array of tags for this subscription."
},
"apiKey": {
"type": "string",
"description": "Datadog API key. Only necessary for legacy Datadog webhook integrations."
},
"config": {
"type": "object",
"example": {
"url": "https://example.com",
"optional": "an optional property",
"required": "the required property"
},
"description": "The unique set of fields required to configure an audit log subscription integration of this type. Refer to the <code>formVariables</code> field in the corresponding <code>manifest.json</code> at https://github.com/launchdarkly/integration-framework/tree/main/integrations for a full list of fields for the integration you wish to configure.",
"additionalProperties": {}
},
"statements": {
"$ref": "#/components/schemas/StatementPostList",
"description": "The set of resources you wish to subscribe to audit log notifications for."
}
}
}
teamPatchInput
{
"type": "object",
"required": [
"instructions"
],
"properties": {
"comment": {
"type": "string",
"example": "Optional comment about the update",
"description": "Optional comment describing the update"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[ { \"kind\": \"updateDescription\", \"value\": \"New description for the team\" } ]",
"description": "The instructions to perform when updating. This should be an array with objects that look like <code>{\"kind\": \"update_action\"}</code>. Some instructions also require additional parameters as part of this object."
}
}
}
teamPostInput
{
"type": "object",
"required": [
"key",
"name"
],
"properties": {
"key": {
"type": "string",
"example": "team-key-123abc",
"description": "The team key"
},
"name": {
"type": "string",
"example": "Example team",
"description": "A human-friendly name for the team"
},
"memberIDs": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"12ab3c45de678910fgh12345"
],
"description": "A list of member IDs who belong to the team"
},
"description": {
"type": "string",
"example": "An example team",
"description": "A description of the team"
},
"customRoleKeys": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"example-role1",
"example-role2"
],
"description": "List of custom role keys the team will access"
},
"permissionGrants": {
"type": "array",
"items": {
"$ref": "#/components/schemas/permissionGrantInput"
},
"description": "A list of permission grants. Permission grants allow access to a specific action, without having to create or update a custom role."
}
}
}
teamsPatchInput
{
"type": "object",
"required": [
"instructions"
],
"properties": {
"comment": {
"type": "string",
"example": "Optional comment about the update",
"description": "Optional comment describing the update"
},
"instructions": {
"$ref": "#/components/schemas/Instructions",
"example": "[ { \"kind\": \"updateDescription\", \"value\": \"New description for the team\" } ]",
"description": "The instructions to perform when updating. This should be an array with objects that look like <code>{\"kind\": \"update_action\"}</code>. Some instructions also require additional parameters as part of this object."
}
}
}
triggerPost
{
"type": "object",
"required": [
"integrationKey"
],
"properties": {
"comment": {
"type": "string",
"example": "example comment",
"description": "Optional comment describing the trigger"
},
"instructions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Instruction"
},
"example": [
{
"kind": "turnFlagOn"
}
],
"description": "The action to perform when triggering. This should be an array with a single object that looks like <code>{\"kind\": \"flag_action\"}</code>. Supported flag actions are <code>turnFlagOn</code> and <code>turnFlagOff</code>."
},
"integrationKey": {
"type": "string",
"example": "generic-trigger",
"description": "The unique identifier of the integration for your trigger. Use <code>generic-trigger</code> for integrations not explicitly supported."
}
}
}
upsertPayloadRep
{
"type": "object",
"required": [
"tags",
"temporary",
"booleanDefaults",
"defaultClientSideAvailability"
],
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"tag-1",
"tag-2"
],
"description": "A list of default tags for each flag"
},
"_links": {
"type": "object",
"description": "The location and content type of related resources",
"additionalProperties": {
"$ref": "#/components/schemas/Link"
}
},
"temporary": {
"type": "boolean",
"example": true,
"description": "Whether the flag should be temporary by default"
},
"booleanDefaults": {
"$ref": "#/components/schemas/BooleanFlagDefaults"
},
"defaultClientSideAvailability": {
"$ref": "#/components/schemas/DefaultClientSideAvailability",
"description": "Which client-side SDK types can use this flag by default."
}
}
}
webhookPost
{
"type": "object",
"required": [
"url",
"sign",
"on"
],
"properties": {
"on": {
"type": "boolean",
"example": true,
"description": "Whether or not this webhook is enabled."
},
"url": {
"type": "string",
"example": "http://www.example.com",
"description": "The URL of the remote webhook"
},
"name": {
"type": "string",
"example": "Example hook",
"description": "A human-readable name for your webhook"
},
"sign": {
"type": "boolean",
"example": true,
"description": "If sign is false, the webhook does not include a signature header, and the secret can be omitted."
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [],
"description": "List of tags for this webhook"
},
"secret": {
"type": "string",
"example": "frobozz",
"description": "If sign is true, and the secret attribute is omitted, LaunchDarkly automatically generates a secret for you."
},
"statements": {
"$ref": "#/components/schemas/StatementPostList",
"description": "Represents a Custom role policy, defining a resource kinds filter the webhook should respond to."
}
}
}