diff --git a/cmd/resources/resource_cmds.go b/cmd/resources/resource_cmds.go index db435aed..a5017e0f 100644 --- a/cmd/resources/resource_cmds.go +++ b/cmd/resources/resource_cmds.go @@ -46,12 +46,20 @@ func AddAllResourceCmds( "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe account usage API lets you query for metrics about how your account is using LaunchDarkly. To learn more, read [Account usage metrics](https://docs.launchdarkly.com/home/account/metrics).\n\nEach endpoint returns time-series data in the form of an array of data points with timestamps. Each one contains data for that time from one or more series. It also includes a metadata array describing what each of the series is.\n", ) + gen_AiConfigsBetaResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "ai-configs-beta", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\nThe AI configs API allows you to create, retrieve, and edit AI configs, AI config variations, and AI model configurations.\n\nAn AI config is a resource in LaunchDarkly that you can use to customize, test, and roll out new large language models (LLMs) within your generative AI applications. Within each AI config, you define one or more AI config variations, each of which includes a model configuration and one or more messages. The model configuration can be a standard one from the list provided by LaunchDarkly, or you can define your own custom AI model configuration.\n\nTo learn more, read [AI configs](https://docs.launchdarkly.com/home/ai-configs).\n", + ) + gen_ApplicationsBetaResourceCmd := NewResourceCmd( rootCmd, analyticsTrackerFn, markdownRenderer, "applications-beta", - "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe applications API lets you create, update, delete, and search for applications and application versions.\n\nEach application includes information about the app you're creating, and a set of versions of the app that you've released. You can use applications to target particular application versions in your feature flags more easily, and to handle unsupported application versions more gracefully.\n\nIn addition to creating applications through the applications API, you can also create applications in the LaunchDarkly user interface. To learn more, read [Applications and application versions](https://docs.launchdarkly.com/home/releases/applications). LaunchDarkly also creates applications and application versions automatically when a LaunchDarkly SDK evaluates a feature flag for a context that includes application information. To learn more, read [Automatic environment attributes](https://docs.launchdarkly.com/sdk/features/environment-attributes).\n\nYou can use an application in any project in your LaunchDarkly account.\n\n### Filtering applications and application versions\n\nThe `filter` parameter supports the following operators: `equals`, `notEquals`, `anyOf`, `startsWith`.\n\nYou can also combine filters in the following ways:\n\n- Use a comma (`,`) as an AND operator\n- Use a vertical bar (`|`) as an OR operator\n- Use parentheses (`()`) to group filters\n\n#### Supported fields and operators\n\nYou can only filter certain fields in applications when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for applications, the `filter` parameter supports the following fields and operators:\n\n|\u003cdiv style=\"width:120px\"\u003eField\u003c/div\u003e |Description |Supported operators |\n|---|---|---|\n|`key` | The application or application version key, a unique identifier |`equals`, `notEquals`, `anyOf` |\n|`name` | The application name or application version name |`equals`, `notEquals`, `anyOf`, `startsWith` |\n|`autoAdded` | Whether the application or application version 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 |`equals`, `notEquals` |\n|`kind` | The application kind, one of `mobile`, `server`, `browser`. Only available for [Get applications](/tag/Applications-(beta)#operation/getApplications). |`equals`, `notEquals`, `anyOf` |\n|`supported` | Whether a mobile application version is supported or unsupported. Only available for [Get application versions by application key](/tag/Applications-(beta)#operation/getApplicationVersions).|`equals`, `notEquals` |\n\nFor example, the filter `?filter=kind anyOf ['mobile', 'server']` matches applications whose `kind` is either `mobile` or `server`. The filter is not case-sensitive.\n\nThe documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=kind anyOf ['mobile', 'server']` must be encoded to `%5B`.\n\n### Sorting applications and application versions\n\nLaunchDarkly supports the following fields for sorting:\n- `name` sorts by application name.\n- `creationDate` sorts by the creation date of the application.\n\nBy default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by application name in ascending order, and `?sort=-name` sorts in descending order.\n", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe applications API lets you create, update, delete, and search for applications and application versions.\n\nEach application includes information about the app you're creating, and a set of versions of the app that you've released. You can use applications to target particular application versions in your feature flags more easily, and to handle unsupported application versions more gracefully.\n\nIn addition to creating applications through the applications API, you can also create applications in the LaunchDarkly user interface. To learn more, read [Applications and application versions](https://docs.launchdarkly.com/home/releases/applications). LaunchDarkly also creates applications and application versions automatically when a LaunchDarkly SDK evaluates a feature flag for a context that includes application information. To learn more, read [Automatic environment attributes](https://docs.launchdarkly.com/sdk/features/environment-attributes).\n\nYou can use an application in any project in your LaunchDarkly account.\n\n### Filtering applications and application versions\n\nThe `filter` parameter supports the following operators: `equals`, `notEquals`, `anyOf`, `startsWith`.\n\nYou can also combine filters in the following ways:\n\n- Use a comma (`,`) as an AND operator\n- Use a vertical bar (`|`) as an OR operator\n- Use parentheses (`()`) to group filters\n\n#### Supported fields and operators\n\nYou can only filter certain fields in applications when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for applications, the `filter` parameter supports the following fields and operators:\n\n|\u003cdiv style=\"width:120px\"\u003eField\u003c/div\u003e |Description |Supported operators |\n|---|---|---|\n|`key` | The application or application version key, a unique identifier |`equals`, `notEquals`, `anyOf` |\n|`name` | The application name or application version name |`equals`, `notEquals`, `anyOf`, `startsWith` |\n|`autoAdded` | Whether the application or application version 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 |`equals`, `notEquals` |\n|`kind` | The application kind, one of `mobile`, `server`, `browser`. Only available for [Get applications](/tag/Applications-(beta)#operation/getApplications). |`equals`, `notEquals`, `anyOf` |\n|`supported` | Whether a mobile application version is supported or unsupported. Only available for [Get application versions by application key](/tag/Applications-(beta)#operation/getApplicationVersions).|`equals`, `notEquals` |\n\nFor example, the filter `?filter=kind anyOf [\"mobile\", \"server\"]` matches applications whose `kind` is either `mobile` or `server`. The filter is not case-sensitive.\n\nThe documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=kind anyOf [\"mobile\", \"server\"]` must be encoded to `%5B`.\n\n### Sorting applications and application versions\n\nLaunchDarkly supports the following fields for sorting:\n- `name` sorts by application name.\n- `creationDate` sorts by the creation date of the application.\n\nBy default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by application name in ascending order, and `?sort=-name` sorts in descending order.\n", ) gen_ApprovalRequestsResourceCmd := NewResourceCmd( @@ -62,12 +70,20 @@ func AddAllResourceCmds( "You can create an approval request that prevents a flag change from being applied without approval from a team member. Select up to ten members as reviewers. Reviewers receive an email notification, but anyone with sufficient permissions can review a pending approval request. A change needs at least one approval before you can apply it. To learn more, read [Approvals](https://docs.launchdarkly.com/home/releases/approvals).\n\nChanges that conflict will fail if approved and applied, and the flag will not be updated.\n\nSeveral of the endpoints in the approvals API require a flag approval request ID. The flag approval request ID is returned as part of the [Create approval request](/tag/Approvals#operation/postApprovalRequest) and [List approval requests for a flag](/tag/Approvals#operation/getApprovalsForFlag) responses. It is the `_id` field, or the `_id` field of each element in the `items` array. If you created the approval request as part of a [workflow](/tag/Workflows), you can also use a workflow ID as the approval request ID. The workflow ID is returned as part of the [Create workflow](/tag/Workflows#operation/postWorkflow) and [Get workflows](/tag/Workflows#operation/getWorkflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n", ) + gen_ApprovalsBetaResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "approvals-beta", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n", + ) + gen_AuditLogResourceCmd := NewResourceCmd( rootCmd, analyticsTrackerFn, markdownRenderer, "audit-log", - "The audit log contains a record of all the changes made to any resource in the system. You can filter the audit log by timestamps, or use a custom policy to select which entries to receive.\n\nSeveral of the endpoints in the audit log API require an audit log entry ID. The audit log entry ID is returned as part of the [List audit log entries](/tag/Audit-log#operation/getAuditLogEntries) response. It is the `_id` field of each element in the `items` array.\n\nTo learn more, read [The audit log and history tabs](https://docs.launchdarkly.com/home/observability/audit-log-history).\n", + "LaunchDarkly maintains a record of all the changes made to any resource in the system. You can access this history using the audit log API, including filtering by timestamps, or using a custom policy to select which entries to receive.\n\nSeveral of the endpoints in the audit log API require an audit log entry ID. The audit log entry ID is returned as part of the [List audit log entries](/tag/Audit-log#operation/getAuditLogEntries) response. It is the `_id` field of each element in the `items` array.\n\nIn the LaunchDarkly UI, this information appears on the **Change history** page. To learn more, read [Change history](https://docs.launchdarkly.com/home/observability/change-history).\n", ) gen_CodeRefsResourceCmd := NewResourceCmd( @@ -91,7 +107,7 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "contexts", - "\nContexts are people, services, machines, or other resources that encounter feature flags in your product. Contexts are identified by their `kind`, which describes the type of resources encountering flags, and by their `key`. Each unique combination of one or more contexts that have encountered a feature flag in your product is called a context instance.\n\nWhen you use the LaunchDarkly SDK to evaluate a flag, you provide a context to that call. LaunchDarkly records the key and attributes of each context instance. You can view these in the LaunchDarkly user interface from the **Contexts** list, or use the Context APIs. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nLaunchDarkly provides APIs for you to:\n\n* retrieve contexts, context instances, and context attribute names and values\n* search for contexts or context instances\n* delete context instances\n* fetch context kinds\n* create and update context kinds\n\nTo learn more about context kinds, read [Context kinds](https://docs.launchdarkly.com/home/observability/context-kinds).\n\nContexts are always scoped within a project and an environment. Each environment has its own set of context instance records.\n\nSeveral of the endpoints in the contexts API require a context instance ID or application ID. Both of these IDs are returned as part of the [Search for context instances](/tag/Contexts#operation/searchContextInstances) response. The context instance ID is the `id` field of each element in the `items` array. The application ID is the `applicationId` field of each element in the `items` array. By default, the application ID is set to the SDK you are using. In the LaunchDarkly UI, the application ID and application version appear on the context details page in the \"From source\" field. You can change the application ID as part of your SDK configuration. To learn more, read [Application metadata configuration](https://docs.launchdarkly.com/sdk/features/app-config).\n\n### Filtering contexts and context instances\n\nWhen you [search for contexts](/tag/Contexts#operation/searchContexts) or [context instances](/tag/Contexts#operation/searchContextInstances), you can filter on certain fields using the `filter` parameter either as a query parameter or as a request body parameter.\n\nThe `filter` parameter supports the following operators: `after`, `anyOf`, `before`, `contains`, `equals`, `exists`, `notEquals`, `startsWith`.\n\n\u003cdetails\u003e\n\u003csummary\u003eExpand for details on operators and syntax\u003c/summary\u003e\n\n#### after\n\nReturns contexts or context instances if any of the values in a field, which should be dates, are after the provided time. For example:\n\n* `myField after \"2022-09-21T19:03:15+00:00\"`\n\n#### anyOf\n\nReturns contexts or context instances if any of the values in a field match any of the values in the match value. For example:\n\n* `myField anyOf [44]`\n* `myField anyOf [\"phone\",\"tablet\"]`\n* `myField anyOf [true]\"`\n\n#### before\n\nReturns contexts or context instances if any of the values in a field, which should be dates, are before the provided time. For example:\n\n* `myField before \"2022-09-21T19:03:15+00:00\"`\n\n#### contains\n\nReturns contexts or context instances if all the match values are found in the list of values in this field. For example:\n\n* `myListField contains 44`\n* `myListField contains [\"phone\",\"tablet\"]`\n* `myListField contains true`\n\n#### equals\n\nReturns contexts or context instances if there is an exact match on the entire field. For example:\n\n* `myField equals 44`\n* `myField equals \"device\"`\n* `myField equals true`\n* `myField equals [1,2,3,4]`\n* `myField equals [\"hello\",\"goodbye\"]`\n\n#### exists\n\nReturns contexts or context instances if the field matches the specified existence. For example:\n\n* `myField exists true`\n* `myField exists false`\n* `*.name exists true`\n\n#### notEquals\n\nReturns contexts or context instances if there is not an exact match on the entire field. For example:\n\n* `myField notEquals 44`\n* `myField notEquals \"device\"`\n* `myField notEquals true`\n* `myField notEquals [1,2,3,4]`\n* `myField notEquals [\"hello\",\"goodbye\"]`\n\n#### startsWith\n\nReturns contexts or context instances if the value in a field, which should be a singular string, begins with the provided substring. For example:\n\n* `myField startsWith \"do\"`\n\n\u003c/details\u003e\n\nYou can also combine filters in the following ways:\n\n* Use a comma (`,`) as an AND operator\n* Use a vertical bar (`|`) as an OR operator\n* Use parentheses `()` to group filters\n\nFor example:\n\n* `myField notEquals 0, myField notEquals 1` returns contexts or context instances where `myField` is not 0 and is not 1\n* `myFirstField equals \"device\",(mySecondField equals \"iPhone\"|mySecondField equals \"iPad\")` returns contexts or context instances where `myFirstField` is equal to \"device\" and `mySecondField` is equal to either \"iPhone\" or \"iPad\"\n\n#### Supported fields and operators\n\nYou can only filter certain fields in contexts and context instances when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for [contexts]((/tag/Contexts#operation/searchContexts)), the `filter` parameter supports the following fields and operators:\n\n|\u003cdiv style=\"width:120px\"\u003eField\u003c/div\u003e |Description |Supported operators |\n|---|---|---|\n|`applicationId` |An identifier representing the application where the LaunchDarkly SDK is running. |`equals`, `notEquals`, `anyOf` |\n|`id` |Unique identifier for the context. |`equals`, `notEquals`, `anyOf` |\n|`key` |The context key. |`equals`, `notEquals`, `anyOf`, `startsWith` |\n|`kind` |The context kind. |`equals`, `notEquals`, `anyOf` |\n|`kinds` |A list of all kinds found in the context. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n|`kindKey` |The kind and key for the context. They are joined with `:`, for example, `user:user-key-abc123`. |`equals`, `notEquals`, `anyOf` |\n|`kindKeys` |A list of all kinds and keys found in the context. The kind and key are joined with `:`, for example, `user:user-key-abc123`. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n|`q` |A \"fuzzy\" search across context attribute values and the context key. Supply a string or list of strings to the operator. |`equals` |\n|`name` |The name for the context. |`equals`, `notEquals`, `exists`, `anyOf`, `startsWith` |\n|`\u003ca kind\u003e.\u003can attribute name\u003e` |A kind and the name of any attribute that appears in a context of that kind, for example, `user.email`. To filter all kinds, use `*` in place of the kind, for example, `*.email`. You can use either a literal attribute name or a JSON path to specify the attribute. If you use a JSON path, then you must escape the `/` character, using `~1`, and the `~` character, using `~0`. For example, use `user.job/title` or `user./job~1title` to filter the `/job/title` field in a user context kind. If the field or value includes whitespace, it should be enclosed in double quotes. |`equals`, `notEquals`, `exists`, `startsWith`, `before`, `after`.|\n\nWhen searching for [context instances](/tag/Contexts#operation/searchContextInstances), the `filter` parameter supports the following fields and operators\n\n|\u003cdiv style=\"width:120px\"\u003eField\u003c/div\u003e |Description |Supported operators |\n|---|---|---|\n|`applicationId` |An identifier representing the application where the LaunchDarkly SDK is running. |`equals`, `notEquals`, `anyOf` |\n|`id` |Unique identifier for the context instance. |`equals`, `notEquals`, `anyOf` |\n|`kinds` |A list of all kinds found in the context instance. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n|`kindKeys` |A list of all kinds and keys found in the context instance. The kind and key are joined with `:`, for example, `user:user-key-abc123`. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n", + "\nContexts are people, services, machines, or other resources that encounter feature flags in your product. Contexts are identified by their `kind`, which describes the type of resources encountering flags, and by their `key`. Each unique combination of one or more contexts that have encountered a feature flag in your product is called a context instance.\n\nWhen you use the LaunchDarkly SDK to evaluate a flag, you provide a context to that call. LaunchDarkly records the key and attributes of each context instance. You can view these in the LaunchDarkly user interface from the **Contexts** list, or use the Context APIs. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nLaunchDarkly provides APIs for you to:\n\n* retrieve contexts, context instances, and context attribute names and values\n* search for contexts or context instances\n* delete context instances\n* fetch context kinds\n* create and update context kinds\n\nTo learn more about context kinds, read [Context kinds](https://docs.launchdarkly.com/home/observability/context-kinds).\n\nContexts are always scoped within a project and an environment. Each environment has its own set of context instance records.\n\nSeveral of the endpoints in the contexts API require a context instance ID or application ID. Both of these IDs are returned as part of the [Search for context instances](/tag/Contexts#operation/searchContextInstances) response. The context instance ID is the `id` field of each element in the `items` array. The application ID is the `applicationId` field of each element in the `items` array. By default, the application ID is set to the SDK you are using. In the LaunchDarkly UI, the application ID and application version appear on the context details page in the \"From source\" field. You can change the application ID as part of your SDK configuration. To learn more, read [Application metadata configuration](https://docs.launchdarkly.com/sdk/features/app-config).\n\n### Filtering contexts and context instances\n\nWhen you [search for contexts](/tag/Contexts#operation/searchContexts) or [context instances](/tag/Contexts#operation/searchContextInstances), you can filter on certain fields using the `filter` parameter either as a query parameter or as a request body parameter.\n\nThe `filter` parameter supports the following operators: `after`, `anyOf`, `before`, `contains`, `equals`, `exists`, `notEquals`, `startsWith`.\n\n\u003cdetails\u003e\n\u003csummary\u003eExpand for details on operators and syntax\u003c/summary\u003e\n\n#### after\n\nReturns contexts or context instances if any of the values in a field, which should be dates, are after the provided time. For example:\n\n* `myField after \"2022-09-21T19:03:15+00:00\"`\n\n#### anyOf\n\nReturns contexts or context instances if any of the values in a field match any of the values in the match value. For example:\n\n* `myField anyOf [44]`\n* `myField anyOf [\"phone\",\"tablet\"]`\n* `myField anyOf [true]\"`\n\n#### before\n\nReturns contexts or context instances if any of the values in a field, which should be dates, are before the provided time. For example:\n\n* `myField before \"2022-09-21T19:03:15+00:00\"`\n\n#### contains\n\nReturns contexts or context instances if all the match values are found in the list of values in this field. For example:\n\n* `myListField contains 44`\n* `myListField contains [\"phone\",\"tablet\"]`\n* `myListField contains true`\n\n#### equals\n\nReturns contexts or context instances if there is an exact match on the entire field. For example:\n\n* `myField equals 44`\n* `myField equals \"device\"`\n* `myField equals true`\n* `myField equals [1,2,3,4]`\n* `myField equals [\"hello\",\"goodbye\"]`\n\n#### exists\n\nReturns contexts or context instances if the field matches the specified existence. For example:\n\n* `myField exists true`\n* `myField exists false`\n* `*.name exists true`\n\n#### notEquals\n\nReturns contexts or context instances if there is not an exact match on the entire field. For example:\n\n* `myField notEquals 44`\n* `myField notEquals \"device\"`\n* `myField notEquals true`\n* `myField notEquals [1,2,3,4]`\n* `myField notEquals [\"hello\",\"goodbye\"]`\n\n#### startsWith\n\nReturns contexts or context instances if the value in a field, which should be a singular string, begins with the provided substring. For example:\n\n* `myField startsWith \"do\"`\n\n\u003c/details\u003e\n\nYou can also combine filters in the following ways:\n\n* Use a comma (`,`) as an AND operator\n* Use a vertical bar (`|`) as an OR operator\n* Use parentheses `()` to group filters\n\nFor example:\n\n* `myField notEquals 0, myField notEquals 1` returns contexts or context instances where `myField` is not 0 and is not 1\n* `myFirstField equals \"device\",(mySecondField equals \"iPhone\"|mySecondField equals \"iPad\")` returns contexts or context instances where `myFirstField` is equal to \"device\" and `mySecondField` is equal to either \"iPhone\" or \"iPad\"\n\n#### Supported fields and operators\n\nYou can only filter certain fields in contexts and context instances when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for [contexts](/tag/Contexts#operation/searchContexts), the `filter` parameter supports the following fields and operators:\n\n|\u003cdiv style=\"width:120px\"\u003eField\u003c/div\u003e |Description |Supported operators |\n|---|---|---|\n|`applicationId` |An identifier representing the application where the LaunchDarkly SDK is running. |`equals`, `notEquals`, `anyOf` |\n|`id` |Unique identifier for the context. |`equals`, `notEquals`, `anyOf` |\n|`key` |The context key. |`equals`, `notEquals`, `anyOf`, `startsWith` |\n|`kind` |The context kind. |`equals`, `notEquals`, `anyOf` |\n|`kinds` |A list of all kinds found in the context. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n|`kindKey` |The kind and key for the context. They are joined with `:`, for example, `user:user-key-abc123`. |`equals`, `notEquals`, `anyOf` |\n|`kindKeys` |A list of all kinds and keys found in the context. The kind and key are joined with `:`, for example, `user:user-key-abc123`. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n|`q` |A \"fuzzy\" search across context attribute values and the context key. Supply a string or list of strings to the operator. |`equals` |\n|`name` |The name for the context. |`equals`, `notEquals`, `exists`, `anyOf`, `startsWith` |\n|`\u003ca kind\u003e.\u003can attribute name\u003e` |A kind and the name of any attribute that appears in a context of that kind, for example, `user.email`. To filter all kinds, use `*` in place of the kind, for example, `*.email`. You can use either a literal attribute name or a JSON path to specify the attribute. If you use a JSON path, then you must escape the `/` character, using `~1`, and the `~` character, using `~0`. For example, use `user.job/title` or `user./job~1title` to filter the `/job/title` field in a user context kind. If the field or value includes whitespace, it should be enclosed in double quotes. |`equals`, `notEquals`, `exists`, `startsWith`, `before`, `after`.|\n\nWhen searching for [context instances](/tag/Contexts#operation/searchContextInstances), the `filter` parameter supports the following fields and operators\n\n|\u003cdiv style=\"width:120px\"\u003eField\u003c/div\u003e |Description |Supported operators |\n|---|---|---|\n|`applicationId` |An identifier representing the application where the LaunchDarkly SDK is running. |`equals`, `notEquals`, `anyOf` |\n|`id` |Unique identifier for the context instance. |`equals`, `notEquals`, `anyOf` |\n|`kinds` |A list of all kinds found in the context instance. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n|`kindKeys` |A list of all kinds and keys found in the context instance. The kind and key are joined with `:`, for example, `user:user-key-abc123`. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n", ) gen_CustomRolesResourceCmd := NewResourceCmd( @@ -107,7 +123,7 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "data-export-destinations", - "\u003e ### Data Export is an add-on feature\n\u003e\n\u003e Data Export is available as an add-on for 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/).\n\nData Export provides a real-time export of raw analytics data, including feature flag requests, analytics events, custom events, and more.\n\nData Export destinations are locations that receive exported data. The Data Export destinations API allows you to configure destinations so that your data can be exported.\n\nSeveral of the endpoints in the Data Export destinations API require a Data Export destination ID. The Data Export destination ID is returned as part of the [Create a Data Export destination](/tag/Data-Export-destinations#operation/postDestination) and [List destinations](/tag/Data-Export-destinations#operation/getDestinations) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n\nTo learn more, read [Data Export](https://docs.launchdarkly.com/integrations/data-export).\n", + "\u003e ### Data Export is an add-on feature\n\u003e\n\u003e Data Export is available as an add-on for customers on a Foundation or Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nData Export provides a real-time export of raw analytics data, including feature flag requests, analytics events, custom events, and more.\n\nData Export destinations are locations that receive exported data. The Data Export destinations API allows you to configure destinations so that your data can be exported.\n\nSeveral of the endpoints in the Data Export destinations API require a Data Export destination ID. The Data Export destination ID is returned as part of the [Create a Data Export destination](/tag/Data-Export-destinations#operation/postDestination) and [List destinations](/tag/Data-Export-destinations#operation/getDestinations) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n\nTo learn more, read [Data Export](https://docs.launchdarkly.com/integrations/data-export).\n", ) gen_EnvironmentsResourceCmd := NewResourceCmd( @@ -115,15 +131,23 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "environments", - "Environments allow you to maintain separate rollout rules in different contexts, from local development to QA, staging, and production. With the LaunchDarkly Environments API, you can programmatically create, delete, and update environments. To learn more, read [Environments](https://docs.launchdarkly.com/home/account/environment).\n", + "Environments allow you to maintain separate rollout rules in different contexts, from local development to QA, staging, and production. With the LaunchDarkly Environments API, you can programmatically list, create, and manage environments. To learn more, read [Environments](https://docs.launchdarkly.com/home/account/environment).\n", + ) + + gen_ExperimentsResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "experiments", + "\u003e ### Available for subscription customers\n\u003e\n\u003e Experimentation is available to all customers on a Developer, Foundation, or Enterprise subscription. If you're on an older Pro or Enterprise plan, Experimentation is available as an add-on. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To change your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\n\n\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nExperimentation lets you validate the impact of features you roll out to your app or infrastructure. You can measure things like page views, clicks, load time, infrastructure costs, and more. By connecting metrics you create to flags in your LaunchDarkly environment, you can measure the changes in your customers' behavior based on what flags they evaluate. You can run experiments with any type of flag, including boolean, string, number, and JSON flags. To learn more, read [Experimentation](https://docs.launchdarkly.com/home/experimentation).\n\nYou can manage experiments by using the dedicated experiment endpoints described below.\n\nSeveral of the endpoints require a treatment ID or a flag rule ID. Treatment IDs are returned as part of the [Get experiment results](/tag/Experiments-(beta)#operation/getExperimentResults) response. They are the `treatmentId` of each element in the `treatmentResults` array. Winning treatment IDs are also returned as part of the [Get experiment](/tag/Experiments-(beta)#operation/getExperiment) response. They are the `winningTreatmentId` in the `currentIteration`, the `winningTreatmentId` in the `draftIteration`, and the `winningTreatmentId` in each element of the `previousIterations` array. In the flags object, the rule ID is the ID of the variation or rollout of the flag. Each flag variation ID is returned as part of the [Get feature flag](/tag/Experiments-(beta)#operation/getFeatureFlag) response. It is the `_id` field in each element of the `variations` array.\n", ) - gen_ExperimentsBetaResourceCmd := NewResourceCmd( + gen_FlagImportConfigurationsBetaResourceCmd := NewResourceCmd( rootCmd, analyticsTrackerFn, markdownRenderer, - "experiments-beta", - "\u003e ### Available for Pro and Enterprise plans\n\u003e\n\u003e Experimentation is available to customers on a Pro or Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To add Experimentation to your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\n\n\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nExperimentation lets you validate the impact of features you roll out to your app or infrastructure. You can measure things like page views, clicks, load time, infrastructure costs, and more. By connecting metrics you create to flags in your LaunchDarkly environment, you can measure the changes in your customers' behavior based on what flags they evaluate. You can run experiments with any type of flag, including boolean, string, number, and JSON flags. To learn more, read [Experimentation](https://docs.launchdarkly.com/home/experimentation).\n\nYou can manage experiments by using the dedicated experiment endpoints described below.\n\nSeveral of the endpoints require a treatment ID or a flag rule ID. Treatment IDs are returned as part of the [Get experiment results](/tag/Experiments-(beta)#operation/getExperimentResults) response. They are the `treatmentId` of each element in the `treatmentResults` array. Winning treatment IDs are also returned as part of the [Get experiment](/tag/Experiments-(beta)#operation/getExperiment) response. They are the `winningTreatmentId` in the `currentIteration`, the `winningTreatmentId` in the `draftIteration`, and the `winningTreatmentId` in each element of the `previousIterations` array. In the flags object, the rule ID is the ID of the variation or rollout of the flag. Each flag variation ID is returned as part of the [Get feature flag](/tag/Experiments-(beta)#operation/getFeatureFlag) response. It is the `_id` field in each element of the `variations` array.\n", + "flag-import-configurations-beta", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nFlag import configurations allow you to import feature flags from another feature management system.\n\nUse the flag import configuration endpoints to create, delete, and manage flag import configurations. You can import flags from other feature management tools into LaunchDarkly. For example, you can import flags from Split.io.\n\nSeveral of the endpoints in the flag import configuration API require an integration ID. The integration ID is returned as part of the [Create a flag import configuration](/tag/Flag-import-configurations-(beta)#operation/createFlagImportConfiguration) response, in the `_id` field. It is also returned as part of the [List all flag import configurations](/tag/Flag-import-configurations-(beta)#operation/getFlagImportConfigurations) response, in the `_id` field of each element in the `items` array.\n\nTo learn more about flag import configurations, read [Import flags](https://docs.launchdarkly.com/home/flags/import).\n", ) gen_FlagLinksBetaResourceCmd := NewResourceCmd( @@ -147,7 +171,7 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "flags", - "The feature flags API allows you to list, create, modify, and delete feature flags, their statuses, and their expiring targets programmatically. For example, you can control percentage rollouts, target specific contexts, or even toggle off a feature flag programmatically.\n\n## Sample feature flag representation\n\nEvery feature flag has a set of top-level attributes, as well as an `environments` map containing the flag rollout and targeting rules specific to each environment. To learn more, read [Using feature flags](https://docs.launchdarkly.com/home/flags/create).\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand an example of a \u003cstrong\u003ecomplete feature flag representation\u003c/strong\u003e\u003c/summary\u003e\n\n```json\n{\n \"name\": \"Alternate product page\",\n \"kind\": \"boolean\",\n \"description\": \"This is a description\",\n \"key\": \"alternate.page\",\n \"_version\": 2,\n \"creationDate\": 1418684722483,\n \"includeInSnippet\": true,\n \"clientSideAvailability\" {\n \"usingMobileKey\": false,\n \"usingEnvironmentId\": true,\n },\n \"variations\": [\n {\n \"value\": true,\n \"name\": \"true\",\n \"_id\": \"86208e6e-468f-4425-b334-7f318397f95c\"\n },\n {\n \"value\": false,\n \"name\": \"false\",\n \"_id\": \"7b32de80-f346-4276-bb77-28dfa7ddc2d8\"\n }\n ],\n \"variationJsonSchema\": null,\n \"defaults\": {\n \"onVariation\": 0,\n \"offVariation\": 1\n },\n \"temporary\": false,\n \"tags\": [\"ops\", \"experiments\"],\n \"_links\": {\n \"parent\": {\n \"href\": \"/api/v2/flags/default\",\n \"type\": \"application/json\"\n },\n \"self\": {\n \"href\": \"/api/v2/flags/default/alternate.page\",\n \"type\": \"application/json\"\n }\n },\n \"maintainerId\": \"548f6741c1efad40031b18ae\",\n \"_maintainer\": {\n \"_links\": {\n \"self\": {\n \"href\": \"/api/v2/members/548f6741c1efad40031b18ae\",\n \"type\": \"application/json\"\n }\n },\n \"_id\": \"548f6741c1efad40031b18ae\",\n \"firstName\": \"Ariel\",\n \"lastName\": \"Flores\",\n \"role\": \"reader\",\n \"email\": \"ariel@acme.com\"\n },\n \"goalIds\": [],\n \"experiments\": {\n \"baselineIdx\": 0,\n \"items\": []\n },\n \"environments\": {\n \"production\": {\n \"on\": true,\n \"archived\": false,\n \"salt\": \"YWx0ZXJuYXRlLnBhZ2U=\",\n \"sel\": \"45501b9314dc4641841af774cb038b96\",\n \"lastModified\": 1469326565348,\n \"version\": 61,\n \"targets\": [{\n \"values\": [\"user-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"user\"\n }],\n \"contextTargets\": [{\n \"values\": [],\n \"variation\": 0,\n \"contextKind\": \"user\"\n }, {\n \"values\": [\"org-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"organization\"\n }],\n \"rules\": [\n {\n \"_id\": \"f3ea72d0-e473-4e8b-b942-565b790ffe18\",\n \"variation\": 0,\n \"clauses\": [\n {\n \"_id\": \"6b81968e-3744-4416-9d64-74547eb0a7d1\",\n \"attribute\": \"groups\",\n \"op\": \"in\",\n \"values\": [\"Top Customers\"],\n \"contextKind\": \"user\",\n \"negate\": false\n },\n {\n \"_id\": \"9d60165d-82b8-4b9a-9136-f23407ba1718\",\n \"attribute\": \"email\",\n \"op\": \"endsWith\",\n \"values\": [\"gmail.com\"],\n \"contextKind\": \"user\",\n \"negate\": false\n }\n ],\n \"trackEvents\": false,\n \"ref\": \"73257308-472b-4d9c-a556-10aa7adbf857\"\n }\n ],\n \"fallthrough\": {\n \"rollout\": {\n \"variations\": [\n {\n \"variation\": 0,\n \"weight\": 60000\n },\n {\n \"variation\": 1,\n \"weight\": 40000\n }\n ],\n \"contextKind\": \"user\"\n }\n },\n \"offVariation\": 1,\n \"prerequisites\": [],\n \"_site\": {\n \"href\": \"/default/production/features/alternate.page\",\n \"type\": \"text/html\"\n },\n \"_environmentName\": \"Production\",\n \"trackEvents\": false,\n \"trackEventsFallthrough\": false,\n \"_summary\": {\n \"variations\": {\n \"0\": {\n \"rules\": 1,\n \"nullRules\": 0,\n \"targets\": 2,\n \"rollout\": 60000\n },\n \"1\": {\n \"rules\": 0,\n \"nullRules\": 0,\n \"targets\": 0,\n \"isOff\": true,\n \"rollout\": 40000\n }\n },\n \"prerequisites\": 0\n }\n }\n}\n```\n\n\u003c/details\u003e\n\n## Anatomy of a feature flag\n\nThis section describes the sample feature flag representation in more detail.\n\n### Top-level attributes\n\nMost of the top-level attributes have a straightforward interpretation, for example `name` and `description`.\n\nThe `variations` array represents the different variation values that a feature flag has. For a boolean flag, there are two variations: `true` and `false`. Multivariate flags have more variation values, and those values could be any JSON type: numbers, strings, objects, or arrays. In targeting rules, the variations are referred to by their index into this array.\n\nTo update these attributes, read [Update feature flag](#operation/patchFeatureFlag), especially the instructions for **updating flag settings**.\n\n### Per-environment configurations\n\nEach entry in the `environments` map contains a JSON object that represents the environment-specific flag configuration data available in the flag's Targeting tab. To learn more, read [Targeting with flags](https://docs.launchdarkly.com/home/flags/target).\n\nTo update per-environment information for a flag, read [Update feature flag](#operation/patchFeatureFlag), especially the instructions for **turning flags on and off** and **working with targeting and variations**.\n\n### Individual context targets\n\nThe `targets` and `contextTargets` arrays in the per-environment configuration data correspond to the individual context targeting on the Targeting tab. To learn more, read [Individual targeting](https://docs.launchdarkly.com/home/flags/individual-targeting).\n\nEach object in the `targets` and `contextTargets` arrays represents a list of context keys assigned to a particular variation. The `targets` array includes contexts with `contextKind` of \"user\" and the `contextTargets` array includes contexts with context kinds other than \"user.\"\n\nFor example:\n\n```json\n{\n ...\n \"environments\" : {\n \"production\" : {\n ...\n \"targets\": [\n {\n \"values\": [\"user-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"user\"\n }\n ],\n \"contextTargets\": [\n {\n \"values\": [\"org-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"organization\"\n }\n ]\n }\n }\n}\n```\n\nThe `targets` array means that any user context instance with the key `user-key-123abc` receives the first variation listed in the `variations` array. The `contextTargets` array means that any organization context with the key `org-key-123abc` receives the first variation listed in the `variations` array. Recall that the variations are stored at the top level of the flag JSON in an array, and the per-environment configuration rules point to indexes into this array. If this is a boolean flag, both contexts are receiving the `true` variation.\n\n### Targeting rules\n\nThe `rules` array corresponds to the rules section of the Targeting tab. This is where you can express complex rules on attributes with conditions and operators. For example, you might create a rule that specifies \"roll out the `true` variation to 80% of contexts whose email address ends with `gmail.com`\". To learn more, read [Targeting rules](https://docs.launchdarkly.com/home/flags/targeting-rules).\n\n### The fallthrough rule\n\nThe `fallthrough` object is a special rule that contains no conditions. It is the rollout strategy that is applied when none of the individual or custom targeting rules match. In the LaunchDarkly UI, it is called the \"Default rule.\"\n\n### The off variation\n\nThe off variation represents the variation to serve if the feature flag targeting is turned off, meaning the `on` attribute is `false`. For boolean flags, this is usually `false`. For multivariate flags, set the off variation to whatever variation represents the control or baseline behavior for your application. If you don't set the off variation, LaunchDarkly will serve the fallback value defined in your code.\n\n### Percentage rollouts\n\nWhen you work with targeting rules and with the default rule, you can specify either a single variation or a percentage rollout. The `weight` attribute defines the percentage rollout for each variation. Weights range from 0 (a 0% rollout) to 100000 (a 100% rollout). The weights are scaled by a factor of 1000 so that fractions of a percent can be represented without using floating-point. For example, a weight of `60000` means that 60% of contexts will receive that variation. The sum of weights across all variations should be 100%.\n", + "The feature flags API allows you to list, create, and modify feature flags and their targeting. For example, you can control percentage rollouts, target specific contexts, or even toggle off a feature flag programmatically.\n\n## Sample feature flag representation\n\nEvery feature flag has a set of top-level attributes, as well as an `environments` map containing the flag rollout and targeting rules specific to each environment. To learn more, read [Using feature flags](https://docs.launchdarkly.com/home/flags/create).\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand an example of a \u003cstrong\u003ecomplete feature flag representation\u003c/strong\u003e\u003c/summary\u003e\n\n```json\n{\n \"name\": \"Alternate product page\",\n \"kind\": \"boolean\",\n \"description\": \"This is a description\",\n \"key\": \"alternate.page\",\n \"_version\": 2,\n \"creationDate\": 1418684722483,\n \"includeInSnippet\": true,\n \"clientSideAvailability\" {\n \"usingMobileKey\": false,\n \"usingEnvironmentId\": true,\n },\n \"variations\": [\n {\n \"value\": true,\n \"name\": \"true\",\n \"_id\": \"86208e6e-468f-4425-b334-7f318397f95c\"\n },\n {\n \"value\": false,\n \"name\": \"false\",\n \"_id\": \"7b32de80-f346-4276-bb77-28dfa7ddc2d8\"\n }\n ],\n \"variationJsonSchema\": null,\n \"defaults\": {\n \"onVariation\": 0,\n \"offVariation\": 1\n },\n \"temporary\": false,\n \"tags\": [\"ops\", \"experiments\"],\n \"_links\": {\n \"parent\": {\n \"href\": \"/api/v2/flags/default\",\n \"type\": \"application/json\"\n },\n \"self\": {\n \"href\": \"/api/v2/flags/default/alternate.page\",\n \"type\": \"application/json\"\n }\n },\n \"maintainerId\": \"548f6741c1efad40031b18ae\",\n \"_maintainer\": {\n \"_links\": {\n \"self\": {\n \"href\": \"/api/v2/members/548f6741c1efad40031b18ae\",\n \"type\": \"application/json\"\n }\n },\n \"_id\": \"548f6741c1efad40031b18ae\",\n \"firstName\": \"Ariel\",\n \"lastName\": \"Flores\",\n \"role\": \"reader\",\n \"email\": \"ariel@acme.com\"\n },\n \"goalIds\": [],\n \"experiments\": {\n \"baselineIdx\": 0,\n \"items\": []\n },\n \"environments\": {\n \"production\": {\n \"on\": true,\n \"archived\": false,\n \"salt\": \"YWx0ZXJuYXRlLnBhZ2U=\",\n \"sel\": \"45501b9314dc4641841af774cb038b96\",\n \"lastModified\": 1469326565348,\n \"version\": 61,\n \"targets\": [{\n \"values\": [\"user-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"user\"\n }],\n \"contextTargets\": [{\n \"values\": [],\n \"variation\": 0,\n \"contextKind\": \"user\"\n }, {\n \"values\": [\"org-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"organization\"\n }],\n \"rules\": [\n {\n \"_id\": \"f3ea72d0-e473-4e8b-b942-565b790ffe18\",\n \"variation\": 0,\n \"clauses\": [\n {\n \"_id\": \"6b81968e-3744-4416-9d64-74547eb0a7d1\",\n \"attribute\": \"groups\",\n \"op\": \"in\",\n \"values\": [\"Top Customers\"],\n \"contextKind\": \"user\",\n \"negate\": false\n },\n {\n \"_id\": \"9d60165d-82b8-4b9a-9136-f23407ba1718\",\n \"attribute\": \"email\",\n \"op\": \"endsWith\",\n \"values\": [\"gmail.com\"],\n \"contextKind\": \"user\",\n \"negate\": false\n }\n ],\n \"trackEvents\": false,\n \"ref\": \"73257308-472b-4d9c-a556-10aa7adbf857\"\n }\n ],\n \"fallthrough\": {\n \"rollout\": {\n \"variations\": [\n {\n \"variation\": 0,\n \"weight\": 60000\n },\n {\n \"variation\": 1,\n \"weight\": 40000\n }\n ],\n \"contextKind\": \"user\"\n }\n },\n \"offVariation\": 1,\n \"prerequisites\": [],\n \"_site\": {\n \"href\": \"/default/production/features/alternate.page\",\n \"type\": \"text/html\"\n },\n \"_environmentName\": \"Production\",\n \"trackEvents\": false,\n \"trackEventsFallthrough\": false,\n \"_summary\": {\n \"variations\": {\n \"0\": {\n \"rules\": 1,\n \"nullRules\": 0,\n \"targets\": 2,\n \"rollout\": 60000\n },\n \"1\": {\n \"rules\": 0,\n \"nullRules\": 0,\n \"targets\": 0,\n \"isOff\": true,\n \"rollout\": 40000\n }\n },\n \"prerequisites\": 0\n }\n }\n}\n```\n\n\u003c/details\u003e\n\n## Anatomy of a feature flag\n\nThis section describes the sample feature flag representation in more detail.\n\n### Top-level attributes\n\nMost of the top-level attributes have a straightforward interpretation, for example `name` and `description`.\n\nThe `variations` array represents the different variation values that a feature flag has. For a boolean flag, there are two variations: `true` and `false`. Multivariate flags have more variation values, and those values could be any JSON type: numbers, strings, objects, or arrays. In targeting rules, the variations are referred to by their index into this array.\n\nTo update these attributes, read [Update feature flag](#operation/patchFeatureFlag), especially the instructions for **updating flag settings**.\n\n### Per-environment configurations\n\nEach entry in the `environments` map contains a JSON object that represents the environment-specific flag configuration data available in the flag's targeting page. To learn more, read [Targeting with flags](https://docs.launchdarkly.com/home/flags/target).\n\nTo update per-environment information for a flag, read [Update feature flag](#operation/patchFeatureFlag), especially the instructions for **turning flags on and off** and **working with targeting and variations**.\n\n### Individual context targets\n\nThe `targets` and `contextTargets` arrays in the per-environment configuration data correspond to the individual context targeting on the flag's targeting page. To learn more, read [Individual targeting](https://docs.launchdarkly.com/home/flags/individual-targeting).\n\nEach object in the `targets` and `contextTargets` arrays represents a list of context keys assigned to a particular variation. The `targets` array includes contexts with `contextKind` of \"user\" and the `contextTargets` array includes contexts with context kinds other than \"user.\"\n\nFor example:\n\n```json\n{\n ...\n \"environments\" : {\n \"production\" : {\n ...\n \"targets\": [\n {\n \"values\": [\"user-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"user\"\n }\n ],\n \"contextTargets\": [\n {\n \"values\": [\"org-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"organization\"\n }\n ]\n }\n }\n}\n```\n\nThe `targets` array means that any user context instance with the key `user-key-123abc` receives the first variation listed in the `variations` array. The `contextTargets` array means that any organization context with the key `org-key-123abc` receives the first variation listed in the `variations` array. Recall that the variations are stored at the top level of the flag JSON in an array, and the per-environment configuration rules point to indexes into this array. If this is a boolean flag, both contexts are receiving the `true` variation.\n\n### Targeting rules\n\nThe `rules` array corresponds to the rules section of the flag's targeting page. This is where you can express complex rules on attributes with conditions and operators. For example, you might create a rule that specifies \"roll out the `true` variation to 80% of contexts whose email address ends with `gmail.com`\". To learn more, read [Targeting rules](https://docs.launchdarkly.com/home/flags/targeting-rules).\n\n### The fallthrough rule\n\nThe `fallthrough` object is a special rule that contains no conditions. It is the rollout strategy that is applied when none of the individual or custom targeting rules match. In the LaunchDarkly UI, it is called the \"Default rule.\"\n\n### The off variation\n\nThe off variation represents the variation to serve if the feature flag targeting is turned off, meaning the `on` attribute is `false`. For boolean flags, this is usually `false`. For multivariate flags, set the off variation to whatever variation represents the control or baseline behavior for your application. If you don't set the off variation, LaunchDarkly will serve the fallback value defined in your code.\n\n### Percentage rollouts\n\nWhen you work with targeting rules and with the default rule, you can specify either a single variation or a percentage rollout. The `weight` attribute defines the percentage rollout for each variation. Weights range from 0 (a 0% rollout) to 100000 (a 100% rollout). The weights are scaled by a factor of 1000 so that fractions of a percent can be represented without using floating-point. For example, a weight of `60000` means that 60% of contexts will receive that variation. The sum of weights across all variations should be 100%.\n", ) gen_FlagsBetaResourceCmd := NewResourceCmd( @@ -166,6 +190,62 @@ func AddAllResourceCmds( "Follow flags to receive email updates about targeting changes to a flag in a project and environment.\n\nSeveral of the endpoints in the follow flags API require a member ID. The member ID is returned as part of the [Invite new members](/tag/Account-members#operation/postMembers) and [List account members](/tag/Account-members#operation/getMembers) responses. It is the `_id` field of each element in the `items` array.\n", ) + gen_HoldoutsBetaResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "holdouts-beta", + "\u003e ### Available for customers using Experimentation\n\u003e\n\u003e Holdouts are available to customers using [Experimentation](/tag/Experiments-(beta)).\n\n\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nHoldouts let you exclude a percentage of your audience from your Experimentation program. This enables you to see the overall effect of your experiments on your customer base, and helps determine how effective the experiments you're running are.\n\nUsing the holdouts API, you can create, delete, and manage holdouts. To learn more, read [Holdouts](https://docs.launchdarkly.com/home/holdouts).\n", + ) + + gen_InsightsChartsBetaResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "insights-charts-beta", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe charts API provides access to the data used in engineering insights project metrics. To learn more, read [Project metrics](https://docs.launchdarkly.com/home/engineering-insights/metrics).\n", + ) + + gen_InsightsDeploymentsBetaResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "insights-deployments-beta", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe deployments API provides access to deployment information in engineering insights. To learn more, read [Deployments](https://docs.launchdarkly.com/home/engineering-insights/metrics/deployment).\n", + ) + + gen_InsightsFlagEventsBetaResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "insights-flag-events-beta", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe flag events API provides access to flag-event data used in engineering insights project metrics. To learn more, read [Flag health](https://docs.launchdarkly.com/home/engineering-insights/metrics/flag-health).\n", + ) + + gen_InsightsPullRequestsBetaResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "insights-pull-requests-beta", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe pull requests API provides access to information used for lead time calculations. To learn more, read [Lead time](https://docs.launchdarkly.com/home/engineering-insights/metrics/lead-time).\n", + ) + + gen_InsightsRepositoriesBetaResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "insights-repositories-beta", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nEngineering insights automatically creates repository associations when it receives deployments or code references. Optionally, you can manually configure additional associations. You can use the repositories API to list repositories and create associations to projects. To learn more, read [Send deployment information](https://docs.launchdarkly.com/home/engineering-insights/config-deployment). \n", + ) + + gen_InsightsScoresBetaResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "insights-scores-beta", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe insights scores API provides scores for data used in engineering insights project metrics. To learn more, read [Project overview](https://docs.launchdarkly.com/home/engineering-insights/project-overview) and [Project metrics](https://docs.launchdarkly.com/home/engineering-insights/metrics).\n", + ) + gen_IntegrationDeliveryConfigurationsBetaResourceCmd := NewResourceCmd( rootCmd, analyticsTrackerFn, @@ -179,7 +259,7 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "integration-subscriptions", - "Audit log integration subscriptions allow you to send audit log events hooks to one of dozens of external tools. For example, you can send flag change event webhooks to external third party software. To learn more, read [Building your own integrations](https://docs.launchdarkly.com/integrations/building-integrations#building-your-own-integrations).\n\nYou can use the integration subscriptions API to create, delete, and manage your integration audit log subscriptions.\n\nEach of these operations requires an `integrationKey` that refers to the type of integration. The required `config` fields to create a subscription vary depending on the `integrationKey`. You can find a full list of the fields for each integration below.\n\nSeveral of these operations require a subscription ID. The subscription ID is returned as part of the [Create audit log subscription](/tag/Integration-audit-log-subscriptions#operation/createSubscription) and [Get audit log subscriptions by integration](/tag/Integration-audit-log-subscriptions#operation/getSubscriptions) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n\n### Configuration bodies by integrationKey\n\n#### datadog\n\n`apiKey` is a sensitive value.\n\n`hostURL` must evaluate to either `\"https://api.datadoghq.com\"` or `\"https://api.datadoghq.eu\"` and will default to the former if not explicitly defined.\n\n```\n\"config\": {\n \"apiKey\": \u003cstring, optional\u003e, # sensitive value\n \"hostURL\": \u003cstring, optional\u003e\n}\n```\n\n#### dynatrace\n\n`apiToken` is a sensitive value.\n\n`entity` must evaluate to one of the following fields and will default to `\"APPLICATION\"` if not explicitly defined:\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand list of fields\u003c/summary\u003e\n\u003cbr\u003e\n\"APPLICATION\"\u003cbr\u003e\n\"APPLICATION_METHOD\"\u003cbr\u003e\n\"APPLICATION_METHOD_GROUP\"\u003cbr\u003e\n\"AUTO_SCALING_GROUP\"\u003cbr\u003e\n\"AUXILIARY_SYNTHETIC_TEST\"\u003cbr\u003e\n\"AWS_APPLICATION_LOAD_BALANCER\"\u003cbr\u003e\n\"AWS_AVAILABILITY_ZONE\"\u003cbr\u003e\n\"AWS_CREDENTIALS\"\u003cbr\u003e\n\"AWS_LAMBDA_FUNCTION\"\u003cbr\u003e\n\"AWS_NETWORK_LOAD_BALANCER\"\u003cbr\u003e\n\"AZURE_API_MANAGEMENT_SERVICE\"\u003cbr\u003e\n\"AZURE_APPLICATION_GATEWAY\"\u003cbr\u003e\n\"AZURE_COSMOS_DB\"\u003cbr\u003e\n\"AZURE_CREDENTIALS\"\u003cbr\u003e\n\"AZURE_EVENT_HUB\"\u003cbr\u003e\n\"AZURE_EVENT_HUB_NAMESPACE\"\u003cbr\u003e\n\"AZURE_FUNCTION_APP\"\u003cbr\u003e\n\"AZURE_IOT_HUB\"\u003cbr\u003e\n\"AZURE_LOAD_BALANCER\"\u003cbr\u003e\n\"AZURE_MGMT_GROUP\"\u003cbr\u003e\n\"AZURE_REDIS_CACHE\"\u003cbr\u003e\n\"AZURE_REGION\"\u003cbr\u003e\n\"AZURE_SERVICE_BUS_NAMESPACE\"\u003cbr\u003e\n\"AZURE_SERVICE_BUS_QUEUE\"\u003cbr\u003e\n\"AZURE_SERVICE_BUS_TOPIC\"\u003cbr\u003e\n\"AZURE_SQL_DATABASE\"\u003cbr\u003e\n\"AZURE_SQL_ELASTIC_POOL\"\u003cbr\u003e\n\"AZURE_SQL_SERVER\"\u003cbr\u003e\n\"AZURE_STORAGE_ACCOUNT\"\u003cbr\u003e\n\"AZURE_SUBSCRIPTION\"\u003cbr\u003e\n\"AZURE_TENANT\"\u003cbr\u003e\n\"AZURE_VM\"\u003cbr\u003e\n\"AZURE_VM_SCALE_SET\"\u003cbr\u003e\n\"AZURE_WEB_APP\"\u003cbr\u003e\n\"CF_APPLICATION\"\u003cbr\u003e\n\"CF_FOUNDATION\"\u003cbr\u003e\n\"CINDER_VOLUME\"\u003cbr\u003e\n\"CLOUD_APPLICATION\"\u003cbr\u003e\n\"CLOUD_APPLICATION_INSTANCE\"\u003cbr\u003e\n\"CLOUD_APPLICATION_NAMESPACE\"\u003cbr\u003e\n\"CONTAINER_GROUP\"\u003cbr\u003e\n\"CONTAINER_GROUP_INSTANCE\"\u003cbr\u003e\n\"CUSTOM_APPLICATION\"\u003cbr\u003e\n\"CUSTOM_DEVICE\"\u003cbr\u003e\n\"CUSTOM_DEVICE_GROUP\"\u003cbr\u003e\n\"DCRUM_APPLICATION\"\u003cbr\u003e\n\"DCRUM_SERVICE\"\u003cbr\u003e\n\"DCRUM_SERVICE_INSTANCE\"\u003cbr\u003e\n\"DEVICE_APPLICATION_METHOD\"\u003cbr\u003e\n\"DISK\"\u003cbr\u003e\n\"DOCKER_CONTAINER_GROUP_INSTANCE\"\u003cbr\u003e\n\"DYNAMO_DB_TABLE\"\u003cbr\u003e\n\"EBS_VOLUME\"\u003cbr\u003e\n\"EC2_INSTANCE\"\u003cbr\u003e\n\"ELASTIC_LOAD_BALANCER\"\u003cbr\u003e\n\"ENVIRONMENT\"\u003cbr\u003e\n\"EXTERNAL_SYNTHETIC_TEST_STEP\"\u003cbr\u003e\n\"GCP_ZONE\"\u003cbr\u003e\n\"GEOLOCATION\"\u003cbr\u003e\n\"GEOLOC_SITE\"\u003cbr\u003e\n\"GOOGLE_COMPUTE_ENGINE\"\u003cbr\u003e\n\"HOST\"\u003cbr\u003e\n\"HOST_GROUP\"\u003cbr\u003e\n\"HTTP_CHECK\"\u003cbr\u003e\n\"HTTP_CHECK_STEP\"\u003cbr\u003e\n\"HYPERVISOR\"\u003cbr\u003e\n\"KUBERNETES_CLUSTER\"\u003cbr\u003e\n\"KUBERNETES_NODE\"\u003cbr\u003e\n\"MOBILE_APPLICATION\"\u003cbr\u003e\n\"NETWORK_INTERFACE\"\u003cbr\u003e\n\"NEUTRON_SUBNET\"\u003cbr\u003e\n\"OPENSTACK_PROJECT\"\u003cbr\u003e\n\"OPENSTACK_REGION\"\u003cbr\u003e\n\"OPENSTACK_VM\"\u003cbr\u003e\n\"OS\"\u003cbr\u003e\n\"PROCESS_GROUP\"\u003cbr\u003e\n\"PROCESS_GROUP_INSTANCE\"\u003cbr\u003e\n\"RELATIONAL_DATABASE_SERVICE\"\u003cbr\u003e\n\"SERVICE\"\u003cbr\u003e\n\"SERVICE_INSTANCE\"\u003cbr\u003e\n\"SERVICE_METHOD\"\u003cbr\u003e\n\"SERVICE_METHOD_GROUP\"\u003cbr\u003e\n\"SWIFT_CONTAINER\"\u003cbr\u003e\n\"SYNTHETIC_LOCATION\"\u003cbr\u003e\n\"SYNTHETIC_TEST\"\u003cbr\u003e\n\"SYNTHETIC_TEST_STEP\"\u003cbr\u003e\n\"VIRTUALMACHINE\"\u003cbr\u003e\n\"VMWARE_DATACENTER\"\n\u003c/details\u003e\n\n```\n\"config\": {\n \"apiToken\": \u003cstring, required\u003e,\n \"url\": \u003cstring, required\u003e,\n \"entity\": \u003cstring, optional\u003e\n}\n```\n\n#### elastic\n\n`token` is a sensitive field.\n\n```\n\"config\": {\n \"url\": \u003cstring, required\u003e,\n \"token\": \u003cstring, required\u003e,\n \"index\": \u003cstring, required\u003e\n}\n```\n\n#### honeycomb\n\n`apiKey` is a sensitive field.\n\n```\n\"config\": {\n \"datasetName\": \u003cstring, required\u003e,\n \"apiKey\": \u003cstring, required\u003e\n}\n```\n\n#### logdna\n\n`ingestionKey` is a sensitive field.\n\n```\n\"config\": {\n \"ingestionKey\": \u003cstring, required\u003e,\n \"level\": \u003cstring, optional\u003e\n}\n```\n\n#### msteams\n\n```\n\"config\": {\n \"url\": \u003cstring, required\u003e\n}\n```\n\n#### new-relic-apm\n\n`apiKey` is a sensitive field.\n\n`domain` must evaluate to either `\"api.newrelic.com\"` or `\"api.eu.newrelic.com\"` and will default to the former if not explicitly defined.\n\n```\n\"config\": {\n \"apiKey\": \u003cstring, required\u003e,\n \"applicationId\": \u003cstring, required\u003e,\n \"domain\": \u003cstring, optional\u003e\n}\n```\n\n#### signalfx\n\n`accessToken` is a sensitive field.\n\n```\n\"config\": {\n \"accessToken\": \u003cstring, required\u003e,\n \"realm\": \u003cstring, required\u003e\n}\n```\n\n#### splunk\n\n`token` is a sensitive field.\n\n```\n\"config\": {\n \"base-url\": \u003cstring, required\u003e,\n \"token\": \u003cstring, required\u003e,\n \"skip-ca-verificiation\": \u003cboolean, required\u003e\n}\n```\n", + "Audit log integration subscriptions allow you to send audit log events hooks to one of dozens of external tools. For example, you can send flag change event webhooks to external third party software. To learn more, read [Building your own integrations](https://docs.launchdarkly.com/integrations/building-integrations#building-your-own-integrations).\n\nYou can use the integration subscriptions API to create, delete, and manage your integration audit log subscriptions.\n\nEach of these operations requires an `integrationKey` that refers to the type of integration. The required `config` fields to create a subscription vary depending on the `integrationKey`. You can find a full list of the fields for each integration below.\n\nSeveral of these operations require a subscription ID. The subscription ID is returned as part of the [Create audit log subscription](/tag/Integration-audit-log-subscriptions#operation/createSubscription) and [Get audit log subscriptions by integration](/tag/Integration-audit-log-subscriptions#operation/getSubscriptions) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n\n### Configuration bodies by integrationKey\n\n#### datadog\n\n`apiKey` is a sensitive value.\n\n`hostURL` must evaluate to either `\"https://api.datadoghq.com\"` or `\"https://api.datadoghq.eu\"` and will default to the former if not explicitly defined.\n\n```\n\"config\": {\n \"apiKey\": \u003cstring, optional\u003e, # sensitive value\n \"hostURL\": \u003cstring, optional\u003e\n}\n```\n\n#### dynatrace\n\n`apiToken` is a sensitive value.\n\n`entity` must evaluate to one of the following fields and will default to `\"APPLICATION\"` if not explicitly defined:\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand list of fields\u003c/summary\u003e\n\u003cbr/\u003e\n\"APPLICATION\"\u003cbr/\u003e\n\"APPLICATION_METHOD\"\u003cbr/\u003e\n\"APPLICATION_METHOD_GROUP\"\u003cbr/\u003e\n\"AUTO_SCALING_GROUP\"\u003cbr/\u003e\n\"AUXILIARY_SYNTHETIC_TEST\"\u003cbr/\u003e\n\"AWS_APPLICATION_LOAD_BALANCER\"\u003cbr/\u003e\n\"AWS_AVAILABILITY_ZONE\"\u003cbr/\u003e\n\"AWS_CREDENTIALS\"\u003cbr/\u003e\n\"AWS_LAMBDA_FUNCTION\"\u003cbr/\u003e\n\"AWS_NETWORK_LOAD_BALANCER\"\u003cbr/\u003e\n\"AZURE_API_MANAGEMENT_SERVICE\"\u003cbr/\u003e\n\"AZURE_APPLICATION_GATEWAY\"\u003cbr/\u003e\n\"AZURE_COSMOS_DB\"\u003cbr/\u003e\n\"AZURE_CREDENTIALS\"\u003cbr/\u003e\n\"AZURE_EVENT_HUB\"\u003cbr/\u003e\n\"AZURE_EVENT_HUB_NAMESPACE\"\u003cbr/\u003e\n\"AZURE_FUNCTION_APP\"\u003cbr/\u003e\n\"AZURE_IOT_HUB\"\u003cbr/\u003e\n\"AZURE_LOAD_BALANCER\"\u003cbr/\u003e\n\"AZURE_MGMT_GROUP\"\u003cbr/\u003e\n\"AZURE_REDIS_CACHE\"\u003cbr/\u003e\n\"AZURE_REGION\"\u003cbr/\u003e\n\"AZURE_SERVICE_BUS_NAMESPACE\"\u003cbr/\u003e\n\"AZURE_SERVICE_BUS_QUEUE\"\u003cbr/\u003e\n\"AZURE_SERVICE_BUS_TOPIC\"\u003cbr/\u003e\n\"AZURE_SQL_DATABASE\"\u003cbr/\u003e\n\"AZURE_SQL_ELASTIC_POOL\"\u003cbr/\u003e\n\"AZURE_SQL_SERVER\"\u003cbr/\u003e\n\"AZURE_STORAGE_ACCOUNT\"\u003cbr/\u003e\n\"AZURE_SUBSCRIPTION\"\u003cbr/\u003e\n\"AZURE_TENANT\"\u003cbr/\u003e\n\"AZURE_VM\"\u003cbr/\u003e\n\"AZURE_VM_SCALE_SET\"\u003cbr/\u003e\n\"AZURE_WEB_APP\"\u003cbr/\u003e\n\"CF_APPLICATION\"\u003cbr/\u003e\n\"CF_FOUNDATION\"\u003cbr/\u003e\n\"CINDER_VOLUME\"\u003cbr/\u003e\n\"CLOUD_APPLICATION\"\u003cbr/\u003e\n\"CLOUD_APPLICATION_INSTANCE\"\u003cbr/\u003e\n\"CLOUD_APPLICATION_NAMESPACE\"\u003cbr/\u003e\n\"CONTAINER_GROUP\"\u003cbr/\u003e\n\"CONTAINER_GROUP_INSTANCE\"\u003cbr/\u003e\n\"CUSTOM_APPLICATION\"\u003cbr/\u003e\n\"CUSTOM_DEVICE\"\u003cbr/\u003e\n\"CUSTOM_DEVICE_GROUP\"\u003cbr/\u003e\n\"DCRUM_APPLICATION\"\u003cbr/\u003e\n\"DCRUM_SERVICE\"\u003cbr/\u003e\n\"DCRUM_SERVICE_INSTANCE\"\u003cbr/\u003e\n\"DEVICE_APPLICATION_METHOD\"\u003cbr/\u003e\n\"DISK\"\u003cbr/\u003e\n\"DOCKER_CONTAINER_GROUP_INSTANCE\"\u003cbr/\u003e\n\"DYNAMO_DB_TABLE\"\u003cbr/\u003e\n\"EBS_VOLUME\"\u003cbr/\u003e\n\"EC2_INSTANCE\"\u003cbr/\u003e\n\"ELASTIC_LOAD_BALANCER\"\u003cbr/\u003e\n\"ENVIRONMENT\"\u003cbr/\u003e\n\"EXTERNAL_SYNTHETIC_TEST_STEP\"\u003cbr/\u003e\n\"GCP_ZONE\"\u003cbr/\u003e\n\"GEOLOCATION\"\u003cbr/\u003e\n\"GEOLOC_SITE\"\u003cbr/\u003e\n\"GOOGLE_COMPUTE_ENGINE\"\u003cbr/\u003e\n\"HOST\"\u003cbr/\u003e\n\"HOST_GROUP\"\u003cbr/\u003e\n\"HTTP_CHECK\"\u003cbr/\u003e\n\"HTTP_CHECK_STEP\"\u003cbr/\u003e\n\"HYPERVISOR\"\u003cbr/\u003e\n\"KUBERNETES_CLUSTER\"\u003cbr/\u003e\n\"KUBERNETES_NODE\"\u003cbr/\u003e\n\"MOBILE_APPLICATION\"\u003cbr/\u003e\n\"NETWORK_INTERFACE\"\u003cbr/\u003e\n\"NEUTRON_SUBNET\"\u003cbr/\u003e\n\"OPENSTACK_PROJECT\"\u003cbr/\u003e\n\"OPENSTACK_REGION\"\u003cbr/\u003e\n\"OPENSTACK_VM\"\u003cbr/\u003e\n\"OS\"\u003cbr/\u003e\n\"PROCESS_GROUP\"\u003cbr/\u003e\n\"PROCESS_GROUP_INSTANCE\"\u003cbr/\u003e\n\"RELATIONAL_DATABASE_SERVICE\"\u003cbr/\u003e\n\"SERVICE\"\u003cbr/\u003e\n\"SERVICE_INSTANCE\"\u003cbr/\u003e\n\"SERVICE_METHOD\"\u003cbr/\u003e\n\"SERVICE_METHOD_GROUP\"\u003cbr/\u003e\n\"SWIFT_CONTAINER\"\u003cbr/\u003e\n\"SYNTHETIC_LOCATION\"\u003cbr/\u003e\n\"SYNTHETIC_TEST\"\u003cbr/\u003e\n\"SYNTHETIC_TEST_STEP\"\u003cbr/\u003e\n\"VIRTUALMACHINE\"\u003cbr/\u003e\n\"VMWARE_DATACENTER\"\n\u003c/details\u003e\n\n```\n\"config\": {\n \"apiToken\": \u003cstring, required\u003e,\n \"url\": \u003cstring, required\u003e,\n \"entity\": \u003cstring, optional\u003e\n}\n```\n\n#### elastic\n\n`token` is a sensitive field.\n\n```\n\"config\": {\n \"url\": \u003cstring, required\u003e,\n \"token\": \u003cstring, required\u003e,\n \"index\": \u003cstring, required\u003e\n}\n```\n\n#### honeycomb\n\n`apiKey` is a sensitive field.\n\n```\n\"config\": {\n \"datasetName\": \u003cstring, required\u003e,\n \"apiKey\": \u003cstring, required\u003e\n}\n```\n\n#### logdna\n\n`ingestionKey` is a sensitive field.\n\n```\n\"config\": {\n \"ingestionKey\": \u003cstring, required\u003e,\n \"level\": \u003cstring, optional\u003e\n}\n```\n\n#### msteams\n\n```\n\"config\": {\n \"url\": \u003cstring, required\u003e\n}\n```\n\n#### new-relic-apm\n\n`apiKey` is a sensitive field.\n\n`domain` must evaluate to either `\"api.newrelic.com\"` or `\"api.eu.newrelic.com\"` and will default to the former if not explicitly defined.\n\n```\n\"config\": {\n \"apiKey\": \u003cstring, required\u003e,\n \"applicationId\": \u003cstring, required\u003e,\n \"domain\": \u003cstring, optional\u003e\n}\n```\n\n#### signalfx\n\n`accessToken` is a sensitive field.\n\n```\n\"config\": {\n \"accessToken\": \u003cstring, required\u003e,\n \"realm\": \u003cstring, required\u003e\n}\n```\n\n#### splunk\n\n`token` is a sensitive field.\n\n```\n\"config\": {\n \"base-url\": \u003cstring, required\u003e,\n \"token\": \u003cstring, required\u003e,\n \"skip-ca-verification\": \u003cboolean, required\u003e\n}\n```\n", ) gen_IntegrationsBetaResourceCmd := NewResourceCmd( @@ -187,7 +267,15 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "integrations-beta", - "\n\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nYou can use the integrations API to create, delete, and manage integrations between LaunchDarkly and third-party applications.\n\nSpecifically, the integrations API provides endpoints for managing the persistent store integrations, also called \"big segment\" store integrations, that are required when you use a server-side SDK and big segments.\n\n\u003e ### Synced segments and larger list-based segments are an Enterprise feature\n\u003e\n\u003e Segments synced from external tools and larger list-based segments with more than 15,000 entries are the two kinds of \"big segment.\" LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n\u003e\n\u003e These segments are 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/).\n\n[Segments synced from external tools](https://docs.launchdarkly.com/home/flags/synced-segments) and [larger list-based segments](https://docs.launchdarkly.com/home/flags/list-based-segments#larger-list-based-segments) are the two kinds of big segment. If you are using server-side SDKs, these segments require a persistent store within your infrastructure. LaunchDarkly keeps the persistent store up to date and consults it during flag evaluation.\n\nYou need either a persistent store integration or a [Relay Proxy](https://docs.launchdarkly.com/sdk/relay-proxy) to support these segments. The integrations API lets you manage the persistent store integrations.\n\nTo learn more about segments, read [Segments](https://docs.launchdarkly.com/home/flags/segments) and [Segment configuration](https://docs.launchdarkly.com/home/flags/segment-config).\n\nSeveral of the endpoints in the integrations API require an integration ID. The integration ID is returned as part of the [Create big segment store integration](/tag/Integrations-(beta)#operation/createBigSegmentStoreIntegration) response, in the `_id` field. It is also returned as part of the [List all big segment store integrations](/tag/Integrations-(beta)#operation/getBigSegmentStoreIntegrations) response, in the `_id` field of each element in the `items` array.\n\nYou can find other APIs for working with big segments under [Segments](/tag/Segments) and [Segments (beta)](/tag/Segments-(beta)).\n", + "\n\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\n\u003e ### Integration configuration is an Enterprise feature\n\u003e\n\u003e Integration configuration 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/).\n\nYou can use the integrations API to create, delete, and manage integration configurations.\n\nAn integration configuration stores and manages configuration details for an integration between LaunchDarkly and a third-party application. To learn more about building an integration, read [Using the LaunchDarkly integration framework](https://docs.launchdarkly.com/integrations/building-integrations) and [Building partner integrations](https://docs.launchdarkly.com/integrations/partner-integrations).\n", + ) + + gen_LayersResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "layers", + "\u003e ### Available for customers using Experimentation\n\u003e\n\u003e Layers are available to customers using [Experimentation](/tag/Experiments-(beta)).\n\nThere are some cases in which you may not want to include a context in more than one experiment at a time. For example, you may be concerned about collisions between experiments that are testing similar parts of your app, like two different changes to the same section of your app's user interface (UI), or experiments running on both the back end and front end of the same functionality. In this case you can eliminate the interaction effect between experiments using layers.\n\nA layer contains a set of experiments that cannot share traffic with each other. All of the experiments within a layer are mutually exclusive, which means that if a context is included in one experiment, LaunchDarkly will exclude it from any other experiments in the same layer.\n\nTo learn more, read [Mutually exclusive experiments](https://docs.launchdarkly.com/home/experimentation/mutually-exclusive).\n", ) gen_MembersResourceCmd := NewResourceCmd( @@ -219,7 +307,15 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "metrics", - "\u003e ### Available for Pro and Enterprise plans\n\u003e\n\u003e Metrics is available to customers on a Pro or Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To add metrics to your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nMetrics track flag behavior over time when an experiment is running. The data generated from experiments gives you more insight into the impact of a particular flag. To learn more, read [Metrics](https://docs.launchdarkly.com/home/observability/metrics).\n\nUsing the metrics API, you can create, delete, and manage metrics.\n\n\u003e ### Are you importing metric events?\n\u003e\n\u003e If you want to import metric events into LaunchDarkly from an existing data source, use the metric import API. To learn more, read [Importing metric events](/home/metrics/import-metric-events).\n\n\u003e ### Metric keys and event keys are different\n\u003e\n\u003e LaunchDarkly automatically generates a metric key when you create a metric. You can use the metric key to identify the metric in API calls.\n\u003e\n\u003e Custom conversion/binary and custom numeric metrics also require an event key. You can set the event key to anything you want. Adding this event key to your codebase lets your SDK track actions customers take in your app as events. To learn more, read [Sending custom events](https://docs.launchdarkly.com/sdk/features/events).\n", + "Metrics track flag behavior over time when an experiment is running. The data generated from experiments gives you more insight into the impact of a particular flag. To learn more, read [Metrics](https://docs.launchdarkly.com/home/observability/metrics).\n\nUsing the metrics API, you can create, delete, and manage metrics.\n\n\u003e ### Are you importing metric events?\n\u003e\n\u003e If you want to import metric events into LaunchDarkly from an existing data source, use the metric import API. To learn more, read [Importing metric events](https://docs.launchdarkly.com/home/metrics/import-metric-events).\n\n\u003e ### Metric keys and event keys are different\n\u003e\n\u003e LaunchDarkly automatically generates a metric key when you create a metric. You can use the metric key to identify the metric in API calls.\n\u003e\n\u003e Custom conversion/binary and custom numeric metrics also require an event key. You can set the event key to anything you want. Adding this event key to your codebase lets your SDK track actions customers take in your app as events. To learn more, read [Sending custom events](https://docs.launchdarkly.com/sdk/features/events).\n", + ) + + gen_PersistentStoreIntegrationsBetaResourceCmd := NewResourceCmd( + rootCmd, + analyticsTrackerFn, + markdownRenderer, + "persistent-store-integrations-beta", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\n### Persistent store integrations\n\nPersistent store integrations, also called \"big segment\" store integrations, are required when you use a server-side SDK and big segments. You can use the persistent store integrations API endpoints to manage these integrations.\n\n\u003e ### Synced segments and larger list-based segments are an Enterprise feature\n\u003e\n\u003e Segments synced from external tools and larger list-based segments with more than 15,000 entries are the two kinds of \"big segment.\" LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n\u003e\n\u003e These segments are 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/).\n\n[Segments synced from external tools](https://docs.launchdarkly.com/home/flags/synced-segments) and [larger list-based segments](https://docs.launchdarkly.com/home/flags/list-based-segments) are the two kinds of big segment. If you are using server-side SDKs, these segments require a persistent store within your infrastructure. LaunchDarkly keeps the persistent store up to date and consults it during flag evaluation.\n\nYou need either a persistent store integration or a [Relay Proxy](https://docs.launchdarkly.com/sdk/relay-proxy) to support these segments. The persistent store integrations API lets you manage the persistent store integrations.\n\nTo learn more about segments, read [Segments](https://docs.launchdarkly.com/home/flags/segments) and [Segment configuration](https://docs.launchdarkly.com/home/flags/segment-config).\n\nSeveral of the endpoints in the persistent store integrations API require an integration ID. The integration ID is returned as part of the [Create big segment store integration](/tag/Persistent-store-integrations-(beta)#operation/createBigSegmentStoreIntegration) response, in the `_id` field. It is also returned as part of the [List all big segment store integrations](/tag/Persistent-store-integrations-(beta)#operation/getBigSegmentStoreIntegrations) response, in the `_id` field of each element in the `items` array.\n\nYou can find other APIs for working with big segments under [Segments](/tag/Segments) and [Segments (beta)](/tag/Segments-(beta)).\n", ) gen_ProjectsResourceCmd := NewResourceCmd( @@ -227,7 +323,7 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "projects", - "Projects allow you to manage multiple different software projects under one LaunchDarkly account. Each project has its own unique set of environments and feature flags. To learn more, read [Projects](https://docs.launchdarkly.com/home/account/project).\n\nUsing the projects API, you can create, destroy, and manage projects.\n", + "Projects allow you to manage multiple different software projects under one LaunchDarkly account. Each project has its own unique set of environments and feature flags. To learn more, read [Projects](https://docs.launchdarkly.com/home/account/project).\n\nUsing the projects API, you can list, create, and manage projects.\n", ) gen_RelayProxyConfigsResourceCmd := NewResourceCmd( @@ -243,7 +339,7 @@ func AddAllResourceCmds( analyticsTrackerFn, markdownRenderer, "release-pipelines-beta", - "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nRelease pipelines track the progression of a feature flag across a series of phases, where each phase consists of one or more environments. When you add a flag to a release pipeline, you create a \"release\" to track that flag's progress through the pipeline.\n\nYou can use release pipelines to ensure that you correctly roll out the flag in each environment before moving on to the next. You can also use them to view the status of ongoing releases across all flags within a project, enforcing a standardized process and ensuring they are following best practices. To learn more, read [Release pipelines](https://docs.launchdarkly.com/home/releases/release-pipelines).\n\nWith the release pipelines API, you can view, create, and delete release pipelines.\n\nWith the related [releases API](/tag/Releases-(beta)), you can view and update the active releases for a given flag.\n\nTo add a feature flag to an existing release pipeline, use the [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag) endpoint.\n", + "\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nRelease pipelines standardize the release process for feature flags across a series of phases, where each phase consists of one or more environments. When you add a flag to a release pipeline, you create a \"release\" to automate that flag's progress through the pipeline.\n\nYou can use release pipelines to ensure that you correctly roll out the flag in each environment before moving on to the next. A release can use an immediate or guarded rollout to a designated audience, and can require approvals for selected environments. You can also use release pipelines to view the status of ongoing releases across all flags within a project, enforcing a standardized process and ensuring they are following best practices. To learn more, read [Release pipelines](https://docs.launchdarkly.com/home/releases/release-pipelines).\n\nWith the release pipelines API, you can view, create, update, and delete release pipelines.\n\nWith the related [releases API](/tag/Releases-(beta)), you can view and update the active releases for a given flag.\n\nTo add a feature flag to an existing release pipeline, use the [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag) endpoint.\n", ) gen_ReleasesBetaResourceCmd := NewResourceCmd( @@ -270,14 +366,6 @@ func AddAllResourceCmds( "\n\u003e ### Synced segments and larger list-based segments are an Enterprise feature\n\u003e\n\u003e This section documents endpoints for rule-based, list-based, and synced segments.\n\u003e\n\u003e A \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n\u003e\n\u003e In the segments API, a big segment is indicated by the `unbounded` field being set to `true`.\n\u003e\n\u003e These segments are 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/).\n\nSegments are groups of contexts that you can use to manage flag targeting behavior in bulk. LaunchDarkly supports:\n\n* rule-based segments, which let you target groups of contexts individually or by attribute,\n* list-based segments, which let you target individual contexts or uploaded lists of contexts, and\n* synced segments, which let you target groups of contexts backed by an external data store.\n\nTo learn more, read [Segments](https://docs.launchdarkly.com/home/flags/segments).\n\nThe segments API allows you to list, create, modify, and delete segments programmatically.\n\nYou can find other APIs for working with big segments under [Segments (beta)](/tag/Segments-(beta)) and [Integrations (beta)](/tag/Integrations-(beta)).\n", ) - gen_SegmentsBetaResourceCmd := NewResourceCmd( - rootCmd, - analyticsTrackerFn, - markdownRenderer, - "segments-beta", - "\u003e ### Synced segments and larger list-based segments are an Enterprise feature\n\u003e\n\u003e This section documents endpoints for rule-based, list-based, and synced segments.\n\u003e\n\u003e A \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n\u003e\n\u003e In the segments API, a big segment is indicated by the `unbounded` field being set to `true`.\n\u003e\n\u003e These segments are 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/).\n\n\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n\u003e\n\u003e Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe segments API allows you to create and retrieve exports and imports for big segments, which are synced segments or list-based segments with 15,000 or more entries. To learn more, read [Segments](https://docs.launchdarkly.com/home/flags/segments).\n\nSeveral of the endpoints in the segments API require an import or export ID. The import ID is returned in the `Location` header as part of the [Create big segment import](/tag/Segments-(beta)#operation/createBigSegmentImport) request. The export ID is returned in the `Location` header as part of the [Create big segment export](/tag/Segments-(beta)#operation/createBigSegmentExport) request. In each case, the ID is the final element of the path returned in the `Location` header.\n\nYou can find other APIs for working with big segments under [Segments](/tag/Segments) and [Integrations (beta)](/tag/Integrations-(beta)).\n", - ) - gen_TagsResourceCmd := NewResourceCmd( rootCmd, analyticsTrackerFn, @@ -476,6 +564,18 @@ func AddAllResourceCmds( Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", Type: "string", }, + { + Name: "project-key", + In: "query", + Description: "A project key. If specified, 'environmentKey' is required and results apply to the corresponding environment in this project.", + Type: "string", + }, + { + Name: "environment-key", + In: "query", + Description: "An environment key. If specified, 'projectKey' is required and results apply to the corresponding environment in this project.", + Type: "string", + }, }, HTTPMethod: "GET", HasBody: false, @@ -584,6 +684,18 @@ func AddAllResourceCmds( Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", Type: "string", }, + { + Name: "project-key", + In: "query", + Description: "A project key. If specified, 'environmentKey' is required and results apply to the corresponding environment in this project.", + Type: "string", + }, + { + Name: "environment-key", + In: "query", + Description: "An environment key. If specified, 'projectKey' is required and results apply to the corresponding environment in this project.", + Type: "string", + }, }, HTTPMethod: "GET", HasBody: false, @@ -610,6 +722,18 @@ func AddAllResourceCmds( Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", Type: "string", }, + { + Name: "project-key", + In: "query", + Description: "A project key. If specified, 'environmentKey' is required and results apply to the corresponding environment in this project.", + Type: "string", + }, + { + Name: "environment-key", + In: "query", + Description: "An environment key. If specified, 'projectKey' is required and results apply to the corresponding environment in this project.", + Type: "string", + }, }, HTTPMethod: "GET", HasBody: false, @@ -756,6 +880,18 @@ func AddAllResourceCmds( Description: "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", Type: "string", }, + { + Name: "project-key", + In: "query", + Description: "A project key. If specified, 'environmentKey' is required and results apply to the corresponding environment in this project.", + Type: "string", + }, + { + Name: "environment-key", + In: "query", + Description: "An environment key. If specified, 'projectKey' is required and results apply to the corresponding environment in this project.", + Type: "string", + }, }, HTTPMethod: "GET", HasBody: false, @@ -873,15 +1009,27 @@ func AddAllResourceCmds( SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete application", - Long: "Delete an application.", - Use: "delete", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete AI config", + Long: "Delete an existing AI config.", + Use: "delete-ai-config", Params: []Param{ { - Name: "application-key", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", In: "path", - Description: "The application key", + Description: "", + Type: "string", + }, + { + Name: "config-key", + In: "path", + Description: "", Type: "string", }, }, @@ -889,25 +1037,37 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/applications/{applicationKey}", + Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete application version", - Long: "Delete an application version.", - Use: "delete-version", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete AI config variation", + Long: "Delete a specific variation of an AI config by config key and variation key.", + Use: "delete-ai-config-variation", Params: []Param{ { - Name: "application-key", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", In: "path", - Description: "The application key", + Description: "", Type: "string", }, { - Name: "version-key", + Name: "config-key", In: "path", - Description: "The application version key", + Description: "", + Type: "string", + }, + { + Name: "variation-key", + In: "path", + Description: "", Type: "string", }, }, @@ -915,25 +1075,63 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/applications/{applicationKey}/versions/{versionKey}", + Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get application by key", - Long: "\nRetrieve an application by the application key.\n\n### Expanding the application response\n\nLaunchDarkly supports expanding the \"Get application\" response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `flags` includes details on the flags that have been evaluated by the application\n\nFor example, use `?expand=flags` to include the `flags` field in the response. By default, this field is **not** included in the response.\n", - Use: "get", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete an AI model config", + Long: "Delete an AI model config.", + Use: "delete-model-config", Params: []Param{ { - Name: "application-key", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", In: "path", - Description: "The application key", + Description: "", Type: "string", }, { - Name: "expand", - In: "query", - Description: "A comma-separated list of properties that can reveal additional information in the response. Options: 'flags'.", + Name: "model-config-key", + In: "path", + Description: "", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get AI config", + Long: "Retrieve a specific AI config by its key.", + Use: "get-ai-config", + Params: []Param{ + { + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", + In: "path", + Description: "", + Type: "string", + }, + { + Name: "config-key", + In: "path", + Description: "", Type: "string", }, }, @@ -941,43 +1139,49 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/applications/{applicationKey}", + Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get application versions by application key", - Long: "Get a list of versions for a specific application in an account.", - Use: "list-versions", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get AI config metrics", + Long: "Retrieve usage metrics for an AI config by config key.", + Use: "get-ai-config-metrics", Params: []Param{ { - Name: "filter", - In: "query", - Description: "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](/tag/Applications-(beta)#filtering-contexts-and-context-instances).", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", Type: "string", }, { - Name: "application-key", + Name: "project-key", In: "path", - Description: "The application key", + Description: "", Type: "string", }, { - Name: "limit", + Name: "config-key", + In: "path", + Description: "", + Type: "string", + }, + { + Name: "from", In: "query", - Description: "The number of versions to return. Defaults to 50.", + Description: "The starting time, as milliseconds since epoch (inclusive).", Type: "integer", }, { - Name: "offset", + Name: "to", In: "query", - Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Description: "The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after 'from'.", Type: "integer", }, { - Name: "sort", + Name: "env", In: "query", - Description: "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.", + Description: "An environment key. Only metrics from this environment will be included.", Type: "string", }, }, @@ -985,43 +1189,49 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/applications/{applicationKey}/versions", + Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get applications", - Long: "\nGet a list of applications.\n\n### Expanding the applications response\n\nLaunchDarkly supports expanding the \"Get applications\" response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `flags` includes details on the flags that have been evaluated by the application\n\nFor example, use `?expand=flags` to include the `flags` field in the response. By default, this field is **not** included in the response.\n", - Use: "list", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get AI config metrics by variation", + Long: "Retrieve usage metrics for an AI config by config key, with results split by variation.", + Use: "get-ai-config-metrics-by-variation", Params: []Param{ { - Name: "filter", - In: "query", - Description: "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](/tag/Applications-(beta)#filtering-contexts-and-context-instances).", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", Type: "string", }, { - Name: "limit", - In: "query", - Description: "The number of applications to return. Defaults to 10.", - Type: "integer", + Name: "project-key", + In: "path", + Description: "", + Type: "string", }, { - Name: "offset", + Name: "config-key", + In: "path", + Description: "", + Type: "string", + }, + { + Name: "from", In: "query", - Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Description: "The starting time, as milliseconds since epoch (inclusive).", Type: "integer", }, { - Name: "sort", + Name: "to", In: "query", - Description: "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.", - Type: "string", + Description: "The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after 'from'.", + Type: "integer", }, { - Name: "expand", + Name: "env", In: "query", - Description: "A comma-separated list of properties that can reveal additional information in the response. Options: 'flags'.", + Description: "An environment key. Only metrics from this environment will be included.", Type: "string", }, }, @@ -1029,534 +1239,525 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/applications", + Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics-by-variation", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update application", - Long: "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](/#section/Overview/Updates).", - Use: "update", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get AI config variation", + Long: "Get an AI config variation by key. The response includes all variation versions for the given variation key.", + Use: "list-ai-config-variation", Params: []Param{ { - Name: "application-key", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", In: "path", - Description: "The application key", + Description: "", Type: "string", }, - }, - HTTPMethod: "PATCH", - HasBody: true, - IsBeta: true, - RequiresBody: true, - Path: "/api/v2/applications/{applicationKey}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update application version", - Long: "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](/#section/Overview/Updates).", - Use: "update-version", - Params: []Param{ { - Name: "application-key", + Name: "config-key", In: "path", - Description: "The application key", + Description: "", Type: "string", }, { - Name: "version-key", + Name: "variation-key", In: "path", - Description: "The application version key", + Description: "", Type: "string", }, }, - HTTPMethod: "PATCH", - HasBody: true, + HTTPMethod: "GET", + HasBody: false, IsBeta: true, - RequiresBody: true, - Path: "/api/v2/applications/{applicationKey}/versions/{versionKey}", + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete approval request", - Long: "Delete an approval request.", - Use: "delete", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List AI configs", + Long: "Get a list of all AI configs in the given project.", + Use: "list-ai-configs", Params: []Param{ { - Name: "id", - In: "path", - Description: "The approval request ID", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", Type: "string", }, - }, - HTTPMethod: "DELETE", - HasBody: false, - IsBeta: false, - RequiresBody: false, - Path: "/api/v2/approval-requests/{id}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete approval request for a flag", - Long: "Delete an approval request for a feature flag.", - Use: "delete-for-flag", - Params: []Param{ { Name: "project-key", In: "path", - Description: "The project key", + Description: "", Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "sort", + In: "query", + Description: "A sort to apply to the list of AI configs.", Type: "string", }, { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", + Name: "limit", + In: "query", + Description: "The number of AI configs to return.", + Type: "integer", }, { - Name: "id", - In: "path", - Description: "The feature flag approval request ID", + Name: "offset", + In: "query", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Type: "integer", + }, + { + Name: "filter", + In: "query", + Description: "A filter to apply to the list of AI configs.", Type: "string", }, }, - HTTPMethod: "DELETE", + HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}", + Path: "/api/v2/projects/{projectKey}/ai-configs", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get approval request for a flag", - Long: "Get a single approval request for a feature flag.", - Use: "get-approval-for-flag", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get AI model config", + Long: "Get an AI model config by key.", + Use: "get-model-config", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", Type: "string", }, { - Name: "environment-key", + Name: "project-key", In: "path", - Description: "The environment key", + Description: "", Type: "string", }, { - Name: "id", + Name: "model-config-key", In: "path", - Description: "The feature flag approval request ID", + Description: "", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}", + Path: "/api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get approval request", - Long: "Get an approval request by approval request ID.\n\n### Expanding approval response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `flag` includes the flag the approval request belongs to\n- `project` includes the project the approval request belongs to\n- `environments` includes the environments the approval request relates to\n\nFor example, `expand=project,flag` includes the `project` and `flag` fields in the response.\n", - Use: "get", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List AI model configs", + Long: "Get all AI model configs for a project.", + Use: "list-model-configs", Params: []Param{ { - Name: "id", - In: "path", - Description: "The approval request ID", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", Type: "string", }, { - Name: "expand", - In: "query", - Description: "A comma-separated list of fields to expand in the response. Supported fields are explained above.", + Name: "project-key", + In: "path", + Description: "", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/approval-requests/{id}", + Path: "/api/v2/projects/{projectKey}/ai-configs/model-configs", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "List approval requests", - Long: "Get all approval requests.\n\n### Filtering approvals\n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf [\"memberId1\", \"memberId2\"]`.\n- `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`.\n- `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`.\n- `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\"]`.\n- `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\"]`.\n\nYou 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`.\n\n### Expanding approval response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `flag` includes the flag the approval request belongs to\n- `project` includes the project the approval request belongs to\n- `environments` includes the environments the approval request relates to\n\nFor example, `expand=project,flag` includes the `project` and `flag` fields in the response.\n", - Use: "list", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update AI config", + Long: "Edit an existing AI config.\n\nThe request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.\n\nHere's an example:\n ```\n {\n \"description\": \"Example updated description\",\n \"tags\": [\"new-tag\"]\n }\n ```\n", + Use: "update-ai-config", Params: []Param{ { - Name: "filter", - In: "query", - Description: "A comma-separated list of filters. Each filter is of the form 'field operator value'. Supported fields are explained above.", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", Type: "string", }, { - Name: "expand", - In: "query", - Description: "A comma-separated list of fields to expand in the response. Supported fields are explained above.", + Name: "project-key", + In: "path", + Description: "", Type: "string", }, { - Name: "limit", - In: "query", - Description: "The number of approvals to return. Defaults to 20. Maximum limit is 200.", - Type: "integer", - }, - { - Name: "offset", - In: "query", - Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", - Type: "integer", + Name: "config-key", + In: "path", + Description: "", + Type: "string", }, }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: false, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/approval-requests", + Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "List approval requests for a flag", - Long: "Get all approval requests for a feature flag.", - Use: "list-approvals-for-flag", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update AI config variation", + Long: "Edit an existing variation of an AI config. This creates a new version of the variation.\n\nThe request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.\n\nHere's an example:\n```\n {\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"The new message\"\n }\n ]\n }\n```\n", + Use: "update-ai-config-variation", Params: []Param{ + { + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, { Name: "project-key", In: "path", - Description: "The project key", + Description: "", Type: "string", }, { - Name: "feature-flag-key", + Name: "config-key", In: "path", - Description: "The feature flag key", + Description: "", Type: "string", }, { - Name: "environment-key", + Name: "variation-key", In: "path", - Description: "The environment key", + Description: "", Type: "string", }, }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: false, - RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create approval request", - Long: "Create an approval request.\n\nThis endpoint currently supports creating an approval request for a flag across all environments with the following instructions:\n\n- `addVariation`\n- `removeVariation`\n- `updateVariation`\n- `updateDefaultVariation`\n\nFor details on using these instructions, read [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag).\n\nTo create an approval for a flag specific to an environment, use [Create approval request for a flag](/tag/Approvals#operation/postApprovalRequestForFlag).\n", - Use: "create", - Params: []Param{}, - HTTPMethod: "POST", + HTTPMethod: "PATCH", HasBody: true, - IsBeta: false, - RequiresBody: true, - Path: "/api/v2/approval-requests", + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Apply approval request", - Long: "Apply an approval request that has been approved.", - Use: "create-apply", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create new AI config", + Long: "Create a new AI config within the given project.", + Use: "create-ai-config", Params: []Param{ { - Name: "id", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", + Type: "string", + }, + { + Name: "project-key", In: "path", - Description: "The feature flag approval request ID", + Description: "", Type: "string", }, }, HTTPMethod: "POST", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/approval-requests/{id}/apply", + Path: "/api/v2/projects/{projectKey}/ai-configs", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Apply approval request for a flag", - Long: "Apply an approval request that has been approved.", - Use: "create-apply-for-flag", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create AI config variation", + Long: "Create a new variation for a given AI config.\n\nThe \u003ccode\u003emodel\u003c/code\u003e in the request body requires a \u003ccode\u003emodelName\u003c/code\u003e and \u003ccode\u003eparameters\u003c/code\u003e, for example:\n\n```\n \"model\": {\n \"modelName\": \"claude-3-opus-20240229\",\n \"parameters\": {\n \"max_tokens\": 1024\n }\n }\n```\n", + Use: "create-ai-config-variation", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", Type: "string", }, { - Name: "environment-key", + Name: "project-key", In: "path", - Description: "The environment key", + Description: "", Type: "string", }, { - Name: "id", + Name: "config-key", In: "path", - Description: "The feature flag approval request ID", + Description: "", Type: "string", }, }, HTTPMethod: "POST", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/apply", + Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create approval request for a flag", - Long: "Create an approval request for a feature flag.", - Use: "create-for-flag", + NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create an AI model config", + Long: "Create an AI model config. You can use this in any variation for any AI config in your project.", + Use: "create-model-config", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "ld-api-version", + In: "header", + Description: "Version of the endpoint.", Type: "string", }, { - Name: "environment-key", + Name: "project-key", In: "path", - Description: "The environment key", + Description: "", Type: "string", }, }, HTTPMethod: "POST", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests", + Path: "/api/v2/projects/{projectKey}/ai-configs/model-configs", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Review approval request", - Long: "Review an approval request by approving or denying changes.", - Use: "create-review", + NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete application", + Long: "Delete an application.", + Use: "delete", Params: []Param{ { - Name: "id", + Name: "application-key", In: "path", - Description: "The approval request ID", + Description: "The application key", Type: "string", }, }, - HTTPMethod: "POST", - HasBody: true, - IsBeta: false, - RequiresBody: true, - Path: "/api/v2/approval-requests/{id}/reviews", + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/applications/{applicationKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Review approval request for a flag", - Long: "Review an approval request by approving or denying changes.", - Use: "create-review-for-flag", + NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete application version", + Long: "Delete an application version.", + Use: "delete-version", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "feature-flag-key", + Name: "application-key", In: "path", - Description: "The feature flag key", + Description: "The application key", Type: "string", }, { - Name: "environment-key", + Name: "version-key", In: "path", - Description: "The environment key", - Type: "string", - }, - { - Name: "id", - In: "path", - Description: "The feature flag approval request ID", + Description: "The application version key", Type: "string", }, }, - HTTPMethod: "POST", - HasBody: true, - IsBeta: false, - RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/reviews", + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/applications/{applicationKey}/versions/{versionKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create approval request to copy flag configurations across environments", - Long: "Create an approval request to copy a feature flag's configuration across environments.", - Use: "create-flag-copy-config", + NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get application by key", + Long: "\nRetrieve an application by the application key.\n\n### Expanding the application response\n\nLaunchDarkly supports expanding the \"Get application\" response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `flags` includes details on the flags that have been evaluated by the application\n\nFor example, use `?expand=flags` to include the `flags` field in the response. By default, this field is **not** included in the response.\n", + Use: "get", Params: []Param{ { - Name: "project-key", + Name: "application-key", In: "path", - Description: "The project key", + Description: "The application key", Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "expand", + In: "query", + Description: "A comma-separated list of properties that can reveal additional information in the response. Options: 'flags'.", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/applications/{applicationKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get application versions by application key", + Long: "Get a list of versions for a specific application in an account.", + Use: "list-versions", + Params: []Param{ + { + Name: "filter", + In: "query", + Description: "Accepts filter by 'key', 'name', 'supported', and 'autoAdded'. To learn more about the filter syntax, read [Filtering applications and application versions](/tag/Applications-(beta)#filtering-contexts-and-context-instances).", Type: "string", }, { - Name: "environment-key", + Name: "application-key", In: "path", - Description: "The environment key for the target environment", + Description: "The application key", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "The number of versions to return. Defaults to 50.", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Type: "integer", + }, + { + Name: "sort", + In: "query", + Description: "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.", Type: "string", }, }, - HTTPMethod: "POST", - HasBody: true, - IsBeta: false, - RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests-flag-copy", + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/applications/{applicationKey}/versions", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_AuditLogResourceCmd, client, markdownRenderer, OperationData{ - Short: "List audit log entries", - Long: "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.\n\nLaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://docs.launchdarkly.com/home/account/role-resources#about-the-resource-specifier-syntax).\n", + NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get applications", + Long: "\nGet a list of applications.\n\n### Expanding the applications response\n\nLaunchDarkly supports expanding the \"Get applications\" response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `flags` includes details on the flags that have been evaluated by the application\n\nFor example, use `?expand=flags` to include the `flags` field in the response. By default, this field is **not** included in the response.\n", Use: "list", Params: []Param{ { - Name: "before", + Name: "filter", In: "query", - Description: "A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred before the timestamp.", - Type: "integer", + Description: "Accepts filter by 'key', 'name', 'kind', and 'autoAdded'. To learn more about the filter syntax, read [Filtering applications and application versions](/tag/Applications-(beta)#filtering-contexts-and-context-instances).", + Type: "string", }, { - Name: "after", + Name: "limit", In: "query", - Description: "A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred after the timestamp.", + Description: "The number of applications to return. Defaults to 10.", Type: "integer", }, { - Name: "q", + Name: "offset", In: "query", - Description: "Text to search for. You can search for the full or partial name of the resource.", - Type: "string", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Type: "integer", }, { - Name: "limit", + Name: "sort", In: "query", - Description: "A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10.", - Type: "integer", + Description: "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.", + Type: "string", }, { - Name: "spec", + Name: "expand", In: "query", - Description: "A resource specifier that lets you filter audit log listings by resource", + Description: "A comma-separated list of properties that can reveal additional information in the response. Options: 'flags'.", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/auditlog", + Path: "/api/v2/applications", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_AuditLogResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get audit log entry", - Long: "Fetch a detailed audit log entry representation. The detailed representation includes several fields that are not present in the summary representation, including:\n\n- `delta`: the JSON patch body that was used in the request to update the entity\n- `previousVersion`: a JSON representation of the previous version of the entity\n- `currentVersion`: a JSON representation of the current version of the entity\n", - Use: "get", + NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update application", + Long: "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](/#section/Overview/Updates).", + Use: "update", Params: []Param{ { - Name: "id", + Name: "application-key", In: "path", - Description: "The ID of the audit log entry", + Description: "The application key", Type: "string", }, }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: false, - RequiresBody: false, - Path: "/api/v2/auditlog/{id}", + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/applications/{applicationKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete branches", - Long: "Asynchronously delete a number of branches.", - Use: "delete-branches", + NewOperationCmd(gen_ApplicationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update application version", + Long: "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](/#section/Overview/Updates).", + Use: "update-version", Params: []Param{ { - Name: "repo", + Name: "application-key", In: "path", - Description: "The repository name to delete branches for.", + Description: "The application key", + Type: "string", + }, + { + Name: "version-key", + In: "path", + Description: "The application version key", Type: "string", }, }, - HTTPMethod: "POST", + HTTPMethod: "PATCH", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/code-refs/repositories/{repo}/branch-delete-tasks", + Path: "/api/v2/applications/{applicationKey}/versions/{versionKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete repository", - Long: "Delete a repository with the specified name.", - Use: "delete-repository", + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete approval request", + Long: "Delete an approval request.", + Use: "delete", Params: []Param{ { - Name: "repo", + Name: "id", In: "path", - Description: "The repository name", + Description: "The approval request ID", Type: "string", }, }, @@ -1564,57 +1765,75 @@ func AddAllResourceCmds( HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/code-refs/repositories/{repo}", + Path: "/api/v2/approval-requests/{id}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get branch", - Long: "Get a specific branch in a repository.", - Use: "get-branch", + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete approval request for a flag", + Long: "Delete an approval request for a feature flag.", + Use: "delete-for-flag", Params: []Param{ { - Name: "repo", + Name: "project-key", In: "path", - Description: "The repository name", + Description: "The project key", Type: "string", }, { - Name: "branch", + Name: "feature-flag-key", In: "path", - Description: "The url-encoded branch name", + Description: "The feature flag key", Type: "string", }, { - Name: "proj-key", - In: "query", - Description: "Filter results to a specific project", + Name: "environment-key", + In: "path", + Description: "The environment key", Type: "string", }, { - Name: "flag-key", - In: "query", - Description: "Filter results to a specific flag key", + Name: "id", + In: "path", + Description: "The feature flag approval request ID", Type: "string", }, }, - HTTPMethod: "GET", + HTTPMethod: "DELETE", HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/code-refs/repositories/{repo}/branches/{branch}", + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "List branches", - Long: "Get a list of branches.", - Use: "list-branches", + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get approval request for a flag", + Long: "Get a single approval request for a feature flag.", + Use: "get-approval-for-flag", Params: []Param{ { - Name: "repo", + Name: "project-key", In: "path", - Description: "The repository name", + Description: "The project key", + Type: "string", + }, + { + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "id", + In: "path", + Description: "The feature flag approval request ID", Type: "string", }, }, @@ -1622,49 +1841,63 @@ func AddAllResourceCmds( HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/code-refs/repositories/{repo}/branches", + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "List extinctions", - Long: "Get a list of all extinctions. LaunchDarkly creates an extinction event after you remove all code references to a flag. To learn more, read [About extinction events](https://docs.launchdarkly.com/home/observability/code-references#about-extinction-events).", - Use: "list-extinctions", + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get approval request", + Long: "Get an approval request by approval request ID.\n\n### Expanding approval response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `flag` includes the flag the approval request belongs to\n- `project` includes the project the approval request belongs to\n- `environments` includes the environments the approval request relates to\n\nFor example, `expand=project,flag` includes the `project` and `flag` fields in the response.\n", + Use: "get", Params: []Param{ { - Name: "repo-name", - In: "query", - Description: "Filter results to a specific repository", + Name: "id", + In: "path", + Description: "The approval request ID", Type: "string", }, { - Name: "branch-name", + Name: "expand", In: "query", - Description: "Filter results to a specific branch. By default, only the default branch will be queried for extinctions.", + Description: "A comma-separated list of fields to expand in the response. Supported fields are explained above.", Type: "string", }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/approval-requests/{id}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "List approval requests", + Long: "Get all approval requests.\n\n### Filtering approvals\n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf [\"memberId1\", \"memberId2\"]`.\n- `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`.\n- `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`.\n- `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\"]`.\n- `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\"]`.\n\nYou 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`.\n\n### Expanding approval response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `flag` includes the flag the approval request belongs to\n- `project` includes the project the approval request belongs to\n- `environments` includes the environments the approval request relates to\n\nFor example, `expand=project,flag` includes the `project` and `flag` fields in the response.\n", + Use: "list", + Params: []Param{ { - Name: "proj-key", + Name: "filter", In: "query", - Description: "Filter results to a specific project", + Description: "A comma-separated list of filters. Each filter is of the form 'field operator value'. Supported fields are explained above.", Type: "string", }, { - Name: "flag-key", + Name: "expand", In: "query", - Description: "Filter results to a specific flag key", + Description: "A comma-separated list of fields to expand in the response. Supported fields are explained above.", Type: "string", }, { - Name: "from", + Name: "limit", In: "query", - Description: "Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with 'to'.", + Description: "The number of approvals to return. Defaults to 20. Maximum limit is 200.", Type: "integer", }, { - Name: "to", + Name: "offset", In: "query", - Description: "Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with 'from'.", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", Type: "integer", }, }, @@ -1672,37 +1905,31 @@ func AddAllResourceCmds( HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/code-refs/extinctions", + Path: "/api/v2/approval-requests", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "List repositories", - Long: "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.", - Use: "list-repositories", + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "List approval requests for a flag", + Long: "Get all approval requests for a feature flag.", + Use: "list-approvals-for-flag", Params: []Param{ { - Name: "with-branches", - In: "query", - Description: "If set to any value, the endpoint returns repositories with associated branch data", - Type: "string", - }, - { - Name: "with-references-for-default-branch", - In: "query", - Description: "If set to any value, the endpoint returns repositories with associated branch data, as well as code references for the default git branch", + Name: "project-key", + In: "path", + Description: "The project key", Type: "string", }, { - Name: "proj-key", - In: "query", - Description: "A LaunchDarkly project key. If provided, this filters code reference results to the specified project.", + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", Type: "string", }, { - Name: "flag-key", - In: "query", - Description: "If set to any value, the endpoint returns repositories with associated branch data, as well as code references for the default git branch", + Name: "environment-key", + In: "path", + Description: "The environment key", Type: "string", }, }, @@ -1710,47 +1937,85 @@ func AddAllResourceCmds( HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/code-refs/repositories", + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get repository", - Long: "Get a single repository by name.", - Use: "get-repository", + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create approval request", + Long: "Create an approval request.\n\nThis endpoint currently supports creating an approval request for a flag across all environments with the following instructions:\n\n- `addVariation`\n- `removeVariation`\n- `updateVariation`\n- `updateDefaultVariation`\n\nFor details on using these instructions, read [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag).\n\nTo create an approval for a flag specific to an environment, use [Create approval request for a flag](/tag/Approvals#operation/postApprovalRequestForFlag).\n", + Use: "create", + Params: []Param{}, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/approval-requests", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Apply approval request", + Long: "Apply an approval request that has been approved.", + Use: "create-apply", Params: []Param{ { - Name: "repo", + Name: "id", In: "path", - Description: "The repository name", + Description: "The feature flag approval request ID", Type: "string", }, }, - HTTPMethod: "GET", - HasBody: false, + HTTPMethod: "POST", + HasBody: true, IsBeta: false, - RequiresBody: false, - Path: "/api/v2/code-refs/repositories/{repo}", + RequiresBody: true, + Path: "/api/v2/approval-requests/{id}/apply", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get links to code reference repositories for each project", - Long: "Get links for all projects that have code references.", - Use: "get-root-statistic", - Params: []Param{}, - HTTPMethod: "GET", - HasBody: false, + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Apply approval request for a flag", + Long: "Apply an approval request that has been approved.", + Use: "create-apply-for-flag", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "id", + In: "path", + Description: "The feature flag approval request ID", + Type: "string", + }, + }, + HTTPMethod: "POST", + HasBody: true, IsBeta: false, - RequiresBody: false, - Path: "/api/v2/code-refs/statistics", + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/apply", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get code references statistics for flags", - Long: "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.", - Use: "get-statistics", + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create approval request for a flag", + Long: "Create an approval request for a feature flag.", + Use: "create-for-flag", Params: []Param{ { Name: "project-key", @@ -1759,55 +2024,73 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "flag-key", - In: "query", - Description: "Filter results to a specific flag key", + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", Type: "string", }, }, - HTTPMethod: "GET", - HasBody: false, + HTTPMethod: "POST", + HasBody: true, IsBeta: false, - RequiresBody: false, - Path: "/api/v2/code-refs/statistics/{projectKey}", + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update repository", - Long: "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](/#section/Overview/Updates).", - Use: "update-repository", + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Review approval request", + Long: "Review an approval request by approving or denying changes.", + Use: "create-review", Params: []Param{ { - Name: "repo", + Name: "id", In: "path", - Description: "The repository name", + Description: "The approval request ID", Type: "string", }, }, - HTTPMethod: "PATCH", + HTTPMethod: "POST", HasBody: true, IsBeta: false, RequiresBody: true, - Path: "/api/v2/code-refs/repositories/{repo}", + Path: "/api/v2/approval-requests/{id}/reviews", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create extinction", - Long: "Create a new extinction.", - Use: "create-extinction", + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Review approval request for a flag", + Long: "Review an approval request by approving or denying changes.", + Use: "create-review-for-flag", Params: []Param{ { - Name: "repo", + Name: "project-key", In: "path", - Description: "The repository name", + Description: "The project key", Type: "string", }, { - Name: "branch", + Name: "feature-flag-key", In: "path", - Description: "The URL-encoded branch name", + Description: "The feature flag key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "id", + In: "path", + Description: "The feature flag approval request ID", Type: "string", }, }, @@ -1815,53 +2098,1362 @@ func AddAllResourceCmds( HasBody: true, IsBeta: false, RequiresBody: true, - Path: "/api/v2/code-refs/repositories/{repo}/branches/{branch}/extinction-events", + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/reviews", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create repository", - Long: "Create a repository with the specified name.", - Use: "create-repository", - Params: []Param{}, + NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create approval request to copy flag configurations across environments", + Long: "Create an approval request to copy a feature flag's configuration across environments.", + Use: "create-flag-copy-config", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key for the target environment", + Type: "string", + }, + }, HTTPMethod: "POST", HasBody: true, IsBeta: false, RequiresBody: true, - Path: "/api/v2/code-refs/repositories", + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests-flag-copy", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Upsert branch", - Long: "Create a new branch if it doesn't exist, or update the branch if it already exists.", - Use: "replace-branch", + NewOperationCmd(gen_ApprovalsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update approval request", + Long: "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instruction for updating an approval request.\n\n#### addReviewers\n\nAdds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`.\n\n##### Parameters\n\n- `notifyMemberIds`: (Optional) List of member IDs.\n- `notifyTeamKeys`: (Optional) List of team keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addReviewers\",\n \"notifyMemberIds\": [ \"user-key-123abc\", \"user-key-456def\" ],\n \"notifyTeamKeys\": [ \"team-key-789abc\"]\n }]\n}\n```\n", + Use: "update-request", Params: []Param{ { - Name: "repo", - In: "path", - Description: "The repository name", + Name: "id", + In: "path", + Description: "The approval ID", + Type: "string", + }, + }, + HTTPMethod: "PATCH", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/approval-requests/{id}", + SupportsSemanticPatch: true, + }) + + NewOperationCmd(gen_ApprovalsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update flag approval request", + Long: "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instruction for updating an approval request.\n\n#### addReviewers\n\nAdds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`.\n\n##### Parameters\n\n- `notifyMemberIds`: (Optional) List of member IDs.\n- `notifyTeamKeys`: (Optional) List of team keys.\n", + Use: "update-flag-config-request", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "id", + In: "path", + Description: "The approval ID", + Type: "string", + }, + }, + HTTPMethod: "PATCH", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}", + SupportsSemanticPatch: true, + }) + + NewOperationCmd(gen_AuditLogResourceCmd, client, markdownRenderer, OperationData{ + Short: "List audit log entries", + Long: "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.\n\nLaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://docs.launchdarkly.com/home/account/role-resources#about-the-resource-specifier-syntax).\n", + Use: "list", + Params: []Param{ + { + Name: "before", + In: "query", + Description: "A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred before the timestamp.", + Type: "integer", + }, + { + Name: "after", + In: "query", + Description: "A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred after the timestamp.", + Type: "integer", + }, + { + Name: "q", + In: "query", + Description: "Text to search for. You can search for the full or partial name of the resource.", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10.", + Type: "integer", + }, + { + Name: "spec", + In: "query", + Description: "A resource specifier that lets you filter audit log listings by resource", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/auditlog", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_AuditLogResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get audit log entry", + Long: "Fetch a detailed audit log entry representation. The detailed representation includes several fields that are not present in the summary representation, including:\n\n- `delta`: the JSON patch body that was used in the request to update the entity\n- `previousVersion`: a JSON representation of the previous version of the entity\n- `currentVersion`: a JSON representation of the current version of the entity\n", + Use: "get", + Params: []Param{ + { + Name: "id", + In: "path", + Description: "The ID of the audit log entry", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/auditlog/{id}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_AuditLogResourceCmd, client, markdownRenderer, OperationData{ + Short: "Search audit log entries", + Long: "Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers.\n\nLaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://docs.launchdarkly.com/home/account/role-resources#about-the-resource-specifier-syntax).\n", + Use: "create-entries", + Params: []Param{ + { + Name: "before", + In: "query", + Description: "A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred before the timestamp.", + Type: "integer", + }, + { + Name: "after", + In: "query", + Description: "A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp.", + Type: "integer", + }, + { + Name: "q", + In: "query", + Description: "Text to search for. You can search for the full or partial name of the resource.", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10.", + Type: "integer", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/auditlog", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete branches", + Long: "Asynchronously delete a number of branches.", + Use: "delete-branches", + Params: []Param{ + { + Name: "repo", + In: "path", + Description: "The repository name to delete branches for.", + Type: "string", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/code-refs/repositories/{repo}/branch-delete-tasks", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete repository", + Long: "Delete a repository with the specified name.", + Use: "delete-repository", + Params: []Param{ + { + Name: "repo", + In: "path", + Description: "The repository name", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/code-refs/repositories/{repo}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get branch", + Long: "Get a specific branch in a repository.", + Use: "get-branch", + Params: []Param{ + { + Name: "repo", + In: "path", + Description: "The repository name", + Type: "string", + }, + { + Name: "branch", + In: "path", + Description: "The url-encoded branch name", + Type: "string", + }, + { + Name: "proj-key", + In: "query", + Description: "Filter results to a specific project", + Type: "string", + }, + { + Name: "flag-key", + In: "query", + Description: "Filter results to a specific flag key", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/code-refs/repositories/{repo}/branches/{branch}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "List branches", + Long: "Get a list of branches.", + Use: "list-branches", + Params: []Param{ + { + Name: "repo", + In: "path", + Description: "The repository name", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/code-refs/repositories/{repo}/branches", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "List extinctions", + Long: "Get a list of all extinctions. LaunchDarkly creates an extinction event after you remove all code references to a flag. To learn more, read [About extinction events](https://docs.launchdarkly.com/home/observability/code-references#about-extinction-events).", + Use: "list-extinctions", + Params: []Param{ + { + Name: "repo-name", + In: "query", + Description: "Filter results to a specific repository", + Type: "string", + }, + { + Name: "branch-name", + In: "query", + Description: "Filter results to a specific branch. By default, only the default branch will be queried for extinctions.", + Type: "string", + }, + { + Name: "proj-key", + In: "query", + Description: "Filter results to a specific project", + Type: "string", + }, + { + Name: "flag-key", + In: "query", + Description: "Filter results to a specific flag key", + Type: "string", + }, + { + Name: "from", + In: "query", + Description: "Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with 'to'.", + Type: "integer", + }, + { + Name: "to", + In: "query", + Description: "Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with 'from'.", + Type: "integer", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/code-refs/extinctions", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "List repositories", + Long: "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.", + Use: "list-repositories", + Params: []Param{ + { + Name: "with-branches", + In: "query", + Description: "If set to any value, the endpoint returns repositories with associated branch data", + Type: "string", + }, + { + Name: "with-references-for-default-branch", + In: "query", + Description: "If set to any value, the endpoint returns repositories with associated branch data, as well as code references for the default git branch", + Type: "string", + }, + { + Name: "proj-key", + In: "query", + Description: "A LaunchDarkly project key. If provided, this filters code reference results to the specified project.", + Type: "string", + }, + { + Name: "flag-key", + In: "query", + Description: "If set to any value, the endpoint returns repositories with associated branch data, as well as code references for the default git branch", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/code-refs/repositories", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get repository", + Long: "Get a single repository by name.", + Use: "get-repository", + Params: []Param{ + { + Name: "repo", + In: "path", + Description: "The repository name", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/code-refs/repositories/{repo}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get links to code reference repositories for each project", + Long: "Get links for all projects that have code references.", + Use: "get-root-statistic", + Params: []Param{}, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/code-refs/statistics", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get code references statistics for flags", + Long: "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.", + Use: "get-statistics", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "flag-key", + In: "query", + Description: "Filter results to a specific flag key", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/code-refs/statistics/{projectKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update repository", + Long: "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](/#section/Overview/Updates).", + Use: "update-repository", + Params: []Param{ + { + Name: "repo", + In: "path", + Description: "The repository name", + Type: "string", + }, + }, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/code-refs/repositories/{repo}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create extinction", + Long: "Create a new extinction.", + Use: "create-extinction", + Params: []Param{ + { + Name: "repo", + In: "path", + Description: "The repository name", + Type: "string", + }, + { + Name: "branch", + In: "path", + Description: "The URL-encoded branch name", + Type: "string", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/code-refs/repositories/{repo}/branches/{branch}/extinction-events", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create repository", + Long: "Create a repository with the specified name.", + Use: "create-repository", + Params: []Param{}, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/code-refs/repositories", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CodeRefsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Upsert branch", + Long: "Create a new branch if it doesn't exist, or update the branch if it already exists.", + Use: "replace-branch", + Params: []Param{ + { + Name: "repo", + In: "path", + Description: "The repository name", + Type: "string", + }, + { + Name: "branch", + In: "path", + Description: "The URL-encoded branch name", + Type: "string", + }, + }, + HTTPMethod: "PUT", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/code-refs/repositories/{repo}/branches/{branch}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ContextSettingsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update flag settings for context", + Long: "\nEnable or disable a feature flag for a context based on its context kind and key.\n\nOmitting the `setting` attribute from the request body, or including a `setting` of `null`, erases the current setting for a context.\n\nIf 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.\n", + Use: "replace", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "context-kind", + In: "path", + Description: "The context kind", + Type: "string", + }, + { + Name: "context-key", + In: "path", + Description: "The context key", + Type: "string", + }, + { + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, + }, + HTTPMethod: "PUT", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{contextKind}/{contextKey}/flags/{featureFlagKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete context instances", + Long: "Delete context instances by ID.", + Use: "delete-instances", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "id", + In: "path", + Description: "The context instance ID", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Evaluate flags for context instance", + Long: "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).\n\n### Filtering \n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `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`.\n- `tags` filters the list to flags that have all of the tags in the list. For example: `filter=tags contains [\"beta\",\"q1\"]`.\n\nYou 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`.\n", + Use: "evaluate-instance", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "The number of feature flags to return. Defaults to -1, which returns all flags", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Type: "integer", + }, + { + Name: "sort", + In: "query", + Description: "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order", + Type: "string", + }, + { + Name: "filter", + In: "query", + Description: "A comma-separated list of filters. Each filter is of the form 'field operator value'. Supported fields are explained above.", + Type: "string", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get context attribute names", + Long: "Get context attribute names.", + Use: "list-attribute-names", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "filter", + In: "query", + Description: "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](/tag/Contexts#filtering-contexts-and-context-instances).", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "Specifies the maximum number of items in the collection to return (max: 100, default: 100)", + Type: "integer", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get context attribute values", + Long: "Get context attribute values.", + Use: "list-attribute-values", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "attribute-name", + In: "path", + Description: "The attribute name", + Type: "string", + }, + { + Name: "filter", + In: "query", + Description: "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](/tag/Contexts#filtering-contexts-and-context-instances).", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "Specifies the maximum number of items in the collection to return (max: 100, default: 50)", + Type: "integer", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes/{attributeName}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get context instances", + Long: "Get context instances by ID.", + Use: "list-instances", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "id", + In: "path", + Description: "The context instance ID", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "Specifies the maximum number of context instances to return (max: 50, default: 20)", + Type: "integer", + }, + { + Name: "continuation-token", + In: "query", + Description: "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.", + Type: "string", + }, + { + Name: "sort", + In: "query", + Description: "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'.", + Type: "string", + }, + { + Name: "filter", + In: "query", + Description: "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](/tag/Contexts#filtering-contexts-and-context-instances).", + Type: "string", + }, + { + Name: "include-total-count", + In: "query", + Description: "Specifies whether to include or omit the total count of matching context instances. Defaults to true.", + Type: "boolean", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get context kinds", + Long: "Get all context kinds for a given project.", + Use: "list-kinds-key", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/context-kinds", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get contexts", + Long: "Get contexts based on kind and key.", + Use: "list", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "kind", + In: "path", + Description: "The context kind", + Type: "string", + }, + { + Name: "key", + In: "path", + Description: "The context key", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", + Type: "integer", + }, + { + Name: "continuation-token", + In: "query", + Description: "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.", + Type: "string", + }, + { + Name: "sort", + In: "query", + Description: "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'.", + Type: "string", + }, + { + Name: "filter", + In: "query", + Description: "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](/tag/Contexts#filtering-contexts-and-context-instances).", + Type: "string", + }, + { + Name: "include-total-count", + In: "query", + Description: "Specifies whether to include or omit the total count of matching contexts. Defaults to true.", + Type: "boolean", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{kind}/{key}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create or update context kind", + Long: "Create or update a context kind by key. Only the included fields will be updated.", + Use: "replace-kind", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "key", + In: "path", + Description: "The context kind key", + Type: "string", + }, + }, + HTTPMethod: "PUT", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/context-kinds/{key}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Search for context instances", + Long: "\nSearch for context instances.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances). To learn more about context instances, read [Context instances](https://docs.launchdarkly.com/home/observability/multi-contexts#context-instances).\n", + Use: "search-instances", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", + Type: "integer", + }, + { + Name: "continuation-token", + In: "query", + Description: "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.", + Type: "string", + }, + { + Name: "sort", + In: "query", + Description: "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'.", + Type: "string", + }, + { + Name: "filter", + In: "query", + Description: "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](/tag/Contexts#filtering-contexts-and-context-instances).", + Type: "string", + }, + { + Name: "include-total-count", + In: "query", + Description: "Specifies whether to include or omit the total count of matching context instances. Defaults to true.", + Type: "boolean", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Search for contexts", + Long: "\nSearch for contexts.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances). To learn more about contexts, read [Contexts and context kinds](https://docs.launchdarkly.com/home/observability/contexts#contexts-and-context-kinds).\n", + Use: "search", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", + Type: "integer", + }, + { + Name: "continuation-token", + In: "query", + Description: "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.", + Type: "string", + }, + { + Name: "sort", + In: "query", + Description: "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'.", + Type: "string", + }, + { + Name: "filter", + In: "query", + Description: "A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances).", + Type: "string", + }, + { + Name: "include-total-count", + In: "query", + Description: "Specifies whether to include or omit the total count of matching contexts. Defaults to true.", + Type: "boolean", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/search", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CustomRolesResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete custom role", + Long: "Delete a custom role by key", + Use: "delete", + Params: []Param{ + { + Name: "custom-role-key", + In: "path", + Description: "The custom role key", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/roles/{customRoleKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CustomRolesResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get custom role", + Long: "Get a single custom role by key or ID", + Use: "get", + Params: []Param{ + { + Name: "custom-role-key", + In: "path", + Description: "The custom role key or ID", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/roles/{customRoleKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CustomRolesResourceCmd, client, markdownRenderer, OperationData{ + Short: "List custom roles", + Long: "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.", + Use: "list", + Params: []Param{ + { + Name: "limit", + In: "query", + Description: "The maximum number of custom roles to return. Defaults to 20.", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "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'.", + Type: "integer", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/roles", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CustomRolesResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update custom role", + Long: "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](/#section/Overview/Updates).\u003cbr/\u003e\u003cbr/\u003eTo add an element to the `policy` array, set the `path` to `/policy` and then append `/\u003carray index\u003e`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.", + Use: "update", + Params: []Param{ + { + Name: "custom-role-key", + In: "path", + Description: "The custom role key", + Type: "string", + }, + }, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/roles/{customRoleKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_CustomRolesResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create custom role", + Long: "Create a new custom role", + Use: "create", + Params: []Param{}, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/roles", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_DataExportDestinationsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete Data Export destination", + Long: "Delete a Data Export destination by ID.", + Use: "delete", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "id", + In: "path", + Description: "The Data Export destination ID", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/destinations/{projectKey}/{environmentKey}/{id}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_DataExportDestinationsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get destination", + Long: "Get a single Data Export destination by ID.", + Use: "get", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "id", + In: "path", + Description: "The Data Export destination ID", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/destinations/{projectKey}/{environmentKey}/{id}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_DataExportDestinationsResourceCmd, client, markdownRenderer, OperationData{ + Short: "List destinations", + Long: "Get a list of Data Export destinations configured across all projects and environments.", + Use: "list", + Params: []Param{}, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/destinations", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_DataExportDestinationsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update Data Export destination", + Long: "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](/#section/Overview/Updates).", + Use: "update", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "id", + In: "path", + Description: "The Data Export destination ID", + Type: "string", + }, + }, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/destinations/{projectKey}/{environmentKey}/{id}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_DataExportDestinationsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create Data Export destination", + Long: "\nCreate a new Data Export destination.\n\nIn the `config` request body parameter, the fields required depend on the type of Data Export destination.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand \u003ccode\u003econfig\u003c/code\u003e parameter details\u003c/summary\u003e\n\n#### Azure Event Hubs\n\nTo create a Data Export destination with a `kind` of `azure-event-hubs`, the `config` object requires the following fields:\n\n* `namespace`: The Event Hub Namespace name\n* `name`: The Event Hub name\n* `policyName`: The shared access signature policy name. You can find your policy name in the settings of your Azure Event Hubs Namespace.\n* `policyKey`: The shared access signature key. You can find your policy key in the settings of your Azure Event Hubs Namespace.\n\n#### Google Cloud Pub/Sub\n\nTo create a Data Export destination with a `kind` of `google-pubsub`, the `config` object requires the following fields:\n\n* `project`: The Google PubSub project ID for the project to publish to\n* `topic`: The Google PubSub topic ID for the topic to publish to\n\n#### Amazon Kinesis\n\nTo create a Data Export destination with a `kind` of `kinesis`, the `config` object requires the following fields:\n\n* `region`: The Kinesis stream's AWS region key\n* `roleArn`: The Amazon Resource Name (ARN) of the AWS role that will be writing to Kinesis\n* `streamName`: The name of the Kinesis stream that LaunchDarkly is sending events to. This is not the ARN of the stream.\n\n#### mParticle\n\nTo create a Data Export destination with a `kind` of `mparticle`, the `config` object requires the following fields:\n\n* `apiKey`: The mParticle API key\n* `secret`: The mParticle API secret\n* `userIdentity`: The type of identifier you use to identify your end users in mParticle\n* `anonymousUserIdentity`: The type of identifier you use to identify your anonymous end users in mParticle\n\n#### Segment\n\nTo create a Data Export destination with a `kind` of `segment`, the `config` object requires the following fields:\n\n* `writeKey`: The Segment write key. This is used to authenticate LaunchDarkly's calls to Segment.\n\n\u003c/details\u003e\n", + Use: "create", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/destinations/{projectKey}/{environmentKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete environment", + Long: "Delete a environment by key.", + Use: "delete", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get environment", + Long: "\u003e ### Approval settings\n\u003e\n\u003e The `approvalSettings` key is only returned when the Flag Approvals feature is enabled.\n\nGet an environment given a project and key.\n", + Use: "get", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "List environments", + Long: "Return a list of environments for the specified project.\n\nBy 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.\n\n### Filtering environments\n\nLaunchDarkly supports two fields for filters:\n- `query` is a string that matches against the environments' names and keys. It is not case sensitive.\n- `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list.\n\nFor 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.\n\nThe 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`.\n\n### Sorting environments\n\nLaunchDarkly supports the following fields for sorting:\n\n- `createdOn` sorts by the creation date of the environment.\n- `critical` sorts by whether the environments are marked as critical.\n- `name` sorts by environment name.\n\nFor example, `sort=name` sorts the response by environment name in ascending order.\n", + Use: "list", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "The number of environments to return in the response. Defaults to 20.", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "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'.", + Type: "integer", + }, + { + Name: "filter", + In: "query", + Description: "A comma-separated list of filters. Each filter is of the form 'field:value'.", Type: "string", }, { - Name: "branch", - In: "path", - Description: "The URL-encoded branch name", + Name: "sort", + In: "query", + Description: "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order.", Type: "string", }, }, - HTTPMethod: "PUT", - HasBody: true, + HTTPMethod: "GET", + HasBody: false, IsBeta: false, - RequiresBody: true, - Path: "/api/v2/code-refs/repositories/{repo}/branches/{branch}", + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/environments", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ContextSettingsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update flag settings for context", - Long: "\nEnable or disable a feature flag for a context based on its context kind and key.\n\nOmitting the `setting` attribute from the request body, or including a `setting` of `null`, erases the current setting for a context.\n\nIf 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.\n", - Use: "replace", + NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update environment", + Long: "\nUpdate 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](/#section/Overview/Updates).\n\nTo update fields in the environment object that are arrays, set the `path` to the name of the field and then append `/\u003carray index\u003e`. Using `/0` appends to the beginning of the array.\n\n### Approval settings\n\nThis request only returns the `approvalSettings` key if the [flag approvals](https://docs.launchdarkly.com/home/releases/approvals/) feature is enabled.\n\nOnly the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable.\n\nIf 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.\n", + Use: "update", Params: []Param{ { Name: "project-key", @@ -1875,37 +3467,39 @@ func AddAllResourceCmds( Description: "The environment key", Type: "string", }, + }, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create environment", + Long: "\u003e ### Approval settings\n\u003e\n\u003e The `approvalSettings` key is only returned when the [flag approvals](https://docs.launchdarkly.com/home/releases/approvals/) feature is enabled.\n\u003e\n\u003e You cannot update approval settings when creating new environments. Update approval settings with the [Update environment API](/tag/Environments#operation/patchEnvironment).\n\nCreate a new environment in a specified project with a given name, key, swatch color, and default TTL.\n", + Use: "create", + Params: []Param{ { - Name: "context-kind", - In: "path", - Description: "The context kind", - Type: "string", - }, - { - Name: "context-key", - In: "path", - Description: "The context key", - Type: "string", - }, - { - Name: "feature-flag-key", + Name: "project-key", In: "path", - Description: "The feature flag key", + Description: "The project key", Type: "string", }, }, - HTTPMethod: "PUT", + HTTPMethod: "POST", HasBody: true, IsBeta: false, RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{contextKind}/{contextKey}/flags/{featureFlagKey}", + Path: "/api/v2/projects/{projectKey}/environments", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete context instances", - Long: "Delete context instances by ID.", - Use: "delete-instances", + NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Reset environment mobile SDK key", + Long: "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.", + Use: "reset-mobile-key", Params: []Param{ { Name: "project-key", @@ -1919,25 +3513,19 @@ func AddAllResourceCmds( Description: "The environment key", Type: "string", }, - { - Name: "id", - In: "path", - Description: "The context instance ID", - Type: "string", - }, }, - HTTPMethod: "DELETE", + HTTPMethod: "POST", HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}", + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/mobileKey", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Evaluate flags for context instance", - Long: "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).\n\n### Filtering \n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `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`.\n- `tags` filters the list to flags that have all of the tags in the list. For example: `filter=tags contains [\"beta\",\"q1\"]`.\n\nYou 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`.\n", - Use: "evaluate-instance", + NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Reset environment SDK key", + Long: "Reset an environment's SDK key with an optional expiry time for the old key.", + Use: "reset-sdk-key", Params: []Param{ { Name: "project-key", @@ -1952,27 +3540,35 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "limit", - In: "query", - Description: "The number of feature flags to return. Defaults to -1, which returns all flags", - Type: "integer", - }, - { - Name: "offset", + Name: "expiry", In: "query", - Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Description: "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.", Type: "integer", }, + }, + HTTPMethod: "POST", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create experiment", + Long: "Create an experiment.\n\nTo run this experiment, you'll need to [create an iteration](/tag/Experiments-(beta)#operation/createIteration) and then [update the experiment](/tag/Experiments-(beta)#operation/patchExperiment) with the `startIteration` instruction.\n\nTo learn more, read [Creating experiments](https://docs.launchdarkly.com/home/experimentation/create).\n", + Use: "create", + Params: []Param{ { - Name: "sort", - In: "query", - Description: "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order", + Name: "project-key", + In: "path", + Description: "The project key", Type: "string", }, { - Name: "filter", - In: "query", - Description: "A comma-separated list of filters. Each filter is of the form 'field operator value'. Supported fields are explained above.", + Name: "environment-key", + In: "path", + Description: "The environment key", Type: "string", }, }, @@ -1980,14 +3576,14 @@ func AddAllResourceCmds( HasBody: true, IsBeta: false, RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate", + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get context attribute names", - Long: "Get context attribute names. Returns only the first 100 attribute names per context.", - Use: "list-attribute-names", + NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create iteration", + Long: "Create an experiment iteration.\n\nExperiment 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](/tag/Experiments-(beta)#operation/patchExperiment) with the `startIteration` or `stopIteration` instruction. \n\nTo learn more, read [Start experiment iterations](https://docs.launchdarkly.com/home/experimentation/feature#start-experiment-iterations).\n", + Use: "create-iteration", Params: []Param{ { Name: "project-key", @@ -2002,24 +3598,24 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "filter", - In: "query", - Description: "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](/tag/Contexts#filtering-contexts-and-context-instances).", + Name: "experiment-key", + In: "path", + Description: "The experiment key", Type: "string", }, }, - HTTPMethod: "GET", - HasBody: false, + HTTPMethod: "POST", + HasBody: true, IsBeta: false, - RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes", + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/iterations", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get context attribute values", - Long: "Get context attribute values.", - Use: "list-attribute-values", + NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get experiment", + Long: "Get details about an experiment.\n\n### Expanding the experiment response\n\nLaunchDarkly supports four fields for expanding the \"Get experiment\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n- `previousIterations` includes all iterations prior to the current iteration. By default only the current iteration is included in the response.\n- `draftIteration` includes the iteration which has not been started yet, if any.\n- `secondaryMetrics` includes secondary metrics. By default only the primary metric is included in the response.\n- `treatments` includes all treatment and parameter details. By default treatment data is not included in the response.\n\nFor 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.\n", + Use: "get", Params: []Param{ { Name: "project-key", @@ -2034,15 +3630,15 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "attribute-name", + Name: "experiment-key", In: "path", - Description: "The attribute name", + Description: "The experiment key", Type: "string", }, { - Name: "filter", + Name: "expand", In: "query", - Description: "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](/tag/Contexts#filtering-contexts-and-context-instances).", + Description: "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", Type: "string", }, }, @@ -2050,14 +3646,14 @@ func AddAllResourceCmds( HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes/{attributeName}", + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get context instances", - Long: "Get context instances by ID.", - Use: "list-instances", + NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get experiment results", + Long: "Get results from an experiment for a particular metric.\n\nLaunchDarkly supports one field for expanding the \"Get experiment results\" response. By default, this field is **not** included in the response.\n\nTo expand the response, append the `expand` query parameter with the following field:\n* `traffic` includes the total count of units for each treatment.\n\nFor example, `expand=traffic` includes the `traffic` field for the project in the response.\n", + Use: "get-results", Params: []Param{ { Name: "project-key", @@ -2072,59 +3668,27 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "id", + Name: "experiment-key", In: "path", - Description: "The context instance ID", - Type: "string", - }, - { - Name: "limit", - In: "query", - Description: "Specifies the maximum number of context instances to return (max: 50, default: 20)", - Type: "integer", - }, - { - Name: "continuation-token", - In: "query", - Description: "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.", + Description: "The experiment key", Type: "string", }, { - Name: "sort", - In: "query", - Description: "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'.", + Name: "metric-key", + In: "path", + Description: "The metric key", Type: "string", }, { - Name: "filter", + Name: "iteration-id", In: "query", - Description: "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](/tag/Contexts#filtering-contexts-and-context-instances).", + Description: "The iteration ID", Type: "string", }, { - Name: "include-total-count", + Name: "expand", In: "query", - Description: "Specifies whether to include or omit the total count of matching context instances. Defaults to true.", - Type: "boolean", - }, - }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: false, - RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get context kinds", - Long: "Get all context kinds for a given project.", - Use: "list-kinds-key", - Params: []Param{ - { - Name: "project-key", - In: "path", - Description: "The project key", + Description: "A comma-separated list of fields to expand in the response. Supported fields are explained above.", Type: "string", }, }, @@ -2132,14 +3696,14 @@ func AddAllResourceCmds( HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/context-kinds", + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metrics/{metricKey}/results", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get contexts", - Long: "Get contexts based on kind and key.", - Use: "list", + NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get experiment results for metric group", + Long: "Get results from an experiment for a particular metric group.", + Use: "get-results-for-metric-group", Params: []Param{ { Name: "project-key", @@ -2154,60 +3718,36 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "kind", - In: "path", - Description: "The context kind", - Type: "string", - }, - { - Name: "key", + Name: "experiment-key", In: "path", - Description: "The context key", - Type: "string", - }, - { - Name: "limit", - In: "query", - Description: "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", - Type: "integer", - }, - { - Name: "continuation-token", - In: "query", - Description: "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.", - Type: "string", - }, - { - Name: "sort", - In: "query", - Description: "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'.", + Description: "The experiment key", Type: "string", }, { - Name: "filter", - In: "query", - Description: "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](/tag/Contexts#filtering-contexts-and-context-instances).", + Name: "metric-group-key", + In: "path", + Description: "The metric group key", Type: "string", }, { - Name: "include-total-count", + Name: "iteration-id", In: "query", - Description: "Specifies whether to include or omit the total count of matching contexts. Defaults to true.", - Type: "boolean", + Description: "The iteration ID", + Type: "string", }, }, HTTPMethod: "GET", HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{kind}/{key}", + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metric-groups/{metricGroupKey}/results", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create or update context kind", - Long: "Create or update a context kind by key. Only the included fields will be updated.", - Use: "replace-kind", + NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get experimentation settings", + Long: "Get current experimentation settings for the given project", + Use: "get-settings", Params: []Param{ { Name: "project-key", @@ -2215,25 +3755,19 @@ func AddAllResourceCmds( Description: "The project key", Type: "string", }, - { - Name: "key", - In: "path", - Description: "The context kind key", - Type: "string", - }, }, - HTTPMethod: "PUT", - HasBody: true, + HTTPMethod: "GET", + HasBody: false, IsBeta: false, - RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/context-kinds/{key}", + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/experimentation-settings", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Search for context instances", - Long: "\nSearch for context instances.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances). To learn more about context instances, read [Context instances](https://docs.launchdarkly.com/home/observability/multi-contexts#context-instances).\n", - Use: "search-instances", + NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get experiments", + Long: "Get details about all experiments in an environment.\n\n### Filtering experiments\n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `flagKey` filters for only experiments that use the flag with the given key.\n- `metricKey` filters for only experiments that use the metric with the given key.\n- `status` filters for only experiments with an iteration with the given status. An iteration can have the status `not_started`, `running` or `stopped`.\n\nFor 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.\n\n### Expanding the experiments response\n\nLaunchDarkly supports four fields for expanding the \"Get experiments\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n- `previousIterations` includes all iterations prior to the current iteration. By default only the current iteration is included in the response.\n- `draftIteration` includes the iteration which has not been started yet, if any.\n- `secondaryMetrics` includes secondary metrics. By default only the primary metric is included in the response.\n- `treatments` includes all treatment and parameter details. By default treatment data is not included in the response.\n\nFor 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.\n", + Use: "list", Params: []Param{ { Name: "project-key", @@ -2250,46 +3784,46 @@ func AddAllResourceCmds( { Name: "limit", In: "query", - Description: "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", + Description: "The maximum number of experiments to return. Defaults to 20.", Type: "integer", }, { - Name: "continuation-token", + Name: "offset", In: "query", - Description: "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.", - Type: "string", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Type: "integer", }, { - Name: "sort", + Name: "filter", In: "query", - Description: "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'.", + Description: "A comma-separated list of filters. Each filter is of the form 'field:value'. Supported fields are explained above.", Type: "string", }, { - Name: "filter", + Name: "expand", In: "query", - Description: "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](/tag/Contexts#filtering-contexts-and-context-instances).", + Description: "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", Type: "string", }, { - Name: "include-total-count", + Name: "lifecycle-state", In: "query", - Description: "Specifies whether to include or omit the total count of matching context instances. Defaults to true.", - Type: "boolean", + Description: "A comma-separated list of experiment archived states. Supports 'archived', 'active', or both. Defaults to 'active' experiments.", + Type: "string", }, }, - HTTPMethod: "POST", - HasBody: true, + HTTPMethod: "GET", + HasBody: false, IsBeta: false, - RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search", + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ContextsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Search for contexts", - Long: "\nSearch for contexts.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances). To learn more about contexts, read [Contexts and context kinds](https://docs.launchdarkly.com/home/observability/contexts#contexts-and-context-kinds).\n", - Use: "search", + NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Patch experiment", + Long: "Update an experiment. Updating an experiment uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating experiments.\n\n#### updateName\n\nUpdates the experiment name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Example updated experiment name\"\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the experiment description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Example updated description\"\n }]\n}\n```\n\n#### startIteration\n\nStarts a new iteration for this experiment. You must [create a new iteration](/tag/Experiments-(beta)#operation/createIteration) before calling this instruction.\n\nAn iteration may not be started until it meets the following criteria:\n\n* Its associated flag is toggled on and is not archived\n* Its `randomizationUnit` is set\n* At least one of its `treatments` has a non-zero `allocationPercent`\n\n##### Parameters\n\n- `changeJustification`: The reason for starting a new iteration. Required when you call `startIteration` on an already running experiment, otherwise optional.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"startIteration\",\n \"changeJustification\": \"It's time to start a new iteration\"\n }]\n}\n```\n\n#### stopIteration\n\nStops the current iteration for this experiment.\n\n##### Parameters\n\n- `winningTreatmentId`: The ID of the winning treatment. Treatment IDs are returned as part of the [Get experiment](/tag/Experiments-(beta)#operation/getExperiment) response. They are the `_id` of each element in the `treatments` array.\n- `winningReason`: The reason for the winner\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"stopIteration\",\n \"winningTreatmentId\": \"3a548ec2-72ac-4e59-8518-5c24f5609ccf\",\n \"winningReason\": \"Example reason to stop the iteration\"\n }]\n}\n```\n\n#### archiveExperiment\n\nArchives this experiment. Archived experiments are hidden by default in the LaunchDarkly user interface. You cannot start new iterations for archived experiments.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"archiveExperiment\" }]\n}\n```\n\n#### restoreExperiment\n\nRestores an archived experiment. After restoring an experiment, you can start new iterations for it again.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"restoreExperiment\" }]\n}\n```\n", + Use: "update", Params: []Param{ { Name: "project-key", @@ -2304,146 +3838,236 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "limit", - In: "query", - Description: "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", - Type: "integer", - }, - { - Name: "continuation-token", - In: "query", - Description: "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.", + Name: "experiment-key", + In: "path", + Description: "The experiment key", Type: "string", }, + }, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}", + SupportsSemanticPatch: true, + }) + + NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update experimentation settings", + Long: "Update experimentation settings for the given project", + Use: "replace-settings", + Params: []Param{ { - Name: "sort", - In: "query", - Description: "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'.", + Name: "project-key", + In: "path", + Description: "The project key", Type: "string", }, + }, + HTTPMethod: "PUT", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/experimentation-settings", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_FlagImportConfigurationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create a flag import configuration", + Long: "Create a new flag import configuration. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`. The `config` object in the request body schema is described by the global integration settings, as specified by the \u003ccode\u003eformVariables\u003c/code\u003e in the \u003ccode\u003emanifest.json\u003c/code\u003e for this integration. It varies slightly based on the `integrationKey`.", + Use: "create", + Params: []Param{ { - Name: "filter", - In: "query", - Description: "A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances).", + Name: "project-key", + In: "path", + Description: "The project key", Type: "string", }, { - Name: "include-total-count", - In: "query", - Description: "Specifies whether to include or omit the total count of matching contexts. Defaults to true.", - Type: "boolean", + Name: "integration-key", + In: "path", + Description: "The integration key", + Type: "string", }, }, HTTPMethod: "POST", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/search", + Path: "/api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CustomRolesResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete custom role", - Long: "Delete a custom role by key", + NewOperationCmd(gen_FlagImportConfigurationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete a flag import configuration", + Long: "Delete a flag import configuration by ID. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`.", Use: "delete", Params: []Param{ { - Name: "custom-role-key", + Name: "project-key", In: "path", - Description: "The custom role key", + Description: "The project key", + Type: "string", + }, + { + Name: "integration-key", + In: "path", + Description: "The integration key", + Type: "string", + }, + { + Name: "integration-id", + In: "path", + Description: "The integration ID", Type: "string", }, }, HTTPMethod: "DELETE", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/roles/{customRoleKey}", + Path: "/api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CustomRolesResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get custom role", - Long: "Get a single custom role by key or ID", + NewOperationCmd(gen_FlagImportConfigurationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get a single flag import configuration", + Long: "Get a single flag import configuration by ID. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`.", Use: "get", Params: []Param{ { - Name: "custom-role-key", + Name: "project-key", In: "path", - Description: "The custom role key or ID", + Description: "The project key", + Type: "string", + }, + { + Name: "integration-key", + In: "path", + Description: "The integration key, for example, 'split'", + Type: "string", + }, + { + Name: "integration-id", + In: "path", + Description: "The integration ID", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/roles/{customRoleKey}", + Path: "/api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CustomRolesResourceCmd, client, markdownRenderer, OperationData{ - Short: "List custom roles", - Long: "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.", - Use: "list", + NewOperationCmd(gen_FlagImportConfigurationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List all flag import configurations", + Long: "List all flag import configurations.", + Use: "list", + Params: []Param{}, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/integration-capabilities/flag-import", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_FlagImportConfigurationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update a flag import configuration", + Long: "Updating a flag import configuration uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](/#section/Overview/Updates).\u003cbr/\u003e\u003cbr/\u003eTo add an element to the import configuration fields that are arrays, set the `path` to the name of the field and then append `/\u003carray index\u003e`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.\u003cbr/\u003e\u003cbr/\u003eYou can update the `config`, `tags`, and `name` of the flag import configuration.", + Use: "update", Params: []Param{ { - Name: "limit", - In: "query", - Description: "The maximum number of custom roles to return. Defaults to 20.", - Type: "integer", + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", }, { - Name: "offset", - In: "query", - Description: "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'.", - Type: "integer", + Name: "integration-key", + In: "path", + Description: "The integration key", + Type: "string", + }, + { + Name: "integration-id", + In: "path", + Description: "The integration ID", + Type: "string", }, }, - HTTPMethod: "GET", + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_FlagImportConfigurationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Trigger a single flag import run", + Long: "Trigger a single flag import run for an existing flag import configuration. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`.", + Use: "trigger-flag-import-job", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "integration-key", + In: "path", + Description: "The integration key", + Type: "string", + }, + { + Name: "integration-id", + In: "path", + Description: "The integration ID", + Type: "string", + }, + }, + HTTPMethod: "POST", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/roles", + Path: "/api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}/trigger", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_CustomRolesResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update custom role", - Long: "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](/#section/Overview/Updates).\u003cbr/\u003e\u003cbr/\u003eTo add an element to the `policy` array, set the `path` to `/policy` and then append `/\u003carray index\u003e`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.", - Use: "update", + NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create flag link", + Long: "Create a new flag link. Flag links let you reference external resources and associate them with your flags.", + Use: "create", Params: []Param{ { - Name: "custom-role-key", + Name: "project-key", In: "path", - Description: "The custom role key", + Description: "The project key", + Type: "string", + }, + { + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", Type: "string", }, }, - HTTPMethod: "PATCH", - HasBody: true, - IsBeta: false, - RequiresBody: true, - Path: "/api/v2/roles/{customRoleKey}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_CustomRolesResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create custom role", - Long: "Create a new custom role", - Use: "create", - Params: []Param{}, HTTPMethod: "POST", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/roles", + Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_DataExportDestinationsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete Data Export destination", - Long: "Delete a Data Export destination by ID.", + NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete flag link", + Long: "Delete a flag link by ID or key.", Use: "delete", Params: []Param{ { @@ -2453,30 +4077,30 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "environment-key", + Name: "feature-flag-key", In: "path", - Description: "The environment key", + Description: "The feature flag key", Type: "string", }, { Name: "id", In: "path", - Description: "The Data Export destination ID", + Description: "The flag link ID or Key", Type: "string", }, }, HTTPMethod: "DELETE", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/destinations/{projectKey}/{environmentKey}/{id}", + Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_DataExportDestinationsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get destination", - Long: "Get a single Data Export destination by ID.", - Use: "get", + NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List flag links", + Long: "Get a list of all flag links.", + Use: "list", Params: []Param{ { Name: "project-key", @@ -2485,42 +4109,23 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", - }, - { - Name: "id", + Name: "feature-flag-key", In: "path", - Description: "The Data Export destination ID", + Description: "The feature flag key", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, - RequiresBody: false, - Path: "/api/v2/destinations/{projectKey}/{environmentKey}/{id}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_DataExportDestinationsResourceCmd, client, markdownRenderer, OperationData{ - Short: "List destinations", - Long: "Get a list of Data Export destinations configured across all projects and environments.", - Use: "list", - Params: []Param{}, - HTTPMethod: "GET", - HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/destinations", + Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_DataExportDestinationsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update Data Export destination", - Long: "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](/#section/Overview/Updates).", + NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update flag link", + Long: "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](/#section/Overview/Updates).", Use: "update", Params: []Param{ { @@ -2530,29 +4135,29 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "environment-key", + Name: "feature-flag-key", In: "path", - Description: "The environment key", + Description: "The feature flag key", Type: "string", }, { Name: "id", In: "path", - Description: "The Data Export destination ID", + Description: "The flag link ID", Type: "string", }, }, HTTPMethod: "PATCH", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/destinations/{projectKey}/{environmentKey}/{id}", + Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_DataExportDestinationsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create Data Export destination", - Long: "\nCreate a new Data Export destination.\n\nIn the `config` request body parameter, the fields required depend on the type of Data Export destination.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand \u003ccode\u003econfig\u003c/code\u003e parameter details\u003c/summary\u003e\n\n#### Azure Event Hubs\n\nTo create a Data Export destination with a `kind` of `azure-event-hubs`, the `config` object requires the following fields:\n\n* `namespace`: The Event Hub Namespace name\n* `name`: The Event Hub name\n* `policyName`: The shared access signature policy name. You can find your policy name in the settings of your Azure Event Hubs Namespace.\n* `policyKey`: The shared access signature key. You can find your policy key in the settings of your Azure Event Hubs Namespace.\n\n#### Google Cloud Pub/Sub\n\nTo create a Data Export destination with a `kind` of `google-pubsub`, the `config` object requires the following fields:\n\n* `project`: The Google PubSub project ID for the project to publish to\n* `topic`: The Google PubSub topic ID for the topic to publish to\n\n#### Amazon Kinesis\n\nTo create a Data Export destination with a `kind` of `kinesis`, the `config` object requires the following fields:\n\n* `region`: The Kinesis stream's AWS region key\n* `roleArn`: The Amazon Resource Name (ARN) of the AWS role that will be writing to Kinesis\n* `streamName`: The name of the Kinesis stream that LaunchDarkly is sending events to. This is not the ARN of the stream.\n\n#### mParticle\n\nTo create a Data Export destination with a `kind` of `mparticle`, the `config` object requires the following fields:\n\n* `apiKey`: The mParticle API key\n* `secret`: The mParticle API secret\n* `userIdentity`: The type of identifier you use to identify your end users in mParticle\n* `anonymousUserIdentity`: The type of identifier you use to identify your anonymous end users in mParticle\n\n#### Segment\n\nTo create a Data Export destination with a `kind` of `segment`, the `config` object requires the following fields:\n\n* `writeKey`: The Segment write key. This is used to authenticate LaunchDarkly's calls to Segment.\n\n\u003c/details\u003e\n", + NewOperationCmd(gen_FlagTriggersResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create flag trigger", + Long: "Create a new flag trigger.", Use: "create", Params: []Param{ { @@ -2567,18 +4172,24 @@ func AddAllResourceCmds( Description: "The environment key", Type: "string", }, + { + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, }, HTTPMethod: "POST", HasBody: true, IsBeta: false, RequiresBody: true, - Path: "/api/v2/destinations/{projectKey}/{environmentKey}", + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete environment", - Long: "Delete a environment by key.", + NewOperationCmd(gen_FlagTriggersResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete flag trigger", + Long: "Delete a flag trigger by ID.", Use: "delete", Params: []Param{ { @@ -2593,45 +4204,31 @@ func AddAllResourceCmds( Description: "The environment key", Type: "string", }, - }, - HTTPMethod: "DELETE", - HasBody: false, - IsBeta: false, - RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get environment", - Long: "\u003e ### Approval settings\n\u003e\n\u003e The `approvalSettings` key is only returned when the Flag Approvals feature is enabled.\n\nGet an environment given a project and key.\n", - Use: "get", - Params: []Param{ { - Name: "project-key", + Name: "feature-flag-key", In: "path", - Description: "The project key", + Description: "The feature flag key", Type: "string", }, { - Name: "environment-key", + Name: "id", In: "path", - Description: "The environment key", + Description: "The flag trigger ID", Type: "string", }, }, - HTTPMethod: "GET", + HTTPMethod: "DELETE", HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}", + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "List environments", - Long: "Return a list of environments for the specified project.\n\nBy 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.\n\n### Filtering environments\n\nLaunchDarkly supports two fields for filters:\n- `query` is a string that matches against the environments' names and keys. It is not case sensitive.\n- `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list.\n\nFor 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.\n\nThe 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`.\n\n### Sorting environments\n\nLaunchDarkly supports the following fields for sorting:\n\n- `createdOn` sorts by the creation date of the environment.\n- `critical` sorts by whether the environments are marked as critical.\n- `name` sorts by environment name.\n\nFor example, `sort=name` sorts the response by environment name in ascending order.\n", - Use: "list", + NewOperationCmd(gen_FlagTriggersResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get flag trigger by ID", + Long: "Get a flag trigger by ID.", + Use: "get", Params: []Param{ { Name: "project-key", @@ -2640,27 +4237,21 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "limit", - In: "query", - Description: "The number of environments to return in the response. Defaults to 20.", - Type: "integer", - }, - { - Name: "offset", - In: "query", - Description: "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'.", - Type: "integer", + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", }, { - Name: "filter", - In: "query", - Description: "A comma-separated list of filters. Each filter is of the form 'field:value'.", + Name: "environment-key", + In: "path", + Description: "The environment key", Type: "string", }, { - Name: "sort", - In: "query", - Description: "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order.", + Name: "id", + In: "path", + Description: "The flag trigger ID", Type: "string", }, }, @@ -2668,14 +4259,14 @@ func AddAllResourceCmds( HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments", + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update environment", - Long: "\nUpdate 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](/#section/Overview/Updates).\n\nTo update fields in the environment object that are arrays, set the `path` to the name of the field and then append `/\u003carray index\u003e`. Using `/0` appends to the beginning of the array.\n\n### Approval settings\n\nThis request only returns the `approvalSettings` key if the [Flag Approvals](https://docs.launchdarkly.com/home/releases/approvals) feature is enabled.\n\nOnly the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable.\n\nIf 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.\n", - Use: "update", + NewOperationCmd(gen_FlagTriggersResourceCmd, client, markdownRenderer, OperationData{ + Short: "List flag triggers", + Long: "Get a list of all flag triggers.", + Use: "list", Params: []Param{ { Name: "project-key", @@ -2689,39 +4280,25 @@ func AddAllResourceCmds( Description: "The environment key", Type: "string", }, - }, - HTTPMethod: "PATCH", - HasBody: true, - IsBeta: false, - RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create environment", - Long: "\u003e ### Approval settings\n\u003e\n\u003e The `approvalSettings` key is only returned when the Flag Approvals feature is enabled.\n\u003e\n\u003e You cannot update approval settings when creating new environments. Update approval settings with the PATCH Environment API.\n\nCreate a new environment in a specified project with a given name, key, swatch color, and default TTL.\n", - Use: "create", - Params: []Param{ { - Name: "project-key", + Name: "feature-flag-key", In: "path", - Description: "The project key", + Description: "The feature flag key", Type: "string", }, }, - HTTPMethod: "POST", - HasBody: true, + HTTPMethod: "GET", + HasBody: false, IsBeta: false, - RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/environments", + RequiresBody: false, + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Reset environment mobile SDK key", - Long: "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.", - Use: "reset-mobile-key", + NewOperationCmd(gen_FlagTriggersResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update flag trigger", + Long: "Update a flag trigger. Updating a flag trigger uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating flag triggers.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating flag triggers\u003c/strong\u003e\u003c/summary\u003e\n\n#### replaceTriggerActionInstructions\n\nRemoves the existing trigger action and replaces it with the new instructions.\n\n##### Parameters\n\n- `value`: An array of the new `kind`s of actions to perform when triggering. Supported flag actions are `turnFlagOn` and `turnFlagOff`.\n\nHere's an example that replaces the existing action with new instructions to turn flag targeting off:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"replaceTriggerActionInstructions\",\n \"value\": [ {\"kind\": \"turnFlagOff\"} ]\n }\n ]\n}\n```\n\n#### cycleTriggerUrl\n\nGenerates a new URL for this trigger. You must update any clients using the trigger to use this new URL.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"cycleTriggerUrl\" }]\n}\n```\n\n#### disableTrigger\n\nDisables the trigger. This saves the trigger configuration, but the trigger stops running. To re-enable, use `enableTrigger`.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"disableTrigger\" }]\n}\n```\n\n#### enableTrigger\n\nEnables the trigger. If you previously disabled the trigger, it begins running again.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"enableTrigger\" }]\n}\n```\n\n\u003c/details\u003e\n", + Use: "update", Params: []Param{ { Name: "project-key", @@ -2735,51 +4312,31 @@ func AddAllResourceCmds( Description: "The environment key", Type: "string", }, - }, - HTTPMethod: "POST", - HasBody: false, - IsBeta: false, - RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/mobileKey", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Reset environment SDK key", - Long: "Reset an environment's SDK key with an optional expiry time for the old key.", - Use: "reset-sdk-key", - Params: []Param{ { - Name: "project-key", + Name: "feature-flag-key", In: "path", - Description: "The project key", + Description: "The feature flag key", Type: "string", }, { - Name: "environment-key", + Name: "id", In: "path", - Description: "The environment key", + Description: "The flag trigger ID", Type: "string", }, - { - Name: "expiry", - In: "query", - Description: "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.", - Type: "integer", - }, }, - HTTPMethod: "POST", - HasBody: false, + HTTPMethod: "PATCH", + HasBody: true, IsBeta: false, - RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey", - SupportsSemanticPatch: false, + RequiresBody: true, + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}", + SupportsSemanticPatch: true, }) - NewOperationCmd(gen_ExperimentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create experiment", - Long: "Create an experiment.\n\nTo run this experiment, you'll need to [create an iteration](/tag/Experiments-(beta)#operation/createIteration) and then [update the experiment](/tag/Experiments-(beta)#operation/patchExperiment) with the `startIteration` instruction.\n\nTo learn more, read [Creating experiments](https://docs.launchdarkly.com/home/experimentation/create).\n", - Use: "create", + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Copy feature flag", + Long: "\n\u003e ### Copying flag settings is an Enterprise feature\n\u003e\n\u003e 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/).\n\nCopy flag settings from a source environment to a target environment.\n\nBy 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.\n\nIf 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.\n", + Use: "copy", Params: []Param{ { Name: "project-key", @@ -2788,24 +4345,24 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "environment-key", + Name: "feature-flag-key", In: "path", - Description: "The environment key", + Description: "The feature flag key. The key identifies the flag in your code.", Type: "string", }, }, HTTPMethod: "POST", HasBody: true, - IsBeta: true, + IsBeta: false, RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments", + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/copy", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ExperimentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create iteration", - Long: "Create an experiment iteration.\n\nExperiment 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](/tag/Experiments-(beta)#operation/patchExperiment) with the `startIteration` or `stopIteration` instruction. \n\nTo learn more, read [Start experiment iterations](https://docs.launchdarkly.com/home/experimentation/feature#start-experiment-iterations).\n", - Use: "create-iteration", + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete feature flag", + Long: "Delete a feature flag in all environments. Use with caution: only delete feature flags your application no longer uses.", + Use: "delete", Params: []Param{ { Name: "project-key", @@ -2814,30 +4371,24 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", - }, - { - Name: "experiment-key", + Name: "feature-flag-key", In: "path", - Description: "The experiment key", + Description: "The feature flag key. The key identifies the flag in your code.", Type: "string", }, }, - HTTPMethod: "POST", - HasBody: true, - IsBeta: true, - RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/iterations", + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ExperimentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get experiment", - Long: "Get details about an experiment.\n\n### Expanding the experiment response\n\nLaunchDarkly supports four fields for expanding the \"Get experiment\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n- `previousIterations` includes all iterations prior to the current iteration. By default only the current iteration is included in the response.\n- `draftIteration` includes the iteration which has not been started yet, if any.\n- `secondaryMetrics` includes secondary metrics. By default only the primary metric is included in the response.\n- `treatments` includes all treatment and parameter details. By default treatment data is not included in the response.\n\nFor 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.\n", - Use: "get", + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get expiring context targets for feature flag", + Long: "Get a list of context targets on a feature flag that are scheduled for removal.", + Use: "list-expiring-context-targets", Params: []Param{ { Name: "project-key", @@ -2852,30 +4403,24 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "experiment-key", + Name: "feature-flag-key", In: "path", - Description: "The experiment key", - Type: "string", - }, - { - Name: "expand", - In: "query", - Description: "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", + Description: "The feature flag key", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: true, + IsBeta: false, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}", + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ExperimentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get experiment results", - Long: "Get results from an experiment for a particular metric.\n\nLaunchDarkly supports one field for expanding the \"Get experiment results\" response. By default, this field is **not** included in the response.\n\nTo expand the response, append the `expand` query parameter with the following field:\n* `traffic` includes the total count of units for each treatment.\n\nFor example, `expand=traffic` includes the `traffic` field for the project in the response.\n", - Use: "get-results", + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get expiring user targets for feature flag", + Long: "\n\u003e ### Contexts are now available\n\u003e\n\u003e After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring context targets for feature flag](/tag/Feature-flags#operation/getExpiringContextTargets) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nGet a list of user targets on a feature flag that are scheduled for removal.\n", + Use: "list-expiring-user-targets", Params: []Param{ { Name: "project-key", @@ -2890,21 +4435,41 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "experiment-key", + Name: "feature-flag-key", In: "path", - Description: "The experiment key", + Description: "The feature flag key", Type: "string", }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get feature flag", + Long: "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.\n\n\u003e #### Recommended use\n\u003e\n\u003e 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.\n\n### Expanding response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days \n- `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`.\n\nFor example, `expand=evaluation` includes the `evaluation` field in the response.\n", + Use: "get", + Params: []Param{ { - Name: "metric-key", + Name: "project-key", In: "path", - Description: "The metric key", + Description: "The project key", Type: "string", }, { - Name: "iteration-id", + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, + { + Name: "env", In: "query", - Description: "The iteration ID", + Description: "Filter configurations by environment", Type: "string", }, { @@ -2916,16 +4481,16 @@ func AddAllResourceCmds( }, HTTPMethod: "GET", HasBody: false, - IsBeta: true, + IsBeta: false, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metrics/{metricKey}/results", + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ExperimentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get experiment results for metric group", - Long: "Get results from an experiment for a particular metric group.", - Use: "get-results-for-metric-group", + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get feature flag status", + Long: "Get the status for a particular feature flag.", + Use: "get-status", Params: []Param{ { Name: "project-key", @@ -2940,36 +4505,56 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "experiment-key", + Name: "feature-flag-key", In: "path", - Description: "The experiment key", + Description: "The feature flag key", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get flag status across environments", + Long: "Get the status for a particular feature flag across environments.", + Use: "get-status-across-environments", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", Type: "string", }, { - Name: "metric-group-key", + Name: "feature-flag-key", In: "path", - Description: "The metric group key", + Description: "The feature flag key", Type: "string", }, { - Name: "iteration-id", + Name: "env", In: "query", - Description: "The iteration ID", + Description: "Optional environment filter", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: true, + IsBeta: false, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metric-groups/{metricGroupKey}/results", + Path: "/api/v2/flag-status/{projectKey}/{featureFlagKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ExperimentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get experimentation settings", - Long: "Get current experimentation settings for the given project", - Use: "get-settings", + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "List feature flag statuses", + Long: "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:\n\n- `new`: You created the flag fewer than seven days ago and it has never been requested.\n- `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.\n- `inactive`: You created the feature flag more than seven days ago, and hasn't been requested within the past seven days.\n- `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.\n\nTo learn more, read [Flag statuses](https://docs.launchdarkly.com/home/observability/flag-status).\n", + Use: "list-statuses", Params: []Param{ { Name: "project-key", @@ -2977,18 +4562,24 @@ func AddAllResourceCmds( Description: "The project key", Type: "string", }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: true, + IsBeta: false, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/experimentation-settings", + Path: "/api/v2/flag-statuses/{projectKey}/{environmentKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ExperimentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get experiments", - Long: "Get details about all experiments in an environment.\n\n### Filtering experiments\n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `flagKey` filters for only experiments that use the flag with the given key.\n- `metricKey` filters for only experiments that use the metric with the given key.\n- `status` filters for only experiments with an iteration with the given status. An iteration can have the status `not_started`, `running` or `stopped`.\n\nFor 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.\n\n### Expanding the experiments response\n\nLaunchDarkly supports four fields for expanding the \"Get experiments\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n- `previousIterations` includes all iterations prior to the current iteration. By default only the current iteration is included in the response.\n- `draftIteration` includes the iteration which has not been started yet, if any.\n- `secondaryMetrics` includes secondary metrics. By default only the primary metric is included in the response.\n- `treatments` includes all treatment and parameter details. By default treatment data is not included in the response.\n\nFor 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.\n", + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "List feature flags", + Long: "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.\n\n\u003e #### Recommended use\n\u003e\n\u003e 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`.\n\n### Filtering flags\n\nYou 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`.\n\nThe `filter` query parameter supports the following arguments:\n\n| Filter argument | Description | Example |\n|-----------------------|-------------|----------------------|\n| `applicationEvaluated` | A string. It filters the list to flags that are evaluated in the application with the given key. | `filter=applicationEvaluated:com.launchdarkly.cafe` |\n| `archived` | (deprecated) A boolean value. It filters the list to archived flags. | Use `filter=state:archived` instead |\n| `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` |\n| `codeReferences.max` | An integer value. Use `0` to return flags that do not have code references. | `filter=codeReferences.max:0` |\n| `codeReferences.min` | An integer value. Use `1` to return flags that do have code references. | `filter=codeReferences.min:1` |\n| `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}` |\n| `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=evaluated:{\"after\":1690527600000},filterEnv:production` |\n| `filterEnv` | A valid environment key. 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. | `filter=evaluated:{\"after\": 1590768455282},filterEnv:production` |\n| `hasExperiment` | A boolean value. It filters the list to flags that are used in an experiment. | `filter=hasExperiment:true` |\n| `maintainerId` | A valid member ID. It filters the list to flags that are maintained by this member. | `filter=maintainerId:12ab3c45de678910abc12345` |\n| `maintainerTeamKey` | A string. It filters the list to flags that are maintained by the team with this key. | `filter=maintainerTeamKey:example-team-key` |\n| `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` |\n| `releasePipeline` | A release pipeline key. It filters the list to flags that are either currently active in the release pipeline or have completed the release pipeline. | `filter=releasePipeline:default-release-pipeline` |\n| `state` | A string, either `live`, `deprecated`, or `archived`. It filters the list to flags in this state. | `filter=state:archived` |\n| `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` |\n| `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` |\n| `type` | A string, either `temporary` or `permanent`. It filters the list to flags with the specified type. | `filter=type:permanent` |\n\nThe documented values for the `filter` query are prior to URL encoding. For example, the `+` in `filter=tags:beta+test` must be encoded to `%2B`.\n\nBy 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.\n\n### Sorting flags\n\nYou can sort flags based on the following fields:\n\n- `creationDate` sorts by the creation date of the flag.\n- `key` sorts by the key of the flag.\n- `maintainerId` sorts by the flag maintainer.\n- `name` sorts by flag name.\n- `tags` sorts by tags.\n- `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\u0026env=production\u0026env=staging` returns results sorted by `targetingModifiedDate` for the `production` environment.\n- `type` sorts by flag type\n\nAll 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.\n\n### Expanding response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `codeReferences` includes code references for the feature flag\n- `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days\n- `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`.\n\nFor example, `expand=evaluation` includes the `evaluation` field in the response.\n\n### Migration flags\nFor 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.\nTo learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flags/migration).\n", Use: "list", Params: []Param{ { @@ -2998,15 +4589,21 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "environment-key", - In: "path", - Description: "The environment key", + Name: "env", + In: "query", + Description: "Filter configurations by environment", + Type: "string", + }, + { + Name: "tag", + In: "query", + Description: "Filter feature flags by tag", Type: "string", }, { Name: "limit", In: "query", - Description: "The maximum number of experiments to return. Defaults to 20.", + Description: "The number of feature flags to return. Defaults to 20.", Type: "integer", }, { @@ -3015,37 +4612,107 @@ func AddAllResourceCmds( Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", Type: "integer", }, + { + Name: "summary", + In: "query", + Description: "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.", + Type: "boolean", + }, { Name: "filter", In: "query", - Description: "A comma-separated list of filters. Each filter is of the form 'field:value'. Supported fields are explained above.", + Description: "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.", + Type: "string", + }, + { + Name: "sort", + In: "query", + Description: "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.", + Type: "string", + }, + { + Name: "expand", + In: "query", + Description: "A comma-separated list of fields to expand in the response. Supported fields are explained above.", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/flags/{projectKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update expiring context targets on feature flag", + Long: "Schedule a context for removal from individual targeting on a feature flag. The flag must already individually target the context.\n\nYou can add, update, or remove a scheduled removal date. You can only schedule a context for removal on a single variation per flag.\n\nUpdating 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring targets.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating expiring targets\u003c/strong\u003e\u003c/summary\u003e\n\n#### addExpiringTarget\n\nAdds a date and time that LaunchDarkly will remove the context from the flag's individual targeting.\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the context from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `contextKey`: The context key for the context to remove from individual targeting\n* `contextKind`: The kind of context represented by the `contextKey`\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExpiringTarget\",\n \"value\": 1754006460000,\n \"variationId\": \"4254742c-71ae-411f-a992-43b18a51afe0\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\"\n }]\n}\n```\n\n#### updateExpiringTarget\n\nUpdates the date and time that LaunchDarkly will remove the context from the flag's individual targeting\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the context from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `contextKey`: The context key for the context to remove from individual targeting\n* `contextKind`: The kind of context represented by the `contextKey`\n* `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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExpiringTarget\",\n \"value\": 1754006460000,\n \"variationId\": \"4254742c-71ae-411f-a992-43b18a51afe0\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\"\n }]\n}\n```\n\n#### removeExpiringTarget\n\nRemoves 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.\n\n##### Parameters\n\n* `variationId`: ID of a variation on the flag\n* `contextKey`: The context key for the context to remove from individual targeting\n* `contextKind`: The kind of context represented by the `contextKey`\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExpiringTarget\",\n \"variationId\": \"4254742c-71ae-411f-a992-43b18a51afe0\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\"\n }]\n}\n```\n\n\u003c/details\u003e\n", + Use: "update-expiring-targets", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, + }, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}", + SupportsSemanticPatch: true, + }) + + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update expiring user targets on feature flag", + Long: "\u003e ### Contexts are now available\n\u003e\n\u003e After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring context targets on feature flag](/tag/Feature-flags#operation/patchExpiringTargets) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nSchedule 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.\n\nYou can add, update, or remove a scheduled removal date. You can only schedule a target for removal on a single variation per flag.\n\nUpdating 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring user targets.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating expiring user targets\u003c/strong\u003e\u003c/summary\u003e\n\n#### addExpireUserTargetDate\n\nAdds a date and time that LaunchDarkly will remove the user from the flag's individual targeting.\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `userKey`: The user key for the user to remove from individual targeting\n\n#### updateExpireUserTargetDate\n\nUpdates the date and time that LaunchDarkly will remove the user from the flag's individual targeting.\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `userKey`: The user key for the user to remove from individual targeting\n* `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.\n\n#### removeExpireUserTargetDate\n\nRemoves 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.\n\n##### Parameters\n\n* `variationId`: ID of a variation on the flag\n* `userKey`: The user key for the user to remove from individual targeting\n\n\u003c/details\u003e\n", + Use: "update-expiring-user-targets", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", Type: "string", }, { - Name: "expand", - In: "query", - Description: "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", + Name: "environment-key", + In: "path", + Description: "The environment key", Type: "string", }, { - Name: "lifecycle-state", - In: "query", - Description: "A comma-separated list of experiment archived states. Supports 'archived', 'active', or both. Defaults to 'active' experiments.", + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", Type: "string", }, }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: true, - RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments", - SupportsSemanticPatch: false, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}", + SupportsSemanticPatch: true, }) - NewOperationCmd(gen_ExperimentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get legacy experiment results (deprecated)", - Long: "Get detailed experiment result data for legacy experiments.", - Use: "get-legacy-results", + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update feature flag", + Long: "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](/#section/Overview/Updates).\n\n### Using semantic patches on a feature flag\n\nTo 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](/reference#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating feature flags takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment.\n* `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.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating feature flags.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eturning flags on and off\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions require the `environmentKey` parameter.\n\n#### turnFlagOff\n\nSets the flag's targeting state to **Off**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOff\" } ]\n}\n```\n\n#### turnFlagOn\n\nSets the flag's targeting state to **On**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOn\" } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eworking with targeting and variations\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions require the `environmentKey` parameter.\n\nSeveral 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](/tag/Feature-flags#operation/getFeatureFlag) 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.\n\n#### addClauses\n\nAdds the given clauses to the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `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.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauses\": [{\n\t\t\t\"contextKind\": \"user\",\n\t\t\t\"attribute\": \"country\",\n\t\t\t\"op\": \"in\",\n\t\t\t\"negate\": false,\n\t\t\t\"values\": [\"USA\", \"Canada\"]\n\t\t}]\n\t}]\n}\n```\n\n#### addPrerequisite\n\nAdds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter.\n\n##### Parameters\n\n- `key`: Flag key of the prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addPrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addRule\n\nAdds 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.\n\nIf you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list.\n\n##### Parameters\n\n- `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.\n- `beforeRuleId`: (Optional) ID of a flag rule.\n- Either\n - `variationId`: ID of a variation of the flag.\n\n or\n\n - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000).\n - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n - `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }]\n }]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }],\n \"rolloutContextKind\": \"organization\",\n \"rolloutWeights\": {\n \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n }\n }]\n}\n```\n\n#### addTargets\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addUserTargets\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addValuesToClause\n\nAdds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addValuesToClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### addVariation\n\nAdds a variation to the flag.\n\n##### Parameters\n\n- `value`: The variation value.\n- `name`: (Optional) The variation name.\n- `description`: (Optional) A description for the variation.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ]\n}\n```\n\n#### clearTargets\n\nRemoves all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### clearUserTargets\n\nRemoves all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"]\n\t}]\n}\n```\n\n#### removePrerequisite\n\nRemoves the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ]\n}\n```\n\n#### removeRule\n\nRemoves the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ]\n}\n```\n\n#### removeTargets\n\nRemoves 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.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeUserTargets\n\nRemoves 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeValuesFromClause\n\nRemoves `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeValuesFromClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### removeVariation\n\nRemoves a variation from the flag.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag to remove.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### reorderRules\n\nRearranges 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.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all rules in the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"reorderRules\",\n\t\t\"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n\t}]\n}\n```\n\n#### replacePrerequisites\n\nRemoves all existing prerequisites and replaces them with the list you provide.\n\n##### Parameters\n\n- `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replacePrerequisites\",\n \"prerequisites\": [\n {\n \"key\": \"prereq-flag-key-123abc\",\n \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\"\n },\n {\n \"key\": \"another-prereq-flag-key-456def\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\"\n }\n ]\n }\n ]\n}\n```\n\n#### replaceRules\n\nRemoves all targeting rules for the flag and replaces them with the list you provide.\n\n##### Parameters\n\n- `rules`: A list of rules.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceRules\",\n \"rules\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"description\": \"My new rule\",\n \"clauses\": [\n {\n \"contextKind\": \"user\",\n \"attribute\": \"segmentMatch\",\n \"op\": \"segmentMatch\",\n \"values\": [\"test\"]\n }\n ],\n \"trackEvents\": true\n }\n ]\n }\n ]\n}\n```\n\n#### replaceTargets\n\nRemoves all existing targeting and replaces it with the list of targets you provide.\n\n##### Parameters\n\n- `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`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceTargets\",\n \"targets\": [\n {\n \"contextKind\": \"user\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\"]\n },\n {\n \"contextKind\": \"device\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"device-key-456def\"]\n }\n ]\n } \n ]\n}\n```\n\n#### replaceUserTargets\n\nRemoves 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.\n\n##### Parameters\n\n- `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceUserTargets\",\n \"targets\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\", \"user-key-456def\"]\n },\n {\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"user-key-789ghi\"]\n }\n ]\n }\n ]\n}\n```\n\n#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `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.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"updateClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\",\n \"clause\": {\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Mexico\", \"Canada\"]\n }\n }]\n}\n```\n\n#### updateDefaultVariation\n\nUpdates the default on or off variation of the flag.\n\n##### Parameters\n\n- `onVariationValue`: (Optional) The value of the variation of the new on variation.\n- `offVariationValue`: (Optional) The value of the variation of the new off variation\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ]\n}\n```\n\n#### updateFallthroughVariationOrRollout\n\nUpdates 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.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nor\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"rolloutContextKind\": \"user\",\n\t\t\"rolloutWeights\": {\n\t\t\t\"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n\t\t\t\"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n\t\t}\n\t}]\n}\n```\n\n#### updateOffVariation\n\nUpdates the default off variation to `variationId`. The flag serves the default off variation when the flag's targeting is **Off**.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### updatePrerequisite\n\nChanges the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updatePrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateRuleDescription\n\nUpdates the description of the feature flag rule.\n\n##### Parameters\n\n- `description`: The new human-readable description for this rule.\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleDescription\",\n\t\t\"description\": \"New rule description\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n\t}]\n}\n```\n\n#### updateRuleTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag associated with this rule.\n\n##### Parameters\n\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleTrackEvents\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"trackEvents\": true\n\t}]\n}\n```\n\n#### updateRuleVariationOrRollout\n\nUpdates 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.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `variationId`: ID of a variation of the flag.\n\n or\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleVariationOrRollout\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for all rules.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ]\n}\n```\n\n#### updateTrackEventsFallthrough\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for the default rule.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ]\n}\n```\n\n#### updateVariation\n\nUpdates a variation of the flag.\n\n##### Parameters\n\n- `variationId`: The ID of the variation to update.\n- `name`: (Optional) The updated variation name.\n- `value`: (Optional) The updated variation value.\n- `description`: (Optional) The updated variation description.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating flag settings\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### addCustomProperties\n\nAdds 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.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"addCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"name\": \"Example custom property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### addTags\n\nAdds tags to the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### makeFlagPermanent\n\nMarks 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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagPermanent\" } ]\n}\n```\n\n#### makeFlagTemporary\n\nMarks the feature flag as temporary.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagTemporary\" } ]\n}\n```\n\n#### removeCustomProperties\n\nRemoves the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `values`: A list of the associated values to remove from the custom property.\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"replaceCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### removeMaintainer\n\nRemoves the flag's maintainer. To set a new maintainer, use the `updateMaintainerMember` or `updateMaintainerTeam` instructions.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeMaintainer\" } ]\n}\n```\n\n#### removeTags\n\nRemoves tags from the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### replaceCustomProperties\n\nReplaces the existing associated values for a custom property with the new values.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the new associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceCustomProperties\",\n \"key\": \"example-custom-property\",\n \"name\": \"Example custom property\",\n \"values\": [\"value1\", \"value2\"]\n }]\n}\n```\n\n#### turnOffClientSideAvailability\n\nTurns 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.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn off availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOffClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### turnOnClientSideAvailability\n\nTurns on client-side SDK availability for the flag. This is equivalent to checking 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.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn on availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOnClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### updateDescription\n\nUpdates the feature flag description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateDescription\", \"value\": \"Updated flag description\" } ]\n}\n```\n#### updateMaintainerMember\n\nUpdates the maintainer of the flag to an existing member and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The ID of the member.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerMember\", \"value\": \"61e9b714fd47591727db558a\" } ]\n}\n```\n\n#### updateMaintainerTeam\n\nUpdates the maintainer of the flag to an existing team and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The key of the team.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerTeam\", \"value\": \"example-team-key\" } ]\n}\n```\n\n#### updateName\n\nUpdates the feature flag name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateName\", \"value\": \"Updated flag name\" } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating the flag lifecycle\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### archiveFlag\n\nArchives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.\n\n```json\n{\n \"instructions\": [ { \"kind\": \"archiveFlag\" } ]\n}\n```\n\n#### deleteFlag\n\nDeletes 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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deleteFlag\" } ]\n}\n```\n\n#### deprecateFlag\n\nDeprecates the feature flag. This hides it from the live flags list without archiving or deleting it.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deprecateFlag\" } ]\n}\n```\n\n#### restoreDeprecatedFlag\n\nRestores the feature flag if it was previously deprecated.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ]\n}\n```\n\n#### restoreFlag\n\nRestores the feature flag if it was previously archived.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreFlag\" } ]\n}\n```\n\n\u003c/details\u003e\n\n### Using JSON patches on a feature flag\n\nIf you do not include the semantic patch header described above, you can use a [JSON patch](/reference#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes.\n\nIn the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](/tag/Feature-flags#operation/getFeatureFlag) endpoint to find the field you want to update.\n\nThere are a few special cases to keep in mind when determining the value of the `path` element:\n\n * 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:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/0/values/-\",\n \"value\": \"TestClient10\"\n }\n ]\n ```\n\n * 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:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/-\",\n \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] }\n }\n ]\n ```\n\n * To add a flag to a release pipeline, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/releasePipelineKey\",\n \"value\": \"example-release-pipeline-key\"\n }\n ]\n ```\n\n### Required approvals\nIf 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](/tag/Approvals) or a [workflow](/tag/Workflows).\n\n### Conflicts\nIf 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`.\n\n### Migration flags\nFor 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`.\nWhen you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`.\nTo learn more, read [Migration flags](https://docs.launchdarkly.com/home/flags/migration).\n", + Use: "update", Params: []Param{ { Name: "project-key", @@ -3056,46 +4723,54 @@ func AddAllResourceCmds( { Name: "feature-flag-key", In: "path", - Description: "The feature flag key", + Description: "The feature flag key. The key identifies the flag in your code.", Type: "string", }, { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", + Name: "ignore-conflicts", + In: "query", + Description: "If true, the patch will be applied even if it causes a pending scheduled change or approval request to fail.", + Type: "boolean", }, + }, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}", + SupportsSemanticPatch: true, + }) + + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create a feature flag", + Long: "Create a feature flag with the given name, key, and variations.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003ecreating a migration flag\u003c/strong\u003e\u003c/summary\u003e\n\n### Creating a migration flag\n\nWhen you create a migration flag, the variations are pre-determined based on the number of stages in the migration.\n\nTo 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.\n\nHere's an example:\n\n```json\n{\n \"key\": \"flag-key-123\",\n \"purpose\": \"migration\",\n \"migrationSettings\": {\n \"stageCount\": 6,\n \"contextKind\": \"account\"\n }\n}\n```\n\nTo learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flags/migration).\n\n\u003c/details\u003e\n", + Use: "create", + Params: []Param{ { - Name: "metric-key", + Name: "project-key", In: "path", - Description: "The metric key", + Description: "The project key", Type: "string", }, { - Name: "from", - In: "query", - Description: "A timestamp denoting the start of the data collection period, expressed as a Unix epoch time in milliseconds.", - Type: "integer", - }, - { - Name: "to", + Name: "clone", In: "query", - Description: "A timestamp denoting the end of the data collection period, expressed as a Unix epoch time in milliseconds.", - Type: "integer", + Description: "The key of the feature flag to be cloned. The key identifies the flag in your code. For example, setting 'clone=flagKey' copies the full targeting configuration for all environments, including 'on/off' state, from the original flag to the new flag.", + Type: "string", }, }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: true, - RequiresBody: false, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/experiments/{environmentKey}/{metricKey}", + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/flags/{projectKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ExperimentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Patch experiment", - Long: "Update an experiment. Updating an experiment uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating experiments.\n\n#### updateName\n\nUpdates the experiment name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Example updated experiment name\"\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the experiment description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Example updated description\"\n }]\n}\n```\n\n#### startIteration\n\nStarts a new iteration for this experiment. You must [create a new iteration](/tag/Experiments-(beta)#operation/createIteration) before calling this instruction.\n\nAn iteration may not be started until it meets the following criteria:\n\n* Its associated flag is toggled on and is not archived\n* Its `randomizationUnit` is set\n* At least one of its `treatments` has a non-zero `allocationPercent`\n\n##### Parameters\n\n- `changeJustification`: The reason for starting a new iteration. Required when you call `startIteration` on an already running experiment, otherwise optional.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"startIteration\",\n \"changeJustification\": \"It's time to start a new iteration\"\n }]\n}\n```\n\n#### stopIteration\n\nStops the current iteration for this experiment.\n\n##### Parameters\n\n- `winningTreatmentId`: The ID of the winning treatment. Treatment IDs are returned as part of the [Get experiment](/tag/Experiments-(beta)#operation/getExperiment) response. They are the `_id` of each element in the `treatments` array.\n- `winningReason`: The reason for the winner\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"stopIteration\",\n \"winningTreatmentId\": \"3a548ec2-72ac-4e59-8518-5c24f5609ccf\",\n \"winningReason\": \"Example reason to stop the iteration\"\n }]\n}\n```\n\n#### archiveExperiment\n\nArchives this experiment. Archived experiments are hidden by default in the LaunchDarkly user interface. You cannot start new iterations for archived experiments.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"archiveExperiment\" }]\n}\n```\n\n#### restoreExperiment\n\nRestores an archived experiment. After restoring an experiment, you can start new iterations for it again.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"restoreExperiment\" }]\n}\n```\n", - Use: "update", + NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get migration safety issues", + Long: "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.", + Use: "create-migration-safety-issues", Params: []Param{ { Name: "project-key", @@ -3104,30 +4779,30 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "environment-key", + Name: "flag-key", In: "path", - Description: "The environment key", + Description: "The migration flag key", Type: "string", }, { - Name: "experiment-key", + Name: "environment-key", In: "path", - Description: "The experiment key", + Description: "The environment key", Type: "string", }, }, - HTTPMethod: "PATCH", + HTTPMethod: "POST", HasBody: true, - IsBeta: true, + IsBeta: false, RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}", + Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/migration-safety-issues", SupportsSemanticPatch: true, }) - NewOperationCmd(gen_ExperimentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update experimentation settings", - Long: "Update experimentation settings for the given project", - Use: "replace-settings", + NewOperationCmd(gen_FlagsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List dependent feature flags", + Long: "\u003e ### Flag prerequisites is an Enterprise feature\n\u003e\n\u003e 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/).\n\nList 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/flags/prereqs).\n", + Use: "list-dependent", Params: []Param{ { Name: "project-key", @@ -3135,19 +4810,25 @@ func AddAllResourceCmds( Description: "The project key", Type: "string", }, + { + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, }, - HTTPMethod: "PUT", - HasBody: true, + HTTPMethod: "GET", + HasBody: false, IsBeta: true, - RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/experimentation-settings", + RequiresBody: false, + Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/dependent-flags", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create flag link", - Long: "Create a new flag link. Flag links let you reference external resources and associate them with your flags.", - Use: "create", + NewOperationCmd(gen_FlagsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List dependent feature flags by environment", + Long: "\u003e ### Flag prerequisites is an Enterprise feature\n\u003e\n\u003e 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/).\n\nList 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/flags/prereqs).\n", + Use: "list-dependent-by-env", Params: []Param{ { Name: "project-key", @@ -3155,6 +4836,12 @@ func AddAllResourceCmds( Description: "The project key", Type: "string", }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, { Name: "feature-flag-key", In: "path", @@ -3162,18 +4849,18 @@ func AddAllResourceCmds( Type: "string", }, }, - HTTPMethod: "POST", - HasBody: true, + HTTPMethod: "GET", + HasBody: false, IsBeta: true, - RequiresBody: true, - Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}", + RequiresBody: false, + Path: "/api/v2/flags/{projectKey}/{environmentKey}/{featureFlagKey}/dependent-flags", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete flag link", - Long: "Delete a flag link by ID or key.", - Use: "delete", + NewOperationCmd(gen_FollowFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Remove a member as a follower of a flag in a project and environment", + Long: "Remove a member as a follower to a flag in a project and environment", + Use: "delete-flag-follower", Params: []Param{ { Name: "project-key", @@ -3188,23 +4875,29 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "id", + Name: "environment-key", In: "path", - Description: "The flag link ID or Key", + Description: "The environment key", + Type: "string", + }, + { + Name: "member-id", + In: "path", + Description: "The memberId of the member to remove as a follower of the flag. Reader roles can only remove themselves.", Type: "string", }, }, HTTPMethod: "DELETE", HasBody: false, - IsBeta: true, + IsBeta: false, RequiresBody: false, - Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}", + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "List flag links", - Long: "Get a list of all flag links.", + NewOperationCmd(gen_FollowFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get followers of a flag in a project and environment", + Long: "Get a list of members following a flag in a project and environment", Use: "list", Params: []Param{ { @@ -3219,19 +4912,25 @@ func AddAllResourceCmds( Description: "The feature flag key", Type: "string", }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: true, + IsBeta: false, RequiresBody: false, - Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}", + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update flag link", - Long: "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](/#section/Overview/Updates).", - Use: "update", + NewOperationCmd(gen_FollowFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get followers of all flags in a given project and environment", + Long: "Get followers of all flags in a given environment and project", + Use: "list-by-proj-env", Params: []Param{ { Name: "project-key", @@ -3240,30 +4939,24 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", - Type: "string", - }, - { - Name: "id", + Name: "environment-key", In: "path", - Description: "The flag link ID", + Description: "The environment key", Type: "string", }, }, - HTTPMethod: "PATCH", - HasBody: true, - IsBeta: true, - RequiresBody: true, - Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}", + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/followers", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FlagTriggersResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create flag trigger", - Long: "Create a new flag trigger.", - Use: "create", + NewOperationCmd(gen_FollowFlagsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Add a member as a follower of a flag in a project and environment", + Long: "Add a member as a follower to a flag in a project and environment", + Use: "replace-flag-follower", Params: []Param{ { Name: "project-key", @@ -3271,6 +4964,12 @@ func AddAllResourceCmds( Description: "The project key", Type: "string", }, + { + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, { Name: "environment-key", In: "path", @@ -3278,24 +4977,24 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "feature-flag-key", + Name: "member-id", In: "path", - Description: "The feature flag key", + Description: "The memberId of the member to add as a follower of the flag. Reader roles can only add themselves.", Type: "string", }, }, - HTTPMethod: "POST", - HasBody: true, + HTTPMethod: "PUT", + HasBody: false, IsBeta: false, - RequiresBody: true, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}", + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FlagTriggersResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete flag trigger", - Long: "Delete a flag trigger by ID.", - Use: "delete", + NewOperationCmd(gen_HoldoutsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get all holdouts", + Long: "", + Use: "list", Params: []Param{ { Name: "project-key", @@ -3310,29 +5009,29 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", - Type: "string", + Name: "limit", + In: "query", + Description: "The number of holdouts to return in the response. Defaults to 20", + Type: "integer", }, { - Name: "id", - In: "path", - Description: "The flag trigger ID", - Type: "string", + Name: "offset", + In: "query", + Description: "Where to start in the list. Use this with pagination. For example, an 'offset' of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Type: "integer", }, }, - HTTPMethod: "DELETE", + HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}", + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts", SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_FlagTriggersResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get flag trigger by ID", - Long: "Get a flag trigger by ID.", + }) + + NewOperationCmd(gen_HoldoutsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get holdout", + Long: "Get details about a holdout.\n\n### Expanding the holdout response\n\nLaunchDarkly supports the following fields for expanding the \"Get holdout\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n- `draftIteration` includes the iteration which has not been started yet, if any, for this holdout.\n- `previousIterations` includes all iterations prior to the current iteration, for this holdout. By default only the current iteration is included in the response.\n- `rel-draftIteration` includes the iteration which has not been started yet, if any, for the experiments related to this holdout.\n- `rel-metrics` includes metrics for experiments related to this holdout.\n- `rel-previousIterations` includes all iterations prior to the current iteration, for the experiments related to this holdout.\n- `rel-secondaryMetrics` includes secondary metrics for experiments related to this holdout.\n- `rel-treatments` includes all treatment and parameter details for experiments related to this holdout.\n- `secondaryMetrics` includes secondary metrics for this holdout. By default only the primary metric is included in the response.\n- `treatments` includes all treatment and parameter details for this holdout. By default treatment data is not included in the response.\n\nFor example, `expand=draftIteration,rel-draftIteration` includes the `draftIteration` and `rel-draftIteration` fields in the response. If fields that you request with the `expand` query parameter are empty, they are not included in the response.\n", Use: "get", Params: []Param{ { @@ -3342,36 +5041,36 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "feature-flag-key", + Name: "environment-key", In: "path", - Description: "The feature flag key", + Description: "The environment key", Type: "string", }, { - Name: "environment-key", + Name: "holdout-key", In: "path", - Description: "The environment key", + Description: "The holdout experiment key", Type: "string", }, { - Name: "id", - In: "path", - Description: "The flag trigger ID", + Name: "expand", + In: "query", + Description: "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. Holdout experiment expansion fields have no prefix. Related experiment expansion fields have 'rel-' as a prefix.", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}", + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/{holdoutKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FlagTriggersResourceCmd, client, markdownRenderer, OperationData{ - Short: "List flag triggers", - Long: "Get a list of all flag triggers.", - Use: "list", + NewOperationCmd(gen_HoldoutsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get Holdout by Id", + Long: "", + Use: "get", Params: []Param{ { Name: "project-key", @@ -3386,23 +5085,23 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "feature-flag-key", + Name: "holdout-id", In: "path", - Description: "The feature flag key", + Description: "The holdout experiment ID", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}", + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/id/{holdoutId}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FlagTriggersResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update flag trigger", - Long: "Update a flag trigger. Updating a flag trigger uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating flag triggers.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating flag triggers\u003c/strong\u003e\u003c/summary\u003e\n\n#### replaceTriggerActionInstructions\n\nRemoves the existing trigger action and replaces it with the new instructions.\n\n##### Parameters\n\n- `value`: An array of the new `kind`s of actions to perform when triggering. Supported flag actions are `turnFlagOn` and `turnFlagOff`.\n\nHere's an example that replaces the existing action with new instructions to turn flag targeting off:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"replaceTriggerActionInstructions\",\n \"value\": [ {\"kind\": \"turnFlagOff\"} ]\n }\n ]\n}\n```\n\n#### cycleTriggerUrl\n\nGenerates a new URL for this trigger. You must update any clients using the trigger to use this new URL.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"cycleTriggerUrl\" }]\n}\n```\n\n#### disableTrigger\n\nDisables the trigger. This saves the trigger configuration, but the trigger stops running. To re-enable, use `enableTrigger`.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"disableTrigger\" }]\n}\n```\n\n#### enableTrigger\n\nEnables the trigger. If you previously disabled the trigger, it begins running again.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"enableTrigger\" }]\n}\n```\n\n\u003c/details\u003e\n", + NewOperationCmd(gen_HoldoutsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Patch holdout", + Long: "Updates an existing holdout, and returns the updated holdout. Updating holdouts uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating holdouts.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating holdouts\u003c/strong\u003e\u003c/summary\u003e\n\n#### endHoldout\n\nEnds a holdout.\n\n##### Parameters\n\nNone.\n\nHere's an example:\n\n```json\n{\n \"comment\": \"Optional comment describing why the holdout is ending\",\n \"instructions\": [{\n \"kind\": \"endHoldout\"\n }]\n}\n```\n\n#### removeExperiment\n\nRemoves an experiment from a holdout.\n\n##### Parameters\n\n- `value`: The key of the experiment to remove\n\nHere's an example:\n\n```json\n{\n \"comment\": \"Optional comment describing the change\",\n \"instructions\": [{\n \"kind\": \"removeExperiment\",\n \"value\": \"experiment-key\"\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the description of the holdout.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"comment\": \"Optional comment describing the update\",\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Updated holdout description\"\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the holdout.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"comment\": \"Optional comment describing the update\",\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated holdout name\"\n }]\n}\n```\n\n\u003c/details\u003e\n", Use: "update", Params: []Param{ { @@ -3418,30 +5117,24 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", - Type: "string", - }, - { - Name: "id", + Name: "holdout-key", In: "path", - Description: "The flag trigger ID", + Description: "The holdout key", Type: "string", }, }, HTTPMethod: "PATCH", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}", + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/{holdoutKey}", SupportsSemanticPatch: true, }) - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Copy feature flag", - Long: "\n\u003e ### Copying flag settings is an Enterprise feature\n\u003e\n\u003e 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/).\n\nCopy flag settings from a source environment to a target environment.\n\nBy 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.\n\nIf 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.\n", - Use: "copy", + NewOperationCmd(gen_HoldoutsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create holdout", + Long: "Create a new holdout in the specified project.", + Use: "create", Params: []Param{ { Name: "project-key", @@ -3450,475 +5143,544 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "feature-flag-key", + Name: "environment-key", In: "path", - Description: "The feature flag key. The key identifies the flag in your code.", + Description: "The environment key", Type: "string", }, }, HTTPMethod: "POST", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/copy", + Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete feature flag", - Long: "Delete a feature flag in all environments. Use with caution: only delete feature flags your application no longer uses.", - Use: "delete", + NewOperationCmd(gen_InsightsChartsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get deployment frequency chart data", + Long: "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).\n\n### Expanding the chart response\n\nLaunchDarkly supports expanding the chart response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `metrics` includes details on the metrics related to deployment frequency\n\nFor example, use `?expand=metrics` to include the `metrics` field in the response. By default, this field is **not** included in the response.\n", + Use: "get-deployment-frequency-chart", Params: []Param{ { Name: "project-key", - In: "path", + In: "query", Description: "The project key", Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key. The key identifies the flag in your code.", + Name: "environment-key", + In: "query", + Description: "The environment key", + Type: "string", + }, + { + Name: "application-key", + In: "query", + Description: "Comma separated list of application keys", + Type: "string", + }, + { + Name: "from", + In: "query", + Description: "Unix timestamp in milliseconds. Default value is 7 days ago.", + Type: "string", + }, + { + Name: "to", + In: "query", + Description: "Unix timestamp in milliseconds. Default value is now.", + Type: "string", + }, + { + Name: "bucket-type", + In: "query", + Description: "Specify type of bucket. Options: 'rolling', 'hour', 'day'. Default: 'rolling'.", + Type: "string", + }, + { + Name: "bucket-ms", + In: "query", + Description: "Duration of intervals for x-axis in milliseconds. Default value is one day ('86400000' milliseconds).", + Type: "integer", + }, + { + Name: "group-by", + In: "query", + Description: "Options: 'application', 'kind'", + Type: "string", + }, + { + Name: "expand", + In: "query", + Description: "Options: 'metrics'", Type: "string", }, }, - HTTPMethod: "DELETE", + HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}", + Path: "/api/v2/engineering-insights/charts/deployments/frequency", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get expiring context targets for feature flag", - Long: "Get a list of context targets on a feature flag that are scheduled for removal.", - Use: "list-expiring-context-targets", + NewOperationCmd(gen_InsightsChartsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get flag status chart data", + Long: "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).", + Use: "get-flag-status-chart", Params: []Param{ { Name: "project-key", - In: "path", + In: "query", Description: "The project key", Type: "string", }, { Name: "environment-key", - In: "path", + In: "query", Description: "The environment key", Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "application-key", + In: "query", + Description: "Comma separated list of application keys", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}", + Path: "/api/v2/engineering-insights/charts/flags/status", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get expiring user targets for feature flag", - Long: "\n\u003e ### Contexts are now available\n\u003e\n\u003e After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring context targets for feature flag](/tag/Feature-flags#operation/getExpiringContextTargets) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nGet a list of user targets on a feature flag that are scheduled for removal.\n", - Use: "list-expiring-user-targets", + NewOperationCmd(gen_InsightsChartsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get lead time chart data", + Long: "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).", + Use: "get-lead-time-chart", Params: []Param{ { Name: "project-key", - In: "path", + In: "query", Description: "The project key", Type: "string", }, { Name: "environment-key", - In: "path", + In: "query", Description: "The environment key", Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "application-key", + In: "query", + Description: "Comma separated list of application keys", + Type: "string", + }, + { + Name: "from", + In: "query", + Description: "Unix timestamp in milliseconds. Default value is 7 days ago.", + Type: "integer", + }, + { + Name: "to", + In: "query", + Description: "Unix timestamp in milliseconds. Default value is now.", + Type: "integer", + }, + { + Name: "bucket-type", + In: "query", + Description: "Specify type of bucket. Options: 'rolling', 'hour', 'day'. Default: 'rolling'.", + Type: "string", + }, + { + Name: "bucket-ms", + In: "query", + Description: "Duration of intervals for x-axis in milliseconds. Default value is one day ('86400000' milliseconds).", + Type: "integer", + }, + { + Name: "group-by", + In: "query", + Description: "Options: 'application', 'stage'. Default: 'stage'.", + Type: "string", + }, + { + Name: "expand", + In: "query", + Description: "Options: 'metrics', 'percentiles'.", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}", + Path: "/api/v2/engineering-insights/charts/lead-time", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get feature flag", - Long: "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.\n\n\u003e #### Recommended use\n\u003e\n\u003e 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.\n\n### Expanding response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days \n- `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`.\n\nFor example, `expand=evaluation` includes the `evaluation` field in the response.\n", - Use: "get", + NewOperationCmd(gen_InsightsChartsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get release frequency chart data", + Long: "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).", + Use: "get-release-frequency-chart", Params: []Param{ { Name: "project-key", - In: "path", + In: "query", Description: "The project key", Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "environment-key", + In: "query", + Description: "The environment key", Type: "string", }, { - Name: "env", + Name: "application-key", In: "query", - Description: "Filter configurations by environment", + Description: "Comma separated list of application keys", + Type: "string", + }, + { + Name: "has-experiments", + In: "query", + Description: "Filter events to those associated with an experiment ('true') or without an experiment ('false')", + Type: "boolean", + }, + { + Name: "global", + In: "query", + Description: "Filter to include or exclude global events. Default value is 'include'. Options: 'include', 'exclude'", + Type: "string", + }, + { + Name: "group-by", + In: "query", + Description: "Property to group results by. Options: 'impact'", + Type: "string", + }, + { + Name: "from", + In: "query", + Description: "Unix timestamp in milliseconds. Default value is 7 days ago.", Type: "string", }, + { + Name: "to", + In: "query", + Description: "Unix timestamp in milliseconds. Default value is now.", + Type: "string", + }, + { + Name: "bucket-type", + In: "query", + Description: "Specify type of bucket. Options: 'rolling', 'hour', 'day'. Default: 'rolling'.", + Type: "string", + }, + { + Name: "bucket-ms", + In: "query", + Description: "Duration of intervals for x-axis in milliseconds. Default value is one day ('86400000' milliseconds).", + Type: "integer", + }, { Name: "expand", In: "query", - Description: "A comma-separated list of fields to expand in the response. Supported fields are explained above.", + Description: "Options: 'metrics'", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}", + Path: "/api/v2/engineering-insights/charts/releases/frequency", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get feature flag status", - Long: "Get the status for a particular feature flag.", - Use: "get-status", + NewOperationCmd(gen_InsightsChartsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get stale flags chart data", + Long: "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).\n\n### Expanding the chart response\n\nLaunchDarkly supports expanding the chart response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `metrics` includes details on the metrics related to stale flags\n\nFor example, use `?expand=metrics` to include the `metrics` field in the response. By default, this field is **not** included in the response.\n", + Use: "get-stale-flags-chart", Params: []Param{ { Name: "project-key", - In: "path", + In: "query", Description: "The project key", Type: "string", }, { Name: "environment-key", - In: "path", + In: "query", Description: "The environment key", Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "application-key", + In: "query", + Description: "Comma separated list of application keys", Type: "string", }, - }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: false, - RequiresBody: false, - Path: "/api/v2/flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get flag status across environments", - Long: "Get the status for a particular feature flag across environments.", - Use: "get-status-across-environments", - Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", + Name: "group-by", + In: "query", + Description: "Property to group results by. Options: 'maintainer'", Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "maintainer-id", + In: "query", + Description: "Comma-separated list of individual maintainers to filter results.", Type: "string", }, { - Name: "env", + Name: "maintainer-team-key", In: "query", - Description: "Optional environment filter", + Description: "Comma-separated list of team maintainer keys to filter results.", + Type: "string", + }, + { + Name: "expand", + In: "query", + Description: "Options: 'metrics'", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/flag-status/{projectKey}/{featureFlagKey}", + Path: "/api/v2/engineering-insights/charts/flags/stale", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_InsightsDeploymentsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create deployment event", + Long: "Create deployment event", + Use: "create-deployment-event", + Params: []Param{}, + HTTPMethod: "POST", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/engineering-insights/deployment-events", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "List feature flag statuses", - Long: "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:\n\n- `new`: You created the flag fewer than seven days ago and it has never been requested.\n- `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.\n- `inactive`: You created the feature flag more than seven days ago, and hasn't been requested within the past seven days.\n- `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.\n\nTo learn more, read [Flag statuses](https://docs.launchdarkly.com/home/observability/flag-status).\n", - Use: "list-statuses", + NewOperationCmd(gen_InsightsDeploymentsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get deployment", + Long: "Get a deployment by ID.\n\nThe deployment ID is returned as part of the [List deployments](#operation/getDeployments) response. It is the `id` field of each element in the `items` array.\n\n### Expanding the deployment response\n\nLaunchDarkly supports expanding the deployment response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `pullRequests` includes details on all of the pull requests associated with each deployment\n* `flagReferences` includes details on all of the references to flags in each deployment\n\nFor example, use `?expand=pullRequests` to include the `pullRequests` field in the response. By default, this field is **not** included in the response.\n", + Use: "get-deployment", Params: []Param{ { - Name: "project-key", + Name: "deployment-id", In: "path", - Description: "The project key", + Description: "The deployment ID", Type: "string", }, { - Name: "environment-key", - In: "path", - Description: "The environment key", + Name: "expand", + In: "query", + Description: "Expand properties in response. Options: 'pullRequests', 'flagReferences'", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/flag-statuses/{projectKey}/{environmentKey}", + Path: "/api/v2/engineering-insights/deployments/{deploymentID}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "List feature flags", - Long: "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.\n\n\u003e #### Recommended use\n\u003e\n\u003e 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`.\n\n### Filtering flags\n\nYou 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`.\n\nThe `filter` query parameter supports the following arguments:\n\n| Filter argument | Description | Example |\n|-----------------------|-------------|----------------------|\n| `applicationEvaluated` | A string. It filters the list to flags that are evaluated in the application with the given key. | `filter=applicationEvaluated:com.launchdarkly.cafe` |\n| `archived` | (deprecated) A boolean value. It filters the list to archived flags. | Use `filter=state:archived` instead |\n| `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` |\n| `codeReferences.max` | An integer value. Use `0` to return flags that do not have code references. | `filter=codeReferences.max:0` |\n| `codeReferences.min` | An integer value. Use `1` to return flags that do have code references. | `filter=codeReferences.min:1` |\n| `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}` |\n| `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=evaluated:{\"after\":1690527600000},filterEnv:production` |\n| `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` |\n| `hasExperiment` | A boolean value. It filters the list to flags that are used in an experiment. | `filter=hasExperiment:true` |\n| `maintainerId` | A valid member ID. It filters the list to flags that are maintained by this member. | `filter=maintainerId:12ab3c45de678910abc12345` |\n| `maintainerTeamKey` | A string. It filters the list to flags that are maintained by the team with this key. | `filter=maintainerTeamKey:example-team-key` |\n| `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` |\n| `state` | A string, either `live`, `deprecated`, or `archived`. It filters the list to flags in this state. | `filter=state:archived` |\n| `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` |\n| `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` |\n| `type` | A string, either `temporary` or `permanent`. It filters the list to flags with the specified type. | `filter=type:permanent` |\n\nThe documented values for the `filter` query are prior to URL encoding. For example, the `+` in `filter=tags:beta+test` must be encoded to `%2B`.\n\nBy 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.\n\n### Sorting flags\n\nYou can sort flags based on the following fields:\n\n- `creationDate` sorts by the creation date of the flag.\n- `key` sorts by the key of the flag.\n- `maintainerId` sorts by the flag maintainer.\n- `name` sorts by flag name.\n- `tags` sorts by tags.\n- `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\u0026env=production\u0026env=staging` returns results sorted by `targetingModifiedDate` for the `production` environment.\n- `type` sorts by flag type\n\nAll 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.\n\n### Expanding response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `codeReferences` includes code references for the feature flag\n- `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days\n- `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`.\n\nFor example, `expand=evaluation` includes the `evaluation` field in the response.\n\n### Migration flags\nFor 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.\nTo learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flags/migration).\n", - Use: "list", + NewOperationCmd(gen_InsightsDeploymentsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List deployments", + Long: "Get a list of deployments\n\n### Expanding the deployment collection response\n\nLaunchDarkly supports expanding the deployment collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `pullRequests` includes details on all of the pull requests associated with each deployment\n* `flagReferences` includes details on all of the references to flags in each deployment\n\nFor example, use `?expand=pullRequests` to include the `pullRequests` field in the response. By default, this field is **not** included in the response.\n", + Use: "list-deployments", Params: []Param{ { Name: "project-key", - In: "path", + In: "query", Description: "The project key", Type: "string", }, { - Name: "env", + Name: "environment-key", In: "query", - Description: "Filter configurations by environment", + Description: "The environment key", Type: "string", }, { - Name: "tag", + Name: "application-key", In: "query", - Description: "Filter feature flags by tag", + Description: "Comma separated list of application keys", Type: "string", }, { Name: "limit", In: "query", - Description: "The number of feature flags to return. Defaults to 20.", + Description: "The number of deployments to return. Default is 20. Maximum allowed is 100.", Type: "integer", }, { - Name: "offset", + Name: "expand", In: "query", - Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Description: "Expand properties in response. Options: 'pullRequests', 'flagReferences'", + Type: "string", + }, + { + Name: "from", + In: "query", + Description: "Unix timestamp in milliseconds. Default value is 7 days ago.", Type: "integer", }, { - Name: "summary", + Name: "to", In: "query", - Description: "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.", - Type: "boolean", + Description: "Unix timestamp in milliseconds. Default value is now.", + Type: "integer", }, { - Name: "filter", + Name: "after", In: "query", - Description: "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.", + Description: "Identifier used for pagination", Type: "string", }, { - Name: "sort", + Name: "before", In: "query", - Description: "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.", + Description: "Identifier used for pagination", Type: "string", }, { - Name: "compare", + Name: "kind", In: "query", - Description: "A boolean to filter results by only flags that have differences between environments", - Type: "boolean", + Description: "The deployment kind", + Type: "string", }, { - Name: "expand", + Name: "status", In: "query", - Description: "A comma-separated list of fields to expand in the response. Supported fields are explained above.", + Description: "The deployment status", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/flags/{projectKey}", + Path: "/api/v2/engineering-insights/deployments", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update expiring context targets on feature flag", - Long: "Schedule a context for removal from individual targeting on a feature flag. The flag must already individually target the context.\n\nYou can add, update, or remove a scheduled removal date. You can only schedule a context for removal on a single variation per flag.\n\nUpdating 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring targets.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating expiring targets\u003c/strong\u003e\u003c/summary\u003e\n\n#### addExpiringTarget\n\nAdds a date and time that LaunchDarkly will remove the context from the flag's individual targeting.\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the context from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `contextKey`: The context key for the context to remove from individual targeting\n* `contextKind`: The kind of context represented by the `contextKey`\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExpiringTarget\",\n \"value\": 1754006460000,\n \"variationId\": \"4254742c-71ae-411f-a992-43b18a51afe0\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\"\n }]\n}\n```\n\n#### updateExpiringTarget\n\nUpdates the date and time that LaunchDarkly will remove the context from the flag's individual targeting\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the context from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `contextKey`: The context key for the context to remove from individual targeting\n* `contextKind`: The kind of context represented by the `contextKey`\n* `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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExpiringTarget\",\n \"value\": 1754006460000,\n \"variationId\": \"4254742c-71ae-411f-a992-43b18a51afe0\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\"\n }]\n}\n```\n\n#### removeExpiringTarget\n\nRemoves 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.\n\n##### Parameters\n\n* `variationId`: ID of a variation on the flag\n* `contextKey`: The context key for the context to remove from individual targeting\n* `contextKind`: The kind of context represented by the `contextKey`\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExpiringTarget\",\n \"variationId\": \"4254742c-71ae-411f-a992-43b18a51afe0\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\"\n }]\n}\n```\n\n\u003c/details\u003e\n", - Use: "update-expiring-targets", + NewOperationCmd(gen_InsightsDeploymentsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update deployment", + Long: "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](/#section/Overview/Updates).\u003cbr/\u003e\u003cbr/\u003eThe deployment ID is returned as part of the [List deployments](#operation/getDeployments) response. It is the `id` field of each element in the `items` array.", + Use: "update-deployment", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", - }, - { - Name: "feature-flag-key", + Name: "deployment-id", In: "path", - Description: "The feature flag key", + Description: "The deployment ID", Type: "string", }, }, HTTPMethod: "PATCH", HasBody: true, - IsBeta: false, + IsBeta: true, RequiresBody: true, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}", - SupportsSemanticPatch: true, + Path: "/api/v2/engineering-insights/deployments/{deploymentID}", + SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update expiring user targets on feature flag", - Long: "\u003e ### Contexts are now available\n\u003e\n\u003e After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring context targets on feature flag](/tag/Feature-flags#operation/patchExpiringTargets) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nSchedule 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.\n\nYou can add, update, or remove a scheduled removal date. You can only schedule a target for removal on a single variation per flag.\n\nUpdating 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring user targets.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating expiring user targets\u003c/strong\u003e\u003c/summary\u003e\n\n#### addExpireUserTargetDate\n\nAdds a date and time that LaunchDarkly will remove the user from the flag's individual targeting.\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `userKey`: The user key for the user to remove from individual targeting\n\n#### updateExpireUserTargetDate\n\nUpdates the date and time that LaunchDarkly will remove the user from the flag's individual targeting.\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `userKey`: The user key for the user to remove from individual targeting\n* `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.\n\n#### removeExpireUserTargetDate\n\nRemoves 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.\n\n##### Parameters\n\n* `variationId`: ID of a variation on the flag\n* `userKey`: The user key for the user to remove from individual targeting\n\n\u003c/details\u003e\n", - Use: "update-expiring-user-targets", + NewOperationCmd(gen_InsightsFlagEventsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List flag events", + Long: "Get a list of flag events\n\n### Expanding the flag event collection response\n\nLaunchDarkly supports expanding the flag event collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `experiments` includes details on all of the experiments run on each flag\n\nFor example, use `?expand=experiments` to include the `experiments` field in the response. By default, this field is **not** included in the response.\n", + Use: "list-flag-events", Params: []Param{ { Name: "project-key", - In: "path", + In: "query", Description: "The project key", Type: "string", }, { Name: "environment-key", - In: "path", + In: "query", Description: "The environment key", Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "application-key", + In: "query", + Description: "Comma separated list of application keys", Type: "string", }, - }, - HTTPMethod: "PATCH", - HasBody: true, - IsBeta: false, - RequiresBody: true, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}", - SupportsSemanticPatch: true, - }) - - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update feature flag", - Long: "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](/#section/Overview/Updates).\n\n### Using semantic patches on a feature flag\n\nTo 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](/reference#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating feature flags takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment.\n* `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.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating feature flags.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eturning flags on and off\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions require the `environmentKey` parameter.\n\n#### turnFlagOff\n\nSets the flag's targeting state to **Off**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOff\" } ]\n}\n```\n\n#### turnFlagOn\n\nSets the flag's targeting state to **On**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOn\" } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eworking with targeting and variations\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions require the `environmentKey` parameter.\n\nSeveral 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](/tag/Feature-flags#operation/getFeatureFlag) 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.\n\n#### addClauses\n\nAdds the given clauses to the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `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.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauses\": [{\n\t\t\t\"contextKind\": \"user\",\n\t\t\t\"attribute\": \"country\",\n\t\t\t\"op\": \"in\",\n\t\t\t\"negate\": false,\n\t\t\t\"values\": [\"USA\", \"Canada\"]\n\t\t}]\n\t}]\n}\n```\n\n#### addPrerequisite\n\nAdds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter.\n\n##### Parameters\n\n- `key`: Flag key of the prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addPrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addRule\n\nAdds 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.\n\nIf you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list.\n\n##### Parameters\n\n- `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.\n- `beforeRuleId`: (Optional) ID of a flag rule.\n- Either\n - `variationId`: ID of a variation of the flag.\n\n or\n\n - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000).\n - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n - `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }]\n }]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }],\n \"rolloutContextKind\": \"organization\",\n \"rolloutWeights\": {\n \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n }\n }]\n}\n```\n\n#### addTargets\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addUserTargets\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addValuesToClause\n\nAdds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addValuesToClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### addVariation\n\nAdds a variation to the flag.\n\n##### Parameters\n\n- `value`: The variation value.\n- `name`: (Optional) The variation name.\n- `description`: (Optional) A description for the variation.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ]\n}\n```\n\n#### clearTargets\n\nRemoves all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### clearUserTargets\n\nRemoves all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"]\n\t}]\n}\n```\n\n#### removePrerequisite\n\nRemoves the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ]\n}\n```\n\n#### removeRule\n\nRemoves the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ]\n}\n```\n\n#### removeTargets\n\nRemoves 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.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeUserTargets\n\nRemoves 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeValuesFromClause\n\nRemoves `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeValuesFromClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### removeVariation\n\nRemoves a variation from the flag.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag to remove.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### reorderRules\n\nRearranges 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.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all rules in the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"reorderRules\",\n\t\t\"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n\t}]\n}\n```\n\n#### replacePrerequisites\n\nRemoves all existing prerequisites and replaces them with the list you provide.\n\n##### Parameters\n\n- `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replacePrerequisites\",\n \"prerequisites\": [\n {\n \"key\": \"prereq-flag-key-123abc\",\n \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\"\n },\n {\n \"key\": \"another-prereq-flag-key-456def\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\"\n }\n ]\n }\n ]\n}\n```\n\n#### replaceRules\n\nRemoves all targeting rules for the flag and replaces them with the list you provide.\n\n##### Parameters\n\n- `rules`: A list of rules.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceRules\",\n \"rules\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"description\": \"My new rule\",\n \"clauses\": [\n {\n \"contextKind\": \"user\",\n \"attribute\": \"segmentMatch\",\n \"op\": \"segmentMatch\",\n \"values\": [\"test\"]\n }\n ],\n \"trackEvents\": true\n }\n ]\n }\n ]\n}\n```\n\n#### replaceTargets\n\nRemoves all existing targeting and replaces it with the list of targets you provide.\n\n##### Parameters\n\n- `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`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceTargets\",\n \"targets\": [\n {\n \"contextKind\": \"user\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\"]\n },\n {\n \"contextKind\": \"device\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"device-key-456def\"]\n }\n ]\n } \n ]\n}\n```\n\n#### replaceUserTargets\n\nRemoves 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.\n\n##### Parameters\n\n- `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceUserTargets\",\n \"targets\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\", \"user-key-456def\"]\n },\n {\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"user-key-789ghi\"]\n }\n ]\n }\n ]\n}\n```\n\n#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `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.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"updateClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\",\n \"clause\": {\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Mexico\", \"Canada\"]\n }\n }]\n}\n```\n\n#### updateDefaultVariation\n\nUpdates the default on or off variation of the flag.\n\n##### Parameters\n\n- `onVariationValue`: (Optional) The value of the variation of the new on variation.\n- `offVariationValue`: (Optional) The value of the variation of the new off variation\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ]\n}\n```\n\n#### updateFallthroughVariationOrRollout\n\nUpdates 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.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nor\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"rolloutContextKind\": \"user\",\n\t\t\"rolloutWeights\": {\n\t\t\t\"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n\t\t\t\"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n\t\t}\n\t}]\n}\n```\n\n#### updateOffVariation\n\nUpdates the default off variation to `variationId`. The flag serves the default off variation when the flag's targeting is **Off**.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### updatePrerequisite\n\nChanges the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updatePrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateRuleDescription\n\nUpdates the description of the feature flag rule.\n\n##### Parameters\n\n- `description`: The new human-readable description for this rule.\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleDescription\",\n\t\t\"description\": \"New rule description\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n\t}]\n}\n```\n\n#### updateRuleTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag associated with this rule.\n\n##### Parameters\n\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleTrackEvents\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"trackEvents\": true\n\t}]\n}\n```\n\n#### updateRuleVariationOrRollout\n\nUpdates 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.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `variationId`: ID of a variation of the flag.\n\n or\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleVariationOrRollout\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for all rules.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ]\n}\n```\n\n#### updateTrackEventsFallthrough\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for the default rule.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ]\n}\n```\n\n#### updateVariation\n\nUpdates a variation of the flag.\n\n##### Parameters\n\n- `variationId`: The ID of the variation to update.\n- `name`: (Optional) The updated variation name.\n- `value`: (Optional) The updated variation value.\n- `description`: (Optional) The updated variation description.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating flag settings\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### addCustomProperties\n\nAdds 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.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"addCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"name\": \"Example custom property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### addTags\n\nAdds tags to the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### makeFlagPermanent\n\nMarks 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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagPermanent\" } ]\n}\n```\n\n#### makeFlagTemporary\n\nMarks the feature flag as temporary.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagTemporary\" } ]\n}\n```\n\n#### removeCustomProperties\n\nRemoves the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `values`: A list of the associated values to remove from the custom property.\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"replaceCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### removeMaintainer\n\nRemoves the flag's maintainer. To set a new maintainer, use the flag's **Settings** tab in the LaunchDarkly user interface.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeMaintainer\" } ]\n}\n```\n\n#### removeTags\n\nRemoves tags from the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### replaceCustomProperties\n\nReplaces the existing associated values for a custom property with the new values.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the new associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceCustomProperties\",\n \"key\": \"example-custom-property\",\n \"name\": \"Example custom property\",\n \"values\": [\"value1\", \"value2\"]\n }]\n}\n```\n\n#### turnOffClientSideAvailability\n\nTurns 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.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn off availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOffClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### turnOnClientSideAvailability\n\nTurns 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.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn on availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOnClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### updateDescription\n\nUpdates the feature flag description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateDescription\", \"value\": \"Updated flag description\" } ]\n}\n```\n#### updateMaintainerMember\n\nUpdates the maintainer of the flag to an existing member and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The ID of the member.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerMember\", \"value\": \"61e9b714fd47591727db558a\" } ]\n}\n```\n\n#### updateMaintainerTeam\n\nUpdates the maintainer of the flag to an existing team and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The key of the team.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerTeam\", \"value\": \"example-team-key\" } ]\n}\n```\n\n#### updateName\n\nUpdates the feature flag name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateName\", \"value\": \"Updated flag name\" } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating the flag lifecycle\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### archiveFlag\n\nArchives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.\n\n```json\n{\n \"instructions\": [ { \"kind\": \"archiveFlag\" } ]\n}\n```\n\n#### deleteFlag\n\nDeletes 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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deleteFlag\" } ]\n}\n```\n\n#### deprecateFlag\n\nDeprecates the feature flag. This hides it from the live flags list without archiving or deleting it.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deprecateFlag\" } ]\n}\n```\n\n#### restoreDeprecatedFlag\n\nRestores the feature flag if it was previously deprecated.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ]\n}\n```\n\n#### restoreFlag\n\nRestores the feature flag if it was previously archived.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreFlag\" } ]\n}\n```\n\n\u003c/details\u003e\n\n### Using JSON patches on a feature flag\n\nIf you do not include the semantic patch header described above, you can use a [JSON patch](/reference#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes.\n\nIn the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](/tag/Feature-flags#operation/getFeatureFlag) endpoint to find the field you want to update.\n\nThere are a few special cases to keep in mind when determining the value of the `path` element:\n\n * 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:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/0/values/-\",\n \"value\": \"TestClient10\"\n }\n ]\n ```\n\n * 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:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/-\",\n \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] }\n }\n ]\n ```\n\n * To add a flag to a release pipeline, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/releasePipelineKey\",\n \"value\": \"example-release-pipeline-key\"\n }\n ]\n ```\n\n### Required approvals\nIf 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](/tag/Approvals) or a [workflow](/tag/Workflows).\n\n### Conflicts\nIf 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`.\n\n### Migration flags\nFor 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`.\nWhen you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`.\nTo learn more, read [Migration flags](https://docs.launchdarkly.com/home/flags/migration).\n", - Use: "update", - Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", + Name: "query", + In: "query", + Description: "Filter events by flag key", Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key. The key identifies the flag in your code.", + Name: "impact-size", + In: "query", + Description: "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'", Type: "string", }, - }, - HTTPMethod: "PATCH", - HasBody: true, - IsBeta: false, - RequiresBody: true, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}", - SupportsSemanticPatch: true, - }) - - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create a feature flag", - Long: "Create a feature flag with the given name, key, and variations.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003ecreating a migration flag\u003c/strong\u003e\u003c/summary\u003e\n\n### Creating a migration flag\n\nWhen you create a migration flag, the variations are pre-determined based on the number of stages in the migration.\n\nTo 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.\n\nHere's an example:\n\n```json\n{\n \"key\": \"flag-key-123\",\n \"purpose\": \"migration\",\n \"migrationSettings\": {\n \"stageCount\": 6,\n \"contextKind\": \"account\"\n }\n}\n```\n\nTo learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flags/migration).\n\n\u003c/details\u003e\n", - Use: "create", - Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", + Name: "has-experiments", + In: "query", + Description: "Filter events to those associated with an experiment ('true') or without an experiment ('false')", + Type: "boolean", }, { - Name: "clone", + Name: "global", In: "query", - Description: "The key of the feature flag to be cloned. The key identifies the flag in your code. For example, setting 'clone=flagKey' copies the full targeting configuration for all environments, including 'on/off' state, from the original flag to the new flag.", + Description: "Filter to include or exclude global events. Default value is 'include'. Options: 'include', 'exclude'", Type: "string", }, - }, - HTTPMethod: "POST", - HasBody: true, - IsBeta: false, - RequiresBody: true, - Path: "/api/v2/flags/{projectKey}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get migration safety issues", - Long: "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.", - Use: "create-migration-safety-issues", - Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", + Name: "expand", + In: "query", + Description: "Expand properties in response. Options: 'experiments'", Type: "string", }, { - Name: "flag-key", - In: "path", - Description: "The migration flag key", - Type: "string", + Name: "limit", + In: "query", + Description: "The number of deployments to return. Default is 20. Maximum allowed is 100.", + Type: "integer", }, { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", + Name: "from", + In: "query", + Description: "Unix timestamp in milliseconds. Default value is 7 days ago.", + Type: "integer", }, - }, - HTTPMethod: "POST", - HasBody: true, - IsBeta: false, - RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/migration-safety-issues", - SupportsSemanticPatch: true, - }) - - NewOperationCmd(gen_FlagsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "List dependent feature flags", - Long: "\u003e ### Flag prerequisites is an Enterprise feature\n\u003e\n\u003e 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/).\n\nList 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/flags/prereqs).\n", - Use: "list-dependent", - Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", + Name: "to", + In: "query", + Description: "Unix timestamp in milliseconds. Default value is now.", + Type: "integer", + }, + { + Name: "after", + In: "query", + Description: "Identifier used for pagination", Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "before", + In: "query", + Description: "Identifier used for pagination", Type: "string", }, }, @@ -3926,31 +5688,85 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/flags/{projectKey}/{featureFlagKey}/dependent-flags", + Path: "/api/v2/engineering-insights/flag-events", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FlagsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "List dependent feature flags by environment", - Long: "\u003e ### Flag prerequisites is an Enterprise feature\n\u003e\n\u003e 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/).\n\nList 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/flags/prereqs).\n", - Use: "list-dependent-by-env", + NewOperationCmd(gen_InsightsPullRequestsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List pull requests", + Long: "Get a list of pull requests\n\n### Expanding the pull request collection response\n\nLaunchDarkly supports expanding the pull request collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `deployments` includes details on all of the deployments associated with each pull request\n* `flagReferences` includes details on all of the references to flags in each pull request\n* `leadTime` includes details about the lead time of the pull request for each stage\n\nFor example, use `?expand=deployments` to include the `deployments` field in the response. By default, this field is **not** included in the response.\n", + Use: "list-pull-requests", Params: []Param{ { Name: "project-key", - In: "path", + In: "query", Description: "The project key", Type: "string", }, { Name: "environment-key", - In: "path", - Description: "The environment key", + In: "query", + Description: "Required if you are using the \u003ccode\u003esort\u003c/code\u003e parameter's \u003ccode\u003eleadTime\u003c/code\u003e option to sort pull requests.", + Type: "string", + }, + { + Name: "application-key", + In: "query", + Description: "Filter the results to pull requests deployed to a comma separated list of applications", + Type: "string", + }, + { + Name: "status", + In: "query", + Description: "Filter results to pull requests with the given status. Options: 'open', 'merged', 'closed', 'deployed'.", + Type: "string", + }, + { + Name: "query", + In: "query", + Description: "Filter list of pull requests by title or author", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "The number of pull requests to return. Default is 20. Maximum allowed is 100.", + Type: "integer", + }, + { + Name: "expand", + In: "query", + Description: "Expand properties in response. Options: 'deployments', 'flagReferences', 'leadTime'.", + Type: "string", + }, + { + Name: "sort", + In: "query", + Description: "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.", + Type: "string", + }, + { + Name: "from", + In: "query", + Description: "Unix timestamp in milliseconds. Default value is 7 days ago.", + Type: "string", + }, + { + Name: "to", + In: "query", + Description: "Unix timestamp in milliseconds. Default value is now.", + Type: "string", + }, + { + Name: "after", + In: "query", + Description: "Identifier used for pagination", Type: "string", }, { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", + Name: "before", + In: "query", + Description: "Identifier used for pagination", Type: "string", }, }, @@ -3958,141 +5774,221 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/flags/{projectKey}/{environmentKey}/{featureFlagKey}/dependent-flags", + Path: "/api/v2/engineering-insights/pull-requests", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FollowFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Remove a member as a follower of a flag in a project and environment", - Long: "Remove a member as a follower to a flag in a project and environment", - Use: "delete", + NewOperationCmd(gen_InsightsRepositoriesBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Associate repositories with projects", + Long: "Associate repositories with projects", + Use: "associate-repositories-and-projects", + Params: []Param{}, + HTTPMethod: "PUT", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/engineering-insights/repositories/projects", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_InsightsRepositoriesBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Remove repository project association", + Long: "Remove repository project association", + Use: "delete-repository-project", Params: []Param{ { - Name: "project-key", + Name: "repository-key", In: "path", - Description: "The project key", + Description: "The repository key", Type: "string", }, { - Name: "feature-flag-key", + Name: "project-key", In: "path", - Description: "The feature flag key", + Description: "The project key", Type: "string", }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/engineering-insights/repositories/{repositoryKey}/projects/{projectKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_InsightsRepositoriesBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List repositories", + Long: "Get a list of repositories\n\n### Expanding the repository collection response\n\nLaunchDarkly supports expanding the repository collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `projects` includes details on all of the LaunchDarkly projects associated with each repository\n\nFor example, use `?expand=projects` to include the `projects` field in the response. By default, this field is **not** included in the response.\n", + Use: "list", + Params: []Param{ { - Name: "environment-key", - In: "path", - Description: "The environment key", + Name: "expand", + In: "query", + Description: "Expand properties in response. Options: 'projects'", Type: "string", }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/engineering-insights/repositories", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_InsightsScoresBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create insight group", + Long: "Create insight group", + Use: "create-insight-group", + Params: []Param{}, + HTTPMethod: "POST", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/engineering-insights/insights/group", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_InsightsScoresBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete insight group", + Long: "Delete insight group", + Use: "delete-insight-group", + Params: []Param{ { - Name: "member-id", + Name: "insight-group-key", In: "path", - Description: "The memberId of the member to remove as a follower of the flag. Reader roles can only remove themselves.", + Description: "The insight group key", Type: "string", }, }, HTTPMethod: "DELETE", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId}", + Path: "/api/v2/engineering-insights/insights/groups/{insightGroupKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FollowFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get followers of a flag in a project and environment", - Long: "Get a list of members following a flag in a project and environment", - Use: "list", + NewOperationCmd(gen_InsightsScoresBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get insight group", + Long: "Get insight group\n\n### Expanding the insight group response\n\nLaunchDarkly supports expanding the insight group response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `scores` includes details on all of the scores used in the engineering insights metrics views for this group\n* `environment` includes details on each environment associated with this group\n\nFor example, use `?expand=scores` to include the `scores` field in the response. By default, this field is **not** included in the response.\n", + Use: "get-insight-group", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "feature-flag-key", + Name: "insight-group-key", In: "path", - Description: "The feature flag key", + Description: "The insight group key", Type: "string", }, { - Name: "environment-key", - In: "path", - Description: "The environment key", + Name: "expand", + In: "query", + Description: "Options: 'scores', 'environment'", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers", + Path: "/api/v2/engineering-insights/insights/groups/{insightGroupKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FollowFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get followers of all flags in a given project and environment", - Long: "Get followers of all flags in a given environment and project", - Use: "list-by-proj-env", + NewOperationCmd(gen_InsightsScoresBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List insight groups", + Long: "List groups for which you are collecting insights\n\n### Expanding the insight groups collection response\n\nLaunchDarkly supports expanding the insight groups collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `scores` includes details on all of the scores used in the engineering insights metrics views for each group\n* `environment` includes details on each environment associated with each group\n* `metadata` includes counts of the number of insight groups with particular indicators, such as \"execellent,\" \"good,\" \"fair,\" and so on.\n\nFor example, use `?expand=scores` to include the `scores` field in the response. By default, this field is **not** included in the response.\n", + Use: "list-insight-groups", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", + Name: "limit", + In: "query", + Description: "The number of insight groups to return. Default is 20. Must be between 1 and 20 inclusive.", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.", + Type: "integer", + }, + { + Name: "sort", + In: "query", + Description: "Sort flag list by field. Prefix field with \u003ccode\u003e-\u003c/code\u003e to sort in descending order. Allowed fields: name", Type: "string", }, { - Name: "environment-key", - In: "path", - Description: "The environment key", + Name: "query", + In: "query", + Description: "Filter list of insights groups by name.", + Type: "string", + }, + { + Name: "expand", + In: "query", + Description: "Options: 'scores', 'environment', 'metadata'", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/followers", + Path: "/api/v2/engineering-insights/insights/groups", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_FollowFlagsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Add a member as a follower of a flag in a project and environment", - Long: "Add a member as a follower to a flag in a project and environment", - Use: "replace", + NewOperationCmd(gen_InsightsScoresBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get insight scores", + Long: "Return insights scores, based on the given parameters. This data is also used in engineering insights metrics views.", + Use: "get", Params: []Param{ { Name: "project-key", - In: "path", + In: "query", Description: "The project key", Type: "string", }, - { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", - Type: "string", - }, { Name: "environment-key", - In: "path", + In: "query", Description: "The environment key", Type: "string", }, { - Name: "member-id", - In: "path", - Description: "The memberId of the member to add as a follower of the flag. Reader roles can only add themselves.", + Name: "application-key", + In: "query", + Description: "Comma separated list of application keys", Type: "string", }, }, - HTTPMethod: "PUT", + HTTPMethod: "GET", HasBody: false, - IsBeta: false, + IsBeta: true, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId}", + Path: "/api/v2/engineering-insights/insights/scores", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_InsightsScoresBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Patch insight group", + Long: "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](/#section/Overview/Updates).", + Use: "update-insight-group", + Params: []Param{ + { + Name: "insight-group-key", + In: "path", + Description: "The insight group key", + Type: "string", + }, + }, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/engineering-insights/insights/groups/{insightGroupKey}", SupportsSemanticPatch: false, }) @@ -4438,26 +6334,14 @@ func AddAllResourceCmds( }) NewOperationCmd(gen_IntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create big segment store integration", - Long: "\nCreate a persistent store integration.\n\nIf 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.\n\nYou 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.\n\nIf you are using Redis to create your persistent store integration, you will need to know:\n\n* Your Redis host\n* Your Redis port\n* Your Redis username\n* Your Redis password\n* Whether or not LaunchDarkly should connect using TLS\n\nIf you are using DynamoDB to create your persistent store integration, you will need to know:\n\n* Your DynamoDB table name. The table must have the following schema:\n * Partition key: `namespace` (string)\n * Sort key: `key` (string)\n* Your DynamoDB Amazon Web Services (AWS) region.\n* Your AWS role Amazon Resource Name (ARN). This is the role that LaunchDarkly will assume to manage your DynamoDB table.\n* The External ID you specified when creating your Amazon Resource Name (ARN).\n\nTo learn more, read [Segment configuration](https://docs.launchdarkly.com/home/flags/segment-config).\n", - Use: "create-big-segment-store", + Short: "Create integration configuration", + Long: "Create a new integration configuration. (Excludes [persistent store](/tag/Persistent-store-integrations-(beta)) and [flag import configurations](/tag/Flag-import-configurations-(beta)).)", + Use: "create-configuration", Params: []Param{ - { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", - }, { Name: "integration-key", In: "path", - Description: "The integration key, either 'redis' or 'dynamodb'", + Description: "The integration key", Type: "string", }, }, @@ -4465,103 +6349,140 @@ func AddAllResourceCmds( HasBody: true, IsBeta: true, RequiresBody: true, - Path: "/api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}", + Path: "/api/v2/integration-configurations/keys/{integrationKey}", SupportsSemanticPatch: false, }) NewOperationCmd(gen_IntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete big segment store integration", - Long: "Delete a persistent store integration. Each integration uses either Redis or DynamoDB.", - Use: "delete-big-segment-store", + Short: "Delete integration configuration", + Long: "Delete an integration configuration by ID. (Excludes [persistent store](/tag/Persistent-store-integrations-(beta)) and [flag import configurations](/tag/Flag-import-configurations-(beta)).)", + Use: "delete-configuration", Params: []Param{ { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", + Name: "integration-configuration-id", In: "path", - Description: "The environment key", + Description: "The ID of the integration configuration to be deleted", Type: "string", }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/integration-configurations/{integrationConfigurationId}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_IntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get all configurations for the integration", + Long: "Get all integration configurations with the specified integration key. (Excludes [persistent store](/tag/Persistent-store-integrations-(beta)) and [flag import configurations](/tag/Flag-import-configurations-(beta))).", + Use: "list-configurations", + Params: []Param{ { Name: "integration-key", In: "path", - Description: "The integration key, either 'redis' or 'dynamodb'", + Description: "Integration key", Type: "string", }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/integration-configurations/keys/{integrationKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_IntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get an integration configuration", + Long: "Get integration configuration with the specified ID. (Excludes [persistent store](/tag/Persistent-store-integrations-(beta)) and [flag import configurations](/tag/Flag-import-configurations-(beta)).)", + Use: "get-configuration", + Params: []Param{ { - Name: "integration-id", + Name: "integration-configuration-id", In: "path", - Description: "The integration ID", + Description: "Integration configuration ID", Type: "string", }, }, - HTTPMethod: "DELETE", + HTTPMethod: "GET", HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}", + Path: "/api/v2/integration-configurations/{integrationConfigurationId}", SupportsSemanticPatch: false, }) NewOperationCmd(gen_IntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get big segment store integration by ID", - Long: "Get a big segment store integration by ID.", - Use: "get-big-segment-store", + Short: "Update integration configuration", + Long: "Update an integration configuration. Updating an integration configuration uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](/#section/Overview/Updates).", + Use: "update-configuration", Params: []Param{ { - Name: "project-key", + Name: "integration-configuration-id", In: "path", - Description: "The project key", + Description: "The ID of the integration configuration", Type: "string", }, + }, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/integration-configurations/{integrationConfigurationId}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_LayersResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create layer", + Long: "Create a layer. Experiments running in the same layer are granted mutually-exclusive traffic.\n", + Use: "create", + Params: []Param{ { - Name: "environment-key", + Name: "project-key", In: "path", - Description: "The environment key", + Description: "The project key", Type: "string", }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/layers", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_LayersResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get layers", + Long: "Get a collection of all layers for a project", + Use: "list", + Params: []Param{ { - Name: "integration-key", + Name: "project-key", In: "path", - Description: "The integration key, either 'redis' or 'dynamodb'", + Description: "The project key", Type: "string", }, { - Name: "integration-id", - In: "path", - Description: "The integration ID", + Name: "filter", + In: "query", + Description: "A comma-separated list of filters. This endpoint only accepts filtering by 'experimentKey'. The filter returns layers which include that experiment for the selected environment(s). For example: 'filter=reservations.experimentKey contains expKey'.", Type: "string", }, }, HTTPMethod: "GET", HasBody: false, - IsBeta: true, - RequiresBody: false, - Path: "/api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_IntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "List all big segment store integrations", - Long: "List all big segment store integrations.", - Use: "list-big-segment-store", - Params: []Param{}, - HTTPMethod: "GET", - HasBody: false, - IsBeta: true, + IsBeta: false, RequiresBody: false, - Path: "/api/v2/integration-capabilities/big-segment-store", + Path: "/api/v2/projects/{projectKey}/layers", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_IntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update big segment store integration", - Long: "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](/#section/Overview/Updates).", - Use: "update-big-segment-store", + NewOperationCmd(gen_LayersResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update layer", + Long: "Update a layer by adding, changing, or removing traffic reservations for experiments, or by changing layer name or description.\nUpdating a layer uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating layers.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating layers\u003c/strong\u003e\u003c/summary\u003e\n\n#### updateName\n\nUpdates the layer name.\n\n##### Parameters\n\n- `name`: The new layer name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"name\": \"New name\"\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the layer description.\n\n##### Parameters\n\n- `description`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"description\": \"New description\"\n }]\n}\n```\n\n#### updateExperimentReservation\n\nAdds or updates a traffic reservation for an experiment in a layer.\n\n##### Parameters\n\n- `experimentKey`: The key of the experiment whose reservation you are adding to or updating in the layer.\n- `reservationPercent`: The amount of traffic in the layer to reserve. Must be an integer. Zero is allowed until iteration start.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"production\",\n \"instructions\": [{\n \"kind\": \"updateExperimentReservation\",\n \"experimentKey\": \"exp-key\",\n \"reservationPercent\": 10\n }]\n}\n```\n\n#### removeExperiment\n\nRemoves a traffic reservation for an experiment from a layer.\n\n##### Parameters\n\n- `experimentKey`: The key of the experiment whose reservation you want to remove from the layer.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"production\",\n \"instructions\": [{\n \"kind\": \"removeExperiment\",\n \"experimentKey\": \"exp-key\"\n }]\n}\n```\n\n\u003c/details\u003e\n", + Use: "update", Params: []Param{ { Name: "project-key", @@ -4570,30 +6491,18 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", - }, - { - Name: "integration-key", - In: "path", - Description: "The integration key, either 'redis' or 'dynamodb'", - Type: "string", - }, - { - Name: "integration-id", + Name: "layer-key", In: "path", - Description: "The integration ID", + Description: "The layer key", Type: "string", }, }, HTTPMethod: "PATCH", HasBody: true, - IsBeta: true, + IsBeta: false, RequiresBody: true, - Path: "/api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}", - SupportsSemanticPatch: false, + Path: "/api/v2/projects/{projectKey}/layers/{layerKey}", + SupportsSemanticPatch: true, }) NewOperationCmd(gen_MembersResourceCmd, client, markdownRenderer, OperationData{ @@ -4627,6 +6536,12 @@ func AddAllResourceCmds( Description: "The member ID", Type: "string", }, + { + Name: "expand", + In: "query", + Description: "A comma-separated list of properties that can reveal additional information in the response.", + Type: "string", + }, }, HTTPMethod: "GET", HasBody: false, @@ -4638,7 +6553,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_MembersResourceCmd, client, markdownRenderer, OperationData{ Short: "List account members", - Long: "Return a list of account members.\n\nBy 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.\n\n### Filtering members\n\nLaunchDarkly supports the following fields for filters:\n\n- `query` is a string that matches against the members' emails and names. It is not case sensitive.\n- `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`.\n- `team` is a string that matches against the key of the teams the members belong to. It is not case sensitive.\n- `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.\n- `lastSeen` is a JSON object in one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `accessCheck` is a string that represents a specific action on a specific resource and is in the format `\u003cActionSpecifier\u003e:\u003cResourceSpecifier\u003e`. 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).\n - 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.\n - Wildcard and tag filters are not supported when filtering for access.\n\nFor 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`.\n\n### Sorting members\n\nLaunchDarkly supports two fields for sorting: `displayName` and `lastSeen`:\n\n- `displayName` sorts by first + last name, using the member's email if no name is set.\n- `lastSeen` sorts by the `_lastSeen` property. LaunchDarkly considers members that have never been seen or have no data the oldest.\n", + Long: "Return a list of account members.\n\nBy 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.\n\n### Filtering members\n\nLaunchDarkly supports the following fields for filters:\n\n- `query` is a string that matches against the members' emails and names. It is not case sensitive.\n- `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`.\n- `id` is a `|` separated list of member IDs. It filters the list to members who match any of the IDs in the list.\n- `email` is a `|` separated list of member emails. It filters the list to members who match any of the emails in the list.\n- `team` is a string that matches against the key of the teams the members belong to. It is not case sensitive.\n- `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.\n- `lastSeen` is a JSON object in one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `accessCheck` is a string that represents a specific action on a specific resource and is in the format `\u003cActionSpecifier\u003e:\u003cResourceSpecifier\u003e`. 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).\n - 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.\n - Wildcard and tag filters are not supported when filtering for access.\n\nFor 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`.\n\n### Sorting members\n\nLaunchDarkly supports two fields for sorting: `displayName` and `lastSeen`:\n\n- `displayName` sorts by first + last name, using the member's email if no name is set.\n- `lastSeen` sorts by the `_lastSeen` property. LaunchDarkly considers members that have never been seen or have no data the oldest.\n", Use: "list", Params: []Param{ { @@ -4659,6 +6574,12 @@ func AddAllResourceCmds( Description: "A comma-separated list of filters. Each filter is of the form 'field:value'. Supported fields are explained above.", Type: "string", }, + { + Name: "expand", + In: "query", + Description: "A comma-separated list of properties that can reveal additional information in the response.", + Type: "string", + }, { Name: "sort", In: "query", @@ -4729,7 +6650,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_MembersBetaResourceCmd, client, markdownRenderer, OperationData{ Short: "Modify account members", - Long: "\u003e ### Full use of this API resource is an Enterprise feature\n\u003e\n\u003e 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/).\n\nPerform a partial update to multiple members. Updating members uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating members.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating members\u003c/strong\u003e\u003c/summary\u003e\n\n#### replaceMembersRoles\n\nReplaces the roles of the specified members. This also removes all custom roles assigned to the specified members.\n\n##### Parameters\n\n- `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/account/built-in-roles).\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMemberRoles\",\n \"value\": \"reader\",\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\",\n \"507f1f77bcf86cd799439011\"\n ]\n }]\n}\n```\n\n#### replaceAllMembersRoles\n\nReplaces the roles of all members. This also removes all custom roles assigned to the specified members.\n\nMembers that match any of the filters are **excluded** from the update.\n\n##### Parameters\n\n- `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/account/built-in-roles).\n- `filterLastSeen`: (Optional) A JSON object with one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive.\n- `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`.\n- `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive.\n- `ignoredMemberIDs`: (Optional) A list of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceAllMembersRoles\",\n \"value\": \"reader\",\n \"filterLastSeen\": { \"never\": true }\n }]\n}\n```\n\n#### replaceMembersCustomRoles\n\nReplaces the custom roles of the specified members.\n\n##### Parameters\n\n- `values`: List of new custom roles. Must be a valid custom role key or ID.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembersCustomRoles\",\n \"values\": [ \"example-custom-role\" ],\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\",\n \"507f1f77bcf86cd799439011\"\n ]\n }]\n}\n```\n\n#### replaceAllMembersCustomRoles\n\nReplaces the custom roles of all members. Members that match any of the filters are **excluded** from the update.\n\n##### Parameters\n\n- `values`: List of new roles. Must be a valid custom role key or ID.\n- `filterLastSeen`: (Optional) A JSON object with one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive.\n- `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`.\n- `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive.\n- `ignoredMemberIDs`: (Optional) A list of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceAllMembersCustomRoles\",\n \"values\": [ \"example-custom-role\" ],\n \"filterLastSeen\": { \"never\": true }\n }]\n}\n```\n\n\u003c/details\u003e\n", + Long: "\u003e ### Full use of this API resource is an Enterprise feature\n\u003e\n\u003e The ability to perform a partial update to multiple members is available to customers on an Enterprise plan. If you are on another 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/).\n\nPerform a partial update to multiple members. Updating members uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating members.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating members\u003c/strong\u003e\u003c/summary\u003e\n\n#### replaceMembersRoles\n\nReplaces the roles of the specified members. This also removes all custom roles assigned to the specified members.\n\n##### Parameters\n\n- `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/account/built-in-roles).\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMemberRoles\",\n \"value\": \"reader\",\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\",\n \"507f1f77bcf86cd799439011\"\n ]\n }]\n}\n```\n\n#### replaceAllMembersRoles\n\nReplaces the roles of all members. This also removes all custom roles assigned to the specified members.\n\nMembers that match any of the filters are **excluded** from the update.\n\n##### Parameters\n\n- `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/account/built-in-roles).\n- `filterLastSeen`: (Optional) A JSON object with one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive.\n- `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`.\n- `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive.\n- `ignoredMemberIDs`: (Optional) A list of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceAllMembersRoles\",\n \"value\": \"reader\",\n \"filterLastSeen\": { \"never\": true }\n }]\n}\n```\n\n#### replaceMembersCustomRoles\n\nReplaces the custom roles of the specified members.\n\n##### Parameters\n\n- `values`: List of new custom roles. Must be a valid custom role key or ID.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembersCustomRoles\",\n \"values\": [ \"example-custom-role\" ],\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\",\n \"507f1f77bcf86cd799439011\"\n ]\n }]\n}\n```\n\n#### replaceAllMembersCustomRoles\n\nReplaces the custom roles of all members. Members that match any of the filters are **excluded** from the update.\n\n##### Parameters\n\n- `values`: List of new roles. Must be a valid custom role key or ID.\n- `filterLastSeen`: (Optional) A JSON object with one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive.\n- `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`.\n- `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive.\n- `ignoredMemberIDs`: (Optional) A list of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceAllMembersCustomRoles\",\n \"values\": [ \"example-custom-role\" ],\n \"filterLastSeen\": { \"never\": true }\n }]\n}\n```\n\n\u003c/details\u003e\n", Use: "update-multiple", Params: []Param{}, HTTPMethod: "PATCH", @@ -4820,7 +6741,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_MetricGroupsBetaResourceCmd, client, markdownRenderer, OperationData{ Short: "List metric groups", - Long: "Get a list of all metric groups for the specified project.\n\n### Expanding the metric groups response\nLaunchDarkly supports one field for expanding the \"Get metric groups\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with the following field:\n\n- `experiments` includes all experiments from the specific project that use the metric group\n\nFor example, `expand=experiments` includes the `experiments` field in the response.\n", + Long: "Get a list of all metric groups for the specified project.\n\n### Expanding the metric groups response\nLaunchDarkly supports one field for expanding the \"Get metric groups\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with the following field:\n\n- `experiments` includes all experiments from the specific project that use the metric group\n\nFor example, `expand=experiments` includes the `experiments` field in the response.\n\n### Filtering metric groups\n\nThe `filter` parameter supports the `equals` operator on the following fields: `experimentStatus`, `query`.\n\nThe `experimentStatus` field supports the following values: `not_started`, `running`, `stopped`, and `started`.\nThe `query` field is a search query that is compared against the metric group name and key.\n\n\n#### Sample query\n\n`filter=experimentStatus equals 'not_started' and query equals 'metric name'`\n", Use: "list", Params: []Param{ { @@ -4829,12 +6750,30 @@ func AddAllResourceCmds( Description: "The project key", Type: "string", }, + { + Name: "filter", + In: "query", + Description: "Accepts filter by 'experimentStatus' and 'query'. Example: 'filter=experimentStatus equals 'running' and query equals 'test''.", + Type: "string", + }, { Name: "expand", In: "query", Description: "A comma-separated list of properties that can reveal additional information in the response.", Type: "string", }, + { + Name: "limit", + In: "query", + Description: "The number of metric groups to return in the response. Defaults to 20. Maximum limit is 50.", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next 'limit' items.", + Type: "integer", + }, }, HTTPMethod: "GET", HasBody: false, @@ -4936,7 +6875,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_MetricsResourceCmd, client, markdownRenderer, OperationData{ Short: "List metrics", - Long: "Get a list of all metrics for the specified project.\n\n### Expanding the metric list response\nLaunchDarkly supports expanding the \"List metrics\" response. By default, the expandable field is **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add the following supported field:\n\n- `experimentCount` includes the number of experiments from the specific project that use the metric\n\nFor example, `expand=experimentCount` includes the `experimentCount` field for each metric in the response.\n", + Long: "Get a list of all metrics for the specified project.\n\n### Filtering metrics\n\nThe `filter` parameter supports the following operators: `contains`.\n\n#### Supported fields and operators\n\nYou can only filter certain fields in metrics when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for metrics, the `filter` parameter supports the following fields and operators:\n\n|\u003cdiv style=\"width:120px\"\u003eField\u003c/div\u003e |Description |Supported operators |\n|---|---|---|\n| `tags` | The metric tags. | `contains` |\n\nFor example, the filter `?filter=tags contains [\"tag1\", \"tag2\", \"tag3\"]` matches metrics that have all three tags.\n\nThe documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=tags contains [\"tag1\", \"tag2\", \"tag3\"]` must be encoded to `%5B`.\n\n### Expanding the metric list response\n\nLaunchDarkly supports expanding the \"List metrics\" response. By default, the expandable field is **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add the following supported field:\n\n- `experimentCount` includes the number of experiments from the specific project that use the metric\n\nFor example, `expand=experimentCount` includes the `experimentCount` field for each metric in the response.\n", Use: "list", Params: []Param{ { @@ -4951,6 +6890,30 @@ func AddAllResourceCmds( Description: "A comma-separated list of properties that can reveal additional information in the response.", Type: "string", }, + { + Name: "limit", + In: "query", + Description: "The number of metrics to return in the response. Defaults to 20. Maximum limit is 50.", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next 'limit' items.", + Type: "integer", + }, + { + Name: "sort", + In: "query", + Description: "A field to sort the items by. Prefix field by a dash ( - ) to sort in descending order. This endpoint supports sorting by 'createdAt' or 'name'.", + Type: "string", + }, + { + Name: "filter", + In: "query", + Description: "A comma-separated list of filters. This endpoint only accepts filtering by 'tags'. To learn more about the filter syntax, read the 'Filtering metrics' section above.", + Type: "string", + }, }, HTTPMethod: "GET", HasBody: false, @@ -5006,6 +6969,165 @@ func AddAllResourceCmds( SupportsSemanticPatch: false, }) + NewOperationCmd(gen_PersistentStoreIntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create big segment store integration", + Long: "\nCreate a persistent store integration.\n\nIf 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.\n\nYou 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.\n\nIf you are using Redis to create your persistent store integration, you will need to know:\n\n* Your Redis host\n* Your Redis port\n* Your Redis username\n* Your Redis password\n* Whether or not LaunchDarkly should connect using TLS\n\nIf you are using DynamoDB to create your persistent store integration, you will need to know:\n\n* Your DynamoDB table name. The table must have the following schema:\n * Partition key: `namespace` (string)\n * Sort key: `key` (string)\n* Your DynamoDB Amazon Web Services (AWS) region.\n* Your AWS role Amazon Resource Name (ARN). This is the role that LaunchDarkly will assume to manage your DynamoDB table.\n* The External ID you specified when creating your Amazon Resource Name (ARN).\n\nTo learn more, read [Segment configuration](https://docs.launchdarkly.com/home/flags/segment-config).\n", + Use: "create-big-segment-store-integration", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "integration-key", + In: "path", + Description: "The integration key, either 'redis' or 'dynamodb'", + Type: "string", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_PersistentStoreIntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete big segment store integration", + Long: "Delete a persistent store integration. Each integration uses either Redis or DynamoDB.", + Use: "delete-big-segment-store-integration", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "integration-key", + In: "path", + Description: "The integration key, either 'redis' or 'dynamodb'", + Type: "string", + }, + { + Name: "integration-id", + In: "path", + Description: "The integration ID", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_PersistentStoreIntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get big segment store integration by ID", + Long: "Get a big segment store integration by ID.", + Use: "get-big-segment-store-integration", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "integration-key", + In: "path", + Description: "The integration key, either 'redis' or 'dynamodb'", + Type: "string", + }, + { + Name: "integration-id", + In: "path", + Description: "The integration ID", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_PersistentStoreIntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "List all big segment store integrations", + Long: "List all big segment store integrations.", + Use: "list-big-segment-store-integrations", + Params: []Param{}, + HTTPMethod: "GET", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/integration-capabilities/big-segment-store", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_PersistentStoreIntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update big segment store integration", + Long: "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](/#section/Overview/Updates).", + Use: "update-big-segment-store-integration", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "integration-key", + In: "path", + Description: "The integration key, either 'redis' or 'dynamodb'", + Type: "string", + }, + { + Name: "integration-id", + In: "path", + Description: "The integration ID", + Type: "string", + }, + }, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/integration-capabilities/big-segment-store/{projectKey}/{environmentKey}/{integrationKey}/{integrationId}", + SupportsSemanticPatch: false, + }) + NewOperationCmd(gen_ProjectsResourceCmd, client, markdownRenderer, OperationData{ Short: "Delete project", Long: "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.", @@ -5074,7 +7196,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_ProjectsResourceCmd, client, markdownRenderer, OperationData{ Short: "List projects", - Long: "Return a list of projects.\n\nBy 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.\n\n### Filtering projects\n\nLaunchDarkly supports two fields for filters:\n- `query` is a string that matches against the projects' names and keys. It is not case sensitive.\n- `tags` is a `+`-separated list of project tags. It filters the list of projects that have all of the tags in the list.\n\nFor 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.\n\nThe 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`.\n\n### Sorting projects\n\nLaunchDarkly supports two fields for sorting:\n- `name` sorts by project name.\n- `createdOn` sorts by the creation date of the project.\n\nFor example, `sort=name` sorts the response by project name in ascending order.\n\n### Expanding the projects response\n\nLaunchDarkly supports one field for expanding the \"List projects\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with the `environments` field.\n\n`Environments` includes a paginated list of the project environments.\n* `environments` includes a paginated list of the project environments.\n\nFor example, `expand=environments` includes the `environments` field for each project in the response.\n", + Long: "Return a list of projects.\n\nBy 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.\n\n### Filtering projects\n\nLaunchDarkly supports three fields for filters:\n- `query` is a string that matches against the projects' names and keys. It is not case sensitive.\n- `tags` is a `+`-separated list of project tags. It filters the list of projects that have all of the tags in the list.\n- `keys` is a `|` separated list of project keys. It filters the list to projects that have any of the keys in the list.\n\nFor 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.\n\nThe 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`.\n\n### Sorting projects\n\nLaunchDarkly supports two fields for sorting:\n- `name` sorts by project name.\n- `createdOn` sorts by the creation date of the project.\n\nFor example, `sort=name` sorts the response by project name in ascending order.\n\n### Expanding the projects response\n\nLaunchDarkly supports one field for expanding the \"List projects\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with the `environments` field.\n\n`Environments` includes a paginated list of the project environments.\n* `environments` includes a paginated list of the project environments.\n\nFor example, `expand=environments` includes the `environments` field for each project in the response.\n", Use: "list", Params: []Param{ { @@ -5313,24 +7435,62 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "pipeline-key", - In: "path", - Description: "The release pipeline key", - Type: "string", + Name: "pipeline-key", + In: "path", + Description: "The release pipeline key", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ReleasePipelinesBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get all release pipelines", + Long: "Get all release pipelines for a project.\n\n### Filtering release pipelines\n\nLaunchDarkly supports the following fields for filters:\n\n- `query` is a string that matches against the release pipeline `key`, `name`, and `description`. It is not case sensitive. For example: `?filter=query:examplePipeline`.\n\n- `env` is a string that matches an environment key. For example: `?filter=env:production`.\n", + Use: "list", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "filter", + In: "query", + Description: "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.", + Type: "string", + }, + { + Name: "limit", + In: "query", + Description: "The maximum number of items to return. Defaults to 20.", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "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'.", + Type: "integer", }, }, - HTTPMethod: "DELETE", + HTTPMethod: "GET", HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}", + Path: "/api/v2/projects/{projectKey}/release-pipelines", SupportsSemanticPatch: false, }) NewOperationCmd(gen_ReleasePipelinesBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get all release pipelines", - Long: "Get all release pipelines for a project.\n\n### Filtering release pipelines\n\nLaunchDarkly supports the following fields for filters:\n\n- `query` is a string that matches against the release pipeline `key`, `name`, and `description`. It is not case sensitive. For example: `?filter=query:examplePipeline`.\n", - Use: "list", + Short: "Get release progressions for release pipeline", + Long: "Get details on the progression of all releases, across all flags, for a release pipeline", + Use: "list-release-progressions", Params: []Param{ { Name: "project-key", @@ -5338,10 +7498,16 @@ func AddAllResourceCmds( Description: "The project key", Type: "string", }, + { + Name: "pipeline-key", + In: "path", + Description: "The pipeline key", + Type: "string", + }, { Name: "filter", In: "query", - Description: "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.", + Description: "Accepts filter by 'status' and 'activePhaseId'. 'status' can take a value of 'completed' or 'active'. 'activePhaseId' takes a UUID and will filter results down to releases active on the specified phase. Providing 'status equals completed' along with an 'activePhaseId' filter will return an error as they are disjoint sets of data. The combination of 'status equals active' and 'activePhaseId' will return the same results as 'activePhaseId' alone.", Type: "string", }, { @@ -5361,7 +7527,7 @@ func AddAllResourceCmds( HasBody: false, IsBeta: true, RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/release-pipelines", + Path: "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}/releases", SupportsSemanticPatch: false, }) @@ -5391,10 +7557,30 @@ func AddAllResourceCmds( SupportsSemanticPatch: false, }) + NewOperationCmd(gen_ReleasePipelinesBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create a release pipeline", + Long: "Creates a new release pipeline.\n\nThe 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](/tag/Projects#operation/patchProject) API to set the `defaultReleasePipelineKey`.\n\nYou can create up to 20 release pipelines per project.\n", + Use: "create", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/release-pipelines", + SupportsSemanticPatch: false, + }) + NewOperationCmd(gen_ReleasePipelinesBetaResourceCmd, client, markdownRenderer, OperationData{ Short: "Update a release pipeline", - Long: "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](/#section/Overview/Updates).", - Use: "update", + Long: "Updates a release pipeline.", + Use: "replace", Params: []Param{ { Name: "project-key", @@ -5409,18 +7595,18 @@ func AddAllResourceCmds( Type: "string", }, }, - HTTPMethod: "PATCH", - HasBody: false, + HTTPMethod: "PUT", + HasBody: true, IsBeta: true, - RequiresBody: false, + RequiresBody: true, Path: "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ReleasePipelinesBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create a release pipeline", - Long: "Creates a new release pipeline.\n\nThe 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](/tag/Projects#operation/patchProject) API to set the `defaultReleasePipelineKey`.\n\nYou can create up to 20 release pipelines per project.\n", - Use: "create", + NewOperationCmd(gen_ReleasesBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create a new release for flag", + Long: "Creates a release by adding a flag to a release pipeline", + Use: "create-for-flag", Params: []Param{ { Name: "project-key", @@ -5428,12 +7614,44 @@ func AddAllResourceCmds( Description: "The project key", Type: "string", }, + { + Name: "flag-key", + In: "path", + Description: "The flag key", + Type: "string", + }, }, - HTTPMethod: "POST", + HTTPMethod: "PUT", HasBody: true, IsBeta: true, RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/release-pipelines", + Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/release", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ReleasesBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete a release for flag", + Long: "Deletes a release from a flag", + Use: "delete", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "flag-key", + In: "path", + Description: "The flag key", + Type: "string", + }, + }, + HTTPMethod: "DELETE", + HasBody: false, + IsBeta: true, + RequiresBody: false, + Path: "/api/v2/flags/{projectKey}/{flagKey}/release", SupportsSemanticPatch: false, }) @@ -5465,7 +7683,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_ReleasesBetaResourceCmd, client, markdownRenderer, OperationData{ Short: "Patch release for flag", - Long: "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](/#section/Overview/Updates).\n\nYou 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:\n\n```\n [\n {\n \"op\": \"replace\",\n \"path\": \"/phase/0/complete\",\n \"value\": true\n }\n ]\n```\n", + Long: "This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](/tag/Releases-(beta)#operation/updatePhaseStatus) endpoint. To learn more about migrating from legacy release pipelines to fully automated release pipelines, read the [Release pipeline migration guide](https://docs.launchdarkly.com/guides/flags/release-pipeline-migration).\n\nUpdate 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](/#section/Overview/Updates).\n\nYou 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:\n\n```\n [\n {\n \"op\": \"replace\",\n \"path\": \"/phase/0/complete\",\n \"value\": true\n }\n ]\n```\n", Use: "update", Params: []Param{ { @@ -5489,6 +7707,38 @@ func AddAllResourceCmds( SupportsSemanticPatch: false, }) + NewOperationCmd(gen_ReleasesBetaResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update phase status for release", + Long: "Updates the execution status of a phase of a release", + Use: "update-phase-status", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "flag-key", + In: "path", + Description: "The flag key", + Type: "string", + }, + { + Name: "phase-id", + In: "path", + Description: "The phase ID", + Type: "string", + }, + }, + HTTPMethod: "PUT", + HasBody: true, + IsBeta: true, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId}", + SupportsSemanticPatch: false, + }) + NewOperationCmd(gen_ScheduledChangesResourceCmd, client, markdownRenderer, OperationData{ Short: "Delete scheduled changes workflow", Long: "Delete a scheduled changes workflow.", @@ -5577,30 +7827,176 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "feature-flag-key", + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + }, + HTTPMethod: "GET", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_ScheduledChangesResourceCmd, client, markdownRenderer, OperationData{ + Short: "Update scheduled changes workflow", + Long: "\nUpdate a scheduled change, overriding existing instructions with the new ones. Updating a scheduled change uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating scheduled changes.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating scheduled changes\u003c/strong\u003e\u003c/summary\u003e\n\n#### deleteScheduledChange\n\nRemoves the scheduled change.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"deleteScheduledChange\" }]\n}\n```\n\n#### replaceScheduledChangesInstructions\n\nRemoves the existing scheduled changes and replaces them with the new instructions.\n\n##### Parameters\n\n- `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`.\n\nHere's an example that replaces the scheduled changes with new instructions to turn flag targeting off:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"replaceScheduledChangesInstructions\",\n \"value\": [ {\"kind\": \"turnFlagOff\"} ]\n }\n ]\n}\n```\n\n#### updateScheduledChangesExecutionDate\n\nUpdates the execution date for the scheduled changes.\n\n##### Parameters\n\n- `value`: the new execution date, in Unix milliseconds.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"updateScheduledChangesExecutionDate\",\n \"value\": 1754092860000\n }\n ]\n}\n```\n\n\u003c/details\u003e\n", + Use: "update", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "id", + In: "path", + Description: "The scheduled change ID", + Type: "string", + }, + { + Name: "ignore-conflicts", + In: "query", + Description: "Whether to succeed ('true') or fail ('false') when these new instructions conflict with existing scheduled changes", + Type: "boolean", + }, + }, + HTTPMethod: "PATCH", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}", + SupportsSemanticPatch: true, + }) + + NewOperationCmd(gen_ScheduledChangesResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create scheduled changes workflow", + Long: "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.", + Use: "create", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "feature-flag-key", + In: "path", + Description: "The feature flag key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "ignore-conflicts", + In: "query", + Description: "Whether to succeed ('true') or fail ('false') when these instructions conflict with existing scheduled changes", + Type: "boolean", + }, + }, + HTTPMethod: "POST", + HasBody: true, + IsBeta: false, + RequiresBody: true, + Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create big segment export", + Long: "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.", + Use: "create-big-export", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", + In: "path", + Description: "The environment key", + Type: "string", + }, + { + Name: "segment-key", + In: "path", + Description: "The segment key", + Type: "string", + }, + }, + HTTPMethod: "POST", + HasBody: false, + IsBeta: false, + RequiresBody: false, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports", + SupportsSemanticPatch: false, + }) + + NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Create big segment import", + Long: "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.", + Use: "create-big-import", + Params: []Param{ + { + Name: "project-key", + In: "path", + Description: "The project key", + Type: "string", + }, + { + Name: "environment-key", In: "path", - Description: "The feature flag key", + Description: "The environment key", Type: "string", }, { - Name: "environment-key", + Name: "segment-key", In: "path", - Description: "The environment key", + Description: "The segment key", Type: "string", }, }, - HTTPMethod: "GET", - HasBody: false, + HTTPMethod: "POST", + HasBody: true, IsBeta: false, - RequiresBody: false, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes", + RequiresBody: true, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports", SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ScheduledChangesResourceCmd, client, markdownRenderer, OperationData{ - Short: "Update scheduled changes workflow", - Long: "\nUpdate a scheduled change, overriding existing instructions with the new ones. Updating a scheduled change uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating scheduled changes.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating scheduled changes\u003c/strong\u003e\u003c/summary\u003e\n\n#### deleteScheduledChange\n\nRemoves the scheduled change.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"deleteScheduledChange\" }]\n}\n```\n\n#### replaceScheduledChangesInstructions\n\nRemoves the existing scheduled changes and replaces them with the new instructions.\n\n##### Parameters\n\n- `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`.\n\nHere's an example that replaces the scheduled changes with new instructions to turn flag targeting off:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"replaceScheduledChangesInstructions\",\n \"value\": [ {\"kind\": \"turnFlagOff\"} ]\n }\n ]\n}\n```\n\n#### updateScheduledChangesExecutionDate\n\nUpdates the execution date for the scheduled changes.\n\n##### Parameters\n\n- `value`: the new execution date, in Unix milliseconds.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"updateScheduledChangesExecutionDate\",\n \"value\": 1754092860000\n }\n ]\n}\n```\n\n\u003c/details\u003e\n", - Use: "update", + NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Delete segment", + Long: "Delete a segment.", + Use: "delete", Params: []Param{ { Name: "project-key", @@ -5608,12 +8004,6 @@ func AddAllResourceCmds( Description: "The project key", Type: "string", }, - { - Name: "feature-flag-key", - In: "path", - Description: "The feature flag key", - Type: "string", - }, { Name: "environment-key", In: "path", @@ -5621,30 +8011,24 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "id", + Name: "segment-key", In: "path", - Description: "The scheduled change ID", + Description: "The segment key", Type: "string", }, - { - Name: "ignore-conflicts", - In: "query", - Description: "Whether to succeed ('true') or fail ('false') when these new instructions conflict with existing scheduled changes", - Type: "boolean", - }, }, - HTTPMethod: "PATCH", - HasBody: true, + HTTPMethod: "DELETE", + HasBody: false, IsBeta: false, - RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}", - SupportsSemanticPatch: true, + RequiresBody: false, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}", + SupportsSemanticPatch: false, }) - NewOperationCmd(gen_ScheduledChangesResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create scheduled changes workflow", - Long: "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.", - Use: "create", + NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ + Short: "Get big segment export", + Long: "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.", + Use: "get-big-export", Params: []Param{ { Name: "project-key", @@ -5653,36 +8037,36 @@ func AddAllResourceCmds( Type: "string", }, { - Name: "feature-flag-key", + Name: "environment-key", In: "path", - Description: "The feature flag key", + Description: "The environment key", Type: "string", }, { - Name: "environment-key", + Name: "segment-key", In: "path", - Description: "The environment key", + Description: "The segment key", Type: "string", }, { - Name: "ignore-conflicts", - In: "query", - Description: "Whether to succeed ('true') or fail ('false') when these instructions conflict with existing scheduled changes", - Type: "boolean", + Name: "export-id", + In: "path", + Description: "The export ID", + Type: "string", }, }, - HTTPMethod: "POST", - HasBody: true, + HTTPMethod: "GET", + HasBody: false, IsBeta: false, - RequiresBody: true, - Path: "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes", + RequiresBody: false, + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID}", SupportsSemanticPatch: false, }) NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ - Short: "Delete segment", - Long: "Delete a segment.", - Use: "delete", + Short: "Get big segment import", + Long: "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.", + Use: "get-big-import", Params: []Param{ { Name: "project-key", @@ -5702,12 +8086,18 @@ func AddAllResourceCmds( Description: "The segment key", Type: "string", }, + { + Name: "import-id", + In: "path", + Description: "The import ID", + Type: "string", + }, }, - HTTPMethod: "DELETE", + HTTPMethod: "GET", HasBody: false, IsBeta: false, RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}", + Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID}", SupportsSemanticPatch: false, }) @@ -5911,7 +8301,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ Short: "List segments", - Long: "Get a list of all segments in the given project.\u003cbr/\u003e\u003cbr/\u003eSegments 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.", + Long: "Get a list of all segments in the given project.\n\nSegments 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.\n\n### Filtering segments\n\nThe `filter` parameter supports the following operators: `equals`, `anyOf`, and `exists`.\n\nYou can also combine filters in the following ways:\n\n- Use a comma (`,`) as an AND operator\n- Use a vertical bar (`|`) as an OR operator\n- Use parentheses (`()`) to group filters\n\n#### Supported fields and operators\n\nYou can only filter certain fields in segments when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for segments, the `filter` parameter supports the following fields and operators:\n\n|\u003cdiv style=\"width:120px\"\u003eField\u003c/div\u003e |Description |Supported operators |\n|---|---|---|\n| `excludedKeys` | The segment keys of segments to exclude from the results. | `anyOf` |\n| `external` | Whether the segment is a synced segment. | `exists` |\n| `includedKeys` | The segment keys of segments to include in the results. | `anyOf` |\n| `query` | A \"fuzzy\" search across segment key, name, and description. Supply a string or list of strings to the operator. | `equals` |\n| `tags` | The segment tags. | `anyOf` |\n| `unbounded` | Whether the segment is a standard segment (`false`) or a big segment (`true`). Standard segments include rule-based segments and smaller list-based segments. Big segments include larger list-based segments and synced segments. | `equals` |\n\nHere are a few examples:\n\n* The filter `?filter=tags anyOf [\"enterprise\", \"beta\"],query equals \"toggle\"` matches segments with \"toggle\" in their key, name, or description that also have \"enterprise\" or \"beta\" as a tag.\n* The filter `?filter=excludedKeys anyOf [\"segmentKey1\", \"segmentKey2\"]` excludes the segments with those keys from the results.\n* The filter `?filter=unbounded equals true` matches larger list-based segments and synced segments.\n\nThe documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=tags anyOf [\"enterprise\", \"beta\"]` must be encoded to `%5B`.\n", Use: "list", Params: []Param{ { @@ -5947,7 +8337,7 @@ func AddAllResourceCmds( { Name: "filter", In: "query", - Description: "Accepts filter by kind, query, tags, unbounded, external, or included and excluded segment keys. 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'. To exclude segments from results, use 'filter=excludedKeys anyOf ['segmentKey1', 'segmentKey2']'.", + Description: "Accepts filter by 'excludedKeys', 'external', 'includedKeys', 'query', 'tags', 'unbounded'. To learn more about the filter syntax, read the 'Filtering segments' section above.", Type: "string", }, }, @@ -6025,7 +8415,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{ Short: "Patch segment", - Long: "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](/#section/Overview/Updates).\n\n### Using semantic patches on a segment\n\nTo 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](/reference#updates-using-semantic-patch).\n\nThe 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:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required) The key of the LaunchDarkly environment.\n* `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.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating segments.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating segments\u003c/strong\u003e\u003c/summary\u003e\n\n#### addIncludedTargets\n\nAdds 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.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be added to.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addIncludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addIncludedUsers\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addIncludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### addExcludedTargets\n\nAdds 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.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be added to.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExcludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addExcludedUsers\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExcludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### removeIncludedTargets\n\nRemoves context keys from the individual context targets included in the segment for the specified `contextKind`.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be removed from.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeIncludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeIncludedUsers\n\nRemoves user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeIncludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### removeExcludedTargets\n\nRemoves context keys from the individual context targets excluded from the segment for the specified `contextKind`.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be removed from.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExcludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeExcludedUsers\n\nRemoves user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExcludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the segment.\n\n##### Parameters\n\n- `value`: Name of the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated segment name\"\n }]\n}\n```\n\n\u003c/details\u003e\n\n## Using JSON patches on a segment\n\nIf you do not include the header described above, you can use a [JSON patch](/reference#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes.\n\nFor example, to update the description for a segment with a JSON patch, use the following request body:\n\n```json\n{\n \"patch\": [\n {\n \"op\": \"replace\",\n \"path\": \"/description\",\n \"value\": \"new description\"\n }\n ]\n}\n```\n\nTo update fields in the segment that are arrays, set the `path` to the name of the field and then append `/\u003carray index\u003e`. 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.\n\nFor example, to add a rule to a segment, use the following request body:\n\n```json\n{\n \"patch\":[\n {\n \"op\": \"add\",\n \"path\": \"/rules/0\",\n \"value\": {\n \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }]\n }\n }\n ]\n}\n```\n\nTo 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.\n", + Long: "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](/#section/Overview/Updates).\n\n### Using semantic patches on a segment\n\nTo 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](/reference#updates-using-semantic-patch).\n\nThe 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:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required) The key of the LaunchDarkly environment.\n* `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.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating segments.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating segment details and settings\u003c/strong\u003e\u003c/summary\u003e\n\n#### addTags\n\nAdds tags to the segment.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addTags\",\n \"values\": [\"tag1\", \"tag2\"]\n }]\n}\n```\n\n#### removeTags\n\nRemoves tags from the segment.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeTags\",\n \"values\": [\"tag1\", \"tag2\"]\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the segment.\n\n##### Parameters\n\n- `value`: Name of the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated segment name\"\n }]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating segment individual targets\u003c/strong\u003e\u003c/summary\u003e\n\n#### addExcludedTargets\n\nAdds context keys to the individual context targets excluded from the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be added to.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExcludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addExcludedUsers\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExcludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### addIncludedTargets\n\nAdds 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.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be added to.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addIncludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addIncludedUsers\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addIncludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### removeExcludedTargets\n\nRemoves context keys from the individual context targets excluded from the segment for the specified `contextKind`.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be removed from.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExcludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeExcludedUsers\n\nRemoves user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExcludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### removeIncludedTargets\n\nRemoves context keys from the individual context targets included in the segment for the specified `contextKind`.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be removed from.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeIncludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeIncludedUsers\n\nRemoves user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeIncludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating segment targeting rules\u003c/strong\u003e\u003c/summary\u003e\n\n#### addClauses\n\nAdds the given clauses to the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `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`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n- `ruleId`: ID of a rule in the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addClauses\",\n \"clauses\": [\n {\n \"attribute\": \"email\",\n \"negate\": false,\n \"op\": \"contains\",\n \"values\": [\"value1\"]\n }\n ],\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n }]\n}\n```\n\n#### addRule\n\nAdds a new targeting rule to the segment. The rule may contain `clauses`.\n\n##### Parameters\n\n- `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`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n- `description`: A description of the rule.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"clauses\": [\n {\n \"attribute\": \"email\",\n \"op\": \"contains\",\n \"negate\": false,\n \"values\": [\"@launchdarkly.com\"]\n }\n ],\n \"description\": \"Targeting rule for LaunchDarkly employees\",\n }]\n}\n```\n\n#### addValuesToClause\n\nAdds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addValuesToClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n \"values\": [\"beta_testers\"]\n }]\n}\n```\n\n#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeClauses\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"]\n }]\n}\n```\n\n#### removeRule\n\nRemoves the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeRule\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n }]\n}\n```\n\n#### removeValuesFromClause\n\nRemoves `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeValuesFromClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n \"values\": [\"beta_testers\"]\n }]\n}\n```\n\n#### reorderRules\n\nRearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules in the segment.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all targeting rules in the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"reorderRules\",\n \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n }]\n}\n```\n\n#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseId`: ID of a clause in that rule.\n- `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\",\n \"clause\": {\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Mexico\", \"Canada\"]\n }\n }]\n}\n```\n\n#### updateRuleDescription\n\nUpdates the description of the segment targeting rule.\n\n##### Parameters\n\n- `description`: The new human-readable description for this rule.\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateRuleDescription\",\n \"description\": \"New rule description\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n }]\n}\n```\n\n#### updateRuleRolloutAndContextKind\n\nFor a rule that includes a percentage of targets, updates the percentage and the context kind of the targets to include.\n\n##### Parameters\n\n- `ruleId`: The ID of a targeting rule in the segment that includes a percentage of targets.\n- `weight`: The weight, in thousandths of a percent (0-100000).\n- `contextKind`: The context kind.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"reorderRules\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"weight\": \"20000\",\n \"contextKind\": \"device\"\n }]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eworking with Big Segments\u003c/strong\u003e\u003c/summary\u003e\n\nA \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n\nThe following semantic patch instructions apply only to these [larger list-based segments](https://docs.launchdarkly.com/home/flags/segments-create#create-larger-list-based-segments).\n\n#### addBigSegmentExcludedTargets\n\nFor use with [larger list-based segments](https://docs.launchdarkly.com/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets excluded from the segment. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addBigSegmentExcludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addBigSegmentIncludedTargets\n\nFor use with [larger list-based segments](https://docs.launchdarkly.com/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets included in the segment. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addBigSegmentIncludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### processBigSegmentImport\n\nFor use with [larger list-based segments](https://docs.launchdarkly.com/home/flags/segments-create#create-larger-list-based-segments) ONLY. Processes a segment import.\n\n##### Parameters\n\n- `importId`: The ID of the import. The import ID is returned in the `Location` header as part of the [Create big segment import](https://apidocs.launchdarkly.com/tag/Segments-(beta)#operation/createBigSegmentImport) request.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"processBigSegmentImport\",\n \"importId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n }]\n}\n```\n\n\n#### removeBigSegmentExcludedTargets\n\nFor use with [larger list-based segments](https://docs.launchdarkly.com/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets excluded from the segment.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeBigSegmentExcludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeBigSegmentIncludedTargets\n\nFor use with [larger list-based segments](https://docs.launchdarkly.com/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets included in the segment.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeBigSegmentIncludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n\u003c/details\u003e\n\n### Using JSON patches on a segment\n\nIf you do not include the header described above, you can use a [JSON patch](/reference#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes.\n\nFor example, to update the description for a segment with a JSON patch, use the following request body:\n\n```json\n{\n \"patch\": [\n {\n \"op\": \"replace\",\n \"path\": \"/description\",\n \"value\": \"new description\"\n }\n ]\n}\n```\n\nTo update fields in the segment that are arrays, set the `path` to the name of the field and then append `/\u003carray index\u003e`. 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.\n\nFor example, to add a rule to a segment, use the following request body:\n\n```json\n{\n \"patch\":[\n {\n \"op\": \"add\",\n \"path\": \"/rules/0\",\n \"value\": {\n \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }]\n }\n }\n ]\n}\n```\n\nTo 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.\n", Use: "update", Params: []Param{ { @@ -6145,146 +8535,6 @@ func AddAllResourceCmds( SupportsSemanticPatch: false, }) - NewOperationCmd(gen_SegmentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create big segment export", - Long: "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.", - Use: "create-big-export", - Params: []Param{ - { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", - }, - { - Name: "segment-key", - In: "path", - Description: "The segment key", - Type: "string", - }, - }, - HTTPMethod: "POST", - HasBody: false, - IsBeta: true, - RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_SegmentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Create big segment import", - Long: "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.", - Use: "create-big-import", - Params: []Param{ - { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", - }, - { - Name: "segment-key", - In: "path", - Description: "The segment key", - Type: "string", - }, - }, - HTTPMethod: "POST", - HasBody: true, - IsBeta: true, - RequiresBody: true, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_SegmentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get big segment export", - Long: "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.", - Use: "get-big-export", - Params: []Param{ - { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", - }, - { - Name: "segment-key", - In: "path", - Description: "The segment key", - Type: "string", - }, - { - Name: "export-id", - In: "path", - Description: "The export ID", - Type: "string", - }, - }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: true, - RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID}", - SupportsSemanticPatch: false, - }) - - NewOperationCmd(gen_SegmentsBetaResourceCmd, client, markdownRenderer, OperationData{ - Short: "Get big segment import", - Long: "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.", - Use: "get-big-import", - Params: []Param{ - { - Name: "project-key", - In: "path", - Description: "The project key", - Type: "string", - }, - { - Name: "environment-key", - In: "path", - Description: "The environment key", - Type: "string", - }, - { - Name: "segment-key", - In: "path", - Description: "The segment key", - Type: "string", - }, - { - Name: "import-id", - In: "path", - Description: "The import ID", - Type: "string", - }, - }, - HTTPMethod: "GET", - HasBody: false, - IsBeta: true, - RequiresBody: false, - Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID}", - SupportsSemanticPatch: false, - }) - NewOperationCmd(gen_TagsResourceCmd, client, markdownRenderer, OperationData{ Short: "List tags", Long: "Get a list of tags.", @@ -6293,8 +8543,8 @@ func AddAllResourceCmds( { Name: "kind", In: "query", - Description: "Fetch tags associated with the specified resource type. Options are 'flag', 'project', 'environment', 'segment'. Returns all types by default.", - Type: "string", + Description: "Fetch tags associated with the specified resource type. Options are 'flag', 'project', 'environment', 'segment', 'metric'. Returns all types by default.", + Type: "array", }, { Name: "pre", @@ -6308,6 +8558,24 @@ func AddAllResourceCmds( Description: "Whether or not to return archived flags", Type: "boolean", }, + { + Name: "limit", + In: "query", + Description: "The number of tags to return. Maximum is 1000.", + Type: "integer", + }, + { + Name: "offset", + In: "query", + Description: "The index of the first tag to return. Default is 0.", + Type: "integer", + }, + { + Name: "as-of", + In: "query", + Description: "The time to retrieve tags as of. Default is the current time.", + Type: "string", + }, }, HTTPMethod: "GET", HasBody: false, @@ -6467,7 +8735,7 @@ func AddAllResourceCmds( NewOperationCmd(gen_TeamsResourceCmd, client, markdownRenderer, OperationData{ Short: "Update team", - Long: "Perform a partial update to a team. Updating a team uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating teams.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating teams\u003c/strong\u003e\u003c/summary\u003e\n\n#### addCustomRoles\n\nAdds custom roles to the team. Team members will have these custom roles granted to them.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### removeCustomRoles\n\nRemoves custom roles from the team. The app will no longer grant these custom roles to the team members.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### addMembers\n\nAdds members to the team.\n\n##### Parameters\n\n- `values`: List of member IDs to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removeMembers\n\nRemoves members from the team.\n\n##### Parameters\n\n- `values`: List of member IDs to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### replaceMembers\n\nReplaces the existing members of the team with the new members.\n\n##### Parameters\n\n- `values`: List of member IDs of the new members.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### addPermissionGrants\n\nAdds 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.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addPermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removePermissionGrants\n\nRemoves 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.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removePermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the description of the team.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Updated team description\"\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the team.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated team name\"\n }]\n}\n```\n\n\u003c/details\u003e\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Update team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", + Long: "Perform a partial update to a team. Updating a team uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating teams. Several of the instructions require one or more member IDs as parameters. The member ID is returned as part of the [List account members](/tag/Account-members#operation/getMembers) response. It is the `_id` field of each element in the `items` array.\n\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating teams\u003c/strong\u003e\u003c/summary\u003e\n\n#### addCustomRoles\n\nAdds custom roles to the team. Team members will have these custom roles granted to them.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### removeCustomRoles\n\nRemoves custom roles from the team. The app will no longer grant these custom roles to the team members.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### addMembers\n\nAdds members to the team.\n\n##### Parameters\n\n- `values`: List of member IDs to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removeMembers\n\nRemoves members from the team.\n\n##### Parameters\n\n- `values`: List of member IDs to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### replaceMembers\n\nReplaces the existing members of the team with the new members.\n\n##### Parameters\n\n- `values`: List of member IDs of the new members.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### addPermissionGrants\n\nAdds 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.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addPermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removePermissionGrants\n\nRemoves 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.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removePermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the description of the team.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Updated team description\"\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the team.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated team name\"\n }]\n}\n```\n\n\u003c/details\u003e\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Update team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", Use: "update", Params: []Param{ { diff --git a/ld-openapi.json b/ld-openapi.json index 1b9063da..9b067cb2 100644 --- a/ld-openapi.json +++ b/ld-openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.3", "info": { "title": "LaunchDarkly REST API", - "description": "# Overview\n\n## Authentication\n\nLaunchDarkly's REST API uses the HTTPS protocol with a minimum TLS version of 1.2.\n\nAll REST API resources are authenticated with either [personal or service access tokens](https://docs.launchdarkly.com/home/account/api), or session cookies. Other authentication mechanisms are not supported. You can manage personal access tokens on your [**Account settings**](https://app.launchdarkly.com/settings/tokens) page.\n\nLaunchDarkly also has SDK keys, mobile keys, and client-side IDs that are used by our server-side SDKs, mobile SDKs, and JavaScript-based SDKs, respectively. **These keys cannot be used to access our REST API**. These keys are environment-specific, and can only perform read-only operations such as fetching feature flag settings.\n\n| Auth mechanism | Allowed resources | Use cases |\n| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- |\n| [Personal or service access tokens](https://docs.launchdarkly.com/home/account/api) | Can be customized on a per-token basis | Building scripts, custom integrations, data export. |\n| SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs |\n| Mobile keys | Can only access read-only resources specific to mobile SDKs, and only for flags marked available to mobile keys. Restricted to a single environment. | Mobile SDKs |\n| Client-side ID | Can only access read-only resources specific to JavaScript-based client-side SDKs, and only for flags marked available to client-side. Restricted to a single environment. | Client-side JavaScript |\n\n> #### Keep your access tokens and SDK keys private\n>\n> Access tokens should _never_ be exposed in untrusted contexts. Never put an access token in client-side JavaScript, or embed it in a mobile application. LaunchDarkly has special mobile keys that you can embed in mobile apps. If you accidentally expose an access token or SDK key, you can reset it from your [**Account settings**](https://app.launchdarkly.com/settings/tokens) page.\n>\n> The client-side ID is safe to embed in untrusted contexts. It's designed for use in client-side JavaScript.\n\n### Authentication using request header\n\nThe preferred way to authenticate with the API is by adding an `Authorization` header containing your access token to your requests. The value of the `Authorization` header must be your access token.\n\nManage personal access tokens from the [**Account settings**](https://app.launchdarkly.com/settings/tokens) page.\n\n### Authentication using session cookie\n\nFor testing purposes, you can make API calls directly from your web browser. If you are logged in to the LaunchDarkly application, the API will use your existing session to authenticate calls.\n\nIf you have a [role](https://docs.launchdarkly.com/home/account/built-in-roles) other than Admin, or have a [custom role](https://docs.launchdarkly.com/home/account/custom-roles) defined, you may not have permission to perform some API calls. You will receive a `401` response code in that case.\n\n> ### Modifying the Origin header causes an error\n>\n> LaunchDarkly validates that the Origin header for any API request authenticated by a session cookie matches the expected Origin header. The expected Origin header is `https://app.launchdarkly.com`.\n>\n> If the Origin header does not match what's expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly.\n>\n> Any browser extension that intentionally changes the Origin header can cause this problem. For example, the `Allow-Control-Allow-Origin: *` Chrome extension changes the Origin header to `http://evil.com` and causes the app to fail.\n>\n> To prevent this error, do not modify your Origin header.\n>\n> LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage.\n\n## Representations\n\nAll resources expect and return JSON response bodies. Error responses also send a JSON body. To learn more about the error format of the API, read [Errors](/#section/Overview/Errors).\n\nIn practice this means that you always get a response with a `Content-Type` header set to `application/json`.\n\nIn addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`.\n\n### Summary and detailed representations\n\nWhen you fetch a list of resources, the response includes only the most important attributes of each resource. This is a _summary representation_ of the resource. When you fetch an individual resource, such as a single feature flag, you receive a _detailed representation_ of the resource.\n\nThe best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation.\n\n### Expanding responses\n\nSometimes the detailed representation of a resource does not include all of the attributes of the resource by default. If this is the case, the request method will clearly document this and describe which attributes you can include in an expanded response.\n\nTo include the additional attributes, append the `expand` request parameter to your request and add a comma-separated list of the attributes to include. For example, when you append `?expand=members,roles` to the [Get team](/tag/Teams#operation/getTeam) endpoint, the expanded response includes both of these attributes.\n\n### Links and addressability\n\nThe best way to navigate the API is by following links. These are attributes in representations that link to other resources. The API always uses the same format for links:\n\n- Links to other resources within the API are encapsulated in a `_links` object\n- If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link\n\nEach link has two attributes:\n\n- An `href`, which contains the URL\n- A `type`, which describes the content type\n\nFor example, a feature resource might return the following:\n\n```json\n{\n \"_links\": {\n \"parent\": {\n \"href\": \"/api/features\",\n \"type\": \"application/json\"\n },\n \"self\": {\n \"href\": \"/api/features/sort.order\",\n \"type\": \"application/json\"\n }\n },\n \"_site\": {\n \"href\": \"/features/sort.order\",\n \"type\": \"text/html\"\n }\n}\n```\n\nFrom this, you can navigate to the parent collection of features by following the `parent` link, or navigate to the site page for the feature by following the `_site` link.\n\nCollections are always represented as a JSON object with an `items` attribute containing an array of representations. Like all other representations, collections have `_links` defined at the top level.\n\nPaginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection.\n\n## Updates\n\nResources that accept partial updates use the `PATCH` verb. Most resources support the [JSON patch](/reference#updates-using-json-patch) format. Some resources also support the [JSON merge patch](/reference#updates-using-json-merge-patch) format, and some resources support the [semantic patch](/reference#updates-using-semantic-patch) format, which is a way to specify the modifications to perform as a set of executable instructions. Each resource supports optional [comments](/reference#updates-with-comments) that you can submit with updates. Comments appear in outgoing webhooks, the audit log, and other integrations.\n\nWhen a resource supports both JSON patch and semantic patch, we document both in the request method. However, the specific request body fields and descriptions included in our documentation only match one type of patch or the other.\n\n### Updates using JSON patch\n\n[JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) is a way to specify the modifications to perform on a resource. JSON patch uses paths and a limited set of operations to describe how to transform the current state of the resource into a new state. JSON patch documents are always arrays, where each element contains an operation, a path to the field to update, and the new value.\n\nFor example, in this feature flag representation:\n\n```json\n{\n \"name\": \"New recommendations engine\",\n \"key\": \"engine.enable\",\n \"description\": \"This is the description\",\n ...\n}\n```\nYou can change the feature flag's description with the following patch document:\n\n```json\n[{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }]\n```\n\nYou can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch:\n\n```json\n[\n { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 },\n { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }\n]\n```\n\nThe above patch request tests whether the feature flag's `version` is `10`, and if so, changes the feature flag's description.\n\nAttributes that are not editable, such as a resource's `_links`, have names that start with an underscore.\n\n### Updates using JSON merge patch\n\n[JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) is another format for specifying the modifications to perform on a resource. JSON merge patch is less expressive than JSON patch. However, in many cases it is simpler to construct a merge patch document. For example, you can change a feature flag's description with the following merge patch document:\n\n```json\n{\n \"description\": \"New flag description\"\n}\n```\n\n### Updates using semantic patch\n\nSome resources support the semantic patch format. A semantic patch is a way to specify the modifications to perform on a resource as a set of executable instructions.\n\nSemantic patch allows you to be explicit about intent using precise, custom instructions. In many cases, you can define semantic patch instructions independently of the current state of the resource. This can be useful when defining a change that may be applied at a future date.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header.\n\nHere's how:\n\n```\nContent-Type: application/json; domain-model=launchdarkly.semanticpatch\n```\n\nIf you call a semantic patch resource without this header, you will receive a `400` response because your semantic patch will be interpreted as a JSON patch.\n\nThe body of a semantic patch request takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required for some resources only) The environment key.\n* `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 instruction requires parameters, you must include those parameters as additional fields in the object. The documentation for each resource that supports semantic patch includes the available instructions and any additional parameters.\n\nFor example:\n\n```json\n{\n \"comment\": \"optional comment\",\n \"instructions\": [ {\"kind\": \"turnFlagOn\"} ]\n}\n```\n\nIf any instruction in the patch encounters an error, the endpoint returns an error and will not change the resource. In general, each instruction silently does nothing if the resource is already in the state you request.\n\n### Updates with comments\n\nYou can submit optional comments with `PATCH` changes.\n\nTo submit a comment along with a JSON patch document, use the following format:\n\n```json\n{\n \"comment\": \"This is a comment string\",\n \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }]\n}\n```\n\nTo submit a comment along with a JSON merge patch document, use the following format:\n\n```json\n{\n \"comment\": \"This is a comment string\",\n \"merge\": { \"description\": \"New flag description\" }\n}\n```\n\nTo submit a comment along with a semantic patch, use the following format:\n\n```json\n{\n \"comment\": \"This is a comment string\",\n \"instructions\": [ {\"kind\": \"turnFlagOn\"} ]\n}\n```\n\n## Errors\n\nThe API always returns errors in a common format. Here's an example:\n\n```json\n{\n \"code\": \"invalid_request\",\n \"message\": \"A feature with that key already exists\",\n \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\"\n}\n```\n\nThe `code` indicates the general class of error. The `message` is a human-readable explanation of what went wrong. The `id` is a unique identifier. Use it when you're working with LaunchDarkly Support to debug a problem with a specific API call.\n\n### HTTP status error response codes\n\n| Code | Definition | Description | Possible Solution |\n| ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |\n| 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. |\n| 401 | Invalid access token | Requestor is unauthorized or does not have permission for this API call. | Ensure your API access token is valid and has the appropriate permissions. |\n| 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. |\n| 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. |\n| 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. |\n| 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. |\n| 422 | Unprocessable entity | The API request can not be completed because the update description can not be understood. | Ensure that the request body is correct for the type of patch you are using, either JSON patch or semantic patch.\n| 429 | Too many requests | Read [Rate limiting](/#section/Overview/Rate-limiting). | Wait and try again later. |\n\n## CORS\n\nThe LaunchDarkly API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. If an `Origin` header is given in a request, it will be echoed as an explicitly allowed origin. Otherwise the request returns a wildcard, `Access-Control-Allow-Origin: *`. For more information on CORS, read the [CORS W3C Recommendation](http://www.w3.org/TR/cors). Example CORS headers might look like:\n\n```http\nAccess-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization\nAccess-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH\nAccess-Control-Allow-Origin: *\nAccess-Control-Max-Age: 300\n```\n\nYou can make authenticated CORS calls just as you would make same-origin calls, using either [token or session-based authentication](/#section/Overview/Authentication). If you are using session authentication, you should set the `withCredentials` property for your `xhr` request to `true`. You should never expose your access tokens to untrusted entities.\n\n## Rate limiting\n\nWe use several rate limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code. Calls to our APIs include headers indicating the current rate limit status. The specific headers returned depend on the API route being called. The limits differ based on the route, authentication mechanism, and other factors. Routes that are not rate limited may not contain any of the headers described below.\n\n> ### Rate limiting and SDKs\n>\n> LaunchDarkly SDKs are never rate limited and do not use the API endpoints defined here. LaunchDarkly uses a different set of approaches, including streaming/server-sent events and a global CDN, to ensure availability to the routes used by LaunchDarkly SDKs.\n\n### Global rate limits\n\nAuthenticated requests are subject to a global limit. This is the maximum number of calls that your account can make to the API per ten seconds. All service and personal access tokens on the account share this limit, so exceeding the limit with one access token will impact other tokens. Calls that are subject to global rate limits may return the headers below:\n\n| Header name | Description |\n| ------------------------------ | -------------------------------------------------------------------------------- |\n| `X-Ratelimit-Global-Remaining` | The maximum number of requests the account is permitted to make per ten seconds. |\n| `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. |\n\nWe do not publicly document the specific number of calls that can be made globally. This limit may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limit.\n\n### Route-level rate limits\n\nSome authenticated routes have custom rate limits. These also reset every ten seconds. Any service or personal access tokens hitting the same route share this limit, so exceeding the limit with one access token may impact other tokens. Calls that are subject to route-level rate limits return the headers below:\n\n| Header name | Description |\n| ----------------------------- | ----------------------------------------------------------------------------------------------------- |\n| `X-Ratelimit-Route-Remaining` | The maximum number of requests to the current route the account is permitted to make per ten seconds. |\n| `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. |\n\nA _route_ represents a specific URL pattern and verb. For example, the [Delete environment](/tag/Environments#operation/deleteEnvironment) endpoint is considered a single route, and each call to delete an environment counts against your route-level rate limit for that route.\n\nWe do not publicly document the specific number of calls that an account can make to each endpoint per ten seconds. These limits may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limits.\n\n### IP-based rate limiting\n\nWe also employ IP-based rate limiting on some API routes. If you hit an IP-based rate limit, your API response will include a `Retry-After` header indicating how long to wait before re-trying the call. Clients must wait at least `Retry-After` seconds before making additional calls to our API, and should employ jitter and backoff strategies to avoid triggering rate limits again.\n\n## OpenAPI (Swagger) and client libraries\n\nWe have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API.\n\nWe auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). You can also use this specification to generate client libraries to interact with our REST API in your language of choice.\n\nOur OpenAPI specification is supported by several API-based tools such as Postman and Insomnia. In many cases, you can directly import our specification to explore our APIs.\n\n## Method overriding\n\nSome firewalls and HTTP clients restrict the use of verbs other than `GET` and `POST`. In those environments, our API endpoints that use `DELETE`, `PATCH`, and `PUT` verbs are inaccessible.\n\nTo avoid this issue, our API supports the `X-HTTP-Method-Override` header, allowing clients to \"tunnel\" `DELETE`, `PATCH`, and `PUT` requests using a `POST` request.\n\nFor example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header.\n\n## Beta resources\n\nWe sometimes release new API resources in **beta** status before we release them with general availability.\n\nResources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nWe try to promote resources into general availability as quickly as possible. This happens after sufficient testing and when we're satisfied that we no longer need to make backwards-incompatible changes.\n\nWe mark beta resources with a \"Beta\" callout in our documentation, pictured below:\n\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\n### Using beta resources\n\nTo use a beta resource, you must include a header in the request. If you call a beta resource without this header, you receive a `403` response.\n\nUse this header:\n\n```\nLD-API-Version: beta\n```\n\n## Federal environments\n\nThe version of LaunchDarkly that is available on domains controlled by the United States government is different from the version of LaunchDarkly available to the general public. If you are an employee or contractor for a United States federal agency and use LaunchDarkly in your work, you likely use the federal instance of LaunchDarkly.\n\nIf you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. In the \"Try it\" sandbox for each request, click the request path to view the complete resource path for the federal environment.\n\nTo learn more, read [LaunchDarkly in federal environments](https://docs.launchdarkly.com/home/infrastructure/federal).\n\n## Versioning\n\nWe try hard to keep our REST API backwards compatible, but we occasionally have to make backwards-incompatible changes in the process of shipping new features. These breaking changes can cause unexpected behavior if you don't prepare for them accordingly.\n\nUpdates to our REST API include support for the latest features in LaunchDarkly. We also release a new version of our REST API every time we make a breaking change. We provide simultaneous support for multiple API versions so you can migrate from your current API version to a new version at your own pace.\n\n### Setting the API version per request\n\nYou can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below:\n\n```\nLD-API-Version: 20240415\n```\n\nThe header value is the version number of the API version you would like to request. The number for each version corresponds to the date the version was released in `yyyymmdd` format. In the example above the version `20240415` corresponds to April 15, 2024.\n\n### Setting the API version per access token\n\nWhen you create an access token, you must specify a specific version of the API to use. This ensures that integrations using this token cannot be broken by version changes.\n\nTokens created before versioning was released have their version set to `20160426`, which is the version of the API that existed before the current versioning scheme, so that they continue working the same way they did before versioning.\n\nIf you would like to upgrade your integration to use a new API version, you can explicitly set the header described above.\n\n> ### Best practice: Set the header for every client or integration\n>\n> We recommend that you set the API version header explicitly in any client or integration you build.\n>\n> Only rely on the access token API version during manual testing.\n\n### API version changelog\n\n|
Version
| Changes | End of life (EOL)\n|---|---|---|\n| `20240415` | | Current |\n| `20220603` | | 2025-04-15 |\n| `20210729` | | 2023-06-03 |\n| `20191212` | | 2022-07-29 |\n| `20160426` | | 2020-12-12 |\n\nTo learn more about how EOL is determined, read LaunchDarkly's [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/).\n", + "description": "# Overview\n\n## Authentication\n\nLaunchDarkly's REST API uses the HTTPS protocol with a minimum TLS version of 1.2.\n\nAll REST API resources are authenticated with either [personal or service access tokens](https://docs.launchdarkly.com/home/account/api), or session cookies. Other authentication mechanisms are not supported. You can manage personal access tokens on your [**Authorization**](https://app.launchdarkly.com/settings/authorization) page in the LaunchDarkly UI.\n\nLaunchDarkly also has SDK keys, mobile keys, and client-side IDs that are used by our server-side SDKs, mobile SDKs, and JavaScript-based SDKs, respectively. **These keys cannot be used to access our REST API**. These keys are environment-specific, and can only perform read-only operations such as fetching feature flag settings.\n\n| Auth mechanism | Allowed resources | Use cases |\n| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------- |\n| [Personal or service access tokens](https://docs.launchdarkly.com/home/account/api) | Can be customized on a per-token basis | Building scripts, custom integrations, data export. |\n| SDK keys | Can only access read-only resources specific to server-side SDKs. Restricted to a single environment. | Server-side SDKs |\n| Mobile keys | Can only access read-only resources specific to mobile SDKs, and only for flags marked available to mobile keys. Restricted to a single environment. | Mobile SDKs |\n| Client-side ID | Can only access read-only resources specific to JavaScript-based client-side SDKs, and only for flags marked available to client-side. Restricted to a single environment. | Client-side JavaScript |\n\n> #### Keep your access tokens and SDK keys private\n>\n> Access tokens should _never_ be exposed in untrusted contexts. Never put an access token in client-side JavaScript, or embed it in a mobile application. LaunchDarkly has special mobile keys that you can embed in mobile apps. If you accidentally expose an access token or SDK key, you can reset it from your [**Authorization**](https://app.launchdarkly.com/settings/authorization) page.\n>\n> The client-side ID is safe to embed in untrusted contexts. It's designed for use in client-side JavaScript.\n\n### Authentication using request header\n\nThe preferred way to authenticate with the API is by adding an `Authorization` header containing your access token to your requests. The value of the `Authorization` header must be your access token.\n\nManage personal access tokens from the [**Authorization**](https://app.launchdarkly.com/settings/authorization) page.\n\n### Authentication using session cookie\n\nFor testing purposes, you can make API calls directly from your web browser. If you are logged in to the LaunchDarkly application, the API will use your existing session to authenticate calls.\n\nIf you have a [role](https://docs.launchdarkly.com/home/account/built-in-roles) other than Admin, or have a [custom role](https://docs.launchdarkly.com/home/account/custom-roles) defined, you may not have permission to perform some API calls. You will receive a `401` response code in that case.\n\n> ### Modifying the Origin header causes an error\n>\n> LaunchDarkly validates that the Origin header for any API request authenticated by a session cookie matches the expected Origin header. The expected Origin header is `https://app.launchdarkly.com`.\n>\n> If the Origin header does not match what's expected, LaunchDarkly returns an error. This error can prevent the LaunchDarkly app from working correctly.\n>\n> Any browser extension that intentionally changes the Origin header can cause this problem. For example, the `Allow-Control-Allow-Origin: *` Chrome extension changes the Origin header to `http://evil.com` and causes the app to fail.\n>\n> To prevent this error, do not modify your Origin header.\n>\n> LaunchDarkly does not require origin matching when authenticating with an access token, so this issue does not affect normal API usage.\n\n## Representations\n\nAll resources expect and return JSON response bodies. Error responses also send a JSON body. To learn more about the error format of the API, read [Errors](/#section/Overview/Errors).\n\nIn practice this means that you always get a response with a `Content-Type` header set to `application/json`.\n\nIn addition, request bodies for `PATCH`, `POST`, and `PUT` requests must be encoded as JSON with a `Content-Type` header set to `application/json`.\n\n### Summary and detailed representations\n\nWhen you fetch a list of resources, the response includes only the most important attributes of each resource. This is a _summary representation_ of the resource. When you fetch an individual resource, such as a single feature flag, you receive a _detailed representation_ of the resource.\n\nThe best way to find a detailed representation is to follow links. Every summary representation includes a link to its detailed representation.\n\n### Expanding responses\n\nSometimes the detailed representation of a resource does not include all of the attributes of the resource by default. If this is the case, the request method will clearly document this and describe which attributes you can include in an expanded response.\n\nTo include the additional attributes, append the `expand` request parameter to your request and add a comma-separated list of the attributes to include. For example, when you append `?expand=members,maintainers` to the [Get team](/tag/Teams#operation/getTeam) endpoint, the expanded response includes both of these attributes.\n\n### Links and addressability\n\nThe best way to navigate the API is by following links. These are attributes in representations that link to other resources. The API always uses the same format for links:\n\n- Links to other resources within the API are encapsulated in a `_links` object\n- If the resource has a corresponding link to HTML content on the site, it is stored in a special `_site` link\n\nEach link has two attributes:\n\n- An `href`, which contains the URL\n- A `type`, which describes the content type\n\nFor example, a feature resource might return the following:\n\n```json\n{\n \"_links\": {\n \"parent\": {\n \"href\": \"/api/features\",\n \"type\": \"application/json\"\n },\n \"self\": {\n \"href\": \"/api/features/sort.order\",\n \"type\": \"application/json\"\n }\n },\n \"_site\": {\n \"href\": \"/features/sort.order\",\n \"type\": \"text/html\"\n }\n}\n```\n\nFrom this, you can navigate to the parent collection of features by following the `parent` link, or navigate to the site page for the feature by following the `_site` link.\n\nCollections are always represented as a JSON object with an `items` attribute containing an array of representations. Like all other representations, collections have `_links` defined at the top level.\n\nPaginated collections include `first`, `last`, `next`, and `prev` links containing a URL with the respective set of elements in the collection.\n\n## Updates\n\nResources that accept partial updates use the `PATCH` verb. Most resources support the [JSON patch](/reference#updates-using-json-patch) format. Some resources also support the [JSON merge patch](/reference#updates-using-json-merge-patch) format, and some resources support the [semantic patch](/reference#updates-using-semantic-patch) format, which is a way to specify the modifications to perform as a set of executable instructions. Each resource supports optional [comments](/reference#updates-with-comments) that you can submit with updates. Comments appear in outgoing webhooks, the audit log, and other integrations.\n\nWhen a resource supports both JSON patch and semantic patch, we document both in the request method. However, the specific request body fields and descriptions included in our documentation only match one type of patch or the other.\n\n### Updates using JSON patch\n\n[JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) is a way to specify the modifications to perform on a resource. JSON patch uses paths and a limited set of operations to describe how to transform the current state of the resource into a new state. JSON patch documents are always arrays, where each element contains an operation, a path to the field to update, and the new value.\n\nFor example, in this feature flag representation:\n\n```json\n{\n \"name\": \"New recommendations engine\",\n \"key\": \"engine.enable\",\n \"description\": \"This is the description\",\n ...\n}\n```\nYou can change the feature flag's description with the following patch document:\n\n```json\n[{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"This is the new description\" }]\n```\n\nYou can specify multiple modifications to perform in a single request. You can also test that certain preconditions are met before applying the patch:\n\n```json\n[\n { \"op\": \"test\", \"path\": \"/version\", \"value\": 10 },\n { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }\n]\n```\n\nThe above patch request tests whether the feature flag's `version` is `10`, and if so, changes the feature flag's description.\n\nAttributes that are not editable, such as a resource's `_links`, have names that start with an underscore.\n\n### Updates using JSON merge patch\n\n[JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) is another format for specifying the modifications to perform on a resource. JSON merge patch is less expressive than JSON patch. However, in many cases it is simpler to construct a merge patch document. For example, you can change a feature flag's description with the following merge patch document:\n\n```json\n{\n \"description\": \"New flag description\"\n}\n```\n\n### Updates using semantic patch\n\nSome resources support the semantic patch format. A semantic patch is a way to specify the modifications to perform on a resource as a set of executable instructions.\n\nSemantic patch allows you to be explicit about intent using precise, custom instructions. In many cases, you can define semantic patch instructions independently of the current state of the resource. This can be useful when defining a change that may be applied at a future date.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header.\n\nHere's how:\n\n```\nContent-Type: application/json; domain-model=launchdarkly.semanticpatch\n```\n\nIf you call a semantic patch resource without this header, you will receive a `400` response because your semantic patch will be interpreted as a JSON patch.\n\nThe body of a semantic patch request takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required for some resources only) The environment key.\n* `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 instruction requires parameters, you must include those parameters as additional fields in the object. The documentation for each resource that supports semantic patch includes the available instructions and any additional parameters.\n\nFor example:\n\n```json\n{\n \"comment\": \"optional comment\",\n \"instructions\": [ {\"kind\": \"turnFlagOn\"} ]\n}\n```\n\nSemantic patches are not applied partially; either all of the instructions are applied or none of them are. If **any** instruction is invalid, the endpoint returns an error and will not change the resource. If all instructions are valid, the request succeeds and the resources are updated if necessary, or left unchanged if they are already in the state you request.\n\n### Updates with comments\n\nYou can submit optional comments with `PATCH` changes.\n\nTo submit a comment along with a JSON patch document, use the following format:\n\n```json\n{\n \"comment\": \"This is a comment string\",\n \"patch\": [{ \"op\": \"replace\", \"path\": \"/description\", \"value\": \"The new description\" }]\n}\n```\n\nTo submit a comment along with a JSON merge patch document, use the following format:\n\n```json\n{\n \"comment\": \"This is a comment string\",\n \"merge\": { \"description\": \"New flag description\" }\n}\n```\n\nTo submit a comment along with a semantic patch, use the following format:\n\n```json\n{\n \"comment\": \"This is a comment string\",\n \"instructions\": [ {\"kind\": \"turnFlagOn\"} ]\n}\n```\n\n## Errors\n\nThe API always returns errors in a common format. Here's an example:\n\n```json\n{\n \"code\": \"invalid_request\",\n \"message\": \"A feature with that key already exists\",\n \"id\": \"30ce6058-87da-11e4-b116-123b93f75cba\"\n}\n```\n\nThe `code` indicates the general class of error. The `message` is a human-readable explanation of what went wrong. The `id` is a unique identifier. Use it when you're working with LaunchDarkly Support to debug a problem with a specific API call.\n\n### HTTP status error response codes\n\n| Code | Definition | Description | Possible Solution |\n| ---- | ----------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |\n| 400 | Invalid request | The request cannot be understood. | Ensure JSON syntax in request body is correct. |\n| 401 | Invalid access token | Requestor is unauthorized or does not have permission for this API call. | Ensure your API access token is valid and has the appropriate permissions. |\n| 403 | Forbidden | Requestor does not have access to this resource. | Ensure that the account member or access token has proper permissions set. |\n| 404 | Invalid resource identifier | The requested resource is not valid. | Ensure that the resource is correctly identified by ID or key. |\n| 405 | Method not allowed | The request method is not allowed on this resource. | Ensure that the HTTP verb is correct. |\n| 409 | Conflict | The API request can not be completed because it conflicts with a concurrent API request. | Retry your request. |\n| 422 | Unprocessable entity | The API request can not be completed because the update description can not be understood. | Ensure that the request body is correct for the type of patch you are using, either JSON patch or semantic patch.\n| 429 | Too many requests | Read [Rate limiting](/#section/Overview/Rate-limiting). | Wait and try again later. |\n\n## CORS\n\nThe LaunchDarkly API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. If an `Origin` header is given in a request, it will be echoed as an explicitly allowed origin. Otherwise the request returns a wildcard, `Access-Control-Allow-Origin: *`. For more information on CORS, read the [CORS W3C Recommendation](http://www.w3.org/TR/cors). Example CORS headers might look like:\n\n```http\nAccess-Control-Allow-Headers: Accept, Content-Type, Content-Length, Accept-Encoding, Authorization\nAccess-Control-Allow-Methods: OPTIONS, GET, DELETE, PATCH\nAccess-Control-Allow-Origin: *\nAccess-Control-Max-Age: 300\n```\n\nYou can make authenticated CORS calls just as you would make same-origin calls, using either [token or session-based authentication](/#section/Overview/Authentication). If you are using session authentication, you should set the `withCredentials` property for your `xhr` request to `true`. You should never expose your access tokens to untrusted entities.\n\n## Rate limiting\n\nWe use several rate limiting strategies to ensure the availability of our APIs. Rate-limited calls to our APIs return a `429` status code. Calls to our APIs include headers indicating the current rate limit status. The specific headers returned depend on the API route being called. The limits differ based on the route, authentication mechanism, and other factors. Routes that are not rate limited may not contain any of the headers described below.\n\n> ### Rate limiting and SDKs\n>\n> LaunchDarkly SDKs are never rate limited and do not use the API endpoints defined here. LaunchDarkly uses a different set of approaches, including streaming/server-sent events and a global CDN, to ensure availability to the routes used by LaunchDarkly SDKs.\n\n### Global rate limits\n\nAuthenticated requests are subject to a global limit. This is the maximum number of calls that your account can make to the API per ten seconds. All service and personal access tokens on the account share this limit, so exceeding the limit with one access token will impact other tokens. Calls that are subject to global rate limits may return the headers below:\n\n| Header name | Description |\n| ------------------------------ | -------------------------------------------------------------------------------- |\n| `X-Ratelimit-Global-Remaining` | The maximum number of requests the account is permitted to make per ten seconds. |\n| `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. |\n\nWe do not publicly document the specific number of calls that can be made globally. This limit may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limit.\n\n### Route-level rate limits\n\nSome authenticated routes have custom rate limits. These also reset every ten seconds. Any service or personal access tokens hitting the same route share this limit, so exceeding the limit with one access token may impact other tokens. Calls that are subject to route-level rate limits return the headers below:\n\n| Header name | Description |\n| ----------------------------- | ----------------------------------------------------------------------------------------------------- |\n| `X-Ratelimit-Route-Remaining` | The maximum number of requests to the current route the account is permitted to make per ten seconds. |\n| `X-Ratelimit-Reset` | The time at which the current rate limit window resets in epoch milliseconds. |\n\nA _route_ represents a specific URL pattern and verb. For example, the [Delete environment](/tag/Environments#operation/deleteEnvironment) endpoint is considered a single route, and each call to delete an environment counts against your route-level rate limit for that route.\n\nWe do not publicly document the specific number of calls that an account can make to each endpoint per ten seconds. These limits may change, and we encourage clients to program against the specification, relying on the two headers defined above, rather than hardcoding to the current limits.\n\n### IP-based rate limiting\n\nWe also employ IP-based rate limiting on some API routes. If you hit an IP-based rate limit, your API response will include a `Retry-After` header indicating how long to wait before re-trying the call. Clients must wait at least `Retry-After` seconds before making additional calls to our API, and should employ jitter and backoff strategies to avoid triggering rate limits again.\n\n## OpenAPI (Swagger) and client libraries\n\nWe have a [complete OpenAPI (Swagger) specification](https://app.launchdarkly.com/api/v2/openapi.json) for our API.\n\nWe auto-generate multiple client libraries based on our OpenAPI specification. To learn more, visit the [collection of client libraries on GitHub](https://github.com/search?q=topic%3Alaunchdarkly-api+org%3Alaunchdarkly&type=Repositories). You can also use this specification to generate client libraries to interact with our REST API in your language of choice.\n\nOur OpenAPI specification is supported by several API-based tools such as Postman and Insomnia. In many cases, you can directly import our specification to explore our APIs.\n\n## Method overriding\n\nSome firewalls and HTTP clients restrict the use of verbs other than `GET` and `POST`. In those environments, our API endpoints that use `DELETE`, `PATCH`, and `PUT` verbs are inaccessible.\n\nTo avoid this issue, our API supports the `X-HTTP-Method-Override` header, allowing clients to \"tunnel\" `DELETE`, `PATCH`, and `PUT` requests using a `POST` request.\n\nFor example, to call a `PATCH` endpoint using a `POST` request, you can include `X-HTTP-Method-Override:PATCH` as a header.\n\n## Beta resources\n\nWe sometimes release new API resources in **beta** status before we release them with general availability.\n\nResources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nWe try to promote resources into general availability as quickly as possible. This happens after sufficient testing and when we're satisfied that we no longer need to make backwards-incompatible changes.\n\nWe mark beta resources with a \"Beta\" callout in our documentation, pictured below:\n\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\n### Using beta resources\n\nTo use a beta resource, you must include a header in the request. If you call a beta resource without this header, you receive a `403` response.\n\nUse this header:\n\n```\nLD-API-Version: beta\n```\n\n## Federal environments\n\nThe version of LaunchDarkly that is available on domains controlled by the United States government is different from the version of LaunchDarkly available to the general public. If you are an employee or contractor for a United States federal agency and use LaunchDarkly in your work, you likely use the federal instance of LaunchDarkly.\n\nIf you are working in the federal instance of LaunchDarkly, the base URI for each request is `https://app.launchdarkly.us`. In the \"Try it\" sandbox for each request, click the request path to view the complete resource path for the federal environment.\n\nTo learn more, read [LaunchDarkly in federal environments](https://docs.launchdarkly.com/home/infrastructure/federal).\n\n## Versioning\n\nWe try hard to keep our REST API backwards compatible, but we occasionally have to make backwards-incompatible changes in the process of shipping new features. These breaking changes can cause unexpected behavior if you don't prepare for them accordingly.\n\nUpdates to our REST API include support for the latest features in LaunchDarkly. We also release a new version of our REST API every time we make a breaking change. We provide simultaneous support for multiple API versions so you can migrate from your current API version to a new version at your own pace.\n\n### Setting the API version per request\n\nYou can set the API version on a specific request by sending an `LD-API-Version` header, as shown in the example below:\n\n```\nLD-API-Version: 20240415\n```\n\nThe header value is the version number of the API version you would like to request. The number for each version corresponds to the date the version was released in `yyyymmdd` format. In the example above the version `20240415` corresponds to April 15, 2024.\n\n### Setting the API version per access token\n\nWhen you create an access token, you must specify a specific version of the API to use. This ensures that integrations using this token cannot be broken by version changes.\n\nTokens created before versioning was released have their version set to `20160426`, which is the version of the API that existed before the current versioning scheme, so that they continue working the same way they did before versioning.\n\nIf you would like to upgrade your integration to use a new API version, you can explicitly set the header described above.\n\n> ### Best practice: Set the header for every client or integration\n>\n> We recommend that you set the API version header explicitly in any client or integration you build.\n>\n> Only rely on the access token API version during manual testing.\n\n### API version changelog\n\n|
Version
| Changes | End of life (EOL)\n|---|---|---|\n| `20240415` | | Current |\n| `20220603` | | 2025-04-15 |\n| `20210729` | | 2023-06-03 |\n| `20191212` | | 2022-07-29 |\n| `20160426` | | 2020-12-12 |\n\nTo learn more about how EOL is determined, read LaunchDarkly's [End of Life (EOL) Policy](https://launchdarkly.com/policies/end-of-life-policy/).\n", "contact": { "name": "LaunchDarkly Technical Support Team", "url": "https://support.launchdarkly.com", @@ -49,54 +49,66 @@ "name": "Account usage (beta)", "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe account usage API lets you query for metrics about how your account is using LaunchDarkly. To learn more, read [Account usage metrics](https://docs.launchdarkly.com/home/account/metrics).\n\nEach endpoint returns time-series data in the form of an array of data points with timestamps. Each one contains data for that time from one or more series. It also includes a metadata array describing what each of the series is.\n" }, + { + "name": "AI configs (beta)", + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\nThe AI configs API allows you to create, retrieve, and edit AI configs, AI config variations, and AI model configurations.\n\nAn AI config is a resource in LaunchDarkly that you can use to customize, test, and roll out new large language models (LLMs) within your generative AI applications. Within each AI config, you define one or more AI config variations, each of which includes a model configuration and one or more messages. The model configuration can be a standard one from the list provided by LaunchDarkly, or you can define your own custom AI model configuration.\n\nTo learn more, read [AI configs](https://docs.launchdarkly.com/home/ai-configs).\n" + }, { "name": "Applications (beta)", - "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe applications API lets you create, update, delete, and search for applications and application versions.\n\nEach application includes information about the app you're creating, and a set of versions of the app that you've released. You can use applications to target particular application versions in your feature flags more easily, and to handle unsupported application versions more gracefully.\n\nIn addition to creating applications through the applications API, you can also create applications in the LaunchDarkly user interface. To learn more, read [Applications and application versions](https://docs.launchdarkly.com/home/releases/applications). LaunchDarkly also creates applications and application versions automatically when a LaunchDarkly SDK evaluates a feature flag for a context that includes application information. To learn more, read [Automatic environment attributes](https://docs.launchdarkly.com/sdk/features/environment-attributes).\n\nYou can use an application in any project in your LaunchDarkly account.\n\n### Filtering applications and application versions\n\nThe `filter` parameter supports the following operators: `equals`, `notEquals`, `anyOf`, `startsWith`.\n\nYou can also combine filters in the following ways:\n\n- Use a comma (`,`) as an AND operator\n- Use a vertical bar (`|`) as an OR operator\n- Use parentheses (`()`) to group filters\n\n#### Supported fields and operators\n\nYou can only filter certain fields in applications when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for applications, the `filter` parameter supports the following fields and operators:\n\n|
Field
|Description |Supported operators |\n|---|---|---|\n|`key` | The application or application version key, a unique identifier |`equals`, `notEquals`, `anyOf` |\n|`name` | The application name or application version name |`equals`, `notEquals`, `anyOf`, `startsWith` |\n|`autoAdded` | Whether the application or application version 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 |`equals`, `notEquals` |\n|`kind` | The application kind, one of `mobile`, `server`, `browser`. Only available for [Get applications](/tag/Applications-(beta)#operation/getApplications). |`equals`, `notEquals`, `anyOf` |\n|`supported` | Whether a mobile application version is supported or unsupported. Only available for [Get application versions by application key](/tag/Applications-(beta)#operation/getApplicationVersions).|`equals`, `notEquals` |\n\nFor example, the filter `?filter=kind anyOf ['mobile', 'server']` matches applications whose `kind` is either `mobile` or `server`. The filter is not case-sensitive.\n\nThe documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=kind anyOf ['mobile', 'server']` must be encoded to `%5B`.\n\n### Sorting applications and application versions\n\nLaunchDarkly supports the following fields for sorting:\n- `name` sorts by application name.\n- `creationDate` sorts by the creation date of the application.\n\nBy default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by application name in ascending order, and `?sort=-name` sorts in descending order.\n" + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe applications API lets you create, update, delete, and search for applications and application versions.\n\nEach application includes information about the app you're creating, and a set of versions of the app that you've released. You can use applications to target particular application versions in your feature flags more easily, and to handle unsupported application versions more gracefully.\n\nIn addition to creating applications through the applications API, you can also create applications in the LaunchDarkly user interface. To learn more, read [Applications and application versions](https://docs.launchdarkly.com/home/releases/applications). LaunchDarkly also creates applications and application versions automatically when a LaunchDarkly SDK evaluates a feature flag for a context that includes application information. To learn more, read [Automatic environment attributes](https://docs.launchdarkly.com/sdk/features/environment-attributes).\n\nYou can use an application in any project in your LaunchDarkly account.\n\n### Filtering applications and application versions\n\nThe `filter` parameter supports the following operators: `equals`, `notEquals`, `anyOf`, `startsWith`.\n\nYou can also combine filters in the following ways:\n\n- Use a comma (`,`) as an AND operator\n- Use a vertical bar (`|`) as an OR operator\n- Use parentheses (`()`) to group filters\n\n#### Supported fields and operators\n\nYou can only filter certain fields in applications when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for applications, the `filter` parameter supports the following fields and operators:\n\n|
Field
|Description |Supported operators |\n|---|---|---|\n|`key` | The application or application version key, a unique identifier |`equals`, `notEquals`, `anyOf` |\n|`name` | The application name or application version name |`equals`, `notEquals`, `anyOf`, `startsWith` |\n|`autoAdded` | Whether the application or application version 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 |`equals`, `notEquals` |\n|`kind` | The application kind, one of `mobile`, `server`, `browser`. Only available for [Get applications](/tag/Applications-(beta)#operation/getApplications). |`equals`, `notEquals`, `anyOf` |\n|`supported` | Whether a mobile application version is supported or unsupported. Only available for [Get application versions by application key](/tag/Applications-(beta)#operation/getApplicationVersions).|`equals`, `notEquals` |\n\nFor example, the filter `?filter=kind anyOf [\"mobile\", \"server\"]` matches applications whose `kind` is either `mobile` or `server`. The filter is not case-sensitive.\n\nThe documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=kind anyOf [\"mobile\", \"server\"]` must be encoded to `%5B`.\n\n### Sorting applications and application versions\n\nLaunchDarkly supports the following fields for sorting:\n- `name` sorts by application name.\n- `creationDate` sorts by the creation date of the application.\n\nBy default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by application name in ascending order, and `?sort=-name` sorts in descending order.\n" }, { "name": "Approvals", "description": "You can create an approval request that prevents a flag change from being applied without approval from a team member. Select up to ten members as reviewers. Reviewers receive an email notification, but anyone with sufficient permissions can review a pending approval request. A change needs at least one approval before you can apply it. To learn more, read [Approvals](https://docs.launchdarkly.com/home/releases/approvals).\n\nChanges that conflict will fail if approved and applied, and the flag will not be updated.\n\nSeveral of the endpoints in the approvals API require a flag approval request ID. The flag approval request ID is returned as part of the [Create approval request](/tag/Approvals#operation/postApprovalRequest) and [List approval requests for a flag](/tag/Approvals#operation/getApprovalsForFlag) responses. It is the `_id` field, or the `_id` field of each element in the `items` array. If you created the approval request as part of a [workflow](/tag/Workflows), you can also use a workflow ID as the approval request ID. The workflow ID is returned as part of the [Create workflow](/tag/Workflows#operation/postWorkflow) and [Get workflows](/tag/Workflows#operation/getWorkflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n" }, + { + "name": "Approvals (beta)", + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n" + }, { "name": "Audit log", - "description": "The audit log contains a record of all the changes made to any resource in the system. You can filter the audit log by timestamps, or use a custom policy to select which entries to receive.\n\nSeveral of the endpoints in the audit log API require an audit log entry ID. The audit log entry ID is returned as part of the [List audit log entries](/tag/Audit-log#operation/getAuditLogEntries) response. It is the `_id` field of each element in the `items` array.\n\nTo learn more, read [The audit log and history tabs](https://docs.launchdarkly.com/home/observability/audit-log-history).\n" + "description": "LaunchDarkly maintains a record of all the changes made to any resource in the system. You can access this history using the audit log API, including filtering by timestamps, or using a custom policy to select which entries to receive.\n\nSeveral of the endpoints in the audit log API require an audit log entry ID. The audit log entry ID is returned as part of the [List audit log entries](/tag/Audit-log#operation/getAuditLogEntries) response. It is the `_id` field of each element in the `items` array.\n\nIn the LaunchDarkly UI, this information appears on the **Change history** page. To learn more, read [Change history](https://docs.launchdarkly.com/home/observability/change-history).\n" }, { "name": "Code references", "description": "> ### Code references is an Enterprise feature\n>\n> Code references 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/).\n\n> ### Use ld-find-code-refs\n>\n> LaunchDarkly provides the [ld-find-code-refs utility](https://github.com/launchdarkly/ld-find-code-refs) that creates repository connections, generates code reference data, and creates calls to the code references API. Most customers do not need to call this API directly.\n\nThe code references API provides access to all resources related to each connected repository, and associated feature flag code reference data for all branches. To learn more, read [Code references](https://docs.launchdarkly.com/home/observability/code-references).\n" }, - { - "name": "Contexts", - "description": "\nContexts are people, services, machines, or other resources that encounter feature flags in your product. Contexts are identified by their `kind`, which describes the type of resources encountering flags, and by their `key`. Each unique combination of one or more contexts that have encountered a feature flag in your product is called a context instance.\n\nWhen you use the LaunchDarkly SDK to evaluate a flag, you provide a context to that call. LaunchDarkly records the key and attributes of each context instance. You can view these in the LaunchDarkly user interface from the **Contexts** list, or use the Context APIs. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nLaunchDarkly provides APIs for you to:\n\n* retrieve contexts, context instances, and context attribute names and values\n* search for contexts or context instances\n* delete context instances\n* fetch context kinds\n* create and update context kinds\n\nTo learn more about context kinds, read [Context kinds](https://docs.launchdarkly.com/home/observability/context-kinds).\n\nContexts are always scoped within a project and an environment. Each environment has its own set of context instance records.\n\nSeveral of the endpoints in the contexts API require a context instance ID or application ID. Both of these IDs are returned as part of the [Search for context instances](/tag/Contexts#operation/searchContextInstances) response. The context instance ID is the `id` field of each element in the `items` array. The application ID is the `applicationId` field of each element in the `items` array. By default, the application ID is set to the SDK you are using. In the LaunchDarkly UI, the application ID and application version appear on the context details page in the \"From source\" field. You can change the application ID as part of your SDK configuration. To learn more, read [Application metadata configuration](https://docs.launchdarkly.com/sdk/features/app-config).\n\n### Filtering contexts and context instances\n\nWhen you [search for contexts](/tag/Contexts#operation/searchContexts) or [context instances](/tag/Contexts#operation/searchContextInstances), you can filter on certain fields using the `filter` parameter either as a query parameter or as a request body parameter.\n\nThe `filter` parameter supports the following operators: `after`, `anyOf`, `before`, `contains`, `equals`, `exists`, `notEquals`, `startsWith`.\n\n
\nExpand for details on operators and syntax\n\n#### after\n\nReturns contexts or context instances if any of the values in a field, which should be dates, are after the provided time. For example:\n\n* `myField after \"2022-09-21T19:03:15+00:00\"`\n\n#### anyOf\n\nReturns contexts or context instances if any of the values in a field match any of the values in the match value. For example:\n\n* `myField anyOf [44]`\n* `myField anyOf [\"phone\",\"tablet\"]`\n* `myField anyOf [true]\"`\n\n#### before\n\nReturns contexts or context instances if any of the values in a field, which should be dates, are before the provided time. For example:\n\n* `myField before \"2022-09-21T19:03:15+00:00\"`\n\n#### contains\n\nReturns contexts or context instances if all the match values are found in the list of values in this field. For example:\n\n* `myListField contains 44`\n* `myListField contains [\"phone\",\"tablet\"]`\n* `myListField contains true`\n\n#### equals\n\nReturns contexts or context instances if there is an exact match on the entire field. For example:\n\n* `myField equals 44`\n* `myField equals \"device\"`\n* `myField equals true`\n* `myField equals [1,2,3,4]`\n* `myField equals [\"hello\",\"goodbye\"]`\n\n#### exists\n\nReturns contexts or context instances if the field matches the specified existence. For example:\n\n* `myField exists true`\n* `myField exists false`\n* `*.name exists true`\n\n#### notEquals\n\nReturns contexts or context instances if there is not an exact match on the entire field. For example:\n\n* `myField notEquals 44`\n* `myField notEquals \"device\"`\n* `myField notEquals true`\n* `myField notEquals [1,2,3,4]`\n* `myField notEquals [\"hello\",\"goodbye\"]`\n\n#### startsWith\n\nReturns contexts or context instances if the value in a field, which should be a singular string, begins with the provided substring. For example:\n\n* `myField startsWith \"do\"`\n\n
\n\nYou can also combine filters in the following ways:\n\n* Use a comma (`,`) as an AND operator\n* Use a vertical bar (`|`) as an OR operator\n* Use parentheses `()` to group filters\n\nFor example:\n\n* `myField notEquals 0, myField notEquals 1` returns contexts or context instances where `myField` is not 0 and is not 1\n* `myFirstField equals \"device\",(mySecondField equals \"iPhone\"|mySecondField equals \"iPad\")` returns contexts or context instances where `myFirstField` is equal to \"device\" and `mySecondField` is equal to either \"iPhone\" or \"iPad\"\n\n#### Supported fields and operators\n\nYou can only filter certain fields in contexts and context instances when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for [contexts]((/tag/Contexts#operation/searchContexts)), the `filter` parameter supports the following fields and operators:\n\n|
Field
|Description |Supported operators |\n|---|---|---|\n|`applicationId` |An identifier representing the application where the LaunchDarkly SDK is running. |`equals`, `notEquals`, `anyOf` |\n|`id` |Unique identifier for the context. |`equals`, `notEquals`, `anyOf` |\n|`key` |The context key. |`equals`, `notEquals`, `anyOf`, `startsWith` |\n|`kind` |The context kind. |`equals`, `notEquals`, `anyOf` |\n|`kinds` |A list of all kinds found in the context. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n|`kindKey` |The kind and key for the context. They are joined with `:`, for example, `user:user-key-abc123`. |`equals`, `notEquals`, `anyOf` |\n|`kindKeys` |A list of all kinds and keys found in the context. The kind and key are joined with `:`, for example, `user:user-key-abc123`. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n|`q` |A \"fuzzy\" search across context attribute values and the context key. Supply a string or list of strings to the operator. |`equals` |\n|`name` |The name for the context. |`equals`, `notEquals`, `exists`, `anyOf`, `startsWith` |\n|`.` |A kind and the name of any attribute that appears in a context of that kind, for example, `user.email`. To filter all kinds, use `*` in place of the kind, for example, `*.email`. You can use either a literal attribute name or a JSON path to specify the attribute. If you use a JSON path, then you must escape the `/` character, using `~1`, and the `~` character, using `~0`. For example, use `user.job/title` or `user./job~1title` to filter the `/job/title` field in a user context kind. If the field or value includes whitespace, it should be enclosed in double quotes. |`equals`, `notEquals`, `exists`, `startsWith`, `before`, `after`.|\n\nWhen searching for [context instances](/tag/Contexts#operation/searchContextInstances), the `filter` parameter supports the following fields and operators\n\n|
Field
|Description |Supported operators |\n|---|---|---|\n|`applicationId` |An identifier representing the application where the LaunchDarkly SDK is running. |`equals`, `notEquals`, `anyOf` |\n|`id` |Unique identifier for the context instance. |`equals`, `notEquals`, `anyOf` |\n|`kinds` |A list of all kinds found in the context instance. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n|`kindKeys` |A list of all kinds and keys found in the context instance. The kind and key are joined with `:`, for example, `user:user-key-abc123`. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n" - }, { "name": "Context settings", "description": "You can use the context settings API to assign a context to a specific variation for any feature flag. To learn more, read [View and manage contexts](https://docs.launchdarkly.com/home/observability/context-attributes#view-and-manage-contexts).\n" }, + { + "name": "Contexts", + "description": "\nContexts are people, services, machines, or other resources that encounter feature flags in your product. Contexts are identified by their `kind`, which describes the type of resources encountering flags, and by their `key`. Each unique combination of one or more contexts that have encountered a feature flag in your product is called a context instance.\n\nWhen you use the LaunchDarkly SDK to evaluate a flag, you provide a context to that call. LaunchDarkly records the key and attributes of each context instance. You can view these in the LaunchDarkly user interface from the **Contexts** list, or use the Context APIs. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nLaunchDarkly provides APIs for you to:\n\n* retrieve contexts, context instances, and context attribute names and values\n* search for contexts or context instances\n* delete context instances\n* fetch context kinds\n* create and update context kinds\n\nTo learn more about context kinds, read [Context kinds](https://docs.launchdarkly.com/home/observability/context-kinds).\n\nContexts are always scoped within a project and an environment. Each environment has its own set of context instance records.\n\nSeveral of the endpoints in the contexts API require a context instance ID or application ID. Both of these IDs are returned as part of the [Search for context instances](/tag/Contexts#operation/searchContextInstances) response. The context instance ID is the `id` field of each element in the `items` array. The application ID is the `applicationId` field of each element in the `items` array. By default, the application ID is set to the SDK you are using. In the LaunchDarkly UI, the application ID and application version appear on the context details page in the \"From source\" field. You can change the application ID as part of your SDK configuration. To learn more, read [Application metadata configuration](https://docs.launchdarkly.com/sdk/features/app-config).\n\n### Filtering contexts and context instances\n\nWhen you [search for contexts](/tag/Contexts#operation/searchContexts) or [context instances](/tag/Contexts#operation/searchContextInstances), you can filter on certain fields using the `filter` parameter either as a query parameter or as a request body parameter.\n\nThe `filter` parameter supports the following operators: `after`, `anyOf`, `before`, `contains`, `equals`, `exists`, `notEquals`, `startsWith`.\n\n
\nExpand for details on operators and syntax\n\n#### after\n\nReturns contexts or context instances if any of the values in a field, which should be dates, are after the provided time. For example:\n\n* `myField after \"2022-09-21T19:03:15+00:00\"`\n\n#### anyOf\n\nReturns contexts or context instances if any of the values in a field match any of the values in the match value. For example:\n\n* `myField anyOf [44]`\n* `myField anyOf [\"phone\",\"tablet\"]`\n* `myField anyOf [true]\"`\n\n#### before\n\nReturns contexts or context instances if any of the values in a field, which should be dates, are before the provided time. For example:\n\n* `myField before \"2022-09-21T19:03:15+00:00\"`\n\n#### contains\n\nReturns contexts or context instances if all the match values are found in the list of values in this field. For example:\n\n* `myListField contains 44`\n* `myListField contains [\"phone\",\"tablet\"]`\n* `myListField contains true`\n\n#### equals\n\nReturns contexts or context instances if there is an exact match on the entire field. For example:\n\n* `myField equals 44`\n* `myField equals \"device\"`\n* `myField equals true`\n* `myField equals [1,2,3,4]`\n* `myField equals [\"hello\",\"goodbye\"]`\n\n#### exists\n\nReturns contexts or context instances if the field matches the specified existence. For example:\n\n* `myField exists true`\n* `myField exists false`\n* `*.name exists true`\n\n#### notEquals\n\nReturns contexts or context instances if there is not an exact match on the entire field. For example:\n\n* `myField notEquals 44`\n* `myField notEquals \"device\"`\n* `myField notEquals true`\n* `myField notEquals [1,2,3,4]`\n* `myField notEquals [\"hello\",\"goodbye\"]`\n\n#### startsWith\n\nReturns contexts or context instances if the value in a field, which should be a singular string, begins with the provided substring. For example:\n\n* `myField startsWith \"do\"`\n\n
\n\nYou can also combine filters in the following ways:\n\n* Use a comma (`,`) as an AND operator\n* Use a vertical bar (`|`) as an OR operator\n* Use parentheses `()` to group filters\n\nFor example:\n\n* `myField notEquals 0, myField notEquals 1` returns contexts or context instances where `myField` is not 0 and is not 1\n* `myFirstField equals \"device\",(mySecondField equals \"iPhone\"|mySecondField equals \"iPad\")` returns contexts or context instances where `myFirstField` is equal to \"device\" and `mySecondField` is equal to either \"iPhone\" or \"iPad\"\n\n#### Supported fields and operators\n\nYou can only filter certain fields in contexts and context instances when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for [contexts](/tag/Contexts#operation/searchContexts), the `filter` parameter supports the following fields and operators:\n\n|
Field
|Description |Supported operators |\n|---|---|---|\n|`applicationId` |An identifier representing the application where the LaunchDarkly SDK is running. |`equals`, `notEquals`, `anyOf` |\n|`id` |Unique identifier for the context. |`equals`, `notEquals`, `anyOf` |\n|`key` |The context key. |`equals`, `notEquals`, `anyOf`, `startsWith` |\n|`kind` |The context kind. |`equals`, `notEquals`, `anyOf` |\n|`kinds` |A list of all kinds found in the context. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n|`kindKey` |The kind and key for the context. They are joined with `:`, for example, `user:user-key-abc123`. |`equals`, `notEquals`, `anyOf` |\n|`kindKeys` |A list of all kinds and keys found in the context. The kind and key are joined with `:`, for example, `user:user-key-abc123`. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n|`q` |A \"fuzzy\" search across context attribute values and the context key. Supply a string or list of strings to the operator. |`equals` |\n|`name` |The name for the context. |`equals`, `notEquals`, `exists`, `anyOf`, `startsWith` |\n|`
.` |A kind and the name of any attribute that appears in a context of that kind, for example, `user.email`. To filter all kinds, use `*` in place of the kind, for example, `*.email`. You can use either a literal attribute name or a JSON path to specify the attribute. If you use a JSON path, then you must escape the `/` character, using `~1`, and the `~` character, using `~0`. For example, use `user.job/title` or `user./job~1title` to filter the `/job/title` field in a user context kind. If the field or value includes whitespace, it should be enclosed in double quotes. |`equals`, `notEquals`, `exists`, `startsWith`, `before`, `after`.|\n\nWhen searching for [context instances](/tag/Contexts#operation/searchContextInstances), the `filter` parameter supports the following fields and operators\n\n|
Field
|Description |Supported operators |\n|---|---|---|\n|`applicationId` |An identifier representing the application where the LaunchDarkly SDK is running. |`equals`, `notEquals`, `anyOf` |\n|`id` |Unique identifier for the context instance. |`equals`, `notEquals`, `anyOf` |\n|`kinds` |A list of all kinds found in the context instance. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n|`kindKeys` |A list of all kinds and keys found in the context instance. The kind and key are joined with `:`, for example, `user:user-key-abc123`. Supply a list of strings to the operator. |`equals`, `anyOf`, `contains` |\n" + }, { "name": "Custom roles", "description": "> ### Custom roles is an Enterprise feature\n>\n> Custom roles 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/).\n\nCustom roles allow you to 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.\n\nThe custom roles API allows you to create, update and delete custom roles. You can also use the API to list all of your custom roles or get a custom role by ID.\n\nFor more information about custom roles and the syntax for custom role policies, read the product documentation for [Custom roles](https://docs.launchdarkly.com/home/account/custom-roles).\n" }, { "name": "Data Export destinations", - "description": "> ### Data Export is an add-on feature\n>\n> Data Export is available as an add-on for 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/).\n\nData Export provides a real-time export of raw analytics data, including feature flag requests, analytics events, custom events, and more.\n\nData Export destinations are locations that receive exported data. The Data Export destinations API allows you to configure destinations so that your data can be exported.\n\nSeveral of the endpoints in the Data Export destinations API require a Data Export destination ID. The Data Export destination ID is returned as part of the [Create a Data Export destination](/tag/Data-Export-destinations#operation/postDestination) and [List destinations](/tag/Data-Export-destinations#operation/getDestinations) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n\nTo learn more, read [Data Export](https://docs.launchdarkly.com/integrations/data-export).\n" + "description": "> ### Data Export is an add-on feature\n>\n> Data Export is available as an add-on for customers on a Foundation or Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nData Export provides a real-time export of raw analytics data, including feature flag requests, analytics events, custom events, and more.\n\nData Export destinations are locations that receive exported data. The Data Export destinations API allows you to configure destinations so that your data can be exported.\n\nSeveral of the endpoints in the Data Export destinations API require a Data Export destination ID. The Data Export destination ID is returned as part of the [Create a Data Export destination](/tag/Data-Export-destinations#operation/postDestination) and [List destinations](/tag/Data-Export-destinations#operation/getDestinations) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n\nTo learn more, read [Data Export](https://docs.launchdarkly.com/integrations/data-export).\n" }, { "name": "Environments", - "description": "Environments allow you to maintain separate rollout rules in different contexts, from local development to QA, staging, and production. With the LaunchDarkly Environments API, you can programmatically create, delete, and update environments. To learn more, read [Environments](https://docs.launchdarkly.com/home/account/environment).\n" + "description": "Environments allow you to maintain separate rollout rules in different contexts, from local development to QA, staging, and production. With the LaunchDarkly Environments API, you can programmatically list, create, and manage environments. To learn more, read [Environments](https://docs.launchdarkly.com/home/account/environment).\n" }, { - "name": "Experiments (beta)", - "description": "> ### Available for Pro and Enterprise plans\n>\n> Experimentation is available to customers on a Pro or Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To add Experimentation to your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\n\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nExperimentation lets you validate the impact of features you roll out to your app or infrastructure. You can measure things like page views, clicks, load time, infrastructure costs, and more. By connecting metrics you create to flags in your LaunchDarkly environment, you can measure the changes in your customers' behavior based on what flags they evaluate. You can run experiments with any type of flag, including boolean, string, number, and JSON flags. To learn more, read [Experimentation](https://docs.launchdarkly.com/home/experimentation).\n\nYou can manage experiments by using the dedicated experiment endpoints described below.\n\nSeveral of the endpoints require a treatment ID or a flag rule ID. Treatment IDs are returned as part of the [Get experiment results](/tag/Experiments-(beta)#operation/getExperimentResults) response. They are the `treatmentId` of each element in the `treatmentResults` array. Winning treatment IDs are also returned as part of the [Get experiment](/tag/Experiments-(beta)#operation/getExperiment) response. They are the `winningTreatmentId` in the `currentIteration`, the `winningTreatmentId` in the `draftIteration`, and the `winningTreatmentId` in each element of the `previousIterations` array. In the flags object, the rule ID is the ID of the variation or rollout of the flag. Each flag variation ID is returned as part of the [Get feature flag](/tag/Experiments-(beta)#operation/getFeatureFlag) response. It is the `_id` field in each element of the `variations` array.\n" + "name": "Experiments", + "description": "> ### Available for subscription customers\n>\n> Experimentation is available to all customers on a Developer, Foundation, or Enterprise subscription. If you're on an older Pro or Enterprise plan, Experimentation is available as an add-on. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To change your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\n\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nExperimentation lets you validate the impact of features you roll out to your app or infrastructure. You can measure things like page views, clicks, load time, infrastructure costs, and more. By connecting metrics you create to flags in your LaunchDarkly environment, you can measure the changes in your customers' behavior based on what flags they evaluate. You can run experiments with any type of flag, including boolean, string, number, and JSON flags. To learn more, read [Experimentation](https://docs.launchdarkly.com/home/experimentation).\n\nYou can manage experiments by using the dedicated experiment endpoints described below.\n\nSeveral of the endpoints require a treatment ID or a flag rule ID. Treatment IDs are returned as part of the [Get experiment results](/tag/Experiments-(beta)#operation/getExperimentResults) response. They are the `treatmentId` of each element in the `treatmentResults` array. Winning treatment IDs are also returned as part of the [Get experiment](/tag/Experiments-(beta)#operation/getExperiment) response. They are the `winningTreatmentId` in the `currentIteration`, the `winningTreatmentId` in the `draftIteration`, and the `winningTreatmentId` in each element of the `previousIterations` array. In the flags object, the rule ID is the ID of the variation or rollout of the flag. Each flag variation ID is returned as part of the [Get feature flag](/tag/Experiments-(beta)#operation/getFeatureFlag) response. It is the `_id` field in each element of the `variations` array.\n" }, { "name": "Feature flags", - "description": "The feature flags API allows you to list, create, modify, and delete feature flags, their statuses, and their expiring targets programmatically. For example, you can control percentage rollouts, target specific contexts, or even toggle off a feature flag programmatically.\n\n## Sample feature flag representation\n\nEvery feature flag has a set of top-level attributes, as well as an `environments` map containing the flag rollout and targeting rules specific to each environment. To learn more, read [Using feature flags](https://docs.launchdarkly.com/home/flags/create).\n\n
\nClick to expand an example of a complete feature flag representation\n\n```json\n{\n \"name\": \"Alternate product page\",\n \"kind\": \"boolean\",\n \"description\": \"This is a description\",\n \"key\": \"alternate.page\",\n \"_version\": 2,\n \"creationDate\": 1418684722483,\n \"includeInSnippet\": true,\n \"clientSideAvailability\" {\n \"usingMobileKey\": false,\n \"usingEnvironmentId\": true,\n },\n \"variations\": [\n {\n \"value\": true,\n \"name\": \"true\",\n \"_id\": \"86208e6e-468f-4425-b334-7f318397f95c\"\n },\n {\n \"value\": false,\n \"name\": \"false\",\n \"_id\": \"7b32de80-f346-4276-bb77-28dfa7ddc2d8\"\n }\n ],\n \"variationJsonSchema\": null,\n \"defaults\": {\n \"onVariation\": 0,\n \"offVariation\": 1\n },\n \"temporary\": false,\n \"tags\": [\"ops\", \"experiments\"],\n \"_links\": {\n \"parent\": {\n \"href\": \"/api/v2/flags/default\",\n \"type\": \"application/json\"\n },\n \"self\": {\n \"href\": \"/api/v2/flags/default/alternate.page\",\n \"type\": \"application/json\"\n }\n },\n \"maintainerId\": \"548f6741c1efad40031b18ae\",\n \"_maintainer\": {\n \"_links\": {\n \"self\": {\n \"href\": \"/api/v2/members/548f6741c1efad40031b18ae\",\n \"type\": \"application/json\"\n }\n },\n \"_id\": \"548f6741c1efad40031b18ae\",\n \"firstName\": \"Ariel\",\n \"lastName\": \"Flores\",\n \"role\": \"reader\",\n \"email\": \"ariel@acme.com\"\n },\n \"goalIds\": [],\n \"experiments\": {\n \"baselineIdx\": 0,\n \"items\": []\n },\n \"environments\": {\n \"production\": {\n \"on\": true,\n \"archived\": false,\n \"salt\": \"YWx0ZXJuYXRlLnBhZ2U=\",\n \"sel\": \"45501b9314dc4641841af774cb038b96\",\n \"lastModified\": 1469326565348,\n \"version\": 61,\n \"targets\": [{\n \"values\": [\"user-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"user\"\n }],\n \"contextTargets\": [{\n \"values\": [],\n \"variation\": 0,\n \"contextKind\": \"user\"\n }, {\n \"values\": [\"org-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"organization\"\n }],\n \"rules\": [\n {\n \"_id\": \"f3ea72d0-e473-4e8b-b942-565b790ffe18\",\n \"variation\": 0,\n \"clauses\": [\n {\n \"_id\": \"6b81968e-3744-4416-9d64-74547eb0a7d1\",\n \"attribute\": \"groups\",\n \"op\": \"in\",\n \"values\": [\"Top Customers\"],\n \"contextKind\": \"user\",\n \"negate\": false\n },\n {\n \"_id\": \"9d60165d-82b8-4b9a-9136-f23407ba1718\",\n \"attribute\": \"email\",\n \"op\": \"endsWith\",\n \"values\": [\"gmail.com\"],\n \"contextKind\": \"user\",\n \"negate\": false\n }\n ],\n \"trackEvents\": false,\n \"ref\": \"73257308-472b-4d9c-a556-10aa7adbf857\"\n }\n ],\n \"fallthrough\": {\n \"rollout\": {\n \"variations\": [\n {\n \"variation\": 0,\n \"weight\": 60000\n },\n {\n \"variation\": 1,\n \"weight\": 40000\n }\n ],\n \"contextKind\": \"user\"\n }\n },\n \"offVariation\": 1,\n \"prerequisites\": [],\n \"_site\": {\n \"href\": \"/default/production/features/alternate.page\",\n \"type\": \"text/html\"\n },\n \"_environmentName\": \"Production\",\n \"trackEvents\": false,\n \"trackEventsFallthrough\": false,\n \"_summary\": {\n \"variations\": {\n \"0\": {\n \"rules\": 1,\n \"nullRules\": 0,\n \"targets\": 2,\n \"rollout\": 60000\n },\n \"1\": {\n \"rules\": 0,\n \"nullRules\": 0,\n \"targets\": 0,\n \"isOff\": true,\n \"rollout\": 40000\n }\n },\n \"prerequisites\": 0\n }\n }\n}\n```\n\n
\n\n## Anatomy of a feature flag\n\nThis section describes the sample feature flag representation in more detail.\n\n### Top-level attributes\n\nMost of the top-level attributes have a straightforward interpretation, for example `name` and `description`.\n\nThe `variations` array represents the different variation values that a feature flag has. For a boolean flag, there are two variations: `true` and `false`. Multivariate flags have more variation values, and those values could be any JSON type: numbers, strings, objects, or arrays. In targeting rules, the variations are referred to by their index into this array.\n\nTo update these attributes, read [Update feature flag](#operation/patchFeatureFlag), especially the instructions for **updating flag settings**.\n\n### Per-environment configurations\n\nEach entry in the `environments` map contains a JSON object that represents the environment-specific flag configuration data available in the flag's Targeting tab. To learn more, read [Targeting with flags](https://docs.launchdarkly.com/home/flags/target).\n\nTo update per-environment information for a flag, read [Update feature flag](#operation/patchFeatureFlag), especially the instructions for **turning flags on and off** and **working with targeting and variations**.\n\n### Individual context targets\n\nThe `targets` and `contextTargets` arrays in the per-environment configuration data correspond to the individual context targeting on the Targeting tab. To learn more, read [Individual targeting](https://docs.launchdarkly.com/home/flags/individual-targeting).\n\nEach object in the `targets` and `contextTargets` arrays represents a list of context keys assigned to a particular variation. The `targets` array includes contexts with `contextKind` of \"user\" and the `contextTargets` array includes contexts with context kinds other than \"user.\"\n\nFor example:\n\n```json\n{\n ...\n \"environments\" : {\n \"production\" : {\n ...\n \"targets\": [\n {\n \"values\": [\"user-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"user\"\n }\n ],\n \"contextTargets\": [\n {\n \"values\": [\"org-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"organization\"\n }\n ]\n }\n }\n}\n```\n\nThe `targets` array means that any user context instance with the key `user-key-123abc` receives the first variation listed in the `variations` array. The `contextTargets` array means that any organization context with the key `org-key-123abc` receives the first variation listed in the `variations` array. Recall that the variations are stored at the top level of the flag JSON in an array, and the per-environment configuration rules point to indexes into this array. If this is a boolean flag, both contexts are receiving the `true` variation.\n\n### Targeting rules\n\nThe `rules` array corresponds to the rules section of the Targeting tab. This is where you can express complex rules on attributes with conditions and operators. For example, you might create a rule that specifies \"roll out the `true` variation to 80% of contexts whose email address ends with `gmail.com`\". To learn more, read [Targeting rules](https://docs.launchdarkly.com/home/flags/targeting-rules).\n\n### The fallthrough rule\n\nThe `fallthrough` object is a special rule that contains no conditions. It is the rollout strategy that is applied when none of the individual or custom targeting rules match. In the LaunchDarkly UI, it is called the \"Default rule.\"\n\n### The off variation\n\nThe off variation represents the variation to serve if the feature flag targeting is turned off, meaning the `on` attribute is `false`. For boolean flags, this is usually `false`. For multivariate flags, set the off variation to whatever variation represents the control or baseline behavior for your application. If you don't set the off variation, LaunchDarkly will serve the fallback value defined in your code.\n\n### Percentage rollouts\n\nWhen you work with targeting rules and with the default rule, you can specify either a single variation or a percentage rollout. The `weight` attribute defines the percentage rollout for each variation. Weights range from 0 (a 0% rollout) to 100000 (a 100% rollout). The weights are scaled by a factor of 1000 so that fractions of a percent can be represented without using floating-point. For example, a weight of `60000` means that 60% of contexts will receive that variation. The sum of weights across all variations should be 100%.\n" + "description": "The feature flags API allows you to list, create, and modify feature flags and their targeting. For example, you can control percentage rollouts, target specific contexts, or even toggle off a feature flag programmatically.\n\n## Sample feature flag representation\n\nEvery feature flag has a set of top-level attributes, as well as an `environments` map containing the flag rollout and targeting rules specific to each environment. To learn more, read [Using feature flags](https://docs.launchdarkly.com/home/flags/create).\n\n
\nClick to expand an example of a complete feature flag representation\n\n```json\n{\n \"name\": \"Alternate product page\",\n \"kind\": \"boolean\",\n \"description\": \"This is a description\",\n \"key\": \"alternate.page\",\n \"_version\": 2,\n \"creationDate\": 1418684722483,\n \"includeInSnippet\": true,\n \"clientSideAvailability\" {\n \"usingMobileKey\": false,\n \"usingEnvironmentId\": true,\n },\n \"variations\": [\n {\n \"value\": true,\n \"name\": \"true\",\n \"_id\": \"86208e6e-468f-4425-b334-7f318397f95c\"\n },\n {\n \"value\": false,\n \"name\": \"false\",\n \"_id\": \"7b32de80-f346-4276-bb77-28dfa7ddc2d8\"\n }\n ],\n \"variationJsonSchema\": null,\n \"defaults\": {\n \"onVariation\": 0,\n \"offVariation\": 1\n },\n \"temporary\": false,\n \"tags\": [\"ops\", \"experiments\"],\n \"_links\": {\n \"parent\": {\n \"href\": \"/api/v2/flags/default\",\n \"type\": \"application/json\"\n },\n \"self\": {\n \"href\": \"/api/v2/flags/default/alternate.page\",\n \"type\": \"application/json\"\n }\n },\n \"maintainerId\": \"548f6741c1efad40031b18ae\",\n \"_maintainer\": {\n \"_links\": {\n \"self\": {\n \"href\": \"/api/v2/members/548f6741c1efad40031b18ae\",\n \"type\": \"application/json\"\n }\n },\n \"_id\": \"548f6741c1efad40031b18ae\",\n \"firstName\": \"Ariel\",\n \"lastName\": \"Flores\",\n \"role\": \"reader\",\n \"email\": \"ariel@acme.com\"\n },\n \"goalIds\": [],\n \"experiments\": {\n \"baselineIdx\": 0,\n \"items\": []\n },\n \"environments\": {\n \"production\": {\n \"on\": true,\n \"archived\": false,\n \"salt\": \"YWx0ZXJuYXRlLnBhZ2U=\",\n \"sel\": \"45501b9314dc4641841af774cb038b96\",\n \"lastModified\": 1469326565348,\n \"version\": 61,\n \"targets\": [{\n \"values\": [\"user-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"user\"\n }],\n \"contextTargets\": [{\n \"values\": [],\n \"variation\": 0,\n \"contextKind\": \"user\"\n }, {\n \"values\": [\"org-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"organization\"\n }],\n \"rules\": [\n {\n \"_id\": \"f3ea72d0-e473-4e8b-b942-565b790ffe18\",\n \"variation\": 0,\n \"clauses\": [\n {\n \"_id\": \"6b81968e-3744-4416-9d64-74547eb0a7d1\",\n \"attribute\": \"groups\",\n \"op\": \"in\",\n \"values\": [\"Top Customers\"],\n \"contextKind\": \"user\",\n \"negate\": false\n },\n {\n \"_id\": \"9d60165d-82b8-4b9a-9136-f23407ba1718\",\n \"attribute\": \"email\",\n \"op\": \"endsWith\",\n \"values\": [\"gmail.com\"],\n \"contextKind\": \"user\",\n \"negate\": false\n }\n ],\n \"trackEvents\": false,\n \"ref\": \"73257308-472b-4d9c-a556-10aa7adbf857\"\n }\n ],\n \"fallthrough\": {\n \"rollout\": {\n \"variations\": [\n {\n \"variation\": 0,\n \"weight\": 60000\n },\n {\n \"variation\": 1,\n \"weight\": 40000\n }\n ],\n \"contextKind\": \"user\"\n }\n },\n \"offVariation\": 1,\n \"prerequisites\": [],\n \"_site\": {\n \"href\": \"/default/production/features/alternate.page\",\n \"type\": \"text/html\"\n },\n \"_environmentName\": \"Production\",\n \"trackEvents\": false,\n \"trackEventsFallthrough\": false,\n \"_summary\": {\n \"variations\": {\n \"0\": {\n \"rules\": 1,\n \"nullRules\": 0,\n \"targets\": 2,\n \"rollout\": 60000\n },\n \"1\": {\n \"rules\": 0,\n \"nullRules\": 0,\n \"targets\": 0,\n \"isOff\": true,\n \"rollout\": 40000\n }\n },\n \"prerequisites\": 0\n }\n }\n}\n```\n\n
\n\n## Anatomy of a feature flag\n\nThis section describes the sample feature flag representation in more detail.\n\n### Top-level attributes\n\nMost of the top-level attributes have a straightforward interpretation, for example `name` and `description`.\n\nThe `variations` array represents the different variation values that a feature flag has. For a boolean flag, there are two variations: `true` and `false`. Multivariate flags have more variation values, and those values could be any JSON type: numbers, strings, objects, or arrays. In targeting rules, the variations are referred to by their index into this array.\n\nTo update these attributes, read [Update feature flag](#operation/patchFeatureFlag), especially the instructions for **updating flag settings**.\n\n### Per-environment configurations\n\nEach entry in the `environments` map contains a JSON object that represents the environment-specific flag configuration data available in the flag's targeting page. To learn more, read [Targeting with flags](https://docs.launchdarkly.com/home/flags/target).\n\nTo update per-environment information for a flag, read [Update feature flag](#operation/patchFeatureFlag), especially the instructions for **turning flags on and off** and **working with targeting and variations**.\n\n### Individual context targets\n\nThe `targets` and `contextTargets` arrays in the per-environment configuration data correspond to the individual context targeting on the flag's targeting page. To learn more, read [Individual targeting](https://docs.launchdarkly.com/home/flags/individual-targeting).\n\nEach object in the `targets` and `contextTargets` arrays represents a list of context keys assigned to a particular variation. The `targets` array includes contexts with `contextKind` of \"user\" and the `contextTargets` array includes contexts with context kinds other than \"user.\"\n\nFor example:\n\n```json\n{\n ...\n \"environments\" : {\n \"production\" : {\n ...\n \"targets\": [\n {\n \"values\": [\"user-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"user\"\n }\n ],\n \"contextTargets\": [\n {\n \"values\": [\"org-key-123abc\"],\n \"variation\": 0,\n \"contextKind\": \"organization\"\n }\n ]\n }\n }\n}\n```\n\nThe `targets` array means that any user context instance with the key `user-key-123abc` receives the first variation listed in the `variations` array. The `contextTargets` array means that any organization context with the key `org-key-123abc` receives the first variation listed in the `variations` array. Recall that the variations are stored at the top level of the flag JSON in an array, and the per-environment configuration rules point to indexes into this array. If this is a boolean flag, both contexts are receiving the `true` variation.\n\n### Targeting rules\n\nThe `rules` array corresponds to the rules section of the flag's targeting page. This is where you can express complex rules on attributes with conditions and operators. For example, you might create a rule that specifies \"roll out the `true` variation to 80% of contexts whose email address ends with `gmail.com`\". To learn more, read [Targeting rules](https://docs.launchdarkly.com/home/flags/targeting-rules).\n\n### The fallthrough rule\n\nThe `fallthrough` object is a special rule that contains no conditions. It is the rollout strategy that is applied when none of the individual or custom targeting rules match. In the LaunchDarkly UI, it is called the \"Default rule.\"\n\n### The off variation\n\nThe off variation represents the variation to serve if the feature flag targeting is turned off, meaning the `on` attribute is `false`. For boolean flags, this is usually `false`. For multivariate flags, set the off variation to whatever variation represents the control or baseline behavior for your application. If you don't set the off variation, LaunchDarkly will serve the fallback value defined in your code.\n\n### Percentage rollouts\n\nWhen you work with targeting rules and with the default rule, you can specify either a single variation or a percentage rollout. The `weight` attribute defines the percentage rollout for each variation. Weights range from 0 (a 0% rollout) to 100000 (a 100% rollout). The weights are scaled by a factor of 1000 so that fractions of a percent can be represented without using floating-point. For example, a weight of `60000` means that 60% of contexts will receive that variation. The sum of weights across all variations should be 100%.\n" }, { "name": "Feature flags (beta)", "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n" }, + { + "name": "Flag import configurations (beta)", + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nFlag import configurations allow you to import feature flags from another feature management system.\n\nUse the flag import configuration endpoints to create, delete, and manage flag import configurations. You can import flags from other feature management tools into LaunchDarkly. For example, you can import flags from Split.io.\n\nSeveral of the endpoints in the flag import configuration API require an integration ID. The integration ID is returned as part of the [Create a flag import configuration](/tag/Flag-import-configurations-(beta)#operation/createFlagImportConfiguration) response, in the `_id` field. It is also returned as part of the [List all flag import configurations](/tag/Flag-import-configurations-(beta)#operation/getFlagImportConfigurations) response, in the `_id` field of each element in the `items` array.\n\nTo learn more about flag import configurations, read [Import flags](https://docs.launchdarkly.com/home/flags/import).\n" + }, { "name": "Flag links (beta)", "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nFlag links let you view external mentions of flags from other tools and services. Links to external conversations and references to your flags allow you to collaborate more easily and quickly review relevant flag contexts. To learn more, read [Flag links](https://docs.launchdarkly.com/home/flags/links).\n\nYou can create custom flag links by associating an external URL with a feature flag. After you create a flag link, it applies across all your environments. You should use caution when you delete a flag link, because it will be deleted from all your environments.\n\nWith the flag links API, you can view, create, update, and delete links to flags.\n\nSeveral of the endpoints in the flag links API require a flag link ID. The flag link ID is returned as part of the [Create flag link](/tag/Flag-links-(beta)#operation/createFlagLink) and [List flag links](/tag/Flag-links-(beta)#operation/getFlagLinks) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n" @@ -109,9 +121,37 @@ "name": "Follow flags", "description": "Follow flags to receive email updates about targeting changes to a flag in a project and environment.\n\nSeveral of the endpoints in the follow flags API require a member ID. The member ID is returned as part of the [Invite new members](/tag/Account-members#operation/postMembers) and [List account members](/tag/Account-members#operation/getMembers) responses. It is the `_id` field of each element in the `items` array.\n" }, + { + "name": "Holdouts (beta)", + "description": "> ### Available for customers using Experimentation\n>\n> Holdouts are available to customers using [Experimentation](/tag/Experiments-(beta)).\n\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nHoldouts let you exclude a percentage of your audience from your Experimentation program. This enables you to see the overall effect of your experiments on your customer base, and helps determine how effective the experiments you're running are.\n\nUsing the holdouts API, you can create, delete, and manage holdouts. To learn more, read [Holdouts](https://docs.launchdarkly.com/home/holdouts).\n" + }, + { + "name": "Insights charts (beta)", + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe charts API provides access to the data used in engineering insights project metrics. To learn more, read [Project metrics](https://docs.launchdarkly.com/home/engineering-insights/metrics).\n" + }, + { + "name": "Insights deployments (beta)", + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe deployments API provides access to deployment information in engineering insights. To learn more, read [Deployments](https://docs.launchdarkly.com/home/engineering-insights/metrics/deployment).\n" + }, + { + "name": "Insights flag events (beta)", + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe flag events API provides access to flag-event data used in engineering insights project metrics. To learn more, read [Flag health](https://docs.launchdarkly.com/home/engineering-insights/metrics/flag-health).\n" + }, + { + "name": "Insights pull requests (beta)", + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe pull requests API provides access to information used for lead time calculations. To learn more, read [Lead time](https://docs.launchdarkly.com/home/engineering-insights/metrics/lead-time).\n" + }, + { + "name": "Insights repositories (beta)", + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nEngineering insights automatically creates repository associations when it receives deployments or code references. Optionally, you can manually configure additional associations. You can use the repositories API to list repositories and create associations to projects. To learn more, read [Send deployment information](https://docs.launchdarkly.com/home/engineering-insights/config-deployment). \n" + }, + { + "name": "Insights scores (beta)", + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe insights scores API provides scores for data used in engineering insights project metrics. To learn more, read [Project overview](https://docs.launchdarkly.com/home/engineering-insights/project-overview) and [Project metrics](https://docs.launchdarkly.com/home/engineering-insights/metrics).\n" + }, { "name": "Integration audit log subscriptions", - "description": "Audit log integration subscriptions allow you to send audit log events hooks to one of dozens of external tools. For example, you can send flag change event webhooks to external third party software. To learn more, read [Building your own integrations](https://docs.launchdarkly.com/integrations/building-integrations#building-your-own-integrations).\n\nYou can use the integration subscriptions API to create, delete, and manage your integration audit log subscriptions.\n\nEach of these operations requires an `integrationKey` that refers to the type of integration. The required `config` fields to create a subscription vary depending on the `integrationKey`. You can find a full list of the fields for each integration below.\n\nSeveral of these operations require a subscription ID. The subscription ID is returned as part of the [Create audit log subscription](/tag/Integration-audit-log-subscriptions#operation/createSubscription) and [Get audit log subscriptions by integration](/tag/Integration-audit-log-subscriptions#operation/getSubscriptions) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n\n### Configuration bodies by integrationKey\n\n#### datadog\n\n`apiKey` is a sensitive value.\n\n`hostURL` must evaluate to either `\"https://api.datadoghq.com\"` or `\"https://api.datadoghq.eu\"` and will default to the former if not explicitly defined.\n\n```\n\"config\": {\n \"apiKey\": , # sensitive value\n \"hostURL\": \n}\n```\n\n#### dynatrace\n\n`apiToken` is a sensitive value.\n\n`entity` must evaluate to one of the following fields and will default to `\"APPLICATION\"` if not explicitly defined:\n\n
\nClick to expand list of fields\n
\n\"APPLICATION\"
\n\"APPLICATION_METHOD\"
\n\"APPLICATION_METHOD_GROUP\"
\n\"AUTO_SCALING_GROUP\"
\n\"AUXILIARY_SYNTHETIC_TEST\"
\n\"AWS_APPLICATION_LOAD_BALANCER\"
\n\"AWS_AVAILABILITY_ZONE\"
\n\"AWS_CREDENTIALS\"
\n\"AWS_LAMBDA_FUNCTION\"
\n\"AWS_NETWORK_LOAD_BALANCER\"
\n\"AZURE_API_MANAGEMENT_SERVICE\"
\n\"AZURE_APPLICATION_GATEWAY\"
\n\"AZURE_COSMOS_DB\"
\n\"AZURE_CREDENTIALS\"
\n\"AZURE_EVENT_HUB\"
\n\"AZURE_EVENT_HUB_NAMESPACE\"
\n\"AZURE_FUNCTION_APP\"
\n\"AZURE_IOT_HUB\"
\n\"AZURE_LOAD_BALANCER\"
\n\"AZURE_MGMT_GROUP\"
\n\"AZURE_REDIS_CACHE\"
\n\"AZURE_REGION\"
\n\"AZURE_SERVICE_BUS_NAMESPACE\"
\n\"AZURE_SERVICE_BUS_QUEUE\"
\n\"AZURE_SERVICE_BUS_TOPIC\"
\n\"AZURE_SQL_DATABASE\"
\n\"AZURE_SQL_ELASTIC_POOL\"
\n\"AZURE_SQL_SERVER\"
\n\"AZURE_STORAGE_ACCOUNT\"
\n\"AZURE_SUBSCRIPTION\"
\n\"AZURE_TENANT\"
\n\"AZURE_VM\"
\n\"AZURE_VM_SCALE_SET\"
\n\"AZURE_WEB_APP\"
\n\"CF_APPLICATION\"
\n\"CF_FOUNDATION\"
\n\"CINDER_VOLUME\"
\n\"CLOUD_APPLICATION\"
\n\"CLOUD_APPLICATION_INSTANCE\"
\n\"CLOUD_APPLICATION_NAMESPACE\"
\n\"CONTAINER_GROUP\"
\n\"CONTAINER_GROUP_INSTANCE\"
\n\"CUSTOM_APPLICATION\"
\n\"CUSTOM_DEVICE\"
\n\"CUSTOM_DEVICE_GROUP\"
\n\"DCRUM_APPLICATION\"
\n\"DCRUM_SERVICE\"
\n\"DCRUM_SERVICE_INSTANCE\"
\n\"DEVICE_APPLICATION_METHOD\"
\n\"DISK\"
\n\"DOCKER_CONTAINER_GROUP_INSTANCE\"
\n\"DYNAMO_DB_TABLE\"
\n\"EBS_VOLUME\"
\n\"EC2_INSTANCE\"
\n\"ELASTIC_LOAD_BALANCER\"
\n\"ENVIRONMENT\"
\n\"EXTERNAL_SYNTHETIC_TEST_STEP\"
\n\"GCP_ZONE\"
\n\"GEOLOCATION\"
\n\"GEOLOC_SITE\"
\n\"GOOGLE_COMPUTE_ENGINE\"
\n\"HOST\"
\n\"HOST_GROUP\"
\n\"HTTP_CHECK\"
\n\"HTTP_CHECK_STEP\"
\n\"HYPERVISOR\"
\n\"KUBERNETES_CLUSTER\"
\n\"KUBERNETES_NODE\"
\n\"MOBILE_APPLICATION\"
\n\"NETWORK_INTERFACE\"
\n\"NEUTRON_SUBNET\"
\n\"OPENSTACK_PROJECT\"
\n\"OPENSTACK_REGION\"
\n\"OPENSTACK_VM\"
\n\"OS\"
\n\"PROCESS_GROUP\"
\n\"PROCESS_GROUP_INSTANCE\"
\n\"RELATIONAL_DATABASE_SERVICE\"
\n\"SERVICE\"
\n\"SERVICE_INSTANCE\"
\n\"SERVICE_METHOD\"
\n\"SERVICE_METHOD_GROUP\"
\n\"SWIFT_CONTAINER\"
\n\"SYNTHETIC_LOCATION\"
\n\"SYNTHETIC_TEST\"
\n\"SYNTHETIC_TEST_STEP\"
\n\"VIRTUALMACHINE\"
\n\"VMWARE_DATACENTER\"\n
\n\n```\n\"config\": {\n \"apiToken\": ,\n \"url\": ,\n \"entity\": \n}\n```\n\n#### elastic\n\n`token` is a sensitive field.\n\n```\n\"config\": {\n \"url\": ,\n \"token\": ,\n \"index\": \n}\n```\n\n#### honeycomb\n\n`apiKey` is a sensitive field.\n\n```\n\"config\": {\n \"datasetName\": ,\n \"apiKey\": \n}\n```\n\n#### logdna\n\n`ingestionKey` is a sensitive field.\n\n```\n\"config\": {\n \"ingestionKey\": ,\n \"level\": \n}\n```\n\n#### msteams\n\n```\n\"config\": {\n \"url\": \n}\n```\n\n#### new-relic-apm\n\n`apiKey` is a sensitive field.\n\n`domain` must evaluate to either `\"api.newrelic.com\"` or `\"api.eu.newrelic.com\"` and will default to the former if not explicitly defined.\n\n```\n\"config\": {\n \"apiKey\": ,\n \"applicationId\": ,\n \"domain\": \n}\n```\n\n#### signalfx\n\n`accessToken` is a sensitive field.\n\n```\n\"config\": {\n \"accessToken\": ,\n \"realm\": \n}\n```\n\n#### splunk\n\n`token` is a sensitive field.\n\n```\n\"config\": {\n \"base-url\": ,\n \"token\": ,\n \"skip-ca-verificiation\": \n}\n```\n" + "description": "Audit log integration subscriptions allow you to send audit log events hooks to one of dozens of external tools. For example, you can send flag change event webhooks to external third party software. To learn more, read [Building your own integrations](https://docs.launchdarkly.com/integrations/building-integrations#building-your-own-integrations).\n\nYou can use the integration subscriptions API to create, delete, and manage your integration audit log subscriptions.\n\nEach of these operations requires an `integrationKey` that refers to the type of integration. The required `config` fields to create a subscription vary depending on the `integrationKey`. You can find a full list of the fields for each integration below.\n\nSeveral of these operations require a subscription ID. The subscription ID is returned as part of the [Create audit log subscription](/tag/Integration-audit-log-subscriptions#operation/createSubscription) and [Get audit log subscriptions by integration](/tag/Integration-audit-log-subscriptions#operation/getSubscriptions) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n\n### Configuration bodies by integrationKey\n\n#### datadog\n\n`apiKey` is a sensitive value.\n\n`hostURL` must evaluate to either `\"https://api.datadoghq.com\"` or `\"https://api.datadoghq.eu\"` and will default to the former if not explicitly defined.\n\n```\n\"config\": {\n \"apiKey\": , # sensitive value\n \"hostURL\": \n}\n```\n\n#### dynatrace\n\n`apiToken` is a sensitive value.\n\n`entity` must evaluate to one of the following fields and will default to `\"APPLICATION\"` if not explicitly defined:\n\n
\nClick to expand list of fields\n
\n\"APPLICATION\"
\n\"APPLICATION_METHOD\"
\n\"APPLICATION_METHOD_GROUP\"
\n\"AUTO_SCALING_GROUP\"
\n\"AUXILIARY_SYNTHETIC_TEST\"
\n\"AWS_APPLICATION_LOAD_BALANCER\"
\n\"AWS_AVAILABILITY_ZONE\"
\n\"AWS_CREDENTIALS\"
\n\"AWS_LAMBDA_FUNCTION\"
\n\"AWS_NETWORK_LOAD_BALANCER\"
\n\"AZURE_API_MANAGEMENT_SERVICE\"
\n\"AZURE_APPLICATION_GATEWAY\"
\n\"AZURE_COSMOS_DB\"
\n\"AZURE_CREDENTIALS\"
\n\"AZURE_EVENT_HUB\"
\n\"AZURE_EVENT_HUB_NAMESPACE\"
\n\"AZURE_FUNCTION_APP\"
\n\"AZURE_IOT_HUB\"
\n\"AZURE_LOAD_BALANCER\"
\n\"AZURE_MGMT_GROUP\"
\n\"AZURE_REDIS_CACHE\"
\n\"AZURE_REGION\"
\n\"AZURE_SERVICE_BUS_NAMESPACE\"
\n\"AZURE_SERVICE_BUS_QUEUE\"
\n\"AZURE_SERVICE_BUS_TOPIC\"
\n\"AZURE_SQL_DATABASE\"
\n\"AZURE_SQL_ELASTIC_POOL\"
\n\"AZURE_SQL_SERVER\"
\n\"AZURE_STORAGE_ACCOUNT\"
\n\"AZURE_SUBSCRIPTION\"
\n\"AZURE_TENANT\"
\n\"AZURE_VM\"
\n\"AZURE_VM_SCALE_SET\"
\n\"AZURE_WEB_APP\"
\n\"CF_APPLICATION\"
\n\"CF_FOUNDATION\"
\n\"CINDER_VOLUME\"
\n\"CLOUD_APPLICATION\"
\n\"CLOUD_APPLICATION_INSTANCE\"
\n\"CLOUD_APPLICATION_NAMESPACE\"
\n\"CONTAINER_GROUP\"
\n\"CONTAINER_GROUP_INSTANCE\"
\n\"CUSTOM_APPLICATION\"
\n\"CUSTOM_DEVICE\"
\n\"CUSTOM_DEVICE_GROUP\"
\n\"DCRUM_APPLICATION\"
\n\"DCRUM_SERVICE\"
\n\"DCRUM_SERVICE_INSTANCE\"
\n\"DEVICE_APPLICATION_METHOD\"
\n\"DISK\"
\n\"DOCKER_CONTAINER_GROUP_INSTANCE\"
\n\"DYNAMO_DB_TABLE\"
\n\"EBS_VOLUME\"
\n\"EC2_INSTANCE\"
\n\"ELASTIC_LOAD_BALANCER\"
\n\"ENVIRONMENT\"
\n\"EXTERNAL_SYNTHETIC_TEST_STEP\"
\n\"GCP_ZONE\"
\n\"GEOLOCATION\"
\n\"GEOLOC_SITE\"
\n\"GOOGLE_COMPUTE_ENGINE\"
\n\"HOST\"
\n\"HOST_GROUP\"
\n\"HTTP_CHECK\"
\n\"HTTP_CHECK_STEP\"
\n\"HYPERVISOR\"
\n\"KUBERNETES_CLUSTER\"
\n\"KUBERNETES_NODE\"
\n\"MOBILE_APPLICATION\"
\n\"NETWORK_INTERFACE\"
\n\"NEUTRON_SUBNET\"
\n\"OPENSTACK_PROJECT\"
\n\"OPENSTACK_REGION\"
\n\"OPENSTACK_VM\"
\n\"OS\"
\n\"PROCESS_GROUP\"
\n\"PROCESS_GROUP_INSTANCE\"
\n\"RELATIONAL_DATABASE_SERVICE\"
\n\"SERVICE\"
\n\"SERVICE_INSTANCE\"
\n\"SERVICE_METHOD\"
\n\"SERVICE_METHOD_GROUP\"
\n\"SWIFT_CONTAINER\"
\n\"SYNTHETIC_LOCATION\"
\n\"SYNTHETIC_TEST\"
\n\"SYNTHETIC_TEST_STEP\"
\n\"VIRTUALMACHINE\"
\n\"VMWARE_DATACENTER\"\n
\n\n```\n\"config\": {\n \"apiToken\": ,\n \"url\": ,\n \"entity\": \n}\n```\n\n#### elastic\n\n`token` is a sensitive field.\n\n```\n\"config\": {\n \"url\": ,\n \"token\": ,\n \"index\": \n}\n```\n\n#### honeycomb\n\n`apiKey` is a sensitive field.\n\n```\n\"config\": {\n \"datasetName\": ,\n \"apiKey\": \n}\n```\n\n#### logdna\n\n`ingestionKey` is a sensitive field.\n\n```\n\"config\": {\n \"ingestionKey\": ,\n \"level\": \n}\n```\n\n#### msteams\n\n```\n\"config\": {\n \"url\": \n}\n```\n\n#### new-relic-apm\n\n`apiKey` is a sensitive field.\n\n`domain` must evaluate to either `\"api.newrelic.com\"` or `\"api.eu.newrelic.com\"` and will default to the former if not explicitly defined.\n\n```\n\"config\": {\n \"apiKey\": ,\n \"applicationId\": ,\n \"domain\": \n}\n```\n\n#### signalfx\n\n`accessToken` is a sensitive field.\n\n```\n\"config\": {\n \"accessToken\": ,\n \"realm\": \n}\n```\n\n#### splunk\n\n`token` is a sensitive field.\n\n```\n\"config\": {\n \"base-url\": ,\n \"token\": ,\n \"skip-ca-verification\": \n}\n```\n" }, { "name": "Integration delivery configurations (beta)", @@ -119,11 +159,15 @@ }, { "name": "Integrations (beta)", - "description": "\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nYou can use the integrations API to create, delete, and manage integrations between LaunchDarkly and third-party applications.\n\nSpecifically, the integrations API provides endpoints for managing the persistent store integrations, also called \"big segment\" store integrations, that are required when you use a server-side SDK and big segments.\n\n> ### Synced segments and larger list-based segments are an Enterprise feature\n>\n> Segments synced from external tools and larger list-based segments with more than 15,000 entries are the two kinds of \"big segment.\" LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n>\n> These segments are 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/).\n\n[Segments synced from external tools](https://docs.launchdarkly.com/home/flags/synced-segments) and [larger list-based segments](https://docs.launchdarkly.com/home/flags/list-based-segments#larger-list-based-segments) are the two kinds of big segment. If you are using server-side SDKs, these segments require a persistent store within your infrastructure. LaunchDarkly keeps the persistent store up to date and consults it during flag evaluation.\n\nYou need either a persistent store integration or a [Relay Proxy](https://docs.launchdarkly.com/sdk/relay-proxy) to support these segments. The integrations API lets you manage the persistent store integrations.\n\nTo learn more about segments, read [Segments](https://docs.launchdarkly.com/home/flags/segments) and [Segment configuration](https://docs.launchdarkly.com/home/flags/segment-config).\n\nSeveral of the endpoints in the integrations API require an integration ID. The integration ID is returned as part of the [Create big segment store integration](/tag/Integrations-(beta)#operation/createBigSegmentStoreIntegration) response, in the `_id` field. It is also returned as part of the [List all big segment store integrations](/tag/Integrations-(beta)#operation/getBigSegmentStoreIntegrations) response, in the `_id` field of each element in the `items` array.\n\nYou can find other APIs for working with big segments under [Segments](/tag/Segments) and [Segments (beta)](/tag/Segments-(beta)).\n" + "description": "\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\n> ### Integration configuration is an Enterprise feature\n>\n> Integration configuration 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/).\n\nYou can use the integrations API to create, delete, and manage integration configurations.\n\nAn integration configuration stores and manages configuration details for an integration between LaunchDarkly and a third-party application. To learn more about building an integration, read [Using the LaunchDarkly integration framework](https://docs.launchdarkly.com/integrations/building-integrations) and [Building partner integrations](https://docs.launchdarkly.com/integrations/partner-integrations).\n" + }, + { + "name": "Layers", + "description": "> ### Available for customers using Experimentation\n>\n> Layers are available to customers using [Experimentation](/tag/Experiments-(beta)).\n\nThere are some cases in which you may not want to include a context in more than one experiment at a time. For example, you may be concerned about collisions between experiments that are testing similar parts of your app, like two different changes to the same section of your app's user interface (UI), or experiments running on both the back end and front end of the same functionality. In this case you can eliminate the interaction effect between experiments using layers.\n\nA layer contains a set of experiments that cannot share traffic with each other. All of the experiments within a layer are mutually exclusive, which means that if a context is included in one experiment, LaunchDarkly will exclude it from any other experiments in the same layer.\n\nTo learn more, read [Mutually exclusive experiments](https://docs.launchdarkly.com/home/experimentation/mutually-exclusive).\n" }, { "name": "Metrics", - "description": "> ### Available for Pro and Enterprise plans\n>\n> Metrics is available to customers on a Pro or Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To add metrics to your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nMetrics track flag behavior over time when an experiment is running. The data generated from experiments gives you more insight into the impact of a particular flag. To learn more, read [Metrics](https://docs.launchdarkly.com/home/observability/metrics).\n\nUsing the metrics API, you can create, delete, and manage metrics.\n\n> ### Are you importing metric events?\n>\n> If you want to import metric events into LaunchDarkly from an existing data source, use the metric import API. To learn more, read [Importing metric events](/home/metrics/import-metric-events).\n\n> ### Metric keys and event keys are different\n>\n> LaunchDarkly automatically generates a metric key when you create a metric. You can use the metric key to identify the metric in API calls.\n>\n> Custom conversion/binary and custom numeric metrics also require an event key. You can set the event key to anything you want. Adding this event key to your codebase lets your SDK track actions customers take in your app as events. To learn more, read [Sending custom events](https://docs.launchdarkly.com/sdk/features/events).\n" + "description": "Metrics track flag behavior over time when an experiment is running. The data generated from experiments gives you more insight into the impact of a particular flag. To learn more, read [Metrics](https://docs.launchdarkly.com/home/observability/metrics).\n\nUsing the metrics API, you can create, delete, and manage metrics.\n\n> ### Are you importing metric events?\n>\n> If you want to import metric events into LaunchDarkly from an existing data source, use the metric import API. To learn more, read [Importing metric events](https://docs.launchdarkly.com/home/metrics/import-metric-events).\n\n> ### Metric keys and event keys are different\n>\n> LaunchDarkly automatically generates a metric key when you create a metric. You can use the metric key to identify the metric in API calls.\n>\n> Custom conversion/binary and custom numeric metrics also require an event key. You can set the event key to anything you want. Adding this event key to your codebase lets your SDK track actions customers take in your app as events. To learn more, read [Sending custom events](https://docs.launchdarkly.com/sdk/features/events).\n" }, { "name": "Metrics (beta)", @@ -133,9 +177,13 @@ "name": "OAuth2 Clients", "description": "The OAuth2 client API allows you to register a LaunchDarkly OAuth client for use in your own custom integrations. Registering a LaunchDarkly OAuth client allows you to use LaunchDarkly as an identity provider so that account members can log into your application with their LaunchDarkly account.\n\nYou can create and manage LaunchDarkly OAuth clients using the LaunchDarkly OAuth client API. This API acknowledges creation of your client with a response containing a one-time, unique `_clientSecret`. If you lose your client secret, you will have to register a new client. LaunchDarkly does not store client secrets in plain text.\n\nSeveral of the endpoints in the OAuth2 client API require an OAuth client ID. The OAuth client ID is returned as part of the [Create a LaunchDarkly OAuth 2.0 client](/tag/OAuth2-Clients#operation/createOAuth2Client) and [Get clients](/tag/OAuth2-Clients#operation/getOAuthClients) responses. It is the `_clientId` field, or the `_clientId` field of each element in the `items` array.\n\nYou must have _Admin_ privileges or an access token created by a member with _Admin_ privileges in order to be able to use this feature.\n\nPlease note that `redirectUri`s must be absolute URIs that conform to the https URI scheme. If you wish to register a client with a different URI scheme, please contact LaunchDarkly Support.\n" }, + { + "name": "Persistent store integrations (beta)", + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\n### Persistent store integrations\n\nPersistent store integrations, also called \"big segment\" store integrations, are required when you use a server-side SDK and big segments. You can use the persistent store integrations API endpoints to manage these integrations.\n\n> ### Synced segments and larger list-based segments are an Enterprise feature\n>\n> Segments synced from external tools and larger list-based segments with more than 15,000 entries are the two kinds of \"big segment.\" LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n>\n> These segments are 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/).\n\n[Segments synced from external tools](https://docs.launchdarkly.com/home/flags/synced-segments) and [larger list-based segments](https://docs.launchdarkly.com/home/flags/list-based-segments) are the two kinds of big segment. If you are using server-side SDKs, these segments require a persistent store within your infrastructure. LaunchDarkly keeps the persistent store up to date and consults it during flag evaluation.\n\nYou need either a persistent store integration or a [Relay Proxy](https://docs.launchdarkly.com/sdk/relay-proxy) to support these segments. The persistent store integrations API lets you manage the persistent store integrations.\n\nTo learn more about segments, read [Segments](https://docs.launchdarkly.com/home/flags/segments) and [Segment configuration](https://docs.launchdarkly.com/home/flags/segment-config).\n\nSeveral of the endpoints in the persistent store integrations API require an integration ID. The integration ID is returned as part of the [Create big segment store integration](/tag/Persistent-store-integrations-(beta)#operation/createBigSegmentStoreIntegration) response, in the `_id` field. It is also returned as part of the [List all big segment store integrations](/tag/Persistent-store-integrations-(beta)#operation/getBigSegmentStoreIntegrations) response, in the `_id` field of each element in the `items` array.\n\nYou can find other APIs for working with big segments under [Segments](/tag/Segments) and [Segments (beta)](/tag/Segments-(beta)).\n" + }, { "name": "Projects", - "description": "Projects allow you to manage multiple different software projects under one LaunchDarkly account. Each project has its own unique set of environments and feature flags. To learn more, read [Projects](https://docs.launchdarkly.com/home/account/project).\n\nUsing the projects API, you can create, destroy, and manage projects.\n" + "description": "Projects allow you to manage multiple different software projects under one LaunchDarkly account. Each project has its own unique set of environments and feature flags. To learn more, read [Projects](https://docs.launchdarkly.com/home/account/project).\n\nUsing the projects API, you can list, create, and manage projects.\n" }, { "name": "Relay Proxy configurations", @@ -143,7 +191,7 @@ }, { "name": "Release pipelines (beta)", - "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nRelease pipelines track the progression of a feature flag across a series of phases, where each phase consists of one or more environments. When you add a flag to a release pipeline, you create a \"release\" to track that flag's progress through the pipeline.\n\nYou can use release pipelines to ensure that you correctly roll out the flag in each environment before moving on to the next. You can also use them to view the status of ongoing releases across all flags within a project, enforcing a standardized process and ensuring they are following best practices. To learn more, read [Release pipelines](https://docs.launchdarkly.com/home/releases/release-pipelines).\n\nWith the release pipelines API, you can view, create, and delete release pipelines.\n\nWith the related [releases API](/tag/Releases-(beta)), you can view and update the active releases for a given flag.\n\nTo add a feature flag to an existing release pipeline, use the [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag) endpoint.\n" + "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nRelease pipelines standardize the release process for feature flags across a series of phases, where each phase consists of one or more environments. When you add a flag to a release pipeline, you create a \"release\" to automate that flag's progress through the pipeline.\n\nYou can use release pipelines to ensure that you correctly roll out the flag in each environment before moving on to the next. A release can use an immediate or guarded rollout to a designated audience, and can require approvals for selected environments. You can also use release pipelines to view the status of ongoing releases across all flags within a project, enforcing a standardized process and ensuring they are following best practices. To learn more, read [Release pipelines](https://docs.launchdarkly.com/home/releases/release-pipelines).\n\nWith the release pipelines API, you can view, create, update, and delete release pipelines.\n\nWith the related [releases API](/tag/Releases-(beta)), you can view and update the active releases for a given flag.\n\nTo add a feature flag to an existing release pipeline, use the [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag) endpoint.\n" }, { "name": "Releases (beta)", @@ -157,10 +205,6 @@ "name": "Segments", "description": "\n> ### Synced segments and larger list-based segments are an Enterprise feature\n>\n> This section documents endpoints for rule-based, list-based, and synced segments.\n>\n> A \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n>\n> In the segments API, a big segment is indicated by the `unbounded` field being set to `true`.\n>\n> These segments are 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/).\n\nSegments are groups of contexts that you can use to manage flag targeting behavior in bulk. LaunchDarkly supports:\n\n* rule-based segments, which let you target groups of contexts individually or by attribute,\n* list-based segments, which let you target individual contexts or uploaded lists of contexts, and\n* synced segments, which let you target groups of contexts backed by an external data store.\n\nTo learn more, read [Segments](https://docs.launchdarkly.com/home/flags/segments).\n\nThe segments API allows you to list, create, modify, and delete segments programmatically.\n\nYou can find other APIs for working with big segments under [Segments (beta)](/tag/Segments-(beta)) and [Integrations (beta)](/tag/Integrations-(beta)).\n" }, - { - "name": "Segments (beta)", - "description": "> ### Synced segments and larger list-based segments are an Enterprise feature\n>\n> This section documents endpoints for rule-based, list-based, and synced segments.\n>\n> A \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n>\n> In the segments API, a big segment is indicated by the `unbounded` field being set to `true`.\n>\n> These segments are 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/).\n\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nThe segments API allows you to create and retrieve exports and imports for big segments, which are synced segments or list-based segments with 15,000 or more entries. To learn more, read [Segments](https://docs.launchdarkly.com/home/flags/segments).\n\nSeveral of the endpoints in the segments API require an import or export ID. The import ID is returned in the `Location` header as part of the [Create big segment import](/tag/Segments-(beta)#operation/createBigSegmentImport) request. The export ID is returned in the `Location` header as part of the [Create big segment export](/tag/Segments-(beta)#operation/createBigSegmentExport) request. In each case, the ID is the final element of the path returned in the `Location` header.\n\nYou can find other APIs for working with big segments under [Segments](/tag/Segments) and [Integrations (beta)](/tag/Integrations-(beta)).\n" - }, { "name": "Tags", "description": "Tags are simple strings that you can attach to most resources in LaunchDarkly. Tags are useful for grouping resources into a set that you can name in a resource specifier. To learn more, read [Custom role concepts](https://docs.launchdarkly.com/home/account/role-concepts#tags).\n\nUsing the tags API, you can list existing tags for resources.\n" @@ -173,6 +217,10 @@ "name": "Teams (beta)", "description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\n> ### Teams is an Enterprise feature\n>\n> Teams 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/).\n\nA team is a group of members in your LaunchDarkly account. A team can have maintainers who are able to add and remove team members. It also can have custom roles assigned to it that allows shared access to those roles for all team members. To learn more, read [Teams](https://docs.launchdarkly.com/home/account/teams).\n" }, + { + "name": "User settings", + "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Contexts](/tag/Contexts) instead of the user settings API. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nLaunchDarkly's user settings API provides a picture of all feature flags and their current values for a specific user. This gives you instant visibility into how a particular user experiences your site or application. To learn more, read [View and manage contexts](https://docs.launchdarkly.com/home/observability/context-attributes#view-and-manage-contexts).\n\nYou can also use the user settings API to assign a user to a specific variation for any feature flag.\n" + }, { "name": "Users", "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Contexts](/tag/Contexts) instead of these endpoints. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\n\nLaunchDarkly creates a record for each user passed in to `variation` calls. This record powers the autocomplete functionality on the feature flag dashboard, as well as the Users page. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nLaunchDarkly also offers an API that lets you tap into this data. You can use the users API to see what user data is available to LaunchDarkly, as well as determine which flag values a user will receive. You can also explicitly set which flag value a user will receive via this API.\n\nUsers are always scoped within a project and environment. In other words, each environment has its own set of user records.\n" @@ -181,22 +229,18 @@ "name": "Users (beta)", "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Contexts](/tag/Contexts) instead of these endpoints. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\n> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](/#section/Overview/Beta-resources).\n>\n> Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.\n\nLaunchDarkly creates a record for each user passed in to `variation` calls. This record powers the autocomplete functionality on the feature flag dashboard, as well as the Users page. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts)\n\nLaunchDarkly also offers an API that lets you access this data. You can use the users API to see what user data is available to LaunchDarkly, as well as determine which flag values a user will receive. You can also explicitly set which flag value a user will receive with this API.\n\nUsers are always scoped within both a project and an environment. Each environment has its own set of user records.\n" }, - { - "name": "User settings", - "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Contexts](/tag/Contexts) instead of the user settings API. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nLaunchDarkly's user settings API provides a picture of all feature flags and their current values for a specific user. This gives you instant visibility into how a particular user experiences your site or application. To learn more, read [View and manage contexts](https://docs.launchdarkly.com/home/observability/context-attributes#view-and-manage-contexts).\n\nYou can also use the user settings API to assign a user to a specific variation for any feature flag.\n" - }, { "name": "Webhooks", "description": "The webhooks API lets you build your own integrations that subscribe to activities in LaunchDarkly. When you generate an activity in LaunchDarkly, such as when you change a flag or you create a project, LaunchDarkly sends an HTTP POST payload to the webhook's URL. Use webhooks to update external issue trackers, update support tickets, notify customers of new feature rollouts, and more.\n\nSeveral of the endpoints in the webhooks API require a webhook ID. The webhook ID is returned as part of the [Creates a webhook](/tag/Webhooks#operation/postWebhook) and [List webhooks](/tag/Webhooks#operation/getAllWebhooks) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n\n## Designating the payload\n\nThe webhook payload is identical to an audit log entry. To learn more, read [Get audit log entry](/tag/Audit-log#operation/getAuditLogEntry).\n\nHere's a sample payload:\n\n> ### Webhook delivery order\n>\n> Webhooks may not be delivered in chronological order. We recommend using the payload's \"date\" field as a timestamp to reorder webhooks as they are received.\n\n```json\n{\n \"_links\": {\n \"canonical\": {\n \"href\": \"/api/v2/projects/alexis/environments/test\",\n \"type\": \"application/json\"\n },\n \"parent\": {\n \"href\": \"/api/v2/auditlog\",\n \"type\": \"application/json\"\n },\n \"self\": {\n \"href\": \"/api/v2/auditlog/57c0a8e29969090743529965\",\n \"type\": \"application/json\"\n },\n \"site\": {\n \"href\": \"/settings#/projects\",\n \"type\": \"text/html\"\n }\n },\n \"_id\": \"57c0a8e29969090743529965\",\n \"date\": 1472243938774,\n \"accesses\": [\n {\n \"action\": \"updateName\",\n \"resource\": \"proj/alexis:env/test\"\n }\n ],\n \"kind\": \"environment\",\n \"name\": \"Testing\",\n \"description\": \"- Changed the name from ~~Test~~ to *Testing*\",\n \"member\": {\n \"_links\": {\n \"parent\": {\n \"href\": \"/internal/account/members\",\n \"type\": \"application/json\"\n },\n \"self\": {\n \"href\": \"/internal/account/members/548f6741c1efad40031b18ae\",\n \"type\": \"application/json\"\n }\n },\n \"_id\": \"548f6741c1efad40031b18ae\",\n \"email\": \"ariel@acme.com\",\n \"firstName\": \"Ariel\",\n \"lastName\": \"Flores\"\n },\n \"titleVerb\": \"changed the name of\",\n \"title\": \"[Ariel Flores](mailto:ariel@acme.com) changed the name of [Testing](https://app.launchdarkly.com/settings#/projects)\",\n \"target\": {\n \"_links\": {\n \"canonical\": {\n \"href\": \"/api/v2/projects/alexis/environments/test\",\n \"type\": \"application/json\"\n },\n \"site\": {\n \"href\": \"/settings#/projects\",\n \"type\": \"text/html\"\n }\n },\n \"name\": \"Testing\",\n \"resources\": [\"proj/alexis:env/test\"]\n }\n}\n```\n\n## Signing the webhook\n\nOptionally, you can define a `secret` when you create a webhook. If you define the secret, the webhook `POST` request will include an `X-LD-Signature header`, whose value will contain an HMAC SHA256 hex digest of the webhook payload, using the `secret` as the key.\n\nCompute the signature of the payload using the same shared secret in your code to verify that the webhook was triggered by LaunchDarkly.\n\n## Understanding connection retries\n\nIf LaunchDarkly receives a non-`2xx` response to a webhook `POST`, it will retry the delivery one time. Webhook delivery is not guaranteed. If you build an integration on webhooks, make sure it is tolerant of delivery failures.\n" }, - { - "name": "Workflows", - "description": "> ### Workflows is an Enterprise feature\n>\n> Workflows 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/).\n\nA workflow is a set of actions that you can schedule in advance to make changes to a feature flag at a future date and time. You can also include approval requests at different stages of a workflow. To learn more, read [Workflows](https://docs.launchdarkly.com/home/releases/workflows).\n\nThe actions supported are as follows:\n\n- Turning targeting `ON` or `OFF`\n- Setting the default variation\n- Adding targets to a given variation\n- Creating a rule to target by segment\n- Modifying the rollout percentage for rules\n\nYou can create multiple stages of a flag release workflow. Unique stages are defined by their conditions: either approvals and/or scheduled changes.\n\nSeveral of the endpoints in the workflows API require a workflow ID or one or more member IDs. The workflow ID is returned as part of the [Create workflow](/tag/Workflows#operation/postWorkflow) and [Get workflows](/tag/Workflows#operation/getWorkflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array. The member ID is returned as part of the [List account members](/tag/Account-members#operation/getMembers) response. It is the `_id` field of each element in the `items` array.\n" - }, { "name": "Workflow templates", "description": "> ### Workflow templates is an Enterprise feature\n>\n> Workflow templates are 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/).\n\nWorkflow templates allow you to define a set of workflow stages that you can use as a starting point for new workflows. You can create these workflows for any flag in any environment and any project, and you can create as many workflows as you like from a given template.\n\nYou can create workflow templates in two ways:\n* by specifying the desired stages, using the `stages` property of the request body\n* by specifying an existing workflow to save as a template, using the `workflowId` property of the request body\n\nYou can use templates to create a workflow in any project, environment, or flag. However, when you create a template, you must specify a particular project, environment, and flag. This means that when you create a template using the `stages` property, you must also include `projectKey`, `environmentKey`, and `flagKey` properties in the request body. When you create a template from an existing workflow, it will use the project, environment, and flag of the existing workflow, so those properties can be omitted from the request body.\n\nTo learn more, read [Workflows documentation](https://docs.launchdarkly.com/home/releases/workflows) and [Workflows API documentation](https://apidocs.launchdarkly.com/tag/Workflows).\n" }, + { + "name": "Workflows", + "description": "> ### Workflows is an Enterprise feature\n>\n> Workflows 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/).\n\nA workflow is a set of actions that you can schedule in advance to make changes to a feature flag at a future date and time. You can also include approval requests at different stages of a workflow. To learn more, read [Workflows](https://docs.launchdarkly.com/home/releases/workflows).\n\nThe actions supported are as follows:\n\n- Turning targeting `ON` or `OFF`\n- Setting the default variation\n- Adding targets to a given variation\n- Creating a rule to target by segment\n- Modifying the rollout percentage for rules\n\nYou can create multiple stages of a flag release workflow. Unique stages are defined by their conditions: either approvals and/or scheduled changes.\n\nSeveral of the endpoints in the workflows API require a workflow ID or one or more member IDs. The workflow ID is returned as part of the [Create workflow](/tag/Workflows#operation/postWorkflow) and [Get workflows](/tag/Workflows#operation/getWorkflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array. The member ID is returned as part of the [List account members](/tag/Account-members#operation/getMembers) response. It is the `_id` field of each element in the `items` array.\n" + }, { "name": "Other", "description": "Other requests available in the LaunchDarkly API. \n" @@ -780,11 +824,11 @@ { "name": "filter", "in": "query", - "description": "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](/tag/Applications-(beta)#filtering-contexts-and-context-instances).", + "description": "Accepts filter by `key`, `name`, `kind`, and `autoAdded`. To learn more about the filter syntax, read [Filtering applications and application versions](/tag/Applications-(beta)#filtering-contexts-and-context-instances).", "schema": { "type": "string", "format": "string", - "description": "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](/tag/Applications-(beta)#filtering-contexts-and-context-instances)." + "description": "Accepts filter by `key`, `name`, `kind`, and `autoAdded`. To learn more about the filter syntax, read [Filtering applications and application versions](/tag/Applications-(beta)#filtering-contexts-and-context-instances)." } }, { @@ -1165,11 +1209,11 @@ { "name": "filter", "in": "query", - "description": "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](/tag/Applications-(beta)#filtering-contexts-and-context-instances).", + "description": "Accepts filter by `key`, `name`, `supported`, and `autoAdded`. To learn more about the filter syntax, read [Filtering applications and application versions](/tag/Applications-(beta)#filtering-contexts-and-context-instances).", "schema": { "type": "string", "format": "string", - "description": "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](/tag/Applications-(beta)#filtering-contexts-and-context-instances)." + "description": "Accepts filter by `key`, `name`, `supported`, and `autoAdded`. To learn more about the filter syntax, read [Filtering applications and application versions](/tag/Applications-(beta)#filtering-contexts-and-context-instances)." } }, { @@ -1572,7 +1616,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/createApprovalRequestRequest" + "$ref": "#/components/schemas/CreateApprovalRequestRequest" } } }, @@ -1675,6 +1719,79 @@ ], "operationId": "getApprovalRequest" }, + "patch": { + "responses": { + "200": { + "description": "Approval request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Approvals (beta)" + ], + "summary": "Update approval request", + "description": "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instruction for updating an approval request.\n\n#### addReviewers\n\nAdds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`.\n\n##### Parameters\n\n- `notifyMemberIds`: (Optional) List of member IDs.\n- `notifyTeamKeys`: (Optional) List of team keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addReviewers\",\n \"notifyMemberIds\": [ \"user-key-123abc\", \"user-key-456def\" ],\n \"notifyTeamKeys\": [ \"team-key-789abc\"]\n }]\n}\n```\n", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The approval ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The approval ID" + } + } + ], + "operationId": "patchApprovalRequest" + }, "delete": { "responses": { "204": { @@ -2054,6 +2171,117 @@ } ], "operationId": "getAuditLogEntries" + }, + "post": { + "responses": { + "200": { + "description": "Audit log entries response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditLogEntryListingRepCollection" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Audit log" + ], + "summary": "Search audit log entries", + "description": "Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers.\n\nLaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read [About the resource specifier syntax](https://docs.launchdarkly.com/home/account/role-resources#about-the-resource-specifier-syntax).\n", + "parameters": [ + { + "name": "before", + "in": "query", + "description": "A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred before the timestamp.", + "schema": { + "type": "integer", + "format": "int64", + "description": "A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred before the timestamp." + } + }, + { + "name": "after", + "in": "query", + "description": "A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp.", + "schema": { + "type": "integer", + "format": "int64", + "description": "A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp." + } + }, + { + "name": "q", + "in": "query", + "description": "Text to search for. You can search for the full or partial name of the resource.", + "schema": { + "type": "string", + "format": "string", + "description": "Text to search for. You can search for the full or partial name of the resource." + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10.", + "schema": { + "type": "integer", + "format": "int64", + "description": "A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10." + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatementPostList" + } + } + } + }, + "operationId": "postAuditLogEntries" } }, "/api/v2/auditlog/{id}": { @@ -2131,6 +2359,48 @@ "operationId": "getAuditLogEntry" } }, + "/api/v2/caller-identity": { + "get": { + "responses": { + "200": { + "description": "Caller Identity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallerIdentityRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Other" + ], + "summary": "Identify the caller", + "description": "Get basic information about the identity used (session cookie, API token, SDK keys, etc.) to call the API", + "operationId": "getCallerIdentity" + } + }, "/api/v2/code-refs/extinctions": { "get": { "responses": { @@ -4576,7 +4846,7 @@ "Feature flags" ], "summary": "List feature flags", - "description": "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.\n\n> #### Recommended use\n>\n> 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`.\n\n### Filtering flags\n\nYou 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`.\n\nThe `filter` query parameter supports the following arguments:\n\n| Filter argument | Description | Example |\n|-----------------------|-------------|----------------------|\n| `applicationEvaluated` | A string. It filters the list to flags that are evaluated in the application with the given key. | `filter=applicationEvaluated:com.launchdarkly.cafe` |\n| `archived` | (deprecated) A boolean value. It filters the list to archived flags. | Use `filter=state:archived` instead |\n| `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` |\n| `codeReferences.max` | An integer value. Use `0` to return flags that do not have code references. | `filter=codeReferences.max:0` |\n| `codeReferences.min` | An integer value. Use `1` to return flags that do have code references. | `filter=codeReferences.min:1` |\n| `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}` |\n| `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=evaluated:{\"after\":1690527600000},filterEnv:production` |\n| `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` |\n| `hasExperiment` | A boolean value. It filters the list to flags that are used in an experiment. | `filter=hasExperiment:true` |\n| `maintainerId` | A valid member ID. It filters the list to flags that are maintained by this member. | `filter=maintainerId:12ab3c45de678910abc12345` |\n| `maintainerTeamKey` | A string. It filters the list to flags that are maintained by the team with this key. | `filter=maintainerTeamKey:example-team-key` |\n| `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` |\n| `state` | A string, either `live`, `deprecated`, or `archived`. It filters the list to flags in this state. | `filter=state:archived` |\n| `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` |\n| `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` |\n| `type` | A string, either `temporary` or `permanent`. It filters the list to flags with the specified type. | `filter=type:permanent` |\n\nThe documented values for the `filter` query are prior to URL encoding. For example, the `+` in `filter=tags:beta+test` must be encoded to `%2B`.\n\nBy 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.\n\n### Sorting flags\n\nYou can sort flags based on the following fields:\n\n- `creationDate` sorts by the creation date of the flag.\n- `key` sorts by the key of the flag.\n- `maintainerId` sorts by the flag maintainer.\n- `name` sorts by flag name.\n- `tags` sorts by tags.\n- `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.\n- `type` sorts by flag type\n\nAll 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.\n\n### Expanding response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `codeReferences` includes code references for the feature flag\n- `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days\n- `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`.\n\nFor example, `expand=evaluation` includes the `evaluation` field in the response.\n\n### Migration flags\nFor 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.\nTo learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flags/migration).\n", + "description": "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.\n\n> #### Recommended use\n>\n> 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`.\n\n### Filtering flags\n\nYou 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`.\n\nThe `filter` query parameter supports the following arguments:\n\n| Filter argument | Description | Example |\n|-----------------------|-------------|----------------------|\n| `applicationEvaluated` | A string. It filters the list to flags that are evaluated in the application with the given key. | `filter=applicationEvaluated:com.launchdarkly.cafe` |\n| `archived` | (deprecated) A boolean value. It filters the list to archived flags. | Use `filter=state:archived` instead |\n| `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` |\n| `codeReferences.max` | An integer value. Use `0` to return flags that do not have code references. | `filter=codeReferences.max:0` |\n| `codeReferences.min` | An integer value. Use `1` to return flags that do have code references. | `filter=codeReferences.min:1` |\n| `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}` |\n| `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=evaluated:{\"after\":1690527600000},filterEnv:production` |\n| `filterEnv` | A valid environment key. 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. | `filter=evaluated:{\"after\": 1590768455282},filterEnv:production` |\n| `hasExperiment` | A boolean value. It filters the list to flags that are used in an experiment. | `filter=hasExperiment:true` |\n| `maintainerId` | A valid member ID. It filters the list to flags that are maintained by this member. | `filter=maintainerId:12ab3c45de678910abc12345` |\n| `maintainerTeamKey` | A string. It filters the list to flags that are maintained by the team with this key. | `filter=maintainerTeamKey:example-team-key` |\n| `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` |\n| `releasePipeline` | A release pipeline key. It filters the list to flags that are either currently active in the release pipeline or have completed the release pipeline. | `filter=releasePipeline:default-release-pipeline` |\n| `state` | A string, either `live`, `deprecated`, or `archived`. It filters the list to flags in this state. | `filter=state:archived` |\n| `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` |\n| `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` |\n| `type` | A string, either `temporary` or `permanent`. It filters the list to flags with the specified type. | `filter=type:permanent` |\n\nThe documented values for the `filter` query are prior to URL encoding. For example, the `+` in `filter=tags:beta+test` must be encoded to `%2B`.\n\nBy 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.\n\n### Sorting flags\n\nYou can sort flags based on the following fields:\n\n- `creationDate` sorts by the creation date of the flag.\n- `key` sorts by the key of the flag.\n- `maintainerId` sorts by the flag maintainer.\n- `name` sorts by flag name.\n- `tags` sorts by tags.\n- `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.\n- `type` sorts by flag type\n\nAll 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.\n\n### Expanding response\n\nLaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:\n\n- `codeReferences` includes code references for the feature flag\n- `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days\n- `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`.\n\nFor example, `expand=evaluation` includes the `evaluation` field in the response.\n\n### Migration flags\nFor 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.\nTo learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flags/migration).\n", "parameters": [ { "name": "projectKey", @@ -4671,10 +4941,11 @@ { "name": "compare", "in": "query", - "description": "A boolean to filter results by only flags that have differences between environments", + "description": "Deprecated, unavailable in API version `20240415`. A boolean to filter results by only flags that have differences between environments.", + "deprecated": true, "schema": { "type": "boolean", - "description": "A boolean to filter results by only flags that have differences between environments" + "description": "Deprecated, unavailable in API version `20240415`. A boolean to filter results by only flags that have differences between environments." } }, { @@ -5071,7 +5342,7 @@ "Feature flags" ], "summary": "Update feature flag", - "description": "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](/#section/Overview/Updates).\n\n### Using semantic patches on a feature flag\n\nTo 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](/reference#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating feature flags takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment.\n* `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.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating feature flags.\n\n
\nClick to expand instructions for turning flags on and off\n\nThese instructions require the `environmentKey` parameter.\n\n#### turnFlagOff\n\nSets the flag's targeting state to **Off**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOff\" } ]\n}\n```\n\n#### turnFlagOn\n\nSets the flag's targeting state to **On**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOn\" } ]\n}\n```\n\n

\n\n
\nClick to expand instructions for working with targeting and variations\n\nThese instructions require the `environmentKey` parameter.\n\nSeveral 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](/tag/Feature-flags#operation/getFeatureFlag) 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.\n\n#### addClauses\n\nAdds the given clauses to the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `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.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauses\": [{\n\t\t\t\"contextKind\": \"user\",\n\t\t\t\"attribute\": \"country\",\n\t\t\t\"op\": \"in\",\n\t\t\t\"negate\": false,\n\t\t\t\"values\": [\"USA\", \"Canada\"]\n\t\t}]\n\t}]\n}\n```\n\n#### addPrerequisite\n\nAdds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter.\n\n##### Parameters\n\n- `key`: Flag key of the prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addPrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addRule\n\nAdds 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.\n\nIf you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list.\n\n##### Parameters\n\n- `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.\n- `beforeRuleId`: (Optional) ID of a flag rule.\n- Either\n - `variationId`: ID of a variation of the flag.\n\n or\n\n - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000).\n - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n - `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }]\n }]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }],\n \"rolloutContextKind\": \"organization\",\n \"rolloutWeights\": {\n \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n }\n }]\n}\n```\n\n#### addTargets\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addUserTargets\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addValuesToClause\n\nAdds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addValuesToClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### addVariation\n\nAdds a variation to the flag.\n\n##### Parameters\n\n- `value`: The variation value.\n- `name`: (Optional) The variation name.\n- `description`: (Optional) A description for the variation.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ]\n}\n```\n\n#### clearTargets\n\nRemoves all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### clearUserTargets\n\nRemoves all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"]\n\t}]\n}\n```\n\n#### removePrerequisite\n\nRemoves the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ]\n}\n```\n\n#### removeRule\n\nRemoves the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ]\n}\n```\n\n#### removeTargets\n\nRemoves 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.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeUserTargets\n\nRemoves 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeValuesFromClause\n\nRemoves `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeValuesFromClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### removeVariation\n\nRemoves a variation from the flag.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag to remove.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### reorderRules\n\nRearranges 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.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all rules in the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"reorderRules\",\n\t\t\"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n\t}]\n}\n```\n\n#### replacePrerequisites\n\nRemoves all existing prerequisites and replaces them with the list you provide.\n\n##### Parameters\n\n- `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replacePrerequisites\",\n \"prerequisites\": [\n {\n \"key\": \"prereq-flag-key-123abc\",\n \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\"\n },\n {\n \"key\": \"another-prereq-flag-key-456def\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\"\n }\n ]\n }\n ]\n}\n```\n\n#### replaceRules\n\nRemoves all targeting rules for the flag and replaces them with the list you provide.\n\n##### Parameters\n\n- `rules`: A list of rules.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceRules\",\n \"rules\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"description\": \"My new rule\",\n \"clauses\": [\n {\n \"contextKind\": \"user\",\n \"attribute\": \"segmentMatch\",\n \"op\": \"segmentMatch\",\n \"values\": [\"test\"]\n }\n ],\n \"trackEvents\": true\n }\n ]\n }\n ]\n}\n```\n\n#### replaceTargets\n\nRemoves all existing targeting and replaces it with the list of targets you provide.\n\n##### Parameters\n\n- `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`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceTargets\",\n \"targets\": [\n {\n \"contextKind\": \"user\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\"]\n },\n {\n \"contextKind\": \"device\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"device-key-456def\"]\n }\n ]\n } \n ]\n}\n```\n\n#### replaceUserTargets\n\nRemoves 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.\n\n##### Parameters\n\n- `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceUserTargets\",\n \"targets\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\", \"user-key-456def\"]\n },\n {\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"user-key-789ghi\"]\n }\n ]\n }\n ]\n}\n```\n\n#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `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.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"updateClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\",\n \"clause\": {\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Mexico\", \"Canada\"]\n }\n }]\n}\n```\n\n#### updateDefaultVariation\n\nUpdates the default on or off variation of the flag.\n\n##### Parameters\n\n- `onVariationValue`: (Optional) The value of the variation of the new on variation.\n- `offVariationValue`: (Optional) The value of the variation of the new off variation\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ]\n}\n```\n\n#### updateFallthroughVariationOrRollout\n\nUpdates 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.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nor\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"rolloutContextKind\": \"user\",\n\t\t\"rolloutWeights\": {\n\t\t\t\"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n\t\t\t\"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n\t\t}\n\t}]\n}\n```\n\n#### updateOffVariation\n\nUpdates the default off variation to `variationId`. The flag serves the default off variation when the flag's targeting is **Off**.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### updatePrerequisite\n\nChanges the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updatePrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateRuleDescription\n\nUpdates the description of the feature flag rule.\n\n##### Parameters\n\n- `description`: The new human-readable description for this rule.\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleDescription\",\n\t\t\"description\": \"New rule description\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n\t}]\n}\n```\n\n#### updateRuleTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag associated with this rule.\n\n##### Parameters\n\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleTrackEvents\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"trackEvents\": true\n\t}]\n}\n```\n\n#### updateRuleVariationOrRollout\n\nUpdates 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.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `variationId`: ID of a variation of the flag.\n\n or\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleVariationOrRollout\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for all rules.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ]\n}\n```\n\n#### updateTrackEventsFallthrough\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for the default rule.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ]\n}\n```\n\n#### updateVariation\n\nUpdates a variation of the flag.\n\n##### Parameters\n\n- `variationId`: The ID of the variation to update.\n- `name`: (Optional) The updated variation name.\n- `value`: (Optional) The updated variation value.\n- `description`: (Optional) The updated variation description.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ]\n}\n```\n\n

\n\n
\nClick to expand instructions for updating flag settings\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### addCustomProperties\n\nAdds 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.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"addCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"name\": \"Example custom property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### addTags\n\nAdds tags to the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### makeFlagPermanent\n\nMarks 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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagPermanent\" } ]\n}\n```\n\n#### makeFlagTemporary\n\nMarks the feature flag as temporary.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagTemporary\" } ]\n}\n```\n\n#### removeCustomProperties\n\nRemoves the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `values`: A list of the associated values to remove from the custom property.\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"replaceCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### removeMaintainer\n\nRemoves the flag's maintainer. To set a new maintainer, use the flag's **Settings** tab in the LaunchDarkly user interface.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeMaintainer\" } ]\n}\n```\n\n#### removeTags\n\nRemoves tags from the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### replaceCustomProperties\n\nReplaces the existing associated values for a custom property with the new values.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the new associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceCustomProperties\",\n \"key\": \"example-custom-property\",\n \"name\": \"Example custom property\",\n \"values\": [\"value1\", \"value2\"]\n }]\n}\n```\n\n#### turnOffClientSideAvailability\n\nTurns 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.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn off availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOffClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### turnOnClientSideAvailability\n\nTurns 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.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn on availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOnClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### updateDescription\n\nUpdates the feature flag description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateDescription\", \"value\": \"Updated flag description\" } ]\n}\n```\n#### updateMaintainerMember\n\nUpdates the maintainer of the flag to an existing member and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The ID of the member.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerMember\", \"value\": \"61e9b714fd47591727db558a\" } ]\n}\n```\n\n#### updateMaintainerTeam\n\nUpdates the maintainer of the flag to an existing team and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The key of the team.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerTeam\", \"value\": \"example-team-key\" } ]\n}\n```\n\n#### updateName\n\nUpdates the feature flag name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateName\", \"value\": \"Updated flag name\" } ]\n}\n```\n\n

\n\n
\nClick to expand instructions for updating the flag lifecycle\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### archiveFlag\n\nArchives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.\n\n```json\n{\n \"instructions\": [ { \"kind\": \"archiveFlag\" } ]\n}\n```\n\n#### deleteFlag\n\nDeletes 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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deleteFlag\" } ]\n}\n```\n\n#### deprecateFlag\n\nDeprecates the feature flag. This hides it from the live flags list without archiving or deleting it.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deprecateFlag\" } ]\n}\n```\n\n#### restoreDeprecatedFlag\n\nRestores the feature flag if it was previously deprecated.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ]\n}\n```\n\n#### restoreFlag\n\nRestores the feature flag if it was previously archived.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreFlag\" } ]\n}\n```\n\n
\n\n### Using JSON patches on a feature flag\n\nIf you do not include the semantic patch header described above, you can use a [JSON patch](/reference#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes.\n\nIn the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](/tag/Feature-flags#operation/getFeatureFlag) endpoint to find the field you want to update.\n\nThere are a few special cases to keep in mind when determining the value of the `path` element:\n\n * 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:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/0/values/-\",\n \"value\": \"TestClient10\"\n }\n ]\n ```\n\n * 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:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/-\",\n \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] }\n }\n ]\n ```\n\n * To add a flag to a release pipeline, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/releasePipelineKey\",\n \"value\": \"example-release-pipeline-key\"\n }\n ]\n ```\n\n### Required approvals\nIf 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](/tag/Approvals) or a [workflow](/tag/Workflows).\n\n### Conflicts\nIf 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`.\n\n### Migration flags\nFor 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`.\nWhen you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`.\nTo learn more, read [Migration flags](https://docs.launchdarkly.com/home/flags/migration).\n", + "description": "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](/#section/Overview/Updates).\n\n### Using semantic patches on a feature flag\n\nTo 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](/reference#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating feature flags takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment.\n* `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.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating feature flags.\n\n
\nClick to expand instructions for turning flags on and off\n\nThese instructions require the `environmentKey` parameter.\n\n#### turnFlagOff\n\nSets the flag's targeting state to **Off**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOff\" } ]\n}\n```\n\n#### turnFlagOn\n\nSets the flag's targeting state to **On**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOn\" } ]\n}\n```\n\n

\n\n
\nClick to expand instructions for working with targeting and variations\n\nThese instructions require the `environmentKey` parameter.\n\nSeveral 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](/tag/Feature-flags#operation/getFeatureFlag) 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.\n\n#### addClauses\n\nAdds the given clauses to the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `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.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauses\": [{\n\t\t\t\"contextKind\": \"user\",\n\t\t\t\"attribute\": \"country\",\n\t\t\t\"op\": \"in\",\n\t\t\t\"negate\": false,\n\t\t\t\"values\": [\"USA\", \"Canada\"]\n\t\t}]\n\t}]\n}\n```\n\n#### addPrerequisite\n\nAdds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter.\n\n##### Parameters\n\n- `key`: Flag key of the prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addPrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addRule\n\nAdds 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.\n\nIf you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list.\n\n##### Parameters\n\n- `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.\n- `beforeRuleId`: (Optional) ID of a flag rule.\n- Either\n - `variationId`: ID of a variation of the flag.\n\n or\n\n - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000).\n - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n - `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }]\n }]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }],\n \"rolloutContextKind\": \"organization\",\n \"rolloutWeights\": {\n \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n }\n }]\n}\n```\n\n#### addTargets\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addUserTargets\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addValuesToClause\n\nAdds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addValuesToClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### addVariation\n\nAdds a variation to the flag.\n\n##### Parameters\n\n- `value`: The variation value.\n- `name`: (Optional) The variation name.\n- `description`: (Optional) A description for the variation.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ]\n}\n```\n\n#### clearTargets\n\nRemoves all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### clearUserTargets\n\nRemoves all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"]\n\t}]\n}\n```\n\n#### removePrerequisite\n\nRemoves the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ]\n}\n```\n\n#### removeRule\n\nRemoves the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ]\n}\n```\n\n#### removeTargets\n\nRemoves 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.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeUserTargets\n\nRemoves 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeValuesFromClause\n\nRemoves `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeValuesFromClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### removeVariation\n\nRemoves a variation from the flag.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag to remove.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### reorderRules\n\nRearranges 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.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all rules in the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"reorderRules\",\n\t\t\"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n\t}]\n}\n```\n\n#### replacePrerequisites\n\nRemoves all existing prerequisites and replaces them with the list you provide.\n\n##### Parameters\n\n- `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replacePrerequisites\",\n \"prerequisites\": [\n {\n \"key\": \"prereq-flag-key-123abc\",\n \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\"\n },\n {\n \"key\": \"another-prereq-flag-key-456def\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\"\n }\n ]\n }\n ]\n}\n```\n\n#### replaceRules\n\nRemoves all targeting rules for the flag and replaces them with the list you provide.\n\n##### Parameters\n\n- `rules`: A list of rules.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceRules\",\n \"rules\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"description\": \"My new rule\",\n \"clauses\": [\n {\n \"contextKind\": \"user\",\n \"attribute\": \"segmentMatch\",\n \"op\": \"segmentMatch\",\n \"values\": [\"test\"]\n }\n ],\n \"trackEvents\": true\n }\n ]\n }\n ]\n}\n```\n\n#### replaceTargets\n\nRemoves all existing targeting and replaces it with the list of targets you provide.\n\n##### Parameters\n\n- `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`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceTargets\",\n \"targets\": [\n {\n \"contextKind\": \"user\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\"]\n },\n {\n \"contextKind\": \"device\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"device-key-456def\"]\n }\n ]\n } \n ]\n}\n```\n\n#### replaceUserTargets\n\nRemoves 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.\n\n##### Parameters\n\n- `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceUserTargets\",\n \"targets\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\", \"user-key-456def\"]\n },\n {\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"user-key-789ghi\"]\n }\n ]\n }\n ]\n}\n```\n\n#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `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.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"updateClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\",\n \"clause\": {\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Mexico\", \"Canada\"]\n }\n }]\n}\n```\n\n#### updateDefaultVariation\n\nUpdates the default on or off variation of the flag.\n\n##### Parameters\n\n- `onVariationValue`: (Optional) The value of the variation of the new on variation.\n- `offVariationValue`: (Optional) The value of the variation of the new off variation\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ]\n}\n```\n\n#### updateFallthroughVariationOrRollout\n\nUpdates 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.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nor\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"rolloutContextKind\": \"user\",\n\t\t\"rolloutWeights\": {\n\t\t\t\"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n\t\t\t\"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n\t\t}\n\t}]\n}\n```\n\n#### updateOffVariation\n\nUpdates the default off variation to `variationId`. The flag serves the default off variation when the flag's targeting is **Off**.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### updatePrerequisite\n\nChanges the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updatePrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateRuleDescription\n\nUpdates the description of the feature flag rule.\n\n##### Parameters\n\n- `description`: The new human-readable description for this rule.\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleDescription\",\n\t\t\"description\": \"New rule description\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n\t}]\n}\n```\n\n#### updateRuleTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag associated with this rule.\n\n##### Parameters\n\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleTrackEvents\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"trackEvents\": true\n\t}]\n}\n```\n\n#### updateRuleVariationOrRollout\n\nUpdates 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.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `variationId`: ID of a variation of the flag.\n\n or\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleVariationOrRollout\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for all rules.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEvents\", \"trackEvents\": true } ]\n}\n```\n\n#### updateTrackEventsFallthrough\n\nUpdates whether or not LaunchDarkly tracks events for the feature flag, for the default rule.\n\n##### Parameters\n\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ]\n}\n```\n\n#### updateVariation\n\nUpdates a variation of the flag.\n\n##### Parameters\n\n- `variationId`: The ID of the variation to update.\n- `name`: (Optional) The updated variation name.\n- `value`: (Optional) The updated variation value.\n- `description`: (Optional) The updated variation description.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ]\n}\n```\n\n

\n\n
\nClick to expand instructions for updating flag settings\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### addCustomProperties\n\nAdds 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.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"addCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"name\": \"Example custom property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### addTags\n\nAdds tags to the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### makeFlagPermanent\n\nMarks 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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagPermanent\" } ]\n}\n```\n\n#### makeFlagTemporary\n\nMarks the feature flag as temporary.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagTemporary\" } ]\n}\n```\n\n#### removeCustomProperties\n\nRemoves the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `values`: A list of the associated values to remove from the custom property.\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"replaceCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### removeMaintainer\n\nRemoves the flag's maintainer. To set a new maintainer, use the `updateMaintainerMember` or `updateMaintainerTeam` instructions.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeMaintainer\" } ]\n}\n```\n\n#### removeTags\n\nRemoves tags from the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### replaceCustomProperties\n\nReplaces the existing associated values for a custom property with the new values.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the new associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceCustomProperties\",\n \"key\": \"example-custom-property\",\n \"name\": \"Example custom property\",\n \"values\": [\"value1\", \"value2\"]\n }]\n}\n```\n\n#### turnOffClientSideAvailability\n\nTurns 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.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn off availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOffClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### turnOnClientSideAvailability\n\nTurns on client-side SDK availability for the flag. This is equivalent to checking 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.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn on availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOnClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### updateDescription\n\nUpdates the feature flag description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateDescription\", \"value\": \"Updated flag description\" } ]\n}\n```\n#### updateMaintainerMember\n\nUpdates the maintainer of the flag to an existing member and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The ID of the member.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerMember\", \"value\": \"61e9b714fd47591727db558a\" } ]\n}\n```\n\n#### updateMaintainerTeam\n\nUpdates the maintainer of the flag to an existing team and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The key of the team.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerTeam\", \"value\": \"example-team-key\" } ]\n}\n```\n\n#### updateName\n\nUpdates the feature flag name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateName\", \"value\": \"Updated flag name\" } ]\n}\n```\n\n

\n\n
\nClick to expand instructions for updating the flag lifecycle\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### archiveFlag\n\nArchives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.\n\n```json\n{\n \"instructions\": [ { \"kind\": \"archiveFlag\" } ]\n}\n```\n\n#### deleteFlag\n\nDeletes 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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deleteFlag\" } ]\n}\n```\n\n#### deprecateFlag\n\nDeprecates the feature flag. This hides it from the live flags list without archiving or deleting it.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deprecateFlag\" } ]\n}\n```\n\n#### restoreDeprecatedFlag\n\nRestores the feature flag if it was previously deprecated.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ]\n}\n```\n\n#### restoreFlag\n\nRestores the feature flag if it was previously archived.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreFlag\" } ]\n}\n```\n\n
\n\n### Using JSON patches on a feature flag\n\nIf you do not include the semantic patch header described above, you can use a [JSON patch](/reference#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes.\n\nIn the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](/tag/Feature-flags#operation/getFeatureFlag) endpoint to find the field you want to update.\n\nThere are a few special cases to keep in mind when determining the value of the `path` element:\n\n * 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:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/0/values/-\",\n \"value\": \"TestClient10\"\n }\n ]\n ```\n\n * 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:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/-\",\n \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] }\n }\n ]\n ```\n\n * To add a flag to a release pipeline, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/releasePipelineKey\",\n \"value\": \"example-release-pipeline-key\"\n }\n ]\n ```\n\n### Required approvals\nIf 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](/tag/Approvals) or a [workflow](/tag/Workflows).\n\n### Conflicts\nIf 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`.\n\n### Migration flags\nFor 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`.\nWhen you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`.\nTo learn more, read [Migration flags](https://docs.launchdarkly.com/home/flags/migration).\n", "parameters": [ { "name": "projectKey", @@ -5094,6 +5365,15 @@ "format": "string", "description": "The feature flag key. The key identifies the flag in your code." } + }, + { + "name": "ignoreConflicts", + "in": "query", + "description": "If true, the patch will be applied even if it causes a pending scheduled change or approval request to fail.", + "schema": { + "type": "boolean", + "description": "If true, the patch will be applied even if it causes a pending scheduled change or approval request to fail." + } } ], "requestBody": { @@ -5398,25 +5678,15 @@ "operationId": "getDependentFlags" } }, - "/api/v2/flags/{projectKey}/{featureFlagKey}/experiments/{environmentKey}/{metricKey}": { + "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}": { "get": { "responses": { "200": { - "description": "Experiment results response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExperimentResults" - } - } - } - }, - "400": { - "description": "Invalid request", + "description": "Expiring target response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/ExpiringTargetGetResponse" } } } @@ -5463,10 +5733,10 @@ } }, "tags": [ - "Experiments (beta)" + "Feature flags" ], - "summary": "Get legacy experiment results (deprecated)", - "description": "Get detailed experiment result data for legacy experiments.", + "summary": "Get expiring context targets for feature flag", + "description": "Get a list of context targets on a feature flag that are scheduled for removal.", "parameters": [ { "name": "projectKey", @@ -5480,72 +5750,155 @@ } }, { - "name": "featureFlagKey", + "name": "environmentKey", "in": "path", - "description": "The feature flag key", + "description": "The environment key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The feature flag key" + "description": "The environment key" } }, { - "name": "environmentKey", + "name": "featureFlagKey", "in": "path", - "description": "The environment key", + "description": "The feature flag key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The environment key" + "description": "The feature flag key" + } + } + ], + "operationId": "getExpiringContextTargets" + }, + "patch": { + "responses": { + "200": { + "description": "Expiring target response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExpiringTargetPatchResponse" + } + } } }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Feature flags" + ], + "summary": "Update expiring context targets on feature flag", + "description": "Schedule a context for removal from individual targeting on a feature flag. The flag must already individually target the context.\n\nYou can add, update, or remove a scheduled removal date. You can only schedule a context for removal on a single variation per flag.\n\nUpdating 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring targets.\n\n
\nClick to expand instructions for updating expiring targets\n\n#### addExpiringTarget\n\nAdds a date and time that LaunchDarkly will remove the context from the flag's individual targeting.\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the context from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `contextKey`: The context key for the context to remove from individual targeting\n* `contextKind`: The kind of context represented by the `contextKey`\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExpiringTarget\",\n \"value\": 1754006460000,\n \"variationId\": \"4254742c-71ae-411f-a992-43b18a51afe0\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\"\n }]\n}\n```\n\n#### updateExpiringTarget\n\nUpdates the date and time that LaunchDarkly will remove the context from the flag's individual targeting\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the context from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `contextKey`: The context key for the context to remove from individual targeting\n* `contextKind`: The kind of context represented by the `contextKey`\n* `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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExpiringTarget\",\n \"value\": 1754006460000,\n \"variationId\": \"4254742c-71ae-411f-a992-43b18a51afe0\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\"\n }]\n}\n```\n\n#### removeExpiringTarget\n\nRemoves 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.\n\n##### Parameters\n\n* `variationId`: ID of a variation on the flag\n* `contextKey`: The context key for the context to remove from individual targeting\n* `contextKind`: The kind of context represented by the `contextKey`\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExpiringTarget\",\n \"variationId\": \"4254742c-71ae-411f-a992-43b18a51afe0\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\"\n }]\n}\n```\n\n
\n", + "parameters": [ { - "name": "metricKey", + "name": "projectKey", "in": "path", - "description": "The metric key", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The metric key" + "description": "The project key" } }, { - "name": "from", - "in": "query", - "description": "A timestamp denoting the start of the data collection period, expressed as a Unix epoch time in milliseconds.", + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "description": "A timestamp denoting the start of the data collection period, expressed as a Unix epoch time in milliseconds." + "type": "string", + "format": "string", + "description": "The environment key" } }, { - "name": "to", - "in": "query", - "description": "A timestamp denoting the end of the data collection period, expressed as a Unix epoch time in milliseconds.", + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "description": "A timestamp denoting the end of the data collection period, expressed as a Unix epoch time in milliseconds." + "type": "string", + "format": "string", + "description": "The feature flag key" } } ], - "operationId": "getLegacyExperimentResults", - "deprecated": true + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/patchFlagsRequest" + } + } + }, + "required": true + }, + "operationId": "patchExpiringTargets" } }, - "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-targets/{environmentKey}": { + "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}": { "get": { "responses": { "200": { - "description": "Expiring target response", + "description": "Expiring user target response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExpiringTargetGetResponse" + "$ref": "#/components/schemas/ExpiringUserTargetGetResponse" } } } @@ -5594,8 +5947,8 @@ "tags": [ "Feature flags" ], - "summary": "Get expiring context targets for feature flag", - "description": "Get a list of context targets on a feature flag that are scheduled for removal.", + "summary": "Get expiring user targets for feature flag", + "description": "\n> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring context targets for feature flag](/tag/Feature-flags#operation/getExpiringContextTargets) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nGet a list of user targets on a feature flag that are scheduled for removal.\n", "parameters": [ { "name": "projectKey", @@ -5631,16 +5984,16 @@ } } ], - "operationId": "getExpiringContextTargets" + "operationId": "getExpiringUserTargets" }, "patch": { "responses": { "200": { - "description": "Expiring target response", + "description": "Expiring user target response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExpiringTargetPatchResponse" + "$ref": "#/components/schemas/ExpiringUserTargetPatchResponse" } } } @@ -5699,8 +6052,8 @@ "tags": [ "Feature flags" ], - "summary": "Update expiring context targets on feature flag", - "description": "Schedule a context for removal from individual targeting on a feature flag. The flag must already individually target the context.\n\nYou can add, update, or remove a scheduled removal date. You can only schedule a context for removal on a single variation per flag.\n\nUpdating 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring targets.\n\n
\nClick to expand instructions for updating expiring targets\n\n#### addExpiringTarget\n\nAdds a date and time that LaunchDarkly will remove the context from the flag's individual targeting.\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the context from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `contextKey`: The context key for the context to remove from individual targeting\n* `contextKind`: The kind of context represented by the `contextKey`\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExpiringTarget\",\n \"value\": 1754006460000,\n \"variationId\": \"4254742c-71ae-411f-a992-43b18a51afe0\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\"\n }]\n}\n```\n\n#### updateExpiringTarget\n\nUpdates the date and time that LaunchDarkly will remove the context from the flag's individual targeting\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the context from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `contextKey`: The context key for the context to remove from individual targeting\n* `contextKind`: The kind of context represented by the `contextKey`\n* `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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExpiringTarget\",\n \"value\": 1754006460000,\n \"variationId\": \"4254742c-71ae-411f-a992-43b18a51afe0\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\"\n }]\n}\n```\n\n#### removeExpiringTarget\n\nRemoves 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.\n\n##### Parameters\n\n* `variationId`: ID of a variation on the flag\n* `contextKey`: The context key for the context to remove from individual targeting\n* `contextKind`: The kind of context represented by the `contextKey`\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExpiringTarget\",\n \"variationId\": \"4254742c-71ae-411f-a992-43b18a51afe0\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\"\n }]\n}\n```\n\n
\n", + "summary": "Update expiring user targets on feature flag", + "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring context targets on feature flag](/tag/Feature-flags#operation/patchExpiringTargets) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nSchedule 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.\n\nYou can add, update, or remove a scheduled removal date. You can only schedule a target for removal on a single variation per flag.\n\nUpdating 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring user targets.\n\n
\nClick to expand instructions for updating expiring user targets\n\n#### addExpireUserTargetDate\n\nAdds a date and time that LaunchDarkly will remove the user from the flag's individual targeting.\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `userKey`: The user key for the user to remove from individual targeting\n\n#### updateExpireUserTargetDate\n\nUpdates the date and time that LaunchDarkly will remove the user from the flag's individual targeting.\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `userKey`: The user key for the user to remove from individual targeting\n* `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.\n\n#### removeExpireUserTargetDate\n\nRemoves 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.\n\n##### Parameters\n\n* `variationId`: ID of a variation on the flag\n* `userKey`: The user key for the user to remove from individual targeting\n\n
\n", "parameters": [ { "name": "projectKey", @@ -5746,18 +6099,18 @@ }, "required": true }, - "operationId": "patchExpiringTargets" + "operationId": "patchExpiringUserTargets" } }, - "/api/v2/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}": { + "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}": { "get": { "responses": { "200": { - "description": "Expiring user target response", + "description": "Flag trigger collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExpiringUserTargetGetResponse" + "$ref": "#/components/schemas/TriggerWorkflowCollectionRep" } } } @@ -5782,16 +6135,6 @@ } } }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -5804,10 +6147,10 @@ } }, "tags": [ - "Feature flags" + "Flag triggers" ], - "summary": "Get expiring user targets for feature flag", - "description": "\n> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring context targets for feature flag](/tag/Feature-flags#operation/getExpiringContextTargets) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nGet a list of user targets on a feature flag that are scheduled for removal.\n", + "summary": "List flag triggers", + "description": "Get a list of all flag triggers.", "parameters": [ { "name": "projectKey", @@ -5843,16 +6186,16 @@ } } ], - "operationId": "getExpiringUserTargets" + "operationId": "getTriggerWorkflows" }, - "patch": { + "post": { "responses": { - "200": { - "description": "Expiring user target response", + "201": { + "description": "Flag trigger response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExpiringUserTargetPatchResponse" + "$ref": "#/components/schemas/TriggerWorkflowRep" } } } @@ -5909,10 +6252,10 @@ } }, "tags": [ - "Feature flags" + "Flag triggers" ], - "summary": "Update expiring user targets on feature flag", - "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring context targets on feature flag](/tag/Feature-flags#operation/patchExpiringTargets) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nSchedule 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.\n\nYou can add, update, or remove a scheduled removal date. You can only schedule a target for removal on a single variation per flag.\n\nUpdating 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring user targets.\n\n
\nClick to expand instructions for updating expiring user targets\n\n#### addExpireUserTargetDate\n\nAdds a date and time that LaunchDarkly will remove the user from the flag's individual targeting.\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `userKey`: The user key for the user to remove from individual targeting\n\n#### updateExpireUserTargetDate\n\nUpdates the date and time that LaunchDarkly will remove the user from the flag's individual targeting.\n\n##### Parameters\n\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag\n* `variationId`: ID of a variation on the flag\n* `userKey`: The user key for the user to remove from individual targeting\n* `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.\n\n#### removeExpireUserTargetDate\n\nRemoves 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.\n\n##### Parameters\n\n* `variationId`: ID of a variation on the flag\n* `userKey`: The user key for the user to remove from individual targeting\n\n
\n", + "summary": "Create flag trigger", + "description": "Create a new flag trigger.", "parameters": [ { "name": "projectKey", @@ -5952,24 +6295,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/patchFlagsRequest" + "$ref": "#/components/schemas/triggerPost" } } }, "required": true }, - "operationId": "patchExpiringUserTargets" + "operationId": "createTriggerWorkflow" } }, - "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}": { + "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}": { "get": { "responses": { "200": { - "description": "Flag trigger collection response", + "description": "Flag trigger response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TriggerWorkflowCollectionRep" + "$ref": "#/components/schemas/TriggerWorkflowRep" } } } @@ -5994,6 +6337,16 @@ } } }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -6008,8 +6361,8 @@ "tags": [ "Flag triggers" ], - "summary": "List flag triggers", - "description": "Get a list of all flag triggers.", + "summary": "Get flag trigger by ID", + "description": "Get a flag trigger by ID.", "parameters": [ { "name": "projectKey", @@ -6022,6 +6375,17 @@ "description": "The project key" } }, + { + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The feature flag key" + } + }, { "name": "environmentKey", "in": "path", @@ -6034,22 +6398,22 @@ } }, { - "name": "featureFlagKey", + "name": "id", "in": "path", - "description": "The feature flag key", + "description": "The flag trigger ID", "required": true, "schema": { "type": "string", "format": "string", - "description": "The feature flag key" + "description": "The flag trigger ID" } } ], - "operationId": "getTriggerWorkflows" + "operationId": "getTriggerWorkflowById" }, - "post": { + "patch": { "responses": { - "201": { + "200": { "description": "Flag trigger response", "content": { "application/json": { @@ -6099,6 +6463,16 @@ } } }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -6113,241 +6487,8 @@ "tags": [ "Flag triggers" ], - "summary": "Create flag trigger", - "description": "Create a new flag trigger.", - "parameters": [ - { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/triggerPost" - } - } - }, - "required": true - }, - "operationId": "createTriggerWorkflow" - } - }, - "/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}": { - "get": { - "responses": { - "200": { - "description": "Flag trigger response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TriggerWorkflowRep" - } - } - } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } - } - }, - "tags": [ - "Flag triggers" - ], - "summary": "Get flag trigger by ID", - "description": "Get a flag trigger by ID.", - "parameters": [ - { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, - { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "id", - "in": "path", - "description": "The flag trigger ID", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The flag trigger ID" - } - } - ], - "operationId": "getTriggerWorkflowById" - }, - "patch": { - "responses": { - "200": { - "description": "Flag trigger response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TriggerWorkflowRep" - } - } - } - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, - "409": { - "description": "Status conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } - } - }, - "tags": [ - "Flag triggers" - ], - "summary": "Update flag trigger", - "description": "Update a flag trigger. Updating a flag trigger uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating flag triggers.\n\n
\nClick to expand instructions for updating flag triggers\n\n#### replaceTriggerActionInstructions\n\nRemoves the existing trigger action and replaces it with the new instructions.\n\n##### Parameters\n\n- `value`: An array of the new `kind`s of actions to perform when triggering. Supported flag actions are `turnFlagOn` and `turnFlagOff`.\n\nHere's an example that replaces the existing action with new instructions to turn flag targeting off:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"replaceTriggerActionInstructions\",\n \"value\": [ {\"kind\": \"turnFlagOff\"} ]\n }\n ]\n}\n```\n\n#### cycleTriggerUrl\n\nGenerates a new URL for this trigger. You must update any clients using the trigger to use this new URL.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"cycleTriggerUrl\" }]\n}\n```\n\n#### disableTrigger\n\nDisables the trigger. This saves the trigger configuration, but the trigger stops running. To re-enable, use `enableTrigger`.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"disableTrigger\" }]\n}\n```\n\n#### enableTrigger\n\nEnables the trigger. If you previously disabled the trigger, it begins running again.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"enableTrigger\" }]\n}\n```\n\n
\n", + "summary": "Update flag trigger", + "description": "Update a flag trigger. Updating a flag trigger uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating flag triggers.\n\n
\nClick to expand instructions for updating flag triggers\n\n#### replaceTriggerActionInstructions\n\nRemoves the existing trigger action and replaces it with the new instructions.\n\n##### Parameters\n\n- `value`: An array of the new `kind`s of actions to perform when triggering. Supported flag actions are `turnFlagOn` and `turnFlagOff`.\n\nHere's an example that replaces the existing action with new instructions to turn flag targeting off:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"replaceTriggerActionInstructions\",\n \"value\": [ {\"kind\": \"turnFlagOff\"} ]\n }\n ]\n}\n```\n\n#### cycleTriggerUrl\n\nGenerates a new URL for this trigger. You must update any clients using the trigger to use this new URL.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"cycleTriggerUrl\" }]\n}\n```\n\n#### disableTrigger\n\nDisables the trigger. This saves the trigger configuration, but the trigger stops running. To re-enable, use `enableTrigger`.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"disableTrigger\" }]\n}\n```\n\n#### enableTrigger\n\nEnables the trigger. If you previously disabled the trigger, it begins running again.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"enableTrigger\" }]\n}\n```\n\n
\n", "parameters": [ { "name": "projectKey", @@ -6638,7 +6779,7 @@ "Releases (beta)" ], "summary": "Patch release for flag", - "description": "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](/#section/Overview/Updates).\n\nYou 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:\n\n```\n [\n {\n \"op\": \"replace\",\n \"path\": \"/phase/0/complete\",\n \"value\": true\n }\n ]\n```\n", + "description": "This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](/tag/Releases-(beta)#operation/updatePhaseStatus) endpoint. To learn more about migrating from legacy release pipelines to fully automated release pipelines, read the [Release pipeline migration guide](https://docs.launchdarkly.com/guides/flags/release-pipeline-migration).\n\nUpdate 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](/#section/Overview/Updates).\n\nYou 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:\n\n```\n [\n {\n \"op\": \"replace\",\n \"path\": \"/phase/0/complete\",\n \"value\": true\n }\n ]\n```\n", "parameters": [ { "name": "projectKey", @@ -6681,6 +6822,63 @@ "required": true }, "operationId": "patchReleaseByFlagKey" + }, + "delete": { + "responses": { + "204": { + "description": "Action succeeded" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + } + }, + "tags": [ + "Releases (beta)" + ], + "summary": "Delete a release for flag", + "description": "Deletes a release from a flag", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "flagKey", + "in": "path", + "description": "The flag key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The flag key" + } + } + ], + "operationId": "deleteReleaseByFlagKey" } }, "/api/v2/integration-capabilities/big-segment-store": { @@ -6738,7 +6936,7 @@ } }, "tags": [ - "Integrations (beta)" + "Persistent store integrations (beta)" ], "summary": "List all big segment store integrations", "description": "List all big segment store integrations.", @@ -6820,7 +7018,7 @@ } }, "tags": [ - "Integrations (beta)" + "Persistent store integrations (beta)" ], "summary": "Create big segment store integration", "description": "\nCreate a persistent store integration.\n\nIf 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.\n\nYou 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.\n\nIf you are using Redis to create your persistent store integration, you will need to know:\n\n* Your Redis host\n* Your Redis port\n* Your Redis username\n* Your Redis password\n* Whether or not LaunchDarkly should connect using TLS\n\nIf you are using DynamoDB to create your persistent store integration, you will need to know:\n\n* Your DynamoDB table name. The table must have the following schema:\n * Partition key: `namespace` (string)\n * Sort key: `key` (string)\n* Your DynamoDB Amazon Web Services (AWS) region.\n* Your AWS role Amazon Resource Name (ARN). This is the role that LaunchDarkly will assume to manage your DynamoDB table.\n* The External ID you specified when creating your Amazon Resource Name (ARN).\n\nTo learn more, read [Segment configuration](https://docs.launchdarkly.com/home/flags/segment-config).\n", @@ -6938,7 +7136,7 @@ } }, "tags": [ - "Integrations (beta)" + "Persistent store integrations (beta)" ], "summary": "Get big segment store integration by ID", "description": "Get a big segment store integration by ID.", @@ -7064,7 +7262,7 @@ } }, "tags": [ - "Integrations (beta)" + "Persistent store integrations (beta)" ], "summary": "Update big segment store integration", "description": "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](/#section/Overview/Updates).", @@ -7183,7 +7381,7 @@ } }, "tags": [ - "Integrations (beta)" + "Persistent store integrations (beta)" ], "summary": "Delete big segment store integration", "description": "Delete a persistent store integration. Each integration uses either Redis or DynamoDB.", @@ -7970,88 +8168,15 @@ "operationId": "validateIntegrationDeliveryConfiguration" } }, - "/api/v2/integrations/{integrationKey}": { + "/api/v2/integration-capabilities/flag-import": { "get": { "responses": { "200": { - "description": "Integrations collection response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Integrations" - } - } - } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } - } - }, - "tags": [ - "Integration audit log subscriptions" - ], - "summary": "Get audit log subscriptions by integration", - "description": "Get all audit log subscriptions associated with a given integration.", - "parameters": [ - { - "name": "integrationKey", - "in": "path", - "description": "The integration key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The integration key" - } - } - ], - "operationId": "getSubscriptions" - }, - "post": { - "responses": { - "201": { - "description": "Integration response", + "description": "Flag Import Configuration response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Integration" + "$ref": "#/components/schemas/FlagImportIntegrationCollection" } } } @@ -8087,199 +8212,7 @@ } }, "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } - } - }, - "tags": [ - "Integration audit log subscriptions" - ], - "summary": "Create audit log subscription", - "description": "Create an audit log subscription.

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/account/role-concepts).", - "parameters": [ - { - "name": "integrationKey", - "in": "path", - "description": "The integration key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The integration key" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/subscriptionPost" - }, - "example": { - "config": { - "optional": "an optional property", - "required": "the required property", - "url": "https://example.com" - }, - "name": "Example audit log subscription.", - "on": false, - "statements": [ - { - "actions": [ - "*" - ], - "effect": "allow", - "resources": [ - "proj/*:env/*:flag/*;testing-tag" - ] - } - ], - "tags": [ - "testing-tag" - ] - } - } - }, - "required": true - }, - "operationId": "createSubscription" - } - }, - "/api/v2/integrations/{integrationKey}/{id}": { - "get": { - "responses": { - "200": { - "description": "Integration response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Integration" - } - } - } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } - } - }, - "tags": [ - "Integration audit log subscriptions" - ], - "summary": "Get audit log subscription by ID", - "description": "Get an audit log subscription by ID.", - "parameters": [ - { - "name": "integrationKey", - "in": "path", - "description": "The integration key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The integration key" - } - }, - { - "name": "id", - "in": "path", - "description": "The subscription ID", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The subscription ID" - } - } - ], - "operationId": "getSubscriptionByID" - }, - "patch": { - "responses": { - "200": { - "description": "Integration response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Integration" - } - } - } - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, - "404": { - "description": "Invalid resource identifier", + "description": "Project not found", "content": { "application/json": { "schema": { @@ -8310,58 +8243,36 @@ } }, "tags": [ - "Integration audit log subscriptions" + "Flag import configurations (beta)" ], - "summary": "Update audit log subscription", - "description": "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](/#section/Overview/Updates).", - "parameters": [ - { - "name": "integrationKey", - "in": "path", - "description": "The integration key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The integration key" + "summary": "List all flag import configurations", + "description": "List all flag import configurations.", + "operationId": "getFlagImportConfigurations" + } + }, + "/api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}": { + "post": { + "responses": { + "200": { + "description": "Flag Import Configuration response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlagImportIntegration" + } + } } }, - { - "name": "id", - "in": "path", - "description": "The ID of the audit log subscription", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The ID of the audit log subscription" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JSONPatch" - }, - "example": [ - { - "op": "replace", - "path": "/on", - "value": false + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" } - ] + } } }, - "required": true - }, - "operationId": "updateSubscription" - }, - "delete": { - "responses": { - "204": { - "description": "Action succeeded" - }, "401": { "description": "Invalid access token", "content": { @@ -8383,7 +8294,7 @@ } }, "404": { - "description": "Invalid resource identifier", + "description": "Project not found", "content": { "application/json": { "schema": { @@ -8392,6 +8303,16 @@ } } }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -8404,46 +8325,81 @@ } }, "tags": [ - "Integration audit log subscriptions" + "Flag import configurations (beta)" ], - "summary": "Delete audit log subscription", - "description": "Delete an audit log subscription.", + "summary": "Create a flag import configuration", + "description": "Create a new flag import configuration. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`. The `config` object in the request body schema is described by the global integration settings, as specified by the formVariables in the manifest.json for this integration. It varies slightly based on the `integrationKey`.", "parameters": [ { - "name": "integrationKey", + "name": "projectKey", "in": "path", - "description": "The integration key", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The integration key" + "description": "The project key" } }, { - "name": "id", + "name": "integrationKey", "in": "path", - "description": "The subscription ID", + "description": "The integration key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The subscription ID" + "description": "The integration key" } } ], - "operationId": "deleteSubscription" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlagImportConfigurationPost" + }, + "example": { + "config": { + "environmentId": "The ID of the environment in the external system", + "ldApiKey": "An API key with create flag permissions in your LaunchDarkly account", + "ldMaintainer": "The ID of the member who will be the maintainer of the imported flags", + "ldTag": "A tag to apply to all flags imported to LaunchDarkly", + "splitTag": "If provided, imports only the flags from the external system with this tag. Leave blank to import all flags.", + "workspaceApiKey": "An API key with read permissions in the external feature management system", + "workspaceId": "The ID of the workspace in the external system" + }, + "name": "Sample configuration", + "tags": [ + "example-tag" + ] + } + } + }, + "required": true + }, + "operationId": "createFlagImportConfiguration" } }, - "/api/v2/members": { + "/api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}": { "get": { "responses": { "200": { - "description": "Members collection response", + "description": "Flag import response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Members" + "$ref": "#/components/schemas/FlagImportIntegration" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -8469,7 +8425,7 @@ } }, "404": { - "description": "Invalid resource identifier", + "description": "Project or import configuration not found", "content": { "application/json": { "schema": { @@ -8478,6 +8434,16 @@ } } }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -8490,62 +8456,55 @@ } }, "tags": [ - "Account members" + "Flag import configurations (beta)" ], - "summary": "List account members", - "description": "Return a list of account members.\n\nBy 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.\n\n### Filtering members\n\nLaunchDarkly supports the following fields for filters:\n\n- `query` is a string that matches against the members' emails and names. It is not case sensitive.\n- `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`.\n- `team` is a string that matches against the key of the teams the members belong to. It is not case sensitive.\n- `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.\n- `lastSeen` is a JSON object in one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `accessCheck` is a string that represents a specific action on a specific resource and is in the format `:`. 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).\n - 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.\n - Wildcard and tag filters are not supported when filtering for access.\n\nFor 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`.\n\n### Sorting members\n\nLaunchDarkly supports two fields for sorting: `displayName` and `lastSeen`:\n\n- `displayName` sorts by first + last name, using the member's email if no name is set.\n- `lastSeen` sorts by the `_lastSeen` property. LaunchDarkly considers members that have never been seen or have no data the oldest.\n", + "summary": "Get a single flag import configuration", + "description": "Get a single flag import configuration by ID. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`.", "parameters": [ { - "name": "limit", - "in": "query", - "description": "The number of members to return in the response. Defaults to 20.", - "schema": { - "type": "integer", - "format": "int64", - "description": "The number of members to return in the response. Defaults to 20." - } - }, - { - "name": "offset", - "in": "query", - "description": "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`.", + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "description": "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`." + "type": "string", + "format": "string", + "description": "The project key" } }, { - "name": "filter", - "in": "query", - "description": "A comma-separated list of filters. Each filter is of the form `field:value`. Supported fields are explained above.", + "name": "integrationKey", + "in": "path", + "description": "The integration key, for example, `split`", + "required": true, "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of filters. Each filter is of the form `field:value`. Supported fields are explained above." + "description": "The integration key, for example, `split`" } }, { - "name": "sort", - "in": "query", - "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order.", + "name": "integrationId", + "in": "path", + "description": "The integration ID", + "required": true, "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order." + "description": "The integration ID" } } ], - "operationId": "getMembers" + "operationId": "getFlagImportConfiguration" }, - "post": { + "patch": { "responses": { - "201": { - "description": "Member collection response", + "200": { + "description": "Flag import response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Members" + "$ref": "#/components/schemas/FlagImportIntegration" } } } @@ -8580,6 +8539,16 @@ } } }, + "404": { + "description": "Project or import configuration not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, "409": { "description": "Status conflict", "content": { @@ -8602,60 +8571,88 @@ } }, "tags": [ - "Account members" + "Flag import configurations (beta)" + ], + "summary": "Update a flag import configuration", + "description": "Updating a flag import configuration uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](/#section/Overview/Updates).

To add an element to the import configuration fields that are arrays, set the `path` to the name of the field and then append `/`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.

You can update the `config`, `tags`, and `name` of the flag import configuration.", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "integrationKey", + "in": "path", + "description": "The integration key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The integration key" + } + }, + { + "name": "integrationId", + "in": "path", + "description": "The integration ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The integration ID" + } + } ], - "summary": "Invite new members", - "description": "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.\n\nEach 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.\n\nRequests to create account members will not work if SCIM is enabled for the account.\n\n_No more than 50 members may be created per request._\n\nA 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`:\n\n- **email_already_exists_in_account**: A member with this email address already exists in this account.\n- **email_taken_in_different_account**: A member with this email address exists in another account.\n- **duplicate_email**s: This request contains two or more members with the same email address.\n\nA request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request).\n", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewMemberFormListPost" + "$ref": "#/components/schemas/JSONPatch" } } }, "required": true }, - "operationId": "postMembers" + "operationId": "patchFlagImportConfiguration" }, - "patch": { + "delete": { "responses": { - "200": { - "description": "Members response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkEditMembersRep" - } - } - } + "204": { + "description": "Action completed successfully" }, - "400": { - "description": "Invalid request", + "401": { + "description": "Invalid access token", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/UnauthorizedErrorRep" } } } }, - "401": { - "description": "Invalid access token", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Project or import configuration not found", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -8682,45 +8679,60 @@ } }, "tags": [ - "Account members (beta)" + "Flag import configurations (beta)" ], - "summary": "Modify account members", - "description": "> ### Full use of this API resource is an Enterprise feature\n>\n> 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/).\n\nPerform a partial update to multiple members. Updating members uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating members.\n\n
\nClick to expand instructions for updating members\n\n#### replaceMembersRoles\n\nReplaces the roles of the specified members. This also removes all custom roles assigned to the specified members.\n\n##### Parameters\n\n- `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/account/built-in-roles).\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMemberRoles\",\n \"value\": \"reader\",\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\",\n \"507f1f77bcf86cd799439011\"\n ]\n }]\n}\n```\n\n#### replaceAllMembersRoles\n\nReplaces the roles of all members. This also removes all custom roles assigned to the specified members.\n\nMembers that match any of the filters are **excluded** from the update.\n\n##### Parameters\n\n- `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/account/built-in-roles).\n- `filterLastSeen`: (Optional) A JSON object with one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive.\n- `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`.\n- `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive.\n- `ignoredMemberIDs`: (Optional) A list of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceAllMembersRoles\",\n \"value\": \"reader\",\n \"filterLastSeen\": { \"never\": true }\n }]\n}\n```\n\n#### replaceMembersCustomRoles\n\nReplaces the custom roles of the specified members.\n\n##### Parameters\n\n- `values`: List of new custom roles. Must be a valid custom role key or ID.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembersCustomRoles\",\n \"values\": [ \"example-custom-role\" ],\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\",\n \"507f1f77bcf86cd799439011\"\n ]\n }]\n}\n```\n\n#### replaceAllMembersCustomRoles\n\nReplaces the custom roles of all members. Members that match any of the filters are **excluded** from the update.\n\n##### Parameters\n\n- `values`: List of new roles. Must be a valid custom role key or ID.\n- `filterLastSeen`: (Optional) A JSON object with one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive.\n- `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`.\n- `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive.\n- `ignoredMemberIDs`: (Optional) A list of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceAllMembersCustomRoles\",\n \"values\": [ \"example-custom-role\" ],\n \"filterLastSeen\": { \"never\": true }\n }]\n}\n```\n\n
\n", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/membersPatchInput" - }, - "example": { - "comment": "Optional comment about the update", - "instructions": [ - { - "kind": "replaceMembersRoles", - "memberIDs": [ - "1234a56b7c89d012345e678f", - "507f1f77bcf86cd799439011" - ], - "value": "reader" - } - ] - } + "summary": "Delete a flag import configuration", + "description": "Delete a flag import configuration by ID. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`.", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" } }, - "required": true - }, - "operationId": "patchMembers" + { + "name": "integrationKey", + "in": "path", + "description": "The integration key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The integration key" + } + }, + { + "name": "integrationId", + "in": "path", + "description": "The integration ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The integration ID" + } + } + ], + "operationId": "deleteFlagImportConfiguration" } }, - "/api/v2/members/{id}": { - "get": { + "/api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}/trigger": { + "post": { "responses": { - "200": { - "description": "Member response", + "201": { + "description": "Import job queued successfully" + }, + "400": { + "description": "Invalid request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Member" + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -8746,7 +8758,7 @@ } }, "404": { - "description": "Invalid resource identifier", + "description": "Project or import configuration not found", "content": { "application/json": { "schema": { @@ -8755,6 +8767,16 @@ } } }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -8767,33 +8789,57 @@ } }, "tags": [ - "Account members" + "Flag import configurations (beta)" ], - "summary": "Get account member", - "description": "Get a single account member by member ID.\n\n`me` is a reserved value for the `id` parameter that returns the caller's member information.\n", + "summary": "Trigger a single flag import run", + "description": "Trigger a single flag import run for an existing flag import configuration. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`.", "parameters": [ { - "name": "id", + "name": "projectKey", "in": "path", - "description": "The member ID", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The member ID" + "description": "The project key" + } + }, + { + "name": "integrationKey", + "in": "path", + "description": "The integration key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The integration key" + } + }, + { + "name": "integrationId", + "in": "path", + "description": "The integration ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The integration ID" } } ], - "operationId": "getMember" - }, - "patch": { + "operationId": "triggerFlagImportJob" + } + }, + "/api/v2/integration-configurations/keys/{integrationKey}": { + "get": { "responses": { "200": { - "description": "Member response", + "description": "List of Integration Configurations", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Member" + "$ref": "#/components/schemas/IntegrationConfigurationCollectionRep" } } } @@ -8829,7 +8875,7 @@ } }, "404": { - "description": "Invalid resource identifier", + "description": "Integration key not found", "content": { "application/json": { "schema": { @@ -8838,16 +8884,6 @@ } } }, - "409": { - "description": "Status conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -8860,46 +8896,46 @@ } }, "tags": [ - "Account members" + "Integrations (beta)" ], - "summary": "Modify an account member", - "description": "\nUpdate 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](/#section/Overview/Updates).\n\nTo update fields in the account member object that are arrays, set the `path` to the name of the field and then append `/`. 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:\n\n```\n [\n {\n \"op\": \"add\",\n \"path\": \"/customRoles/0\",\n \"value\": \"some-role-id\"\n }\n ]\n```\n\nYou 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.\n\nWhen 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.\n", + "summary": "Get all configurations for the integration", + "description": "Get all integration configurations with the specified integration key. (Excludes [persistent store](/tag/Persistent-store-integrations-(beta)) and [flag import configurations](/tag/Flag-import-configurations-(beta))).", "parameters": [ { - "name": "id", + "name": "integrationKey", "in": "path", - "description": "The member ID", + "description": "Integration key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The member ID" + "description": "Integration key" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JSONPatch" - }, - "example": [ - { - "op": "add", - "path": "/role", - "value": "writer" + "operationId": "getAllIntegrationConfigurations" + }, + "post": { + "responses": { + "201": { + "description": "Integration Configuration response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationConfigurationsRep" } - ] + } } }, - "required": true - }, - "operationId": "patchMember" - }, - "delete": { - "responses": { - "204": { - "description": "Action succeeded" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } }, "401": { "description": "Invalid access token", @@ -8922,7 +8958,7 @@ } }, "404": { - "description": "Invalid resource identifier", + "description": "Integration key not found", "content": { "application/json": { "schema": { @@ -8953,35 +8989,45 @@ } }, "tags": [ - "Account members" + "Integrations (beta)" ], - "summary": "Delete account member", - "description": "Delete a single account member by ID. Requests to delete account members will not work if SCIM is enabled for the account.", + "summary": "Create integration configuration", + "description": "Create a new integration configuration. (Excludes [persistent store](/tag/Persistent-store-integrations-(beta)) and [flag import configurations](/tag/Flag-import-configurations-(beta)).)", "parameters": [ { - "name": "id", + "name": "integrationKey", "in": "path", - "description": "The member ID", + "description": "The integration key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The member ID" + "description": "The integration key" } } ], - "operationId": "deleteMember" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationConfigurationPost" + } + } + }, + "required": true + }, + "operationId": "createIntegrationConfiguration" } }, - "/api/v2/members/{id}/teams": { - "post": { + "/api/v2/integration-configurations/{integrationConfigurationId}": { + "get": { "responses": { - "201": { - "description": "Member response", + "200": { + "description": "Integration Configuration response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Member" + "$ref": "#/components/schemas/IntegrationConfigurationsRep" } } } @@ -9017,7 +9063,7 @@ } }, "404": { - "description": "Member not found", + "description": "Integration ID not found", "content": { "application/json": { "schema": { @@ -9026,16 +9072,6 @@ } } }, - "409": { - "description": "Status conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -9048,55 +9084,53 @@ } }, "tags": [ - "Account members" + "Integrations (beta)" ], - "summary": "Add a member to teams", - "description": "Add one member to one or more teams.", + "summary": "Get an integration configuration", + "description": "Get integration configuration with the specified ID. (Excludes [persistent store](/tag/Persistent-store-integrations-(beta)) and [flag import configurations](/tag/Flag-import-configurations-(beta)).)", "parameters": [ { - "name": "id", + "name": "integrationConfigurationId", "in": "path", - "description": "The member ID", + "description": "Integration configuration ID", "required": true, "schema": { "type": "string", "format": "string", - "description": "The member ID" + "description": "Integration configuration ID" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemberTeamsPostInput" + "operationId": "getIntegrationConfiguration" + }, + "patch": { + "responses": { + "200": { + "description": "Integration configuration response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationConfigurationsRep" + } } } }, - "required": true - }, - "operationId": "postMemberTeams" - } - }, - "/api/v2/metrics/{projectKey}": { - "get": { - "responses": { - "200": { - "description": "Metrics collection response", + "400": { + "description": "Invalid request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MetricCollectionRep" + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } }, - "401": { - "description": "Invalid access token", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } @@ -9110,46 +9144,224 @@ } } } - } + }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } }, "tags": [ - "Metrics" + "Integrations (beta)" ], - "summary": "List metrics", - "description": "Get a list of all metrics for the specified project.\n\n### Expanding the metric list response\nLaunchDarkly supports expanding the \"List metrics\" response. By default, the expandable field is **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add the following supported field:\n\n- `experimentCount` includes the number of experiments from the specific project that use the metric\n\nFor example, `expand=experimentCount` includes the `experimentCount` field for each metric in the response.\n", + "summary": "Update integration configuration", + "description": "Update an integration configuration. Updating an integration configuration uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](/#section/Overview/Updates).", "parameters": [ { - "name": "projectKey", + "name": "integrationConfigurationId", "in": "path", - "description": "The project key", + "description": "The ID of the integration configuration", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The ID of the integration configuration" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONPatch" + }, + "example": [ + { + "op": "replace", + "path": "/on", + "value": false + } + ] + } + }, + "required": true + }, + "operationId": "updateIntegrationConfiguration" + }, + "delete": { + "responses": { + "204": { + "description": "Action succeeded" + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } } }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Integrations (beta)" + ], + "summary": "Delete integration configuration", + "description": "Delete an integration configuration by ID. (Excludes [persistent store](/tag/Persistent-store-integrations-(beta)) and [flag import configurations](/tag/Flag-import-configurations-(beta)).)", + "parameters": [ { - "name": "expand", - "in": "query", - "description": "A comma-separated list of properties that can reveal additional information in the response.", + "name": "integrationConfigurationId", + "in": "path", + "description": "The ID of the integration configuration to be deleted", + "required": true, "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of properties that can reveal additional information in the response." + "description": "The ID of the integration configuration to be deleted" } } ], - "operationId": "getMetrics" + "operationId": "deleteIntegrationConfiguration" + } + }, + "/api/v2/integrations/{integrationKey}": { + "get": { + "responses": { + "200": { + "description": "Integrations collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integrations" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Integration audit log subscriptions" + ], + "summary": "Get audit log subscriptions by integration", + "description": "Get all audit log subscriptions associated with a given integration.", + "parameters": [ + { + "name": "integrationKey", + "in": "path", + "description": "The integration key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The integration key" + } + } + ], + "operationId": "getSubscriptions" }, "post": { "responses": { "201": { - "description": "Metric response", + "description": "Integration response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MetricRep" + "$ref": "#/components/schemas/Integration" } } } @@ -9194,16 +9406,6 @@ } } }, - "409": { - "description": "Status conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -9216,20 +9418,20 @@ } }, "tags": [ - "Metrics" + "Integration audit log subscriptions" ], - "summary": "Create metric", - "description": "Create a new metric in the specified project. The expected `POST` body differs depending on the specified `kind` property.", + "summary": "Create audit log subscription", + "description": "Create an audit log subscription.

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/account/role-concepts).", "parameters": [ { - "name": "projectKey", + "name": "integrationKey", "in": "path", - "description": "The project key", + "description": "The integration key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The integration key" } } ], @@ -9237,31 +9439,47 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MetricPost" + "$ref": "#/components/schemas/subscriptionPost" }, "example": { - "eventKey": "trackedClick", - "isActive": true, - "isNumeric": false, - "key": "metric-key-123abc", - "kind": "custom" + "config": { + "optional": "an optional property", + "required": "the required property", + "url": "https://example.com" + }, + "name": "Example audit log subscription.", + "on": false, + "statements": [ + { + "actions": [ + "*" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*:flag/*;testing-tag" + ] + } + ], + "tags": [ + "testing-tag" + ] } } }, "required": true }, - "operationId": "postMetric" + "operationId": "createSubscription" } }, - "/api/v2/metrics/{projectKey}/{metricKey}": { + "/api/v2/integrations/{integrationKey}/{id}": { "get": { "responses": { "200": { - "description": "Metric response", + "description": "Integration response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MetricRep" + "$ref": "#/components/schemas/Integration" } } } @@ -9308,64 +9526,44 @@ } }, "tags": [ - "Metrics" + "Integration audit log subscriptions" ], - "summary": "Get metric", - "description": "Get information for a single metric from the specific project.\n\n### Expanding the metric response\nLaunchDarkly supports four fields for expanding the \"Get metric\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n- `experiments` includes all experiments from the specific project that use the metric\n- `experimentCount` includes the number of experiments from the specific project that use the metric\n- `metricGroups` includes all metric groups from the specific project that use the metric\n- `metricGroupCount` includes the number of metric groups from the specific project that use the metric\n\nFor example, `expand=experiments` includes the `experiments` field in the response.\n", + "summary": "Get audit log subscription by ID", + "description": "Get an audit log subscription by ID.", "parameters": [ { - "name": "projectKey", + "name": "integrationKey", "in": "path", - "description": "The project key", + "description": "The integration key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The integration key" } }, { - "name": "metricKey", + "name": "id", "in": "path", - "description": "The metric key", + "description": "The subscription ID", "required": true, "schema": { "type": "string", "format": "string", - "description": "The metric key" - } - }, - { - "name": "expand", - "in": "query", - "description": "A comma-separated list of properties that can reveal additional information in the response.", - "schema": { - "type": "string", - "format": "string", - "description": "A comma-separated list of properties that can reveal additional information in the response." - } - }, - { - "name": "versionId", - "in": "query", - "description": "The specific version ID of the metric", - "schema": { - "type": "string", - "format": "string", - "description": "The specific version ID of the metric" + "description": "The subscription ID" } } ], - "operationId": "getMetric" + "operationId": "getSubscriptionByID" }, "patch": { "responses": { "200": { - "description": "Metric response", + "description": "Integration response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MetricRep" + "$ref": "#/components/schemas/Integration" } } } @@ -9380,12 +9578,12 @@ } } }, - "401": { - "description": "Invalid access token", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } @@ -9422,31 +9620,31 @@ } }, "tags": [ - "Metrics" + "Integration audit log subscriptions" ], - "summary": "Update metric", - "description": "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](/#section/Overview/Updates).", + "summary": "Update audit log subscription", + "description": "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](/#section/Overview/Updates).", "parameters": [ { - "name": "projectKey", + "name": "integrationKey", "in": "path", - "description": "The project key", + "description": "The integration key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The integration key" } }, { - "name": "metricKey", + "name": "id", "in": "path", - "description": "The metric key", + "description": "The ID of the audit log subscription", "required": true, "schema": { "type": "string", "format": "string", - "description": "The metric key" + "description": "The ID of the audit log subscription" } } ], @@ -9459,15 +9657,15 @@ "example": [ { "op": "replace", - "path": "/name", - "value": "my-updated-metric" + "path": "/on", + "value": false } ] } }, "required": true }, - "operationId": "patchMetric" + "operationId": "updateSubscription" }, "delete": { "responses": { @@ -9516,96 +9714,158 @@ } }, "tags": [ - "Metrics" + "Integration audit log subscriptions" ], - "summary": "Delete metric", - "description": "Delete a metric by key.", + "summary": "Delete audit log subscription", + "description": "Delete an audit log subscription.", "parameters": [ { - "name": "projectKey", + "name": "integrationKey", "in": "path", - "description": "The project key", + "description": "The integration key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The integration key" } }, { - "name": "metricKey", + "name": "id", "in": "path", - "description": "The metric key", + "description": "The subscription ID", "required": true, "schema": { "type": "string", "format": "string", - "description": "The metric key" + "description": "The subscription ID" } } ], - "operationId": "deleteMetric" + "operationId": "deleteSubscription" } }, - "/api/v2/oauth/clients": { + "/api/v2/members": { "get": { "responses": { "200": { - "description": "OAuth 2.0 client collection response", + "description": "Members collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClientCollection" + "$ref": "#/components/schemas/Members" } } } }, - "400": { - "description": "Invalid request", + "401": { + "description": "Invalid access token", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/UnauthorizedErrorRep" } } } }, - "401": { - "description": "Invalid access token", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" } } } } }, "tags": [ - "OAuth2 Clients" + "Account members" ], - "summary": "Get clients", - "description": "Get all OAuth 2.0 clients registered by your account.", - "operationId": "getOAuthClients" + "summary": "List account members", + "description": "Return a list of account members.\n\nBy 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.\n\n### Filtering members\n\nLaunchDarkly supports the following fields for filters:\n\n- `query` is a string that matches against the members' emails and names. It is not case sensitive.\n- `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`.\n- `id` is a `|` separated list of member IDs. It filters the list to members who match any of the IDs in the list.\n- `email` is a `|` separated list of member emails. It filters the list to members who match any of the emails in the list.\n- `team` is a string that matches against the key of the teams the members belong to. It is not case sensitive.\n- `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.\n- `lastSeen` is a JSON object in one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `accessCheck` is a string that represents a specific action on a specific resource and is in the format `:`. 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).\n - 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.\n - Wildcard and tag filters are not supported when filtering for access.\n\nFor 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`.\n\n### Sorting members\n\nLaunchDarkly supports two fields for sorting: `displayName` and `lastSeen`:\n\n- `displayName` sorts by first + last name, using the member's email if no name is set.\n- `lastSeen` sorts by the `_lastSeen` property. LaunchDarkly considers members that have never been seen or have no data the oldest.\n", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "The number of members to return in the response. Defaults to 20.", + "schema": { + "type": "integer", + "format": "int64", + "description": "The number of members to return in the response. Defaults to 20." + } + }, + { + "name": "offset", + "in": "query", + "description": "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`.", + "schema": { + "type": "integer", + "format": "int64", + "description": "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`." + } + }, + { + "name": "filter", + "in": "query", + "description": "A comma-separated list of filters. Each filter is of the form `field:value`. Supported fields are explained above.", + "schema": { + "type": "string", + "format": "string", + "description": "A comma-separated list of filters. Each filter is of the form `field:value`. Supported fields are explained above." + } + }, + { + "name": "expand", + "in": "query", + "description": "A comma-separated list of properties that can reveal additional information in the response.", + "schema": { + "type": "string", + "format": "string", + "description": "A comma-separated list of properties that can reveal additional information in the response." + } + }, + { + "name": "sort", + "in": "query", + "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order.", + "schema": { + "type": "string", + "format": "string", + "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order." + } + } + ], + "operationId": "getMembers" }, "post": { "responses": { "201": { - "description": "OAuth 2.0 client response", + "description": "Member collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Client" + "$ref": "#/components/schemas/Members" } } } @@ -9639,35 +9899,53 @@ } } } + }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } }, "tags": [ - "OAuth2 Clients" + "Account members" ], - "summary": "Create a LaunchDarkly OAuth 2.0 client", - "description": "Create (register) a LaunchDarkly OAuth2 client. OAuth2 clients allow you to build custom integrations using LaunchDarkly as your identity provider.", + "summary": "Invite new members", + "description": "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.\n\nEach 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.\n\nRequests to create account members will not work if SCIM is enabled for the account.\n\n_No more than 50 members may be created per request._\n\nA 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`:\n\n- **email_already_exists_in_account**: A member with this email address already exists in this account.\n- **email_taken_in_different_account**: A member with this email address exists in another account.\n- **duplicate_email**s: This request contains two or more members with the same email address.\n\nA request that fails for one of the above reasons returns an HTTP response code of 400 (Bad Request).\n", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/oauthClientPost" + "$ref": "#/components/schemas/NewMemberFormListPost" } } }, "required": true }, - "operationId": "createOAuth2Client" - } - }, - "/api/v2/oauth/clients/{clientId}": { - "get": { + "operationId": "postMembers" + }, + "patch": { "responses": { "200": { - "description": "OAuth 2.0 client response", + "description": "Members response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Client" + "$ref": "#/components/schemas/BulkEditMembersRep" } } } @@ -9702,45 +9980,150 @@ } } }, - "404": { - "description": "Invalid resource identifier", + "409": { + "description": "Status conflict", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" } } } } }, "tags": [ - "OAuth2 Clients" + "Account members (beta)" ], - "summary": "Get client by ID", - "description": "Get a registered OAuth 2.0 client by unique client ID.", - "parameters": [ - { - "name": "clientId", - "in": "path", - "description": "The client ID", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The client ID" - } + "summary": "Modify account members", + "description": "> ### Full use of this API resource is an Enterprise feature\n>\n> The ability to perform a partial update to multiple members is available to customers on an Enterprise plan. If you are on another 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/).\n\nPerform a partial update to multiple members. Updating members uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating members.\n\n
\nClick to expand instructions for updating members\n\n#### replaceMembersRoles\n\nReplaces the roles of the specified members. This also removes all custom roles assigned to the specified members.\n\n##### Parameters\n\n- `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/account/built-in-roles).\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMemberRoles\",\n \"value\": \"reader\",\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\",\n \"507f1f77bcf86cd799439011\"\n ]\n }]\n}\n```\n\n#### replaceAllMembersRoles\n\nReplaces the roles of all members. This also removes all custom roles assigned to the specified members.\n\nMembers that match any of the filters are **excluded** from the update.\n\n##### Parameters\n\n- `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/account/built-in-roles).\n- `filterLastSeen`: (Optional) A JSON object with one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive.\n- `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`.\n- `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive.\n- `ignoredMemberIDs`: (Optional) A list of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceAllMembersRoles\",\n \"value\": \"reader\",\n \"filterLastSeen\": { \"never\": true }\n }]\n}\n```\n\n#### replaceMembersCustomRoles\n\nReplaces the custom roles of the specified members.\n\n##### Parameters\n\n- `values`: List of new custom roles. Must be a valid custom role key or ID.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembersCustomRoles\",\n \"values\": [ \"example-custom-role\" ],\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\",\n \"507f1f77bcf86cd799439011\"\n ]\n }]\n}\n```\n\n#### replaceAllMembersCustomRoles\n\nReplaces the custom roles of all members. Members that match any of the filters are **excluded** from the update.\n\n##### Parameters\n\n- `values`: List of new roles. Must be a valid custom role key or ID.\n- `filterLastSeen`: (Optional) A JSON object with one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive.\n- `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`.\n- `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive.\n- `ignoredMemberIDs`: (Optional) A list of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceAllMembersCustomRoles\",\n \"values\": [ \"example-custom-role\" ],\n \"filterLastSeen\": { \"never\": true }\n }]\n}\n```\n\n
\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/membersPatchInput" + }, + "example": { + "comment": "Optional comment about the update", + "instructions": [ + { + "kind": "replaceMembersRoles", + "memberIDs": [ + "1234a56b7c89d012345e678f", + "507f1f77bcf86cd799439011" + ], + "value": "reader" + } + ] + } + } + }, + "required": true + }, + "operationId": "patchMembers" + } + }, + "/api/v2/members/{id}": { + "get": { + "responses": { + "200": { + "description": "Member response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Member" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } + }, + "tags": [ + "Account members" ], - "operationId": "getOAuthClientById" + "summary": "Get account member", + "description": "Get a single account member by member ID.\n\n`me` is a reserved value for the `id` parameter that returns the caller's member information.\n", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The member ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The member ID" + } + }, + { + "name": "expand", + "in": "query", + "description": "A comma-separated list of properties that can reveal additional information in the response.", + "schema": { + "type": "string", + "format": "string", + "description": "A comma-separated list of properties that can reveal additional information in the response." + } + } + ], + "operationId": "getMember" }, "patch": { "responses": { "200": { - "description": "OAuth 2.0 client response", + "description": "Member response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Client" + "$ref": "#/components/schemas/Member" } } } @@ -9784,23 +10167,43 @@ } } } + }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } }, "tags": [ - "OAuth2 Clients" + "Account members" ], - "summary": "Patch client by ID", - "description": "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](/#section/Overview/Updates). Only `name`, `description`, and `redirectUri` may be patched.", + "summary": "Modify an account member", + "description": "\nUpdate 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](/#section/Overview/Updates).\n\nTo update fields in the account member object that are arrays, set the `path` to the name of the field and then append `/`. 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:\n\n```\n [\n {\n \"op\": \"add\",\n \"path\": \"/customRoles/0\",\n \"value\": \"some-role-id\"\n }\n ]\n```\n\nYou 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.\n\nWhen 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.\n", "parameters": [ { - "name": "clientId", + "name": "id", "in": "path", - "description": "The client ID", + "description": "The member ID", "required": true, "schema": { "type": "string", "format": "string", - "description": "The client ID" + "description": "The member ID" } } ], @@ -9812,32 +10215,22 @@ }, "example": [ { - "op": "replace", - "path": "/name", - "value": "Example Client V2" + "op": "add", + "path": "/role", + "value": "writer" } ] } }, "required": true }, - "operationId": "patchOAuthClient" + "operationId": "patchMember" }, "delete": { "responses": { "204": { "description": "Action succeeded" }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, "401": { "description": "Invalid access token", "content": { @@ -9867,34 +10260,16 @@ } } } - } - }, - "tags": [ - "OAuth2 Clients" - ], - "summary": "Delete OAuth 2.0 client", - "description": "Delete an existing OAuth 2.0 client by unique client ID.", - "parameters": [ - { - "name": "clientId", - "in": "path", - "description": "The client ID", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The client ID" + }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } } - } - ], - "operationId": "deleteOAuthClient" - } - }, - "/api/v2/openapi.json": { - "get": { - "responses": { - "200": { - "description": "OpenAPI Spec" }, "429": { "description": "Rate limited", @@ -9908,22 +10283,35 @@ } }, "tags": [ - "Other" + "Account members" ], - "summary": "Gets the OpenAPI spec in json", - "description": "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.", - "operationId": "getOpenapiSpec" + "summary": "Delete account member", + "description": "Delete a single account member by ID. Requests to delete account members will not work if SCIM is enabled for the account.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The member ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The member ID" + } + } + ], + "operationId": "deleteMember" } }, - "/api/v2/projects": { - "get": { + "/api/v2/members/{id}/teams": { + "post": { "responses": { - "200": { - "description": "Project collection response", + "201": { + "description": "Member response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Projects" + "$ref": "#/components/schemas/Member" } } } @@ -9958,6 +10346,26 @@ } } }, + "404": { + "description": "Member not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -9970,19 +10378,105 @@ } }, "tags": [ - "Projects" + "Account members" ], - "summary": "List projects", - "description": "Return a list of projects.\n\nBy 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.\n\n### Filtering projects\n\nLaunchDarkly supports two fields for filters:\n- `query` is a string that matches against the projects' names and keys. It is not case sensitive.\n- `tags` is a `+`-separated list of project tags. It filters the list of projects that have all of the tags in the list.\n\nFor 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.\n\nThe 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`.\n\n### Sorting projects\n\nLaunchDarkly supports two fields for sorting:\n- `name` sorts by project name.\n- `createdOn` sorts by the creation date of the project.\n\nFor example, `sort=name` sorts the response by project name in ascending order.\n\n### Expanding the projects response\n\nLaunchDarkly supports one field for expanding the \"List projects\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with the `environments` field.\n\n`Environments` includes a paginated list of the project environments.\n* `environments` includes a paginated list of the project environments.\n\nFor example, `expand=environments` includes the `environments` field for each project in the response.\n", + "summary": "Add a member to teams", + "description": "Add one member to one or more teams.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The member ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The member ID" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemberTeamsPostInput" + } + } + }, + "required": true + }, + "operationId": "postMemberTeams" + } + }, + "/api/v2/metrics/{projectKey}": { + "get": { + "responses": { + "200": { + "description": "Metrics collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetricCollectionRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + } + }, + "tags": [ + "Metrics" + ], + "summary": "List metrics", + "description": "Get a list of all metrics for the specified project.\n\n### Filtering metrics\n\nThe `filter` parameter supports the following operators: `contains`.\n\n#### Supported fields and operators\n\nYou can only filter certain fields in metrics when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for metrics, the `filter` parameter supports the following fields and operators:\n\n|
Field
|Description |Supported operators |\n|---|---|---|\n| `tags` | The metric tags. | `contains` |\n\nFor example, the filter `?filter=tags contains [\"tag1\", \"tag2\", \"tag3\"]` matches metrics that have all three tags.\n\nThe documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=tags contains [\"tag1\", \"tag2\", \"tag3\"]` must be encoded to `%5B`.\n\n### Expanding the metric list response\n\nLaunchDarkly supports expanding the \"List metrics\" response. By default, the expandable field is **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add the following supported field:\n\n- `experimentCount` includes the number of experiments from the specific project that use the metric\n\nFor example, `expand=experimentCount` includes the `experimentCount` field for each metric in the response.\n", "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "expand", + "in": "query", + "description": "A comma-separated list of properties that can reveal additional information in the response.", + "schema": { + "type": "string", + "format": "string", + "description": "A comma-separated list of properties that can reveal additional information in the response." + } + }, { "name": "limit", "in": "query", - "description": "The number of projects to return in the response. Defaults to 20.", + "description": "The number of metrics to return in the response. Defaults to 20. Maximum limit is 50.", "schema": { "type": "integer", "format": "int64", - "description": "The number of projects to return in the response. Defaults to 20." + "description": "The number of metrics to return in the response. Defaults to 20. Maximum limit is 50." } }, { @@ -9995,47 +10489,37 @@ "description": "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." } }, - { - "name": "filter", - "in": "query", - "description": "A comma-separated list of filters. Each filter is constructed as `field:value`.", - "schema": { - "type": "string", - "format": "string", - "description": "A comma-separated list of filters. Each filter is constructed as `field:value`." - } - }, { "name": "sort", "in": "query", - "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order.", + "description": "A field to sort the items by. Prefix field by a dash ( - ) to sort in descending order. This endpoint supports sorting by `createdAt` or `name`.", "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order." + "description": "A field to sort the items by. Prefix field by a dash ( - ) to sort in descending order. This endpoint supports sorting by `createdAt` or `name`." } }, { - "name": "expand", + "name": "filter", "in": "query", - "description": "A comma-separated list of properties that can reveal additional information in the response.", + "description": "A comma-separated list of filters. This endpoint only accepts filtering by `tags`. To learn more about the filter syntax, read the 'Filtering metrics' section above.", "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of properties that can reveal additional information in the response." + "description": "A comma-separated list of filters. This endpoint only accepts filtering by `tags`. To learn more about the filter syntax, read the 'Filtering metrics' section above." } } ], - "operationId": "getProjects" + "operationId": "getMetrics" }, "post": { "responses": { "201": { - "description": "Project response", + "description": "Metric response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectRep" + "$ref": "#/components/schemas/MetricRep" } } } @@ -10070,6 +10554,16 @@ } } }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, "409": { "description": "Status conflict", "content": { @@ -10092,46 +10586,52 @@ } }, "tags": [ - "Projects" + "Metrics" + ], + "summary": "Create metric", + "description": "Create a new metric in the specified project. The expected `POST` body differs depending on the specified `kind` property.", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + } ], - "summary": "Create project", - "description": "Create a new project with the given key and name. Project keys must be unique within an account.", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectPost" + "$ref": "#/components/schemas/MetricPost" }, "example": { - "key": "project-key-123abc", - "name": "My Project" + "eventKey": "trackedClick", + "isActive": true, + "isNumeric": false, + "key": "metric-key-123abc", + "kind": "custom" } } }, "required": true }, - "operationId": "postProject" + "operationId": "postMetric" } }, - "/api/v2/projects/{projectKey}": { + "/api/v2/metrics/{projectKey}/{metricKey}": { "get": { "responses": { "200": { - "description": "Project response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Project" - } - } - } - }, - "400": { - "description": "Invalid request", + "description": "Metric response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/MetricRep" } } } @@ -10178,20 +10678,31 @@ } }, "tags": [ - "Projects" + "Metrics" ], - "summary": "Get project", - "description": "Get a single project by key.\n\n### Expanding the project response\n\nLaunchDarkly supports one field for expanding the \"Get project\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n* `environments` includes a paginated list of the project environments.\n\nFor example, `expand=environments` includes the `environments` field for the project in the response.\n", + "summary": "Get metric", + "description": "Get information for a single metric from the specific project.\n\n### Expanding the metric response\nLaunchDarkly supports four fields for expanding the \"Get metric\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n- `experiments` includes all experiments from the specific project that use the metric\n- `experimentCount` includes the number of experiments from the specific project that use the metric\n- `metricGroups` includes all metric groups from the specific project that use the metric\n- `metricGroupCount` includes the number of metric groups from the specific project that use the metric\n\nFor example, `expand=experiments` includes the `experiments` field in the response.\n", "parameters": [ { "name": "projectKey", "in": "path", - "description": "The project key.", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key." + "description": "The project key" + } + }, + { + "name": "metricKey", + "in": "path", + "description": "The metric key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The metric key" } }, { @@ -10203,18 +10714,28 @@ "format": "string", "description": "A comma-separated list of properties that can reveal additional information in the response." } + }, + { + "name": "versionId", + "in": "query", + "description": "The specific version ID of the metric", + "schema": { + "type": "string", + "format": "string", + "description": "The specific version ID of the metric" + } } ], - "operationId": "getProject" + "operationId": "getMetric" }, "patch": { "responses": { "200": { - "description": "Project response", + "description": "Metric response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectRep" + "$ref": "#/components/schemas/MetricRep" } } } @@ -10239,16 +10760,6 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, "404": { "description": "Invalid resource identifier", "content": { @@ -10281,10 +10792,10 @@ } }, "tags": [ - "Projects" + "Metrics" ], - "summary": "Update project", - "description": "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](/#section/Overview/Updates).

To add an element to the project fields that are arrays, set the `path` to the name of the field and then append `/`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.", + "summary": "Update metric", + "description": "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](/#section/Overview/Updates).", "parameters": [ { "name": "projectKey", @@ -10296,6 +10807,17 @@ "format": "string", "description": "The project key" } + }, + { + "name": "metricKey", + "in": "path", + "description": "The metric key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The metric key" + } } ], "requestBody": { @@ -10306,32 +10828,22 @@ }, "example": [ { - "op": "add", - "path": "/tags/0", - "value": "another-tag" + "op": "replace", + "path": "/name", + "value": "my-updated-metric" } ] } }, "required": true }, - "operationId": "patchProject" + "operationId": "patchMetric" }, "delete": { "responses": { "204": { "description": "Action succeeded" }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, "401": { "description": "Invalid access token", "content": { @@ -10374,10 +10886,10 @@ } }, "tags": [ - "Projects" + "Metrics" ], - "summary": "Delete project", - "description": "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.", + "summary": "Delete metric", + "description": "Delete a metric by key.", "parameters": [ { "name": "projectKey", @@ -10389,20 +10901,153 @@ "format": "string", "description": "The project key" } - } - ], - "operationId": "deleteProject" - } + }, + { + "name": "metricKey", + "in": "path", + "description": "The metric key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The metric key" + } + } + ], + "operationId": "deleteMetric" + } }, - "/api/v2/projects/{projectKey}/context-kinds": { + "/api/v2/oauth/clients": { "get": { "responses": { "200": { - "description": "Context kinds collection response", + "description": "OAuth 2.0 client collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContextKindsCollectionRep" + "$ref": "#/components/schemas/ClientCollection" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + } + }, + "tags": [ + "OAuth2 Clients" + ], + "summary": "Get clients", + "description": "Get all OAuth 2.0 clients registered by your account.", + "operationId": "getOAuthClients" + }, + "post": { + "responses": { + "201": { + "description": "OAuth 2.0 client response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Client" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + } + }, + "tags": [ + "OAuth2 Clients" + ], + "summary": "Create a LaunchDarkly OAuth 2.0 client", + "description": "Create (register) a LaunchDarkly OAuth2 client. OAuth2 clients allow you to build custom integrations using LaunchDarkly as your identity provider.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oauthClientPost" + } + } + }, + "required": true + }, + "operationId": "createOAuth2Client" + } + }, + "/api/v2/oauth/clients/{clientId}": { + "get": { + "responses": { + "200": { + "description": "OAuth 2.0 client response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Client" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -10439,35 +11084,33 @@ } }, "tags": [ - "Contexts" + "OAuth2 Clients" ], - "summary": "Get context kinds", - "description": "Get all context kinds for a given project.", + "summary": "Get client by ID", + "description": "Get a registered OAuth 2.0 client by unique client ID.", "parameters": [ { - "name": "projectKey", + "name": "clientId", "in": "path", - "description": "The project key", + "description": "The client ID", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The client ID" } } ], - "operationId": "getContextKindsByProjectKey" - } - }, - "/api/v2/projects/{projectKey}/context-kinds/{key}": { - "put": { + "operationId": "getOAuthClientById" + }, + "patch": { "responses": { "200": { - "description": "Context kind upsert response", + "description": "OAuth 2.0 client response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertResponseRep" + "$ref": "#/components/schemas/Client" } } } @@ -10514,31 +11157,20 @@ } }, "tags": [ - "Contexts" + "OAuth2 Clients" ], - "summary": "Create or update context kind", - "description": "Create or update a context kind by key. Only the included fields will be updated.", + "summary": "Patch client by ID", + "description": "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](/#section/Overview/Updates). Only `name`, `description`, and `redirectUri` may be patched.", "parameters": [ { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, - { - "name": "key", + "name": "clientId", "in": "path", - "description": "The context kind key", + "description": "The client ID", "required": true, "schema": { "type": "string", "format": "string", - "description": "The context kind key" + "description": "The client ID" } } ], @@ -10546,27 +11178,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertContextKindPayload" - } + "$ref": "#/components/schemas/JSONPatch" + }, + "example": [ + { + "op": "replace", + "path": "/name", + "value": "Example Client V2" + } + ] } }, "required": true }, - "operationId": "putContextKind" - } - }, - "/api/v2/projects/{projectKey}/environments": { - "get": { + "operationId": "patchOAuthClient" + }, + "delete": { "responses": { - "200": { - "description": "Environments collection response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Environments" - } - } - } + "204": { + "description": "Action succeeded" }, "400": { "description": "Invalid request", @@ -10607,13 +11237,93 @@ } } } + } + }, + "tags": [ + "OAuth2 Clients" + ], + "summary": "Delete OAuth 2.0 client", + "description": "Delete an existing OAuth 2.0 client by unique client ID.", + "parameters": [ + { + "name": "clientId", + "in": "path", + "description": "The client ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The client ID" + } + } + ], + "operationId": "deleteOAuthClient" + } + }, + "/api/v2/openapi.json": { + "get": { + "responses": { + "200": { + "description": "OpenAPI Spec" }, - "405": { - "description": "Method not allowed", + "429": { + "description": "Rate limited", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Other" + ], + "summary": "Gets the OpenAPI spec in json", + "description": "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.", + "operationId": "getOpenapiSpec" + } + }, + "/api/v2/projects": { + "get": { + "responses": { + "200": { + "description": "Project collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Projects" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } @@ -10630,50 +11340,39 @@ } }, "tags": [ - "Environments" + "Projects" ], - "summary": "List environments", - "description": "Return a list of environments for the specified project.\n\nBy 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.\n\n### Filtering environments\n\nLaunchDarkly supports two fields for filters:\n- `query` is a string that matches against the environments' names and keys. It is not case sensitive.\n- `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list.\n\nFor 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.\n\nThe 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`.\n\n### Sorting environments\n\nLaunchDarkly supports the following fields for sorting:\n\n- `createdOn` sorts by the creation date of the environment.\n- `critical` sorts by whether the environments are marked as critical.\n- `name` sorts by environment name.\n\nFor example, `sort=name` sorts the response by environment name in ascending order.\n", + "summary": "List projects", + "description": "Return a list of projects.\n\nBy 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.\n\n### Filtering projects\n\nLaunchDarkly supports three fields for filters:\n- `query` is a string that matches against the projects' names and keys. It is not case sensitive.\n- `tags` is a `+`-separated list of project tags. It filters the list of projects that have all of the tags in the list.\n- `keys` is a `|` separated list of project keys. It filters the list to projects that have any of the keys in the list.\n\nFor 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.\n\nThe 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`.\n\n### Sorting projects\n\nLaunchDarkly supports two fields for sorting:\n- `name` sorts by project name.\n- `createdOn` sorts by the creation date of the project.\n\nFor example, `sort=name` sorts the response by project name in ascending order.\n\n### Expanding the projects response\n\nLaunchDarkly supports one field for expanding the \"List projects\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with the `environments` field.\n\n`Environments` includes a paginated list of the project environments.\n* `environments` includes a paginated list of the project environments.\n\nFor example, `expand=environments` includes the `environments` field for each project in the response.\n", "parameters": [ - { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, { "name": "limit", "in": "query", - "description": "The number of environments to return in the response. Defaults to 20.", + "description": "The number of projects to return in the response. Defaults to 20.", "schema": { "type": "integer", "format": "int64", - "description": "The number of environments to return in the response. Defaults to 20." + "description": "The number of projects to return in the response. Defaults to 20." } }, { "name": "offset", "in": "query", - "description": "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`.", + "description": "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.", "schema": { "type": "integer", "format": "int64", - "description": "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`." + "description": "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." } }, { "name": "filter", "in": "query", - "description": "A comma-separated list of filters. Each filter is of the form `field:value`.", + "description": "A comma-separated list of filters. Each filter is constructed as `field:value`.", "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of filters. Each filter is of the form `field:value`." + "description": "A comma-separated list of filters. Each filter is constructed as `field:value`." } }, { @@ -10685,18 +11384,28 @@ "format": "string", "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order." } + }, + { + "name": "expand", + "in": "query", + "description": "A comma-separated list of properties that can reveal additional information in the response.", + "schema": { + "type": "string", + "format": "string", + "description": "A comma-separated list of properties that can reveal additional information in the response." + } } ], - "operationId": "getEnvironmentsByProject" + "operationId": "getProjects" }, "post": { "responses": { "201": { - "description": "Environment response", + "description": "Project response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Environment" + "$ref": "#/components/schemas/ProjectRep" } } } @@ -10731,16 +11440,6 @@ } } }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, "409": { "description": "Status conflict", "content": { @@ -10763,50 +11462,46 @@ } }, "tags": [ - "Environments" - ], - "summary": "Create environment", - "description": "> ### Approval settings\n>\n> The `approvalSettings` key is only returned when the Flag Approvals feature is enabled.\n>\n> You cannot update approval settings when creating new environments. Update approval settings with the PATCH Environment API.\n\nCreate a new environment in a specified project with a given name, key, swatch color, and default TTL.\n", - "parameters": [ - { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - } + "Projects" ], + "summary": "Create project", + "description": "Create a new project with the given key and name. Project keys must be unique within an account.", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentPost" + "$ref": "#/components/schemas/ProjectPost" }, "example": { - "color": "DADBEE", - "key": "environment-key-123abc", - "name": "My Environment" + "key": "project-key-123abc", + "name": "My Project" } } }, "required": true }, - "operationId": "postEnvironment" + "operationId": "postProject" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}": { + "/api/v2/projects/{projectKey}": { "get": { "responses": { "200": { - "description": "Environment response", + "description": "Project response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Environment" + "$ref": "#/components/schemas/Project" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -10853,44 +11548,43 @@ } }, "tags": [ - "Environments" + "Projects" ], - "summary": "Get environment", - "description": "> ### Approval settings\n>\n> The `approvalSettings` key is only returned when the Flag Approvals feature is enabled.\n\nGet an environment given a project and key.\n", + "summary": "Get project", + "description": "Get a single project by key.\n\n### Expanding the project response\n\nLaunchDarkly supports one field for expanding the \"Get project\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n* `environments` includes a paginated list of the project environments.\n\nFor example, `expand=environments` includes the `environments` field for the project in the response.\n", "parameters": [ { "name": "projectKey", "in": "path", - "description": "The project key", + "description": "The project key.", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The project key." } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, + "name": "expand", + "in": "query", + "description": "A comma-separated list of properties that can reveal additional information in the response.", "schema": { "type": "string", "format": "string", - "description": "The environment key" + "description": "A comma-separated list of properties that can reveal additional information in the response." } } ], - "operationId": "getEnvironment" + "operationId": "getProject" }, "patch": { "responses": { "200": { - "description": "Environment response", + "description": "Project response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Environment" + "$ref": "#/components/schemas/ProjectRep" } } } @@ -10915,6 +11609,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, "404": { "description": "Invalid resource identifier", "content": { @@ -10947,10 +11651,10 @@ } }, "tags": [ - "Environments" + "Projects" ], - "summary": "Update environment", - "description": "\nUpdate 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](/#section/Overview/Updates).\n\nTo update fields in the environment object that are arrays, set the `path` to the name of the field and then append `/`. Using `/0` appends to the beginning of the array.\n\n### Approval settings\n\nThis request only returns the `approvalSettings` key if the [Flag Approvals](https://docs.launchdarkly.com/home/releases/approvals) feature is enabled.\n\nOnly the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable.\n\nIf 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.\n", + "summary": "Update project", + "description": "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](/#section/Overview/Updates).

To add an element to the project fields that are arrays, set the `path` to the name of the field and then append `/`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.", "parameters": [ { "name": "projectKey", @@ -10962,17 +11666,6 @@ "format": "string", "description": "The project key" } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } } ], "requestBody": { @@ -10983,22 +11676,32 @@ }, "example": [ { - "op": "replace", - "path": "/requireComments", - "value": true + "op": "add", + "path": "/tags/0", + "value": "another-tag" } ] } }, "required": true }, - "operationId": "patchEnvironment" + "operationId": "patchProject" }, "delete": { "responses": { "204": { "description": "Action succeeded" }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, "401": { "description": "Invalid access token", "content": { @@ -11041,10 +11744,10 @@ } }, "tags": [ - "Environments" + "Projects" ], - "summary": "Delete environment", - "description": "Delete a environment by key.", + "summary": "Delete project", + "description": "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.", "parameters": [ { "name": "projectKey", @@ -11056,41 +11759,20 @@ "format": "string", "description": "The project key" } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } } ], - "operationId": "deleteEnvironment" + "operationId": "deleteProject" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey": { - "post": { + "/api/v2/projects/{projectKey}/context-kinds": { + "get": { "responses": { "200": { - "description": "Environment response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Environment" - } - } - } - }, - "400": { - "description": "Invalid request", + "description": "Context kinds collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/ContextKindsCollectionRep" } } } @@ -11124,33 +11806,13 @@ } } } - }, - "409": { - "description": "Status conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Environments" + "Contexts" ], - "summary": "Reset environment SDK key", - "description": "Reset an environment's SDK key with an optional expiry time for the old key.", + "summary": "Get context kinds", + "description": "Get all context kinds for a given project.", "parameters": [ { "name": "projectKey", @@ -11162,41 +11824,20 @@ "format": "string", "description": "The project key" } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "expiry", - "in": "query", - "description": "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.", - "schema": { - "type": "integer", - "format": "int64", - "description": "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." - } } ], - "operationId": "resetEnvironmentSDKKey" + "operationId": "getContextKindsByProjectKey" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes": { - "get": { + "/api/v2/projects/{projectKey}/context-kinds/{key}": { + "put": { "responses": { "200": { - "description": "Context attribute names collection response", + "description": "Context kind upsert response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContextAttributeNamesCollection" + "$ref": "#/components/schemas/UpsertResponseRep" } } } @@ -11231,12 +11872,12 @@ } } }, - "429": { - "description": "Rate limited", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -11245,8 +11886,8 @@ "tags": [ "Contexts" ], - "summary": "Get context attribute names", - "description": "Get context attribute names. Returns only the first 100 attribute names per context.", + "summary": "Create or update context kind", + "description": "Create or update a context kind by key. Only the included fields will be updated.", "parameters": [ { "name": "projectKey", @@ -11260,39 +11901,39 @@ } }, { - "name": "environmentKey", + "name": "key", "in": "path", - "description": "The environment key", + "description": "The context kind key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The environment key" - } - }, - { - "name": "filter", - "in": "query", - "description": "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](/tag/Contexts#filtering-contexts-and-context-instances).", - "schema": { - "type": "string", - "format": "string", - "description": "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](/tag/Contexts#filtering-contexts-and-context-instances)." + "description": "The context kind key" } } ], - "operationId": "getContextAttributeNames" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertContextKindPayload" + } + } + }, + "required": true + }, + "operationId": "putContextKind" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes/{attributeName}": { + "/api/v2/projects/{projectKey}/environments": { "get": { "responses": { "200": { - "description": "Context attribute values collection response", + "description": "Environments collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContextAttributeValuesCollection" + "$ref": "#/components/schemas/Environments" } } } @@ -11327,6 +11968,26 @@ } } }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -11339,10 +12000,10 @@ } }, "tags": [ - "Contexts" + "Environments" ], - "summary": "Get context attribute values", - "description": "Get context attribute values.", + "summary": "List environments", + "description": "Return a list of environments for the specified project.\n\nBy 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.\n\n### Filtering environments\n\nLaunchDarkly supports two fields for filters:\n- `query` is a string that matches against the environments' names and keys. It is not case sensitive.\n- `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list.\n\nFor 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.\n\nThe 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`.\n\n### Sorting environments\n\nLaunchDarkly supports the following fields for sorting:\n\n- `createdOn` sorts by the creation date of the environment.\n- `critical` sorts by whether the environments are marked as critical.\n- `name` sorts by environment name.\n\nFor example, `sort=name` sorts the response by environment name in ascending order.\n", "parameters": [ { "name": "projectKey", @@ -11356,50 +12017,56 @@ } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, + "name": "limit", + "in": "query", + "description": "The number of environments to return in the response. Defaults to 20.", "schema": { - "type": "string", - "format": "string", - "description": "The environment key" + "type": "integer", + "format": "int64", + "description": "The number of environments to return in the response. Defaults to 20." } }, { - "name": "attributeName", - "in": "path", - "description": "The attribute name", - "required": true, + "name": "offset", + "in": "query", + "description": "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`.", + "schema": { + "type": "integer", + "format": "int64", + "description": "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`." + } + }, + { + "name": "filter", + "in": "query", + "description": "A comma-separated list of filters. Each filter is of the form `field:value`.", "schema": { "type": "string", "format": "string", - "description": "The attribute name" + "description": "A comma-separated list of filters. Each filter is of the form `field:value`." } }, { - "name": "filter", + "name": "sort", "in": "query", - "description": "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](/tag/Contexts#filtering-contexts-and-context-instances).", + "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order.", "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of 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](/tag/Contexts#filtering-contexts-and-context-instances)." + "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order." } } ], - "operationId": "getContextAttributeValues" - } - }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search": { + "operationId": "getEnvironmentsByProject" + }, "post": { "responses": { - "200": { - "description": "Context instances collection response", + "201": { + "description": "Environment response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContextInstances" + "$ref": "#/components/schemas/Environment" } } } @@ -11434,6 +12101,26 @@ } } }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -11446,10 +12133,10 @@ } }, "tags": [ - "Contexts" + "Environments" ], - "summary": "Search for context instances", - "description": "\nSearch for context instances.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances). To learn more about context instances, read [Context instances](https://docs.launchdarkly.com/home/observability/multi-contexts#context-instances).\n", + "summary": "Create environment", + "description": "> ### Approval settings\n>\n> The `approvalSettings` key is only returned when the [flag approvals](https://docs.launchdarkly.com/home/releases/approvals/) feature is enabled.\n>\n> You cannot update approval settings when creating new environments. Update approval settings with the [Update environment API](/tag/Environments#operation/patchEnvironment).\n\nCreate a new environment in a specified project with a given name, key, swatch color, and default TTL.\n", "parameters": [ { "name": "projectKey", @@ -11461,120 +12148,65 @@ "format": "string", "description": "The project key" } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "limit", - "in": "query", - "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", - "schema": { - "type": "integer", - "format": "int64", - "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)" - } - }, - { - "name": "continuationToken", - "in": "query", - "description": "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.", - "schema": { - "type": "string", - "format": "string", - "description": "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." - } - }, - { - "name": "sort", - "in": "query", - "description": "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`.", - "schema": { - "type": "string", - "format": "string", - "description": "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`." - } - }, - { - "name": "filter", - "in": "query", - "description": "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](/tag/Contexts#filtering-contexts-and-context-instances).", - "schema": { - "type": "string", - "format": "string", - "description": "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](/tag/Contexts#filtering-contexts-and-context-instances)." - } - }, - { - "name": "includeTotalCount", - "in": "query", - "description": "Specifies whether to include or omit the total count of matching context instances. Defaults to true.", - "schema": { - "type": "boolean", - "description": "Specifies whether to include or omit the total count of matching context instances. Defaults to true." - } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContextInstanceSearch" + "$ref": "#/components/schemas/EnvironmentPost" + }, + "example": { + "color": "DADBEE", + "key": "environment-key-123abc", + "name": "My Environment" } } }, "required": true }, - "operationId": "searchContextInstances" + "operationId": "postEnvironment" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}": { "get": { "responses": { "200": { - "description": "Context instances collection response", + "description": "Environment response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContextInstances" + "$ref": "#/components/schemas/Environment" } } } }, - "400": { - "description": "Invalid request", + "401": { + "description": "Invalid access token", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/UnauthorizedErrorRep" } } } }, - "401": { - "description": "Invalid access token", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -11591,10 +12223,10 @@ } }, "tags": [ - "Contexts" + "Environments" ], - "summary": "Get context instances", - "description": "Get context instances by ID.", + "summary": "Get environment", + "description": "> ### Approval settings\n>\n> The `approvalSettings` key is only returned when the Flag Approvals feature is enabled.\n\nGet an environment given a project and key.\n", "parameters": [ { "name": "projectKey", @@ -11617,85 +12249,126 @@ "format": "string", "description": "The environment key" } + } + ], + "operationId": "getEnvironment" + }, + "patch": { + "responses": { + "200": { + "description": "Environment response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Environment" + } + } + } }, - { - "name": "id", - "in": "path", - "description": "The context instance ID", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The context instance ID" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } } }, - { - "name": "limit", - "in": "query", - "description": "Specifies the maximum number of context instances to return (max: 50, default: 20)", - "schema": { - "type": "integer", - "format": "int64", - "description": "Specifies the maximum number of context instances to return (max: 50, default: 20)" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } } }, - { - "name": "continuationToken", - "in": "query", - "description": "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.", - "schema": { - "type": "string", - "format": "string", - "description": "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." + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } } }, - { - "name": "sort", - "in": "query", - "description": "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`.", - "schema": { - "type": "string", - "format": "string", - "description": "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`." + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } } }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Environments" + ], + "summary": "Update environment", + "description": "\nUpdate 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](/#section/Overview/Updates).\n\nTo update fields in the environment object that are arrays, set the `path` to the name of the field and then append `/`. Using `/0` appends to the beginning of the array.\n\n### Approval settings\n\nThis request only returns the `approvalSettings` key if the [flag approvals](https://docs.launchdarkly.com/home/releases/approvals/) feature is enabled.\n\nOnly the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable.\n\nIf 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.\n", + "parameters": [ { - "name": "filter", - "in": "query", - "description": "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](/tag/Contexts#filtering-contexts-and-context-instances).", + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "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](/tag/Contexts#filtering-contexts-and-context-instances)." + "description": "The project key" } }, { - "name": "includeTotalCount", - "in": "query", - "description": "Specifies whether to include or omit the total count of matching context instances. Defaults to true.", + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, "schema": { - "type": "boolean", - "description": "Specifies whether to include or omit the total count of matching context instances. Defaults to true." + "type": "string", + "format": "string", + "description": "The environment key" } } ], - "operationId": "getContextInstances" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONPatch" + }, + "example": [ + { + "op": "replace", + "path": "/requireComments", + "value": true + } + ] + } + }, + "required": true + }, + "operationId": "patchEnvironment" }, "delete": { "responses": { "204": { "description": "Action succeeded" }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, "401": { "description": "Invalid access token", "content": { @@ -11738,10 +12411,10 @@ } }, "tags": [ - "Contexts" + "Environments" ], - "summary": "Delete context instances", - "description": "Delete context instances by ID.", + "summary": "Delete environment", + "description": "Delete a environment by key.", "parameters": [ { "name": "projectKey", @@ -11764,31 +12437,20 @@ "format": "string", "description": "The environment key" } - }, - { - "name": "id", - "in": "path", - "description": "The context instance ID", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The context instance ID" - } } ], - "operationId": "deleteContextInstances" + "operationId": "deleteEnvironment" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/search": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/apiKey": { "post": { "responses": { "200": { - "description": "Contexts collection response", + "description": "Environment response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contexts" + "$ref": "#/components/schemas/Environment" } } } @@ -11823,6 +12485,26 @@ } } }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -11835,10 +12517,10 @@ } }, "tags": [ - "Contexts" + "Environments" ], - "summary": "Search for contexts", - "description": "\nSearch for contexts.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances). To learn more about contexts, read [Contexts and context kinds](https://docs.launchdarkly.com/home/observability/contexts#contexts-and-context-kinds).\n", + "summary": "Reset environment SDK key", + "description": "Reset an environment's SDK key with an optional expiry time for the old key.", "parameters": [ { "name": "projectKey", @@ -11863,73 +12545,137 @@ } }, { - "name": "limit", + "name": "expiry", "in": "query", - "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", + "description": "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.", "schema": { "type": "integer", "format": "int64", - "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)" - } - }, - { - "name": "continuationToken", - "in": "query", - "description": "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.", - "schema": { - "type": "string", - "format": "string", - "description": "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." + "description": "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." } - }, - { - "name": "sort", - "in": "query", - "description": "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`.", + } + ], + "operationId": "resetEnvironmentSDKKey" + } + }, + "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes": { + "get": { + "responses": { + "200": { + "description": "Context attribute names collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContextAttributeNamesCollection" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Contexts" + ], + "summary": "Get context attribute names", + "description": "Get context attribute names.", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "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`." + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" } }, { "name": "filter", "in": "query", - "description": "A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances).", + "description": "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](/tag/Contexts#filtering-contexts-and-context-instances).", "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances)." + "description": "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](/tag/Contexts#filtering-contexts-and-context-instances)." } }, { - "name": "includeTotalCount", + "name": "limit", "in": "query", - "description": "Specifies whether to include or omit the total count of matching contexts. Defaults to true.", + "description": "Specifies the maximum number of items in the collection to return (max: 100, default: 100)", "schema": { - "type": "boolean", - "description": "Specifies whether to include or omit the total count of matching contexts. Defaults to true." + "type": "integer", + "format": "int64", + "description": "Specifies the maximum number of items in the collection to return (max: 100, default: 100)" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ContextSearch" - } - } - }, - "required": true - }, - "operationId": "searchContexts" + "operationId": "getContextAttributeNames" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{contextKind}/{contextKey}/flags/{featureFlagKey}": { - "put": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-attributes/{attributeName}": { + "get": { "responses": { - "204": { - "description": "Action succeeded" + "200": { + "description": "Context attribute values collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContextAttributeValuesCollection" + } + } + } }, "400": { "description": "Invalid request", @@ -11961,16 +12707,6 @@ } } }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -11983,10 +12719,10 @@ } }, "tags": [ - "Context settings" + "Contexts" ], - "summary": "Update flag settings for context", - "description": "\nEnable or disable a feature flag for a context based on its context kind and key.\n\nOmitting the `setting` attribute from the request body, or including a `setting` of `null`, erases the current setting for a context.\n\nIf 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.\n", + "summary": "Get context attribute values", + "description": "Get context attribute values.", "parameters": [ { "name": "projectKey", @@ -12011,61 +12747,49 @@ } }, { - "name": "contextKind", + "name": "attributeName", "in": "path", - "description": "The context kind", + "description": "The attribute name", "required": true, "schema": { "type": "string", "format": "string", - "description": "The context kind" + "description": "The attribute name" } }, { - "name": "contextKey", - "in": "path", - "description": "The context key", - "required": true, + "name": "filter", + "in": "query", + "description": "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](/tag/Contexts#filtering-contexts-and-context-instances).", "schema": { "type": "string", "format": "string", - "description": "The context key" + "description": "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](/tag/Contexts#filtering-contexts-and-context-instances)." } }, { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, + "name": "limit", + "in": "query", + "description": "Specifies the maximum number of items in the collection to return (max: 100, default: 50)", "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" + "type": "integer", + "format": "int64", + "description": "Specifies the maximum number of items in the collection to return (max: 100, default: 50)" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValuePut" - } - } - }, - "required": true - }, - "operationId": "putContextFlagSetting" + "operationId": "getContextAttributeValues" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{kind}/{key}": { - "get": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/search": { + "post": { "responses": { "200": { - "description": "Contexts collection response", + "description": "Context instances collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Contexts" + "$ref": "#/components/schemas/ContextInstances" } } } @@ -12114,8 +12838,8 @@ "tags": [ "Contexts" ], - "summary": "Get contexts", - "description": "Get contexts based on kind and key.", + "summary": "Search for context instances", + "description": "\nSearch for context instances.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances). To learn more about context instances, read [Context instances](https://docs.launchdarkly.com/home/observability/multi-contexts#context-instances).\n", "parameters": [ { "name": "projectKey", @@ -12139,28 +12863,6 @@ "description": "The environment key" } }, - { - "name": "kind", - "in": "path", - "description": "The context kind", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The context kind" - } - }, - { - "name": "key", - "in": "path", - "description": "The context key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The context key" - } - }, { "name": "limit", "in": "query", @@ -12174,11 +12876,11 @@ { "name": "continuationToken", "in": "query", - "description": "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.", + "description": "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.", "schema": { "type": "string", "format": "string", - "description": "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." + "description": "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." } }, { @@ -12204,25 +12906,35 @@ { "name": "includeTotalCount", "in": "query", - "description": "Specifies whether to include or omit the total count of matching contexts. Defaults to true.", + "description": "Specifies whether to include or omit the total count of matching context instances. Defaults to true.", "schema": { "type": "boolean", - "description": "Specifies whether to include or omit the total count of matching contexts. Defaults to true." + "description": "Specifies whether to include or omit the total count of matching context instances. Defaults to true." } } ], - "operationId": "getContexts" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContextInstanceSearch" + } + } + }, + "required": true + }, + "operationId": "searchContextInstances" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/context-instances/{id}": { "get": { "responses": { "200": { - "description": "Experiment collection response", + "description": "Context instances collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExperimentCollectionRep" + "$ref": "#/components/schemas/ContextInstances" } } } @@ -12257,26 +12969,6 @@ } } }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -12289,10 +12981,10 @@ } }, "tags": [ - "Experiments (beta)" + "Contexts" ], - "summary": "Get experiments", - "description": "Get details about all experiments in an environment.\n\n### Filtering experiments\n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `flagKey` filters for only experiments that use the flag with the given key.\n- `metricKey` filters for only experiments that use the metric with the given key.\n- `status` filters for only experiments with an iteration with the given status. An iteration can have the status `not_started`, `running` or `stopped`.\n\nFor 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.\n\n### Expanding the experiments response\n\nLaunchDarkly supports four fields for expanding the \"Get experiments\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n- `previousIterations` includes all iterations prior to the current iteration. By default only the current iteration is included in the response.\n- `draftIteration` includes the iteration which has not been started yet, if any.\n- `secondaryMetrics` includes secondary metrics. By default only the primary metric is included in the response.\n- `treatments` includes all treatment and parameter details. By default treatment data is not included in the response.\n\nFor 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.\n", + "summary": "Get context instances", + "description": "Get context instances by ID.", "parameters": [ { "name": "projectKey", @@ -12317,69 +13009,72 @@ } }, { - "name": "limit", - "in": "query", - "description": "The maximum number of experiments to return. Defaults to 20.", + "name": "id", + "in": "path", + "description": "The context instance ID", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "description": "The maximum number of experiments to return. Defaults to 20." + "type": "string", + "format": "string", + "description": "The context instance ID" } }, { - "name": "offset", + "name": "limit", "in": "query", - "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", + "description": "Specifies the maximum number of context instances to return (max: 50, default: 20)", "schema": { "type": "integer", "format": "int64", - "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`." + "description": "Specifies the maximum number of context instances to return (max: 50, default: 20)" } }, { - "name": "filter", + "name": "continuationToken", "in": "query", - "description": "A comma-separated list of filters. Each filter is of the form `field:value`. Supported fields are explained above.", + "description": "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.", "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of filters. Each filter is of the form `field:value`. Supported fields are explained above." + "description": "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." } }, { - "name": "expand", + "name": "sort", "in": "query", - "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", + "description": "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`.", "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above." + "description": "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`." } }, { - "name": "lifecycleState", + "name": "filter", "in": "query", - "description": "A comma-separated list of experiment archived states. Supports `archived`, `active`, or both. Defaults to `active` experiments.", + "description": "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](/tag/Contexts#filtering-contexts-and-context-instances).", "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of experiment archived states. Supports `archived`, `active`, or both. Defaults to `active` experiments." + "description": "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](/tag/Contexts#filtering-contexts-and-context-instances)." + } + }, + { + "name": "includeTotalCount", + "in": "query", + "description": "Specifies whether to include or omit the total count of matching context instances. Defaults to true.", + "schema": { + "type": "boolean", + "description": "Specifies whether to include or omit the total count of matching context instances. Defaults to true." } } ], - "operationId": "getExperiments" + "operationId": "getContextInstances" }, - "post": { + "delete": { "responses": { - "201": { - "description": "Experiment response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Experiment" - } - } - } + "204": { + "description": "Action succeeded" }, "400": { "description": "Invalid request", @@ -12433,10 +13128,10 @@ } }, "tags": [ - "Experiments (beta)" + "Contexts" ], - "summary": "Create experiment", - "description": "Create an experiment.\n\nTo run this experiment, you'll need to [create an iteration](/tag/Experiments-(beta)#operation/createIteration) and then [update the experiment](/tag/Experiments-(beta)#operation/patchExperiment) with the `startIteration` instruction.\n\nTo learn more, read [Creating experiments](https://docs.launchdarkly.com/home/experimentation/create).\n", + "summary": "Delete context instances", + "description": "Delete context instances by ID.", "parameters": [ { "name": "projectKey", @@ -12459,30 +13154,31 @@ "format": "string", "description": "The environment key" } + }, + { + "name": "id", + "in": "path", + "description": "The context instance ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The context instance ID" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExperimentPost" - } - } - }, - "required": true - }, - "operationId": "createExperiment" + "operationId": "deleteContextInstances" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}": { - "get": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/search": { + "post": { "responses": { "200": { - "description": "Experiment response", + "description": "Contexts collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Experiment" + "$ref": "#/components/schemas/Contexts" } } } @@ -12517,26 +13213,6 @@ } } }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -12549,10 +13225,10 @@ } }, "tags": [ - "Experiments (beta)" + "Contexts" ], - "summary": "Get experiment", - "description": "Get details about an experiment.\n\n### Expanding the experiment response\n\nLaunchDarkly supports four fields for expanding the \"Get experiment\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n- `previousIterations` includes all iterations prior to the current iteration. By default only the current iteration is included in the response.\n- `draftIteration` includes the iteration which has not been started yet, if any.\n- `secondaryMetrics` includes secondary metrics. By default only the primary metric is included in the response.\n- `treatments` includes all treatment and parameter details. By default treatment data is not included in the response.\n\nFor 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.\n", + "summary": "Search for contexts", + "description": "\nSearch for contexts.\n\nYou can use either the query parameters or the request body parameters. If both are provided, there is an error.\n\nTo learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances). To learn more about contexts, read [Contexts and context kinds](https://docs.launchdarkly.com/home/observability/contexts#contexts-and-context-kinds).\n", "parameters": [ { "name": "projectKey", @@ -12577,41 +13253,74 @@ } }, { - "name": "experimentKey", - "in": "path", - "description": "The experiment key", - "required": true, + "name": "limit", + "in": "query", + "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", + "schema": { + "type": "integer", + "format": "int64", + "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)" + } + }, + { + "name": "continuationToken", + "in": "query", + "description": "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.", "schema": { "type": "string", "format": "string", - "description": "The experiment key" + "description": "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." } }, { - "name": "expand", + "name": "sort", "in": "query", - "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", + "description": "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`.", "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above." + "description": "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`." + } + }, + { + "name": "filter", + "in": "query", + "description": "A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances).", + "schema": { + "type": "string", + "format": "string", + "description": "A comma-separated list of context filters. To learn more about the filter syntax, read [Filtering contexts and context instances](/tag/Contexts#filtering-contexts-and-context-instances)." + } + }, + { + "name": "includeTotalCount", + "in": "query", + "description": "Specifies whether to include or omit the total count of matching contexts. Defaults to true.", + "schema": { + "type": "boolean", + "description": "Specifies whether to include or omit the total count of matching contexts. Defaults to true." } } ], - "operationId": "getExperiment" - }, - "patch": { - "responses": { - "200": { - "description": "Experiment response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Experiment" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContextSearch" } } }, + "required": true + }, + "operationId": "searchContexts" + } + }, + "/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{contextKind}/{contextKey}/flags/{featureFlagKey}": { + "put": { + "responses": { + "204": { + "description": "Action succeeded" + }, "400": { "description": "Invalid request", "content": { @@ -12652,16 +13361,6 @@ } } }, - "409": { - "description": "Conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -12674,10 +13373,10 @@ } }, "tags": [ - "Experiments (beta)" + "Context settings" ], - "summary": "Patch experiment", - "description": "Update an experiment. Updating an experiment uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating experiments.\n\n#### updateName\n\nUpdates the experiment name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Example updated experiment name\"\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the experiment description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Example updated description\"\n }]\n}\n```\n\n#### startIteration\n\nStarts a new iteration for this experiment. You must [create a new iteration](/tag/Experiments-(beta)#operation/createIteration) before calling this instruction.\n\nAn iteration may not be started until it meets the following criteria:\n\n* Its associated flag is toggled on and is not archived\n* Its `randomizationUnit` is set\n* At least one of its `treatments` has a non-zero `allocationPercent`\n\n##### Parameters\n\n- `changeJustification`: The reason for starting a new iteration. Required when you call `startIteration` on an already running experiment, otherwise optional.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"startIteration\",\n \"changeJustification\": \"It's time to start a new iteration\"\n }]\n}\n```\n\n#### stopIteration\n\nStops the current iteration for this experiment.\n\n##### Parameters\n\n- `winningTreatmentId`: The ID of the winning treatment. Treatment IDs are returned as part of the [Get experiment](/tag/Experiments-(beta)#operation/getExperiment) response. They are the `_id` of each element in the `treatments` array.\n- `winningReason`: The reason for the winner\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"stopIteration\",\n \"winningTreatmentId\": \"3a548ec2-72ac-4e59-8518-5c24f5609ccf\",\n \"winningReason\": \"Example reason to stop the iteration\"\n }]\n}\n```\n\n#### archiveExperiment\n\nArchives this experiment. Archived experiments are hidden by default in the LaunchDarkly user interface. You cannot start new iterations for archived experiments.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"archiveExperiment\" }]\n}\n```\n\n#### restoreExperiment\n\nRestores an archived experiment. After restoring an experiment, you can start new iterations for it again.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"restoreExperiment\" }]\n}\n```\n", + "summary": "Update flag settings for context", + "description": "\nEnable or disable a feature flag for a context based on its context kind and key.\n\nOmitting the `setting` attribute from the request body, or including a `setting` of `null`, erases the current setting for a context.\n\nIf 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.\n", "parameters": [ { "name": "projectKey", @@ -12702,14 +13401,36 @@ } }, { - "name": "experimentKey", + "name": "contextKind", "in": "path", - "description": "The experiment key", + "description": "The context kind", "required": true, "schema": { "type": "string", "format": "string", - "description": "The experiment key" + "description": "The context kind" + } + }, + { + "name": "contextKey", + "in": "path", + "description": "The context key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The context key" + } + }, + { + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The feature flag key" } } ], @@ -12717,33 +13438,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExperimentPatchInput" - }, - "example": { - "comment": "Example comment describing the update", - "instructions": [ - { - "kind": "updateName", - "value": "Updated experiment name" - } - ] + "$ref": "#/components/schemas/ValuePut" } } }, "required": true }, - "operationId": "patchExperiment" + "operationId": "putContextFlagSetting" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/iterations": { - "post": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{kind}/{key}": { + "get": { "responses": { "200": { - "description": "Iteration response", + "description": "Contexts collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IterationRep" + "$ref": "#/components/schemas/Contexts" } } } @@ -12778,16 +13490,6 @@ } } }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -12800,10 +13502,10 @@ } }, "tags": [ - "Experiments (beta)" + "Contexts" ], - "summary": "Create iteration", - "description": "Create an experiment iteration.\n\nExperiment 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](/tag/Experiments-(beta)#operation/patchExperiment) with the `startIteration` or `stopIteration` instruction. \n\nTo learn more, read [Start experiment iterations](https://docs.launchdarkly.com/home/experimentation/feature#start-experiment-iterations).\n", + "summary": "Get contexts", + "description": "Get contexts based on kind and key.", "parameters": [ { "name": "projectKey", @@ -12828,167 +13530,89 @@ } }, { - "name": "experimentKey", + "name": "kind", "in": "path", - "description": "The experiment key", + "description": "The context kind", "required": true, "schema": { "type": "string", "format": "string", - "description": "The experiment key" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IterationInput" - } - } - }, - "required": true - }, - "operationId": "createIteration" - } - }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metric-groups/{metricGroupKey}/results": { - "get": { - "responses": { - "200": { - "description": "Experiment results response for metric group", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MetricGroupResultsRep" - } - } - } - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } + "description": "The context kind" } }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } - } - }, - "tags": [ - "Experiments (beta)" - ], - "summary": "Get experiment results for metric group", - "description": "Get results from an experiment for a particular metric group.", - "parameters": [ { - "name": "projectKey", + "name": "key", "in": "path", - "description": "The project key", + "description": "The context key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The context key" } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, + "name": "limit", + "in": "query", + "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", "schema": { - "type": "string", - "format": "string", - "description": "The environment key" + "type": "integer", + "format": "int64", + "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)" } }, { - "name": "experimentKey", - "in": "path", - "description": "The experiment key", - "required": true, + "name": "continuationToken", + "in": "query", + "description": "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.", "schema": { "type": "string", "format": "string", - "description": "The experiment key" + "description": "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." } }, { - "name": "metricGroupKey", - "in": "path", - "description": "The metric group key", - "required": true, + "name": "sort", + "in": "query", + "description": "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`.", "schema": { "type": "string", "format": "string", - "description": "The metric group key" + "description": "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`." } }, { - "name": "iterationId", + "name": "filter", "in": "query", - "description": "The iteration ID", + "description": "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](/tag/Contexts#filtering-contexts-and-context-instances).", "schema": { "type": "string", "format": "string", - "description": "The iteration ID" + "description": "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](/tag/Contexts#filtering-contexts-and-context-instances)." + } + }, + { + "name": "includeTotalCount", + "in": "query", + "description": "Specifies whether to include or omit the total count of matching contexts. Defaults to true.", + "schema": { + "type": "boolean", + "description": "Specifies whether to include or omit the total count of matching contexts. Defaults to true." } } ], - "operationId": "getExperimentResultsForMetricGroup" + "operationId": "getContexts" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metrics/{metricKey}/results": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments": { "get": { "responses": { "200": { - "description": "Experiment results response", + "description": "Experiment collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExperimentBayesianResultsRep" + "$ref": "#/components/schemas/ExperimentCollectionRep" } } } @@ -13033,6 +13657,16 @@ } } }, + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -13045,10 +13679,10 @@ } }, "tags": [ - "Experiments (beta)" + "Experiments" ], - "summary": "Get experiment results", - "description": "Get results from an experiment for a particular metric.\n\nLaunchDarkly supports one field for expanding the \"Get experiment results\" response. By default, this field is **not** included in the response.\n\nTo expand the response, append the `expand` query parameter with the following field:\n* `traffic` includes the total count of units for each treatment.\n\nFor example, `expand=traffic` includes the `traffic` field for the project in the response.\n", + "summary": "Get experiments", + "description": "Get details about all experiments in an environment.\n\n### Filtering experiments\n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `flagKey` filters for only experiments that use the flag with the given key.\n- `metricKey` filters for only experiments that use the metric with the given key.\n- `status` filters for only experiments with an iteration with the given status. An iteration can have the status `not_started`, `running` or `stopped`.\n\nFor 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.\n\n### Expanding the experiments response\n\nLaunchDarkly supports four fields for expanding the \"Get experiments\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n- `previousIterations` includes all iterations prior to the current iteration. By default only the current iteration is included in the response.\n- `draftIteration` includes the iteration which has not been started yet, if any.\n- `secondaryMetrics` includes secondary metrics. By default only the primary metric is included in the response.\n- `treatments` includes all treatment and parameter details. By default treatment data is not included in the response.\n\nFor 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.\n", "parameters": [ { "name": "projectKey", @@ -13073,60 +13707,66 @@ } }, { - "name": "experimentKey", - "in": "path", - "description": "The experiment key", - "required": true, + "name": "limit", + "in": "query", + "description": "The maximum number of experiments to return. Defaults to 20.", "schema": { - "type": "string", - "format": "string", - "description": "The experiment key" + "type": "integer", + "format": "int64", + "description": "The maximum number of experiments to return. Defaults to 20." } }, { - "name": "metricKey", - "in": "path", - "description": "The metric key", - "required": true, + "name": "offset", + "in": "query", + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`." + } + }, + { + "name": "filter", + "in": "query", + "description": "A comma-separated list of filters. Each filter is of the form `field:value`. Supported fields are explained above.", "schema": { "type": "string", "format": "string", - "description": "The metric key" + "description": "A comma-separated list of filters. Each filter is of the form `field:value`. Supported fields are explained above." } }, { - "name": "iterationId", + "name": "expand", "in": "query", - "description": "The iteration ID", + "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", "schema": { "type": "string", "format": "string", - "description": "The iteration ID" + "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above." } }, { - "name": "expand", + "name": "lifecycleState", "in": "query", - "description": "A comma-separated list of fields to expand in the response. Supported fields are explained above.", + "description": "A comma-separated list of experiment archived states. Supports `archived`, `active`, or both. Defaults to `active` experiments.", "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of fields to expand in the response. Supported fields are explained above." + "description": "A comma-separated list of experiment archived states. Supports `archived`, `active`, or both. Defaults to `active` experiments." } } ], - "operationId": "getExperimentResults" - } - }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate": { + "operationId": "getExperiments" + }, "post": { "responses": { - "200": { - "description": "Flag evaluation collection response", + "201": { + "description": "Experiment response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContextInstanceEvaluations" + "$ref": "#/components/schemas/Experiment" } } } @@ -13183,10 +13823,10 @@ } }, "tags": [ - "Contexts" + "Experiments" ], - "summary": "Evaluate flags for context instance", - "description": "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).\n\n### Filtering \n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `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`.\n- `tags` filters the list to flags that have all of the tags in the list. For example: `filter=tags contains [\"beta\",\"q1\"]`.\n\nYou 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`.\n", + "summary": "Create experiment", + "description": "Create an experiment.\n\nTo run this experiment, you'll need to [create an iteration](/tag/Experiments-(beta)#operation/createIteration) and then [update the experiment](/tag/Experiments-(beta)#operation/patchExperiment) with the `startIteration` instruction.\n\nTo learn more, read [Creating experiments](https://docs.launchdarkly.com/home/experimentation/create).\n", "parameters": [ { "name": "projectKey", @@ -13209,75 +13849,30 @@ "format": "string", "description": "The environment key" } - }, - { - "name": "limit", - "in": "query", - "description": "The number of feature flags to return. Defaults to -1, which returns all flags", - "schema": { - "type": "integer", - "format": "int64", - "description": "The number of feature flags to return. Defaults to -1, which returns all flags" - } - }, - { - "name": "offset", - "in": "query", - "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", - "schema": { - "type": "integer", - "format": "int64", - "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`." - } - }, - { - "name": "sort", - "in": "query", - "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order", - "schema": { - "type": "string", - "format": "string", - "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order" - } - }, - { - "name": "filter", - "in": "query", - "description": "A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above.", - "schema": { - "type": "string", - "format": "string", - "description": "A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above." - } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContextInstance" - }, - "example": { - "key": "user-key-123abc", - "kind": "user", - "otherAttribute": "other attribute value" + "$ref": "#/components/schemas/ExperimentPost" } } }, "required": true }, - "operationId": "evaluateContextInstance" + "operationId": "createExperiment" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/followers": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}": { "get": { "responses": { "200": { - "description": "Flags and flag followers response", + "description": "Experiment response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FlagFollowersByProjEnvGetRep" + "$ref": "#/components/schemas/Experiment" } } } @@ -13321,13 +13916,33 @@ } } } + }, + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } }, "tags": [ - "Follow flags" + "Experiments" ], - "summary": "Get followers of all flags in a given project and environment", - "description": "Get followers of all flags in a given environment and project", + "summary": "Get experiment", + "description": "Get details about an experiment.\n\n### Expanding the experiment response\n\nLaunchDarkly supports four fields for expanding the \"Get experiment\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n- `previousIterations` includes all iterations prior to the current iteration. By default only the current iteration is included in the response.\n- `draftIteration` includes the iteration which has not been started yet, if any.\n- `secondaryMetrics` includes secondary metrics. By default only the primary metric is included in the response.\n- `treatments` includes all treatment and parameter details. By default treatment data is not included in the response.\n\nFor 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.\n", "parameters": [ { "name": "projectKey", @@ -13350,20 +13965,39 @@ "format": "string", "description": "The environment key" } + }, + { + "name": "experimentKey", + "in": "path", + "description": "The experiment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The experiment key" + } + }, + { + "name": "expand", + "in": "query", + "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", + "schema": { + "type": "string", + "format": "string", + "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above." + } } ], - "operationId": "getFollowersByProjEnv" - } - }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/mobileKey": { - "post": { + "operationId": "getExperiment" + }, + "patch": { "responses": { "200": { - "description": "Environment response", + "description": "Experiment response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Environment" + "$ref": "#/components/schemas/Experiment" } } } @@ -13409,7 +14043,7 @@ } }, "409": { - "description": "Status conflict", + "description": "Conflict", "content": { "application/json": { "schema": { @@ -13430,10 +14064,10 @@ } }, "tags": [ - "Environments" + "Experiments" ], - "summary": "Reset environment mobile SDK key", - "description": "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.", + "summary": "Patch experiment", + "description": "Update an experiment. Updating an experiment uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating experiments.\n\n#### updateName\n\nUpdates the experiment name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Example updated experiment name\"\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the experiment description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Example updated description\"\n }]\n}\n```\n\n#### startIteration\n\nStarts a new iteration for this experiment. You must [create a new iteration](/tag/Experiments-(beta)#operation/createIteration) before calling this instruction.\n\nAn iteration may not be started until it meets the following criteria:\n\n* Its associated flag is toggled on and is not archived\n* Its `randomizationUnit` is set\n* At least one of its `treatments` has a non-zero `allocationPercent`\n\n##### Parameters\n\n- `changeJustification`: The reason for starting a new iteration. Required when you call `startIteration` on an already running experiment, otherwise optional.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"startIteration\",\n \"changeJustification\": \"It's time to start a new iteration\"\n }]\n}\n```\n\n#### stopIteration\n\nStops the current iteration for this experiment.\n\n##### Parameters\n\n- `winningTreatmentId`: The ID of the winning treatment. Treatment IDs are returned as part of the [Get experiment](/tag/Experiments-(beta)#operation/getExperiment) response. They are the `_id` of each element in the `treatments` array.\n- `winningReason`: The reason for the winner\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"stopIteration\",\n \"winningTreatmentId\": \"3a548ec2-72ac-4e59-8518-5c24f5609ccf\",\n \"winningReason\": \"Example reason to stop the iteration\"\n }]\n}\n```\n\n#### archiveExperiment\n\nArchives this experiment. Archived experiments are hidden by default in the LaunchDarkly user interface. You cannot start new iterations for archived experiments.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"archiveExperiment\" }]\n}\n```\n\n#### restoreExperiment\n\nRestores an archived experiment. After restoring an experiment, you can start new iterations for it again.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"restoreExperiment\" }]\n}\n```\n", "parameters": [ { "name": "projectKey", @@ -13456,20 +14090,50 @@ "format": "string", "description": "The environment key" } + }, + { + "name": "experimentKey", + "in": "path", + "description": "The experiment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The experiment key" + } } ], - "operationId": "resetEnvironmentMobileKey" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentPatchInput" + }, + "example": { + "comment": "Example comment describing the update", + "instructions": [ + { + "kind": "updateName", + "value": "Updated experiment name" + } + ] + } + } + }, + "required": true + }, + "operationId": "patchExperiment" } }, - "/api/v2/projects/{projectKey}/environments/{environmentKey}/segments/evaluate": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/iterations": { "post": { "responses": { "200": { - "description": "Context instance segment membership collection response", + "description": "Iteration response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContextInstanceSegmentMemberships" + "$ref": "#/components/schemas/IterationRep" } } } @@ -13494,6 +14158,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, "404": { "description": "Invalid resource identifier", "content": { @@ -13503,13 +14177,23 @@ } } } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } }, "tags": [ - "Segments" + "Experiments" ], - "summary": "List segment memberships for context instance", - "description": "For a given context instance with attributes, get membership details for all segments. In the request body, pass in the context instance.", + "summary": "Create iteration", + "description": "Create an experiment iteration.\n\nExperiment 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](/tag/Experiments-(beta)#operation/patchExperiment) with the `startIteration` or `stopIteration` instruction. \n\nTo learn more, read [Start experiment iterations](https://docs.launchdarkly.com/home/experimentation/feature#start-experiment-iterations).\n", "parameters": [ { "name": "projectKey", @@ -13532,40 +14216,41 @@ "format": "string", "description": "The environment key" } + }, + { + "name": "experimentKey", + "in": "path", + "description": "The experiment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The experiment key" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ContextInstance" - }, - "example": { - "address": { - "city": "Springfield", - "street": "123 Main Street" - }, - "jobFunction": "doctor", - "key": "context-key-123abc", - "kind": "user", - "name": "Sandy" + "$ref": "#/components/schemas/IterationInput" } } }, "required": true }, - "operationId": "getContextInstanceSegmentsMembershipByEnv" + "operationId": "createIteration" } }, - "/api/v2/projects/{projectKey}/experimentation-settings": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metric-groups/{metricGroupKey}/results": { "get": { "responses": { "200": { - "description": "Experimentation settings response", + "description": "Experiment results response for metric group", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RandomizationSettingsRep" + "$ref": "#/components/schemas/MetricGroupResultsRep" } } } @@ -13610,16 +14295,6 @@ } } }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -13632,10 +14307,10 @@ } }, "tags": [ - "Experiments (beta)" + "Experiments" ], - "summary": "Get experimentation settings", - "description": "Get current experimentation settings for the given project", + "summary": "Get experiment results for metric group", + "description": "Get results from an experiment for a particular metric group.", "parameters": [ { "name": "projectKey", @@ -13647,123 +14322,73 @@ "format": "string", "description": "The project key" } - } - ], - "operationId": "getExperimentationSettings" - }, - "put": { - "responses": { - "200": { - "description": "Experimentation settings response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RandomizationSettingsRep" - } - } - } }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" } }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } + { + "name": "experimentKey", + "in": "path", + "description": "The experiment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The experiment key" } }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } - } - }, - "tags": [ - "Experiments (beta)" - ], - "summary": "Update experimentation settings", - "description": "Update experimentation settings for the given project", - "parameters": [ { - "name": "projectKey", + "name": "metricGroupKey", "in": "path", - "description": "The project key", + "description": "The metric group key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The metric group key" + } + }, + { + "name": "iterationId", + "in": "query", + "description": "The iteration ID", + "schema": { + "type": "string", + "format": "string", + "description": "The iteration ID" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RandomizationSettingsPut" - } - } - }, - "required": true - }, - "operationId": "putExperimentationSettings" + "operationId": "getExperimentResultsForMetricGroup" } }, - "/api/v2/projects/{projectKey}/flag-defaults": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/experiments/{experimentKey}/metrics/{metricKey}/results": { "get": { "responses": { "200": { - "description": "Flag defaults response", + "description": "Experiment results response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/flagDefaultsRep" + "$ref": "#/components/schemas/ExperimentBayesianResultsRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -13797,13 +14422,23 @@ } } } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } }, "tags": [ - "Projects" + "Experiments" ], - "summary": "Get flag defaults for project", - "description": "Get the flag defaults for a specific project.", + "summary": "Get experiment results", + "description": "Get results from an experiment for a particular metric.\n\nLaunchDarkly supports one field for expanding the \"Get experiment results\" response. By default, this field is **not** included in the response.\n\nTo expand the response, append the `expand` query parameter with the following field:\n* `traffic` includes the total count of units for each treatment.\n\nFor example, `expand=traffic` includes the `traffic` field for the project in the response.\n", "parameters": [ { "name": "projectKey", @@ -13815,18 +14450,73 @@ "format": "string", "description": "The project key" } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "experimentKey", + "in": "path", + "description": "The experiment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The experiment key" + } + }, + { + "name": "metricKey", + "in": "path", + "description": "The metric key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The metric key" + } + }, + { + "name": "iterationId", + "in": "query", + "description": "The iteration ID", + "schema": { + "type": "string", + "format": "string", + "description": "The iteration ID" + } + }, + { + "name": "expand", + "in": "query", + "description": "A comma-separated list of fields to expand in the response. Supported fields are explained above.", + "schema": { + "type": "string", + "format": "string", + "description": "A comma-separated list of fields to expand in the response. Supported fields are explained above." + } } ], - "operationId": "getFlagDefaultsByProject" - }, - "patch": { + "operationId": "getExperimentResults" + } + }, + "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate": { + "post": { "responses": { "200": { - "description": "Flag default response", + "description": "Flag evaluation collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/upsertPayloadRep" + "$ref": "#/components/schemas/ContextInstanceEvaluations" } } } @@ -13871,16 +14561,6 @@ } } }, - "409": { - "description": "Status conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -13893,10 +14573,10 @@ } }, "tags": [ - "Projects" + "Contexts" ], - "summary": "Update flag default for project", - "description": "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](/#section/Overview/Updates).", + "summary": "Evaluate flags for context instance", + "description": "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).\n\n### Filtering \n\nLaunchDarkly supports the `filter` query param for filtering, with the following fields:\n\n- `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`.\n- `tags` filters the list to flags that have all of the tags in the list. For example: `filter=tags contains [\"beta\",\"q1\"]`.\n\nYou 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`.\n", "parameters": [ { "name": "projectKey", @@ -13908,28 +14588,86 @@ "format": "string", "description": "The project key" } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "limit", + "in": "query", + "description": "The number of feature flags to return. Defaults to -1, which returns all flags", + "schema": { + "type": "integer", + "format": "int64", + "description": "The number of feature flags to return. Defaults to -1, which returns all flags" + } + }, + { + "name": "offset", + "in": "query", + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`." + } + }, + { + "name": "sort", + "in": "query", + "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order", + "schema": { + "type": "string", + "format": "string", + "description": "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order" + } + }, + { + "name": "filter", + "in": "query", + "description": "A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above.", + "schema": { + "type": "string", + "format": "string", + "description": "A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above." + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JSONPatch" + "$ref": "#/components/schemas/ContextInstance" + }, + "example": { + "key": "user-key-123abc", + "kind": "user", + "otherAttribute": "other attribute value" } } }, "required": true }, - "operationId": "patchFlagDefaultsByProject" - }, - "put": { + "operationId": "evaluateContextInstance" + } + }, + "/api/v2/projects/{projectKey}/environments/{environmentKey}/followers": { + "get": { "responses": { "200": { - "description": "Flag default response", + "description": "Flags and flag followers response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/upsertPayloadRep" + "$ref": "#/components/schemas/FlagFollowersByProjEnvGetRep" } } } @@ -13973,33 +14711,13 @@ } } } - }, - "409": { - "description": "Status conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Projects" + "Follow flags" ], - "summary": "Create or update flag defaults for project", - "description": "Create or update flag defaults for a project.", + "summary": "Get followers of all flags in a given project and environment", + "description": "Get followers of all flags in a given environment and project", "parameters": [ { "name": "projectKey", @@ -14011,60 +14729,61 @@ "format": "string", "description": "The project key" } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpsertFlagDefaultsPayload" - } - } - }, - "required": true - }, - "operationId": "putFlagDefaultsByProject" + "operationId": "getFollowersByProjEnv" } }, - "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts": { "get": { "responses": { "200": { - "description": "Approval request collection response", + "description": "All Holdouts response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FlagConfigApprovalRequestsResponse" + "$ref": "#/components/schemas/HoldoutsCollectionRep" } } } }, - "401": { - "description": "Invalid access token", + "400": { + "description": "Invalid request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } }, - "403": { - "description": "Forbidden", + "401": { + "description": "Invalid access token", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/UnauthorizedErrorRep" } } } }, - "404": { - "description": "Invalid resource identifier", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } @@ -14081,10 +14800,9 @@ } }, "tags": [ - "Approvals" + "Holdouts (beta)" ], - "summary": "List approval requests for a flag", - "description": "Get all approval requests for a feature flag.", + "summary": "Get all holdouts", "parameters": [ { "name": "projectKey", @@ -14098,38 +14816,47 @@ } }, { - "name": "featureFlagKey", + "name": "environmentKey", "in": "path", - "description": "The feature flag key", + "description": "The environment key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The feature flag key" + "description": "The environment key" } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, + "name": "limit", + "in": "query", + "description": "The number of holdouts to return in the response. Defaults to 20", "schema": { - "type": "string", - "format": "string", - "description": "The environment key" + "type": "integer", + "format": "int64", + "description": "The number of holdouts to return in the response. Defaults to 20" + } + }, + { + "name": "offset", + "in": "query", + "description": "Where to start in the list. Use this with pagination. For example, an `offset` of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Where to start in the list. Use this with pagination. For example, an `offset` of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`." } } ], - "operationId": "getApprovalsForFlag" + "operationId": "getAllHoldouts" }, "post": { "responses": { "201": { - "description": "Approval request response", + "description": "Holdout response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" + "$ref": "#/components/schemas/HoldoutRep" } } } @@ -14143,43 +14870,13 @@ } } } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Approvals" + "Holdouts (beta)" ], - "summary": "Create approval request for a flag", - "description": "Create an approval request for a feature flag.", + "summary": "Create holdout", + "description": "Create a new holdout in the specified project.", "parameters": [ { "name": "projectKey", @@ -14192,17 +14889,6 @@ "description": "The project key" } }, - { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" - } - }, { "name": "environmentKey", "in": "path", @@ -14219,24 +14905,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/createFlagConfigApprovalRequestRequest" + "$ref": "#/components/schemas/HoldoutPostRequest" } } }, "required": true }, - "operationId": "postApprovalRequestForFlag" + "operationId": "postHoldout" } }, - "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests-flag-copy": { - "post": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/id/{holdoutId}": { + "get": { "responses": { - "201": { - "description": "Approval request response", + "200": { + "description": "Holdout response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" + "$ref": "#/components/schemas/HoldoutRep" } } } @@ -14271,12 +14957,12 @@ } } }, - "409": { - "description": "Status conflict", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -14293,10 +14979,9 @@ } }, "tags": [ - "Approvals" + "Holdouts (beta)" ], - "summary": "Create approval request to copy flag configurations across environments", - "description": "Create an approval request to copy a feature flag's configuration across environments.", + "summary": "Get Holdout by Id", "parameters": [ { "name": "projectKey", @@ -14310,50 +14995,50 @@ } }, { - "name": "featureFlagKey", + "name": "environmentKey", "in": "path", - "description": "The feature flag key", + "description": "The environment key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The feature flag key" + "description": "The environment key" } }, { - "name": "environmentKey", + "name": "holdoutId", "in": "path", - "description": "The environment key for the target environment", + "description": "The holdout experiment ID", "required": true, "schema": { "type": "string", "format": "string", - "description": "The environment key for the target environment" + "description": "The holdout experiment ID" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/createCopyFlagConfigApprovalRequestRequest" - } - } - }, - "required": true - }, - "operationId": "postFlagCopyConfigApprovalRequest" + "operationId": "getHoldoutById" } }, - "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/{holdoutKey}": { "get": { "responses": { "200": { - "description": "Approval request response", + "description": "HoldoutDetail response with full experiments", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" + "$ref": "#/components/schemas/HoldoutDetailRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -14400,10 +15085,10 @@ } }, "tags": [ - "Approvals" + "Holdouts (beta)" ], - "summary": "Get approval request for a flag", - "description": "Get a single approval request for a feature flag.", + "summary": "Get holdout", + "description": "Get details about a holdout.\n\n### Expanding the holdout response\n\nLaunchDarkly supports the following fields for expanding the \"Get holdout\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n- `draftIteration` includes the iteration which has not been started yet, if any, for this holdout.\n- `previousIterations` includes all iterations prior to the current iteration, for this holdout. By default only the current iteration is included in the response.\n- `rel-draftIteration` includes the iteration which has not been started yet, if any, for the experiments related to this holdout.\n- `rel-metrics` includes metrics for experiments related to this holdout.\n- `rel-previousIterations` includes all iterations prior to the current iteration, for the experiments related to this holdout.\n- `rel-secondaryMetrics` includes secondary metrics for experiments related to this holdout.\n- `rel-treatments` includes all treatment and parameter details for experiments related to this holdout.\n- `secondaryMetrics` includes secondary metrics for this holdout. By default only the primary metric is included in the response.\n- `treatments` includes all treatment and parameter details for this holdout. By default treatment data is not included in the response.\n\nFor example, `expand=draftIteration,rel-draftIteration` includes the `draftIteration` and `rel-draftIteration` fields in the response. If fields that you request with the `expand` query parameter are empty, they are not included in the response.\n", "parameters": [ { "name": "projectKey", @@ -14417,45 +15102,61 @@ } }, { - "name": "featureFlagKey", + "name": "environmentKey", "in": "path", - "description": "The feature flag key", + "description": "The environment key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The feature flag key" + "description": "The environment key" } }, { - "name": "environmentKey", + "name": "holdoutKey", "in": "path", - "description": "The environment key", + "description": "The holdout experiment key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The environment key" + "description": "The holdout experiment key" } }, { - "name": "id", - "in": "path", - "description": "The feature flag approval request ID", - "required": true, + "name": "expand", + "in": "query", + "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. Holdout experiment expansion fields have no prefix. Related experiment expansion fields have `rel-` as a prefix.", "schema": { "type": "string", "format": "string", - "description": "The feature flag approval request ID" + "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. Holdout experiment expansion fields have no prefix. Related experiment expansion fields have `rel-` as a prefix." } } ], - "operationId": "getApprovalForFlag" + "operationId": "getHoldout" }, - "delete": { + "patch": { "responses": { - "204": { - "description": "Action succeeded" + "200": { + "description": "Holdout response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HoldoutRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } }, "401": { "description": "Invalid access token", @@ -14499,10 +15200,10 @@ } }, "tags": [ - "Approvals" + "Holdouts (beta)" ], - "summary": "Delete approval request for a flag", - "description": "Delete an approval request for a feature flag.", + "summary": "Patch holdout", + "description": "Updates an existing holdout, and returns the updated holdout. Updating holdouts uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating holdouts.\n\n
\nClick to expand instructions for updating holdouts\n\n#### endHoldout\n\nEnds a holdout.\n\n##### Parameters\n\nNone.\n\nHere's an example:\n\n```json\n{\n \"comment\": \"Optional comment describing why the holdout is ending\",\n \"instructions\": [{\n \"kind\": \"endHoldout\"\n }]\n}\n```\n\n#### removeExperiment\n\nRemoves an experiment from a holdout.\n\n##### Parameters\n\n- `value`: The key of the experiment to remove\n\nHere's an example:\n\n```json\n{\n \"comment\": \"Optional comment describing the change\",\n \"instructions\": [{\n \"kind\": \"removeExperiment\",\n \"value\": \"experiment-key\"\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the description of the holdout.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"comment\": \"Optional comment describing the update\",\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Updated holdout description\"\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the holdout.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"comment\": \"Optional comment describing the update\",\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated holdout name\"\n }]\n}\n```\n\n
\n", "parameters": [ { "name": "projectKey", @@ -14516,20 +15217,9 @@ } }, { - "name": "featureFlagKey", + "name": "environmentKey", "in": "path", - "description": "The feature flag key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", + "description": "The environment key", "required": true, "schema": { "type": "string", @@ -14538,29 +15228,48 @@ } }, { - "name": "id", + "name": "holdoutKey", "in": "path", - "description": "The feature flag approval request ID", + "description": "The holdout key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The feature flag approval request ID" + "description": "The holdout key" } } ], - "operationId": "deleteApprovalRequestForFlag" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HoldoutPatchInput" + }, + "example": { + "comment": "Optional comment describing the update", + "instructions": [ + { + "kind": "updateName", + "value": "Updated holdout name" + } + ] + } + } + }, + "required": true + }, + "operationId": "patchHoldout" } }, - "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/apply": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/mobileKey": { "post": { "responses": { "200": { - "description": "Approval request apply response", + "description": "Environment response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" + "$ref": "#/components/schemas/Environment" } } } @@ -14605,6 +15314,16 @@ } } }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -14617,10 +15336,10 @@ } }, "tags": [ - "Approvals" + "Environments" ], - "summary": "Apply approval request for a flag", - "description": "Apply an approval request that has been approved.", + "summary": "Reset environment mobile SDK key", + "description": "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.", "parameters": [ { "name": "projectKey", @@ -14633,17 +15352,6 @@ "description": "The project key" } }, - { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" - } - }, { "name": "environmentKey", "in": "path", @@ -14654,41 +15362,20 @@ "format": "string", "description": "The environment key" } - }, - { - "name": "id", - "in": "path", - "description": "The feature flag approval request ID", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag approval request ID" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/postApprovalRequestApplyRequest" - } - } - }, - "required": true - }, - "operationId": "postApprovalRequestApplyForFlag" + "operationId": "resetEnvironmentMobileKey" } }, - "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/reviews": { + "/api/v2/projects/{projectKey}/environments/{environmentKey}/segments/evaluate": { "post": { "responses": { "200": { - "description": "Approval request review response", + "description": "Context instance segment membership collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" + "$ref": "#/components/schemas/ContextInstanceSegmentMemberships" } } } @@ -14713,16 +15400,6 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, "404": { "description": "Invalid resource identifier", "content": { @@ -14732,23 +15409,13 @@ } } } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Approvals" + "Segments" ], - "summary": "Review approval request for a flag", - "description": "Review an approval request by approving or denying changes.", + "summary": "List segment memberships for context instance", + "description": "For a given context instance with attributes, get membership details for all segments. In the request body, pass in the context instance.", "parameters": [ { "name": "projectKey", @@ -14761,17 +15428,6 @@ "description": "The project key" } }, - { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" - } - }, { "name": "environmentKey", "in": "path", @@ -14782,41 +15438,40 @@ "format": "string", "description": "The environment key" } - }, - { - "name": "id", - "in": "path", - "description": "The feature flag approval request ID", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag approval request ID" - } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/postApprovalRequestReviewRequest" + "$ref": "#/components/schemas/ContextInstance" + }, + "example": { + "address": { + "city": "Springfield", + "street": "123 Main Street" + }, + "jobFunction": "doctor", + "key": "context-key-123abc", + "kind": "user", + "name": "Sandy" } } }, "required": true }, - "operationId": "postApprovalRequestReviewForFlag" + "operationId": "getContextInstanceSegmentsMembershipByEnv" } }, - "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers": { + "/api/v2/projects/{projectKey}/experimentation-settings": { "get": { "responses": { "200": { - "description": "Flag followers response", + "description": "Experimentation settings response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FlagFollowersGetRep" + "$ref": "#/components/schemas/RandomizationSettingsRep" } } } @@ -14860,13 +15515,33 @@ } } } + }, + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } }, "tags": [ - "Follow flags" + "Experiments" ], - "summary": "Get followers of a flag in a project and environment", - "description": "Get a list of members following a flag in a project and environment", + "summary": "Get experimentation settings", + "description": "Get current experimentation settings for the given project", "parameters": [ { "name": "projectKey", @@ -14878,38 +15553,21 @@ "format": "string", "description": "The project key" } - }, - { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } } ], - "operationId": "getFlagFollowers" - } - }, - "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId}": { + "operationId": "getExperimentationSettings" + }, "put": { "responses": { - "204": { - "description": "Action succeeded" + "200": { + "description": "Experimentation settings response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RandomizationSettingsRep" + } + } + } }, "400": { "description": "Invalid request", @@ -14950,13 +15608,33 @@ } } } + }, + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } }, "tags": [ - "Follow flags" + "Experiments" ], - "summary": "Add a member as a follower of a flag in a project and environment", - "description": "Add a member as a follower to a flag in a project and environment", + "summary": "Update experimentation settings", + "description": "Update experimentation settings for the given project", "parameters": [ { "name": "projectKey", @@ -14968,54 +15646,30 @@ "format": "string", "description": "The project key" } - }, - { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "memberId", - "in": "path", - "description": "The memberId of the member to add as a follower of the flag. Reader roles can only add themselves.", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The memberId of the member to add as a follower of the flag. Reader roles can only add themselves." - } } ], - "operationId": "putFlagFollowers" - }, - "delete": { - "responses": { - "204": { - "description": "Action succeeded" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RandomizationSettingsPut" + } + } }, - "400": { - "description": "Invalid request", + "required": true + }, + "operationId": "putExperimentationSettings" + } + }, + "/api/v2/projects/{projectKey}/flag-defaults": { + "get": { + "responses": { + "200": { + "description": "Flag defaults response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/flagDefaultsRep" } } } @@ -15052,10 +15706,10 @@ } }, "tags": [ - "Follow flags" + "Projects" ], - "summary": "Remove a member as a follower of a flag in a project and environment", - "description": "Remove a member as a follower to a flag in a project and environment", + "summary": "Get flag defaults for project", + "description": "Get the flag defaults for a specific project.", "parameters": [ { "name": "projectKey", @@ -15067,53 +15721,18 @@ "format": "string", "description": "The project key" } - }, - { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "memberId", - "in": "path", - "description": "The memberId of the member to remove as a follower of the flag. Reader roles can only remove themselves.", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The memberId of the member to remove as a follower of the flag. Reader roles can only remove themselves." - } } ], - "operationId": "deleteFlagFollowers" - } - }, - "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes": { - "get": { + "operationId": "getFlagDefaultsByProject" + }, + "patch": { "responses": { "200": { - "description": "Scheduled changes collection response", + "description": "Flag default response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeatureFlagScheduledChanges" + "$ref": "#/components/schemas/upsertPayloadRep" } } } @@ -15157,13 +15776,33 @@ } } } + }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } }, "tags": [ - "Scheduled changes" + "Projects" ], - "summary": "List scheduled changes", - "description": "Get a list of scheduled changes that will be applied to the feature flag.", + "summary": "Update flag default for project", + "description": "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](/#section/Overview/Updates).", "parameters": [ { "name": "projectKey", @@ -15175,40 +15814,28 @@ "format": "string", "description": "The project key" } - }, - { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } } ], - "operationId": "getFlagConfigScheduledChanges" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONPatch" + } + } + }, + "required": true + }, + "operationId": "patchFlagDefaultsByProject" }, - "post": { + "put": { "responses": { - "201": { - "description": "Scheduled changes response", + "200": { + "description": "Flag default response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeatureFlagScheduledChange" + "$ref": "#/components/schemas/upsertPayloadRep" } } } @@ -15253,16 +15880,6 @@ } } }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, "409": { "description": "Status conflict", "content": { @@ -15285,10 +15902,10 @@ } }, "tags": [ - "Scheduled changes" + "Projects" ], - "summary": "Create scheduled changes workflow", - "description": "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.", + "summary": "Create or update flag defaults for project", + "description": "Create or update flag defaults for a project.", "parameters": [ { "name": "projectKey", @@ -15300,70 +15917,30 @@ "format": "string", "description": "The project key" } - }, - { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "ignoreConflicts", - "in": "query", - "description": "Whether to succeed (`true`) or fail (`false`) when these instructions conflict with existing scheduled changes", - "schema": { - "type": "boolean", - "description": "Whether to succeed (`true`) or fail (`false`) when these instructions conflict with existing scheduled changes" - } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PostFlagScheduledChangesInput" - }, - "example": { - "comment": "Optional comment describing the scheduled changes", - "executionDate": 1718467200000, - "instructions": [ - { - "kind": "turnFlagOn" - } - ] + "$ref": "#/components/schemas/UpsertFlagDefaultsPayload" } } }, "required": true }, - "operationId": "postFlagConfigScheduledChanges" + "operationId": "putFlagDefaultsByProject" } }, - "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}": { + "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests": { "get": { "responses": { "200": { - "description": "Scheduled changes response", + "description": "Approval request collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeatureFlagScheduledChange" + "$ref": "#/components/schemas/FlagConfigApprovalRequestsResponse" } } } @@ -15378,6 +15955,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, "404": { "description": "Invalid resource identifier", "content": { @@ -15400,10 +15987,10 @@ } }, "tags": [ - "Scheduled changes" + "Approvals" ], - "summary": "Get a scheduled change", - "description": "Get a scheduled change that will be applied to the feature flag by ID.", + "summary": "List approval requests for a flag", + "description": "Get all approval requests for a feature flag.", "parameters": [ { "name": "projectKey", @@ -15437,29 +16024,18 @@ "format": "string", "description": "The environment key" } - }, - { - "name": "id", - "in": "path", - "description": "The scheduled change id", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The scheduled change id" - } } ], - "operationId": "getFeatureFlagScheduledChange" + "operationId": "getApprovalsForFlag" }, - "patch": { + "post": { "responses": { - "200": { - "description": "Scheduled changes response", + "201": { + "description": "Approval request response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeatureFlagScheduledChange" + "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" } } } @@ -15494,36 +16070,6 @@ } } }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, - "409": { - "description": "Status conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -15536,10 +16082,10 @@ } }, "tags": [ - "Scheduled changes" + "Approvals" ], - "summary": "Update scheduled changes workflow", - "description": "\nUpdate a scheduled change, overriding existing instructions with the new ones. Updating a scheduled change uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating scheduled changes.\n\n
\nClick to expand instructions for updating scheduled changes\n\n#### deleteScheduledChange\n\nRemoves the scheduled change.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"deleteScheduledChange\" }]\n}\n```\n\n#### replaceScheduledChangesInstructions\n\nRemoves the existing scheduled changes and replaces them with the new instructions.\n\n##### Parameters\n\n- `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`.\n\nHere's an example that replaces the scheduled changes with new instructions to turn flag targeting off:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"replaceScheduledChangesInstructions\",\n \"value\": [ {\"kind\": \"turnFlagOff\"} ]\n }\n ]\n}\n```\n\n#### updateScheduledChangesExecutionDate\n\nUpdates the execution date for the scheduled changes.\n\n##### Parameters\n\n- `value`: the new execution date, in Unix milliseconds.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"updateScheduledChangesExecutionDate\",\n \"value\": 1754092860000\n }\n ]\n}\n```\n\n
\n", + "summary": "Create approval request for a flag", + "description": "Create an approval request for a feature flag.", "parameters": [ { "name": "projectKey", @@ -15573,94 +16119,60 @@ "format": "string", "description": "The environment key" } - }, - { - "name": "id", - "in": "path", - "description": "The scheduled change ID", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The scheduled change ID" - } - }, - { - "name": "ignoreConflicts", - "in": "query", - "description": "Whether to succeed (`true`) or fail (`false`) when these new instructions conflict with existing scheduled changes", - "schema": { - "type": "boolean", - "description": "Whether to succeed (`true`) or fail (`false`) when these new instructions conflict with existing scheduled changes" - } } ], "requestBody": { "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" - } - ] - } - ] + "$ref": "#/components/schemas/createFlagConfigApprovalRequestRequest" } } }, "required": true }, - "operationId": "patchFlagConfigScheduledChange" - }, - "delete": { + "operationId": "postApprovalRequestForFlag" + } + }, + "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests-flag-copy": { + "post": { "responses": { - "204": { - "description": "Action succeeded" - }, - "401": { - "description": "Invalid access token", + "201": { + "description": "Approval request response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" } } } }, - "403": { - "description": "Forbidden", + "400": { + "description": "Invalid request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } }, - "404": { - "description": "Invalid resource identifier", + "401": { + "description": "Invalid access token", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/UnauthorizedErrorRep" } } } }, - "405": { - "description": "Method not allowed", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } @@ -15687,10 +16199,10 @@ } }, "tags": [ - "Scheduled changes" + "Approvals" ], - "summary": "Delete scheduled changes workflow", - "description": "Delete a scheduled changes workflow.", + "summary": "Create approval request to copy flag configurations across environments", + "description": "Create an approval request to copy a feature flag's configuration across environments.", "parameters": [ { "name": "projectKey", @@ -15717,38 +16229,37 @@ { "name": "environmentKey", "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "id", - "in": "path", - "description": "The scheduled change id", + "description": "The environment key for the target environment", "required": true, "schema": { "type": "string", "format": "string", - "description": "The scheduled change id" + "description": "The environment key for the target environment" } } ], - "operationId": "deleteFlagConfigScheduledChanges" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createCopyFlagConfigApprovalRequestRequest" + } + } + }, + "required": true + }, + "operationId": "postFlagCopyConfigApprovalRequest" } }, - "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows": { + "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}": { "get": { "responses": { "200": { - "description": "Workflows collection response", + "description": "Approval request response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomWorkflowsListingOutput" + "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" } } } @@ -15795,10 +16306,10 @@ } }, "tags": [ - "Workflows" + "Approvals" ], - "summary": "Get workflows", - "description": "Display workflows associated with a feature flag.", + "summary": "Get approval request for a flag", + "description": "Get a single approval request for a feature flag.", "parameters": [ { "name": "projectKey", @@ -15834,66 +16345,27 @@ } }, { - "name": "status", - "in": "query", - "description": "Filter results by workflow status. Valid status filters are `active`, `completed`, and `failed`.", - "schema": { - "type": "string", - "format": "string", - "description": "Filter results by workflow status. Valid status filters are `active`, `completed`, and `failed`." - } - }, - { - "name": "sort", - "in": "query", - "description": "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`.", + "name": "id", + "in": "path", + "description": "The feature flag approval request ID", + "required": true, "schema": { "type": "string", "format": "string", - "description": "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`." - } - }, - { - "name": "limit", - "in": "query", - "description": "The maximum number of workflows to return. Defaults to 20.", - "schema": { - "type": "integer", - "format": "int64", - "description": "The maximum number of workflows to return. Defaults to 20." - } - }, - { - "name": "offset", - "in": "query", - "description": "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`.", - "schema": { - "type": "integer", - "format": "int64", - "description": "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`." + "description": "The feature flag approval request ID" } } ], - "operationId": "getWorkflows" + "operationId": "getApprovalForFlag" }, - "post": { + "patch": { "responses": { - "201": { - "description": "Workflow response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomWorkflowOutput" - } - } - } - }, - "400": { - "description": "Invalid request", + "200": { + "description": "Approval request response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" } } } @@ -15940,30 +16412,11 @@ } }, "tags": [ - "Workflows" + "Approvals (beta)" ], - "summary": "Create workflow", - "description": "Create a workflow for a feature flag. You can create a workflow directly, or you can apply a template to create a new workflow.\n\n### Creating a workflow\n\nYou can use the create workflow endpoint to create a workflow directly by adding a `stages` array to the request body.\n\nFor each stage, define the `name`, `conditions` when the stage should be executed, and `action` that describes the stage.\n\n
\nClick to expand example\n\n_Example request body_\n```json\n{\n \"name\": \"Progressive rollout starting in two days\",\n \"description\": \"Turn flag targeting on and increase feature rollout in 10% increments each day\",\n \"stages\": [\n {\n \"name\": \"10% rollout on day 1\",\n \"conditions\": [\n {\n \"kind\": \"schedule\",\n \"scheduleKind\": \"relative\", // or \"absolute\"\n // If \"scheduleKind\" is \"absolute\", set \"executionDate\";\n // \"waitDuration\" and \"waitDurationUnit\" will be ignored\n \"waitDuration\": 2,\n \"waitDurationUnit\": \"calendarDay\"\n },\n {\n \"kind\": \"ld-approval\",\n \"notifyMemberIds\": [ \"507f1f77bcf86cd799439011\" ],\n \"notifyTeamKeys\": [ \"team-key-123abc\" ]\n }\n ],\n \"action\": {\n \"instructions\": [\n {\n \"kind\": \"turnFlagOn\"\n },\n {\n \"kind\": \"updateFallthroughVariationOrRollout\",\n \"rolloutWeights\": {\n \"452f5fb5-7320-4ba3-81a1-8f4324f79d49\": 90000,\n \"fc15f6a4-05d3-4aa4-a997-446be461345d\": 10000\n }\n }\n ]\n }\n }\n ]\n}\n```\n
\n\n### Creating a workflow by applying a workflow template\n\nYou 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.\n\n#### Applicability of stages\nTemplates 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.\n\nYou 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.\n\n#### Overriding template parameters\nYou 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.\n\n
\nClick to expand example\n\n_Example request body_\n```json\n{\n\t\"name\": \"workflow created from my-template\",\n\t\"description\": \"description of my workflow\",\n\t\"parameters\": [\n\t\t{\n\t\t\t\"_id\": \"62cf2bc4cadbeb7697943f3b\",\n\t\t\t\"path\": \"/clauses/0/values\",\n\t\t\t\"default\": {\n\t\t\t\t\"value\": [\"updated-segment\"]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"_id\": \"62cf2bc4cadbeb7697943f3d\",\n\t\t\t\"path\": \"/variationId\",\n\t\t\t\"default\": {\n\t\t\t\t\"value\": \"abcd1234-abcd-1234-abcd-1234abcd12\"\n\t\t\t}\n\t\t}\n\t]\n}\n```\n
\n\nIf 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.\n", + "summary": "Update flag approval request", + "description": "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instruction for updating an approval request.\n\n#### addReviewers\n\nAdds the specified members and teams to the existing list of reviewers. You must include at least one of `notifyMemberIds` and `notifyTeamKeys`.\n\n##### Parameters\n\n- `notifyMemberIds`: (Optional) List of member IDs.\n- `notifyTeamKeys`: (Optional) List of team keys.\n", "parameters": [ - { - "name": "templateKey", - "in": "query", - "description": "The template key to apply as a starting point for the new workflow", - "schema": { - "type": "string", - "format": "string", - "description": "The template key to apply as a starting point for the new workflow" - } - }, - { - "name": "dryRun", - "in": "query", - "description": "Whether to call the endpoint in dry-run mode", - "schema": { - "type": "boolean", - "description": "Whether to call the endpoint in dry-run mode" - } - }, { "name": "projectKey", "in": "path", @@ -15996,64 +16449,25 @@ "format": "string", "description": "The environment key" } + }, + { + "name": "id", + "in": "path", + "description": "The approval ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The approval ID" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomWorkflowInput" - }, - "example": { - "description": "Turn flag on for 10% of customers each day", - "name": "Progressive rollout starting in two days", - "stages": [ - { - "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" - } - ], - "name": "10% rollout on day 1" - } - ] - } - } - }, - "required": true - }, - "operationId": "postWorkflow" - } - }, - "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}": { - "get": { + "operationId": "patchFlagConfigApprovalRequest" + }, + "delete": { "responses": { - "200": { - "description": "Workflow response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomWorkflowOutput" - } - } - } + "204": { + "description": "Action succeeded" }, "401": { "description": "Invalid access token", @@ -16097,10 +16511,10 @@ } }, "tags": [ - "Workflows" + "Approvals" ], - "summary": "Get custom workflow", - "description": "Get a specific workflow by ID.", + "summary": "Delete approval request for a flag", + "description": "Delete an approval request for a feature flag.", "parameters": [ { "name": "projectKey", @@ -16136,23 +16550,32 @@ } }, { - "name": "workflowId", + "name": "id", "in": "path", - "description": "The workflow ID", + "description": "The feature flag approval request ID", "required": true, "schema": { "type": "string", "format": "string", - "description": "The workflow ID" + "description": "The feature flag approval request ID" } } ], - "operationId": "getCustomWorkflow" - }, - "delete": { + "operationId": "deleteApprovalRequestForFlag" + } + }, + "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/apply": { + "post": { "responses": { - "204": { - "description": "Action completed successfully" + "200": { + "description": "Approval request apply response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" + } + } + } }, "400": { "description": "Invalid request", @@ -16206,10 +16629,10 @@ } }, "tags": [ - "Workflows" + "Approvals" ], - "summary": "Delete workflow", - "description": "Delete a workflow from a feature flag.", + "summary": "Apply approval request for a flag", + "description": "Apply an approval request that has been approved.", "parameters": [ { "name": "projectKey", @@ -16245,39 +16668,43 @@ } }, { - "name": "workflowId", + "name": "id", "in": "path", - "description": "The workflow id", + "description": "The feature flag approval request ID", "required": true, "schema": { "type": "string", "format": "string", - "description": "The workflow id" + "description": "The feature flag approval request ID" } } ], - "operationId": "deleteWorkflow" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/postApprovalRequestApplyRequest" + } + } + }, + "required": true + }, + "operationId": "postApprovalRequestApplyForFlag" } }, - "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/migration-safety-issues": { + "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{id}/reviews": { "post": { "responses": { "200": { - "description": "Migration safety issues found", + "description": "Approval request review response", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MigrationSafetyIssueRep" - } + "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" } } } }, - "204": { - "description": "No safety issues found" - }, "400": { "description": "Invalid request", "content": { @@ -16327,23 +16754,13 @@ } } } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusServiceUnavailable" - } - } - } } }, "tags": [ - "Feature flags" + "Approvals" ], - "summary": "Get migration safety issues", - "description": "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.", + "summary": "Review approval request for a flag", + "description": "Review an approval request by approving or denying changes.", "parameters": [ { "name": "projectKey", @@ -16357,14 +16774,14 @@ } }, { - "name": "flagKey", + "name": "featureFlagKey", "in": "path", - "description": "The migration flag key", + "description": "The feature flag key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The migration flag key" + "description": "The feature flag key" } }, { @@ -16377,30 +16794,41 @@ "format": "string", "description": "The environment key" } + }, + { + "name": "id", + "in": "path", + "description": "The feature flag approval request ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The feature flag approval request ID" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/flagSempatch" + "$ref": "#/components/schemas/postApprovalRequestReviewRequest" } } }, "required": true }, - "operationId": "postMigrationSafetyIssues" + "operationId": "postApprovalRequestReviewForFlag" } }, - "/api/v2/projects/{projectKey}/metric-groups": { + "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers": { "get": { "responses": { "200": { - "description": "Metric group collection response", + "description": "Flag followers response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MetricGroupCollectionRep" + "$ref": "#/components/schemas/FlagFollowersGetRep" } } } @@ -16444,33 +16872,13 @@ } } } - }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Metrics (beta)" + "Follow flags" ], - "summary": "List metric groups", - "description": "Get a list of all metric groups for the specified project.\n\n### Expanding the metric groups response\nLaunchDarkly supports one field for expanding the \"Get metric groups\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with the following field:\n\n- `experiments` includes all experiments from the specific project that use the metric group\n\nFor example, `expand=experiments` includes the `experiments` field in the response.\n", + "summary": "Get followers of a flag in a project and environment", + "description": "Get a list of members following a flag in a project and environment", "parameters": [ { "name": "projectKey", @@ -16484,29 +16892,36 @@ } }, { - "name": "expand", - "in": "query", - "description": "A comma-separated list of properties that can reveal additional information in the response.", + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of properties that can reveal additional information in the response." + "description": "The feature flag key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" } } ], - "operationId": "getMetricGroups" - }, - "post": { + "operationId": "getFlagFollowers" + } + }, + "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/followers/{memberId}": { + "put": { "responses": { - "201": { - "description": "Metric group response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MetricGroupRep" - } - } - } + "204": { + "description": "Action succeeded" }, "400": { "description": "Invalid request", @@ -16547,33 +16962,13 @@ } } } - }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Metrics (beta)" + "Follow flags" ], - "summary": "Create metric group", - "description": "Create a new metric group in the specified project", + "summary": "Add a member as a follower of a flag in a project and environment", + "description": "Add a member as a follower to a flag in a project and environment", "parameters": [ { "name": "projectKey", @@ -16585,34 +16980,48 @@ "format": "string", "description": "The project key" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MetricGroupPost" - } + }, + { + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The feature flag key" } }, - "required": true - }, - "operationId": "createMetricGroup" - } - }, - "/api/v2/projects/{projectKey}/metric-groups/{metricGroupKey}": { - "get": { - "responses": { - "200": { - "description": "Metric group response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MetricGroupRep" - } - } + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" } }, + { + "name": "memberId", + "in": "path", + "description": "The memberId of the member to add as a follower of the flag. Reader roles can only add themselves.", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The memberId of the member to add as a follower of the flag. Reader roles can only add themselves." + } + } + ], + "operationId": "putFlagFollower" + }, + "delete": { + "responses": { + "204": { + "description": "Action succeeded" + }, "400": { "description": "Invalid request", "content": { @@ -16652,33 +17061,13 @@ } } } - }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Metrics (beta)" + "Follow flags" ], - "summary": "Get metric group", - "description": "Get information for a single metric group from the specific project.\n\n### Expanding the metric group response\nLaunchDarkly supports two fields for expanding the \"Get metric group\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with either or both of the following fields:\n\n- `experiments` includes all experiments from the specific project that use the metric group\n- `experimentCount` includes the number of experiments from the specific project that use the metric group\n\nFor example, `expand=experiments` includes the `experiments` field in the response.\n", + "summary": "Remove a member as a follower of a flag in a project and environment", + "description": "Remove a member as a follower to a flag in a project and environment", "parameters": [ { "name": "projectKey", @@ -16692,37 +17081,51 @@ } }, { - "name": "metricGroupKey", + "name": "featureFlagKey", "in": "path", - "description": "The metric group key", + "description": "The feature flag key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The metric group key" + "description": "The feature flag key" } }, { - "name": "expand", - "in": "query", - "description": "A comma-separated list of properties that can reveal additional information in the response.", + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "A comma-separated list of properties that can reveal additional information in the response." + "description": "The environment key" + } + }, + { + "name": "memberId", + "in": "path", + "description": "The memberId of the member to remove as a follower of the flag. Reader roles can only remove themselves.", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The memberId of the member to remove as a follower of the flag. Reader roles can only remove themselves." } } ], - "operationId": "getMetricGroup" - }, - "patch": { + "operationId": "deleteFlagFollower" + } + }, + "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes": { + "get": { "responses": { "200": { - "description": "Metric group response", + "description": "Scheduled changes collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MetricGroupRep" + "$ref": "#/components/schemas/FeatureFlagScheduledChanges" } } } @@ -16766,33 +17169,13 @@ } } } - }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Metrics (beta)" + "Scheduled changes" ], - "summary": "Patch metric group", - "description": "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.", + "summary": "List scheduled changes", + "description": "Get a list of scheduled changes that will be applied to the feature flag.", "parameters": [ { "name": "projectKey", @@ -16806,40 +17189,41 @@ } }, { - "name": "metricGroupKey", + "name": "featureFlagKey", "in": "path", - "description": "The metric group key", + "description": "The feature flag key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The metric group key" + "description": "The feature flag key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JSONPatch" - }, - "example": [ - { - "op": "replace", - "path": "/name", - "value": "my-updated-metric-group" - } - ] - } - }, - "required": true - }, - "operationId": "patchMetricGroup" + "operationId": "getFlagConfigScheduledChanges" }, - "delete": { + "post": { "responses": { - "204": { - "description": "Action succeeded" + "201": { + "description": "Scheduled changes response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeatureFlagScheduledChange" + } + } + } }, "400": { "description": "Invalid request", @@ -16891,6 +17275,16 @@ } } }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -16903,10 +17297,10 @@ } }, "tags": [ - "Metrics (beta)" + "Scheduled changes" ], - "summary": "Delete metric group", - "description": "Delete a metric group by key.", + "summary": "Create scheduled changes workflow", + "description": "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.", "parameters": [ { "name": "projectKey", @@ -16920,29 +17314,78 @@ } }, { - "name": "metricGroupKey", + "name": "featureFlagKey", "in": "path", - "description": "The metric group key", + "description": "The feature flag key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The metric group key" + "description": "The feature flag key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "ignoreConflicts", + "in": "query", + "description": "Whether to succeed (`true`) or fail (`false`) when these instructions conflict with existing scheduled changes", + "schema": { + "type": "boolean", + "description": "Whether to succeed (`true`) or fail (`false`) when these instructions conflict with existing scheduled changes" } } ], - "operationId": "deleteMetricGroup" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostFlagScheduledChangesInput" + }, + "example": { + "comment": "Optional comment describing the scheduled changes", + "executionDate": 1718467200000, + "instructions": [ + { + "kind": "turnFlagOn" + } + ] + } + } + }, + "required": true + }, + "operationId": "postFlagConfigScheduledChanges" } }, - "/api/v2/projects/{projectKey}/release-pipelines": { + "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}": { "get": { "responses": { "200": { - "description": "Release pipeline collection", + "description": "Scheduled changes response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReleasePipelineCollection" + "$ref": "#/components/schemas/FeatureFlagScheduledChange" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" } } } @@ -16956,13 +17399,23 @@ } } } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } }, "tags": [ - "Release pipelines (beta)" + "Scheduled changes" ], - "summary": "Get all release pipelines", - "description": "Get all release pipelines for a project.\n\n### Filtering release pipelines\n\nLaunchDarkly supports the following fields for filters:\n\n- `query` is a string that matches against the release pipeline `key`, `name`, and `description`. It is not case sensitive. For example: `?filter=query:examplePipeline`.\n", + "summary": "Get a scheduled change", + "description": "Get a scheduled change that will be applied to the feature flag by ID.", "parameters": [ { "name": "projectKey", @@ -16976,46 +17429,49 @@ } }, { - "name": "filter", - "in": "query", - "description": "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.", + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "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." + "description": "The feature flag key" } }, { - "name": "limit", - "in": "query", - "description": "The maximum number of items to return. Defaults to 20.", + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "description": "The maximum number of items to return. Defaults to 20." + "type": "string", + "format": "string", + "description": "The environment key" } }, { - "name": "offset", - "in": "query", - "description": "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`.", + "name": "id", + "in": "path", + "description": "The scheduled change id", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "description": "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`." + "type": "string", + "format": "string", + "description": "The scheduled change id" } } ], - "operationId": "getAllReleasePipelines" + "operationId": "getFeatureFlagScheduledChange" }, - "post": { + "patch": { "responses": { - "201": { - "description": "Release pipeline response", + "200": { + "description": "Scheduled changes response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReleasePipeline" + "$ref": "#/components/schemas/FeatureFlagScheduledChange" } } } @@ -17030,6 +17486,16 @@ } } }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, "403": { "description": "Forbidden", "content": { @@ -17050,77 +17516,42 @@ } } }, - "409": { - "description": "Status conflict", + "405": { + "description": "Method not allowed", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" } } } - } - }, - "tags": [ - "Release pipelines (beta)" - ], - "summary": "Create a release pipeline", - "description": "Creates a new release pipeline.\n\nThe 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](/tag/Projects#operation/patchProject) API to set the `defaultReleasePipelineKey`.\n\nYou can create up to 20 release pipelines per project.\n", - "parameters": [ - { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateReleasePipelineInput" - } - } }, - "required": true - }, - "operationId": "postReleasePipeline" - } - }, - "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}": { - "get": { - "responses": { - "200": { - "description": "Release pipeline response", + "409": { + "description": "Status conflict", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReleasePipeline" + "$ref": "#/components/schemas/StatusConflictErrorRep" } } } }, - "404": { - "description": "Invalid resource identifier", + "429": { + "description": "Rate limited", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/RateLimitedErrorRep" } } } } }, "tags": [ - "Release pipelines (beta)" + "Scheduled changes" ], - "summary": "Get release pipeline by key", - "description": "Get a release pipeline by key", + "summary": "Update scheduled changes workflow", + "description": "\nUpdate a scheduled change, overriding existing instructions with the new ones. Updating a scheduled change uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating scheduled changes.\n\n
\nClick to expand instructions for updating scheduled changes\n\n#### deleteScheduledChange\n\nRemoves the scheduled change.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"deleteScheduledChange\" }]\n}\n```\n\n#### replaceScheduledChangesInstructions\n\nRemoves the existing scheduled changes and replaces them with the new instructions.\n\n##### Parameters\n\n- `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`.\n\nHere's an example that replaces the scheduled changes with new instructions to turn flag targeting off:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"replaceScheduledChangesInstructions\",\n \"value\": [ {\"kind\": \"turnFlagOff\"} ]\n }\n ]\n}\n```\n\n#### updateScheduledChangesExecutionDate\n\nUpdates the execution date for the scheduled changes.\n\n##### Parameters\n\n- `value`: the new execution date, in Unix milliseconds.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [\n {\n \"kind\": \"updateScheduledChangesExecutionDate\",\n \"value\": 1754092860000\n }\n ]\n}\n```\n\n
\n", "parameters": [ { "name": "projectKey", @@ -17134,37 +17565,84 @@ } }, { - "name": "pipelineKey", + "name": "featureFlagKey", "in": "path", - "description": "The release pipeline key", + "description": "The feature flag key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The release pipeline key" + "description": "The feature flag key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "id", + "in": "path", + "description": "The scheduled change ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The scheduled change ID" + } + }, + { + "name": "ignoreConflicts", + "in": "query", + "description": "Whether to succeed (`true`) or fail (`false`) when these new instructions conflict with existing scheduled changes", + "schema": { + "type": "boolean", + "description": "Whether to succeed (`true`) or fail (`false`) when these new instructions conflict with existing scheduled changes" } } ], - "operationId": "getReleasePipelineByKey" - }, - "patch": { - "responses": { - "200": { - "description": "Release pipeline response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReleasePipeline" - } + "requestBody": { + "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" + } + ] + } + ] } } }, - "400": { - "description": "Invalid request", + "required": true + }, + "operationId": "patchFlagConfigScheduledChange" + }, + "delete": { + "responses": { + "204": { + "description": "Action succeeded" + }, + "401": { + "description": "Invalid access token", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/UnauthorizedErrorRep" } } } @@ -17188,70 +17666,43 @@ } } } - } - }, - "tags": [ - "Release pipelines (beta)" - ], - "summary": "Update a release pipeline", - "description": "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](/#section/Overview/Updates).", - "parameters": [ - { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } }, - { - "name": "pipelineKey", - "in": "path", - "description": "The release pipeline key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The release pipeline key" + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } } - } - ], - "operationId": "patchReleasePipeline" - }, - "delete": { - "responses": { - "204": { - "description": "Action succeeded" }, - "403": { - "description": "Forbidden", + "409": { + "description": "Status conflict", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/StatusConflictErrorRep" } } } }, - "404": { - "description": "Invalid resource identifier", + "429": { + "description": "Rate limited", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/RateLimitedErrorRep" } } } } }, "tags": [ - "Release pipelines (beta)" + "Scheduled changes" ], - "summary": "Delete release pipeline", - "description": "Deletes a release pipeline.\n\nYou cannot delete the default release pipeline.\n\nIf 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](/tag/Projects#operation/patchProject) API to set the `defaultReleasePipelineKey`.\n", + "summary": "Delete scheduled changes workflow", + "description": "Delete a scheduled changes workflow.", "parameters": [ { "name": "projectKey", @@ -17265,61 +17716,51 @@ } }, { - "name": "pipelineKey", + "name": "featureFlagKey", "in": "path", - "description": "The release pipeline key", + "description": "The feature flag key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The release pipeline key" + "description": "The feature flag key" } - } - ], - "operationId": "deleteReleasePipeline" - } - }, - "/api/v2/public-ip-list": { - "get": { - "responses": { - "200": { - "description": "Public IP response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ipList" - } - } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" } }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } + { + "name": "id", + "in": "path", + "description": "The scheduled change id", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The scheduled change id" } } - }, - "tags": [ - "Other" ], - "summary": "Gets the public IP list", - "description": "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/).

In the sandbox, click 'Try it' and enter any string in the 'Authorization' field to test this endpoint.", - "operationId": "getIps" + "operationId": "deleteFlagConfigScheduledChanges" } }, - "/api/v2/roles": { + "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows": { "get": { "responses": { "200": { - "description": "Custom roles collection response", + "description": "Workflows collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomRoles" + "$ref": "#/components/schemas/CustomWorkflowsListingOutput" } } } @@ -17344,6 +17785,16 @@ } } }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -17356,19 +17807,72 @@ } }, "tags": [ - "Custom roles" + "Workflows" ], - "summary": "List custom roles", - "description": "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.", + "summary": "Get workflows", + "description": "Display workflows associated with a feature flag.", "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The feature flag key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "status", + "in": "query", + "description": "Filter results by workflow status. Valid status filters are `active`, `completed`, and `failed`.", + "schema": { + "type": "string", + "format": "string", + "description": "Filter results by workflow status. Valid status filters are `active`, `completed`, and `failed`." + } + }, + { + "name": "sort", + "in": "query", + "description": "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`.", + "schema": { + "type": "string", + "format": "string", + "description": "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`." + } + }, { "name": "limit", "in": "query", - "description": "The maximum number of custom roles to return. Defaults to 20.", + "description": "The maximum number of workflows to return. Defaults to 20.", "schema": { "type": "integer", "format": "int64", - "description": "The maximum number of custom roles to return. Defaults to 20." + "description": "The maximum number of workflows to return. Defaults to 20." } }, { @@ -17382,16 +17886,16 @@ } } ], - "operationId": "getCustomRoles" + "operationId": "getWorkflows" }, "post": { "responses": { "201": { - "description": "Custom role response", + "description": "Workflow response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomRole" + "$ref": "#/components/schemas/CustomWorkflowOutput" } } } @@ -17426,12 +17930,12 @@ } } }, - "409": { - "description": "Status conflict", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -17448,30 +17952,98 @@ } }, "tags": [ - "Custom roles" + "Workflows" + ], + "summary": "Create workflow", + "description": "Create a workflow for a feature flag. You can create a workflow directly, or you can apply a template to create a new workflow.\n\n### Creating a workflow\n\nYou can use the create workflow endpoint to create a workflow directly by adding a `stages` array to the request body.\n\nFor each stage, define the `name`, `conditions` when the stage should be executed, and `action` that describes the stage.\n\n
\nClick to expand example\n\n_Example request body_\n```json\n{\n \"name\": \"Progressive rollout starting in two days\",\n \"description\": \"Turn flag targeting on and increase feature rollout in 10% increments each day\",\n \"stages\": [\n {\n \"name\": \"10% rollout on day 1\",\n \"conditions\": [\n {\n \"kind\": \"schedule\",\n \"scheduleKind\": \"relative\", // or \"absolute\"\n // If \"scheduleKind\" is \"absolute\", set \"executionDate\";\n // \"waitDuration\" and \"waitDurationUnit\" will be ignored\n \"waitDuration\": 2,\n \"waitDurationUnit\": \"calendarDay\"\n },\n {\n \"kind\": \"ld-approval\",\n \"notifyMemberIds\": [ \"507f1f77bcf86cd799439011\" ],\n \"notifyTeamKeys\": [ \"team-key-123abc\" ]\n }\n ],\n \"action\": {\n \"instructions\": [\n {\n \"kind\": \"turnFlagOn\"\n },\n {\n \"kind\": \"updateFallthroughVariationOrRollout\",\n \"rolloutWeights\": {\n \"452f5fb5-7320-4ba3-81a1-8f4324f79d49\": 90000,\n \"fc15f6a4-05d3-4aa4-a997-446be461345d\": 10000\n }\n }\n ]\n }\n }\n ]\n}\n```\n
\n\n### Creating a workflow by applying a workflow template\n\nYou 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.\n\n#### Applicability of stages\nTemplates 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.\n\nYou 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.\n\n#### Overriding template parameters\nYou 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.\n\n
\nClick to expand example\n\n_Example request body_\n```json\n{\n\t\"name\": \"workflow created from my-template\",\n\t\"description\": \"description of my workflow\",\n\t\"parameters\": [\n\t\t{\n\t\t\t\"_id\": \"62cf2bc4cadbeb7697943f3b\",\n\t\t\t\"path\": \"/clauses/0/values\",\n\t\t\t\"default\": {\n\t\t\t\t\"value\": [\"updated-segment\"]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"_id\": \"62cf2bc4cadbeb7697943f3d\",\n\t\t\t\"path\": \"/variationId\",\n\t\t\t\"default\": {\n\t\t\t\t\"value\": \"abcd1234-abcd-1234-abcd-1234abcd12\"\n\t\t\t}\n\t\t}\n\t]\n}\n```\n
\n\nIf 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.\n", + "parameters": [ + { + "name": "templateKey", + "in": "query", + "description": "The template key to apply as a starting point for the new workflow", + "schema": { + "type": "string", + "format": "string", + "description": "The template key to apply as a starting point for the new workflow" + } + }, + { + "name": "dryRun", + "in": "query", + "description": "Whether to call the endpoint in dry-run mode", + "schema": { + "type": "boolean", + "description": "Whether to call the endpoint in dry-run mode" + } + }, + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The feature flag key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + } ], - "summary": "Create custom role", - "description": "Create a new custom role", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomRolePost" + "$ref": "#/components/schemas/CustomWorkflowInput" }, "example": { - "basePermissions": "reader", - "description": "An example role for members of the ops team", - "key": "role-key-123abc", - "name": "Ops team", - "policy": [ + "description": "Turn flag on for 10% of customers each day", + "name": "Progressive rollout starting in two days", + "stages": [ { - "actions": [ - "updateOn" + "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" + } ], - "effect": "allow", - "resources": [ - "proj/*:env/production:flag/*" - ] + "name": "10% rollout on day 1" } ] } @@ -17479,18 +18051,18 @@ }, "required": true }, - "operationId": "postCustomRole" + "operationId": "postWorkflow" } }, - "/api/v2/roles/{customRoleKey}": { + "/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/workflows/{workflowId}": { "get": { "responses": { "200": { - "description": "Custom role response", + "description": "Workflow response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomRole" + "$ref": "#/components/schemas/CustomWorkflowOutput" } } } @@ -17537,36 +18109,62 @@ } }, "tags": [ - "Custom roles" + "Workflows" ], - "summary": "Get custom role", - "description": "Get a single custom role by key or ID", + "summary": "Get custom workflow", + "description": "Get a specific workflow by ID.", "parameters": [ { - "name": "customRoleKey", + "name": "projectKey", "in": "path", - "description": "The custom role key or ID", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The custom role key or ID" + "description": "The project key" + } + }, + { + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The feature flag key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "workflowId", + "in": "path", + "description": "The workflow ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The workflow ID" } } ], - "operationId": "getCustomRole" + "operationId": "getCustomWorkflow" }, - "patch": { + "delete": { "responses": { - "200": { - "description": "Custom role response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomRole" - } - } - } + "204": { + "description": "Action completed successfully" }, "400": { "description": "Invalid request", @@ -17588,22 +18186,22 @@ } } }, - "404": { - "description": "Invalid resource identifier", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } }, - "409": { - "description": "Status conflict", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -17620,56 +18218,87 @@ } }, "tags": [ - "Custom roles" + "Workflows" ], - "summary": "Update custom role", - "description": "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](/#section/Overview/Updates).

To add an element to the `policy` array, set the `path` to `/policy` and then append `/`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.", + "summary": "Delete workflow", + "description": "Delete a workflow from a feature flag.", "parameters": [ { - "name": "customRoleKey", + "name": "projectKey", "in": "path", - "description": "The custom role key", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The custom role key" + "description": "The project key" + } + }, + { + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The feature flag key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "workflowId", + "in": "path", + "description": "The workflow id", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The workflow id" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchWithComment" - }, - "example": { - "patch": [ - { - "op": "add", - "path": "/policy/0", - "value": { - "actions": [ - "updateOn" - ], - "effect": "allow", - "resources": [ - "proj/*:env/qa:flag/*" - ] - } + "operationId": "deleteWorkflow" + } + }, + "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/migration-safety-issues": { + "post": { + "responses": { + "200": { + "description": "Migration safety issues found", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MigrationSafetyIssueRep" } - ] + } } } }, - "required": true - }, - "operationId": "patchCustomRole" - }, - "delete": { - "responses": { "204": { - "description": "Action succeeded" + "description": "No safety issues found" + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } }, "401": { "description": "Invalid access token", @@ -17681,6 +18310,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, "404": { "description": "Invalid resource identifier", "content": { @@ -17700,78 +18339,44 @@ } } } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusServiceUnavailable" + } + } + } } }, "tags": [ - "Custom roles" + "Feature flags" ], - "summary": "Delete custom role", - "description": "Delete a custom role by key", + "summary": "Get migration safety issues", + "description": "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.", "parameters": [ { - "name": "customRoleKey", + "name": "projectKey", "in": "path", - "description": "The custom role key", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The custom role key" - } - } - ], - "operationId": "deleteCustomRole" - } - }, - "/api/v2/segments/{projectKey}/{environmentKey}": { - "get": { - "responses": { - "200": { - "description": "Segment collection response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserSegments" - } - } - } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } + "description": "The project key" } }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - } - }, - "tags": [ - "Segments" - ], - "summary": "List segments", - "description": "Get a list of all segments in the given project.

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.", - "parameters": [ { - "name": "projectKey", + "name": "flagKey", "in": "path", - "description": "The project key", + "description": "The migration flag key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The migration flag key" } }, { @@ -17784,58 +18389,30 @@ "format": "string", "description": "The environment key" } - }, - { - "name": "limit", - "in": "query", - "description": "The number of segments to return. Defaults to 20.", - "schema": { - "type": "integer", - "format": "int64", - "description": "The number of segments to return. Defaults to 20." - } - }, - { - "name": "offset", - "in": "query", - "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", - "schema": { - "type": "integer", - "format": "int64", - "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`." - } - }, - { - "name": "sort", - "in": "query", - "description": "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.", - "schema": { - "type": "string", - "format": "string", - "description": "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." - } - }, - { - "name": "filter", - "in": "query", - "description": "Accepts filter by kind, query, tags, unbounded, external, or included and excluded segment keys. 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`. To exclude segments from results, use `filter=excludedKeys anyOf ['segmentKey1', 'segmentKey2']`.", - "schema": { - "type": "string", - "format": "string", - "description": "Accepts filter by kind, query, tags, unbounded, external, or included and excluded segment keys. 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`. To exclude segments from results, use `filter=excludedKeys anyOf ['segmentKey1', 'segmentKey2']`." - } } ], - "operationId": "getSegments" - }, - "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/flagSempatch" + } + } + }, + "required": true + }, + "operationId": "postMigrationSafetyIssues" + } + }, + "/api/v2/projects/{projectKey}/flags/{flagKey}/release": { + "put": { "responses": { - "201": { - "description": "Segment response", + "200": { + "description": "Release response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserSegment" + "$ref": "#/components/schemas/Release" } } } @@ -17860,16 +18437,6 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, "404": { "description": "Invalid resource identifier", "content": { @@ -17881,7 +18448,7 @@ } }, "429": { - "description": "Rate limited", + "description": "Rate limit exceeded", "content": { "application/json": { "schema": { @@ -17892,10 +18459,10 @@ } }, "tags": [ - "Segments" + "Releases (beta)" ], - "summary": "Create segment", - "description": "Create a new segment.", + "summary": "Create a new release for flag", + "description": "Creates a release by adding a flag to a release pipeline", "parameters": [ { "name": "projectKey", @@ -17909,14 +18476,14 @@ } }, { - "name": "environmentKey", + "name": "flagKey", "in": "path", - "description": "The environment key", + "description": "The flag key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The environment key" + "description": "The flag key" } } ], @@ -17924,24 +18491,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SegmentBody" + "$ref": "#/components/schemas/CreateReleaseInput" } } }, "required": true }, - "operationId": "postSegment" + "operationId": "createReleaseForFlag" } }, - "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}": { - "get": { + "/api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId}": { + "put": { "responses": { "200": { - "description": "Segment response", + "description": "Action succeeded", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserSegment" + "$ref": "#/components/schemas/Release" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -17957,7 +18534,7 @@ } }, "404": { - "description": "Invalid resource identifier", + "description": "release or phase not found", "content": { "application/json": { "schema": { @@ -17967,7 +18544,7 @@ } }, "429": { - "description": "Rate limited", + "description": "Rate limit exceeded", "content": { "application/json": { "schema": { @@ -17978,10 +18555,10 @@ } }, "tags": [ - "Segments" + "Releases (beta)" ], - "summary": "Get segment", - "description": "Get a single segment by key.

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.", + "summary": "Update phase status for release", + "description": "Updates the execution status of a phase of a release", "parameters": [ { "name": "projectKey", @@ -17995,38 +18572,50 @@ } }, { - "name": "environmentKey", + "name": "flagKey", "in": "path", - "description": "The environment key", + "description": "The flag key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The environment key" + "description": "The flag key" } }, { - "name": "segmentKey", + "name": "phaseId", "in": "path", - "description": "The segment key", + "description": "The phase ID", "required": true, "schema": { "type": "string", "format": "string", - "description": "The segment key" + "description": "The phase ID" } } ], - "operationId": "getSegment" - }, - "patch": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePhaseStatusInput" + } + } + }, + "required": true + }, + "operationId": "updatePhaseStatus" + } + }, + "/api/v2/projects/{projectKey}/layers": { + "get": { "responses": { "200": { - "description": "Segment response", + "description": "Layer Collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserSegment" + "$ref": "#/components/schemas/LayerCollectionRep" } } } @@ -18041,16 +18630,6 @@ } } }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, "403": { "description": "Forbidden", "content": { @@ -18071,16 +18650,6 @@ } } }, - "409": { - "description": "Status conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -18093,10 +18662,10 @@ } }, "tags": [ - "Segments" + "Layers" ], - "summary": "Patch segment", - "description": "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](/#section/Overview/Updates).\n\n### Using semantic patches on a segment\n\nTo 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](/reference#updates-using-semantic-patch).\n\nThe 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:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required) The key of the LaunchDarkly environment.\n* `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.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating segments.\n\n
\nClick to expand instructions for updating segments\n\n#### addIncludedTargets\n\nAdds 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.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be added to.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addIncludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addIncludedUsers\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addIncludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### addExcludedTargets\n\nAdds 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.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be added to.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExcludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addExcludedUsers\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExcludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### removeIncludedTargets\n\nRemoves context keys from the individual context targets included in the segment for the specified `contextKind`.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be removed from.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeIncludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeIncludedUsers\n\nRemoves user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeIncludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### removeExcludedTargets\n\nRemoves context keys from the individual context targets excluded from the segment for the specified `contextKind`.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be removed from.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExcludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeExcludedUsers\n\nRemoves user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExcludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the segment.\n\n##### Parameters\n\n- `value`: Name of the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated segment name\"\n }]\n}\n```\n\n
\n\n## Using JSON patches on a segment\n\nIf you do not include the header described above, you can use a [JSON patch](/reference#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes.\n\nFor example, to update the description for a segment with a JSON patch, use the following request body:\n\n```json\n{\n \"patch\": [\n {\n \"op\": \"replace\",\n \"path\": \"/description\",\n \"value\": \"new description\"\n }\n ]\n}\n```\n\nTo update fields in the segment that are arrays, set the `path` to the name of the field and then append `/`. 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.\n\nFor example, to add a rule to a segment, use the following request body:\n\n```json\n{\n \"patch\":[\n {\n \"op\": \"add\",\n \"path\": \"/rules/0\",\n \"value\": {\n \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }]\n }\n }\n ]\n}\n```\n\nTo 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.\n", + "summary": "Get layers", + "description": "Get a collection of all layers for a project", "parameters": [ { "name": "projectKey", @@ -18110,95 +18679,56 @@ } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "segmentKey", - "in": "path", - "description": "The segment key", - "required": true, + "name": "filter", + "in": "query", + "description": "A comma-separated list of filters. This endpoint only accepts filtering by `experimentKey`. The filter returns layers which include that experiment for the selected environment(s). For example: `filter=reservations.experimentKey contains expKey`.", "schema": { "type": "string", "format": "string", - "description": "The segment key" + "description": "A comma-separated list of filters. This endpoint only accepts filtering by `experimentKey`. The filter returns layers which include that experiment for the selected environment(s). For example: `filter=reservations.experimentKey contains expKey`." } } ], - "requestBody": { - "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 - }, - "operationId": "patchSegment" + "operationId": "getLayers" }, - "delete": { + "post": { "responses": { - "204": { - "description": "Action succeeded" - }, - "401": { - "description": "Invalid access token", + "201": { + "description": "Layer response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/LayerRep" } } } }, - "403": { - "description": "Forbidden", + "400": { + "description": "Invalid request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } }, - "404": { - "description": "Invalid resource identifier", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } }, - "409": { - "description": "Status conflict", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -18215,10 +18745,10 @@ } }, "tags": [ - "Segments" + "Layers" ], - "summary": "Delete segment", - "description": "Delete a segment.", + "summary": "Create layer", + "description": "Create a layer. Experiments running in the same layer are granted mutually-exclusive traffic.\n", "parameters": [ { "name": "projectKey", @@ -18230,38 +18760,33 @@ "format": "string", "description": "The project key" } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "segmentKey", - "in": "path", - "description": "The segment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The segment key" - } } ], - "operationId": "deleteSegment" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LayerPost" + } + } + }, + "required": true + }, + "operationId": "createLayer" } }, - "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts": { - "post": { + "/api/v2/projects/{projectKey}/layers/{layerKey}": { + "patch": { "responses": { - "204": { - "description": "Action succeeded" + "200": { + "description": "Layer response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LayerRep" + } + } + } }, "400": { "description": "Invalid request", @@ -18273,12 +18798,12 @@ } } }, - "401": { - "description": "Invalid access token", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } @@ -18305,10 +18830,10 @@ } }, "tags": [ - "Segments" + "Layers" ], - "summary": "Update context targets on a big segment", - "description": "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.", + "summary": "Update layer", + "description": "Update a layer by adding, changing, or removing traffic reservations for experiments, or by changing layer name or description.\nUpdating a layer uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating layers.\n\n
\nClick to expand instructions for updating layers\n\n#### updateName\n\nUpdates the layer name.\n\n##### Parameters\n\n- `name`: The new layer name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"name\": \"New name\"\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the layer description.\n\n##### Parameters\n\n- `description`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"description\": \"New description\"\n }]\n}\n```\n\n#### updateExperimentReservation\n\nAdds or updates a traffic reservation for an experiment in a layer.\n\n##### Parameters\n\n- `experimentKey`: The key of the experiment whose reservation you are adding to or updating in the layer.\n- `reservationPercent`: The amount of traffic in the layer to reserve. Must be an integer. Zero is allowed until iteration start.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"production\",\n \"instructions\": [{\n \"kind\": \"updateExperimentReservation\",\n \"experimentKey\": \"exp-key\",\n \"reservationPercent\": 10\n }]\n}\n```\n\n#### removeExperiment\n\nRemoves a traffic reservation for an experiment from a layer.\n\n##### Parameters\n\n- `experimentKey`: The key of the experiment whose reservation you want to remove from the layer.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"production\",\n \"instructions\": [{\n \"kind\": \"removeExperiment\",\n \"experimentKey\": \"exp-key\"\n }]\n}\n```\n\n
\n", "parameters": [ { "name": "projectKey", @@ -18322,25 +18847,14 @@ } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "segmentKey", + "name": "layerKey", "in": "path", - "description": "The segment key", + "description": "The layer key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The segment key" + "description": "The layer key" } } ], @@ -18348,24 +18862,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SegmentUserState" + "$ref": "#/components/schemas/LayerPatchInput" + }, + "example": { + "comment": "Example comment describing the update", + "environmentKey": "production", + "instructions": [ + { + "experimentKey": "checkout-button-color", + "kind": "updateExperimentReservation", + "reservationPercent": 25 + } + ] } } }, "required": true }, - "operationId": "updateBigSegmentContextTargets" + "operationId": "updateLayer" } }, - "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts/{contextKey}": { + "/api/v2/projects/{projectKey}/metric-groups": { "get": { "responses": { "200": { - "description": "Segment membership for context response", + "description": "Metric group collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BigSegmentTarget" + "$ref": "#/components/schemas/MetricGroupCollectionRep" } } } @@ -18390,6 +18915,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, "404": { "description": "Invalid resource identifier", "content": { @@ -18400,6 +18935,16 @@ } } }, + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -18412,10 +18957,10 @@ } }, "tags": [ - "Segments" + "Metrics (beta)" ], - "summary": "Get big segment membership for context", - "description": "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.", + "summary": "List metric groups", + "description": "Get a list of all metric groups for the specified project.\n\n### Expanding the metric groups response\nLaunchDarkly supports one field for expanding the \"Get metric groups\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with the following field:\n\n- `experiments` includes all experiments from the specific project that use the metric group\n\nFor example, `expand=experiments` includes the `experiments` field in the response.\n\n### Filtering metric groups\n\nThe `filter` parameter supports the `equals` operator on the following fields: `experimentStatus`, `query`.\n\nThe `experimentStatus` field supports the following values: `not_started`, `running`, `stopped`, and `started`.\nThe `query` field is a search query that is compared against the metric group name and key.\n\n\n#### Sample query\n\n`filter=experimentStatus equals 'not_started' and query equals 'metric name'`\n", "parameters": [ { "name": "projectKey", @@ -18429,47 +18974,59 @@ } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, + "name": "filter", + "in": "query", + "description": "Accepts filter by `experimentStatus` and `query`. Example: `filter=experimentStatus equals 'running' and query equals 'test'`.", "schema": { "type": "string", "format": "string", - "description": "The environment key" + "description": "Accepts filter by `experimentStatus` and `query`. Example: `filter=experimentStatus equals 'running' and query equals 'test'`." } }, { - "name": "segmentKey", - "in": "path", - "description": "The segment key", - "required": true, + "name": "expand", + "in": "query", + "description": "A comma-separated list of properties that can reveal additional information in the response.", "schema": { "type": "string", "format": "string", - "description": "The segment key" + "description": "A comma-separated list of properties that can reveal additional information in the response." } }, { - "name": "contextKey", - "in": "path", - "description": "The context key", - "required": true, + "name": "limit", + "in": "query", + "description": "The number of metric groups to return in the response. Defaults to 20. Maximum limit is 50.", "schema": { - "type": "string", - "format": "string", - "description": "The context key" + "type": "integer", + "format": "int64", + "description": "The number of metric groups to return in the response. Defaults to 20. Maximum limit is 50." + } + }, + { + "name": "offset", + "in": "query", + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items." } } ], - "operationId": "getSegmentMembershipForContext" - } - }, - "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports": { + "operationId": "getMetricGroups" + }, "post": { "responses": { - "200": { - "description": "Action succeeded" + "201": { + "description": "Metric group response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetricGroupRep" + } + } + } }, "400": { "description": "Invalid request", @@ -18491,6 +19048,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, "404": { "description": "Invalid resource identifier", "content": { @@ -18501,6 +19068,16 @@ } } }, + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -18513,10 +19090,10 @@ } }, "tags": [ - "Segments (beta)" + "Metrics (beta)" ], - "summary": "Create big segment export", - "description": "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.", + "summary": "Create metric group", + "description": "Create a new metric group in the specified project", "parameters": [ { "name": "projectKey", @@ -18528,42 +19105,30 @@ "format": "string", "description": "The project key" } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "segmentKey", - "in": "path", - "description": "The segment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The segment key" - } } ], - "operationId": "createBigSegmentExport" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetricGroupPost" + } + } + }, + "required": true + }, + "operationId": "createMetricGroup" } }, - "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID}": { + "/api/v2/projects/{projectKey}/metric-groups/{metricGroupKey}": { "get": { "responses": { "200": { - "description": "Segment export response", + "description": "Metric group response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Export" + "$ref": "#/components/schemas/MetricGroupRep" } } } @@ -18578,86 +19143,109 @@ } } }, - "404": { - "description": "Invalid resource identifier", + "401": { + "description": "Invalid access token", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/UnauthorizedErrorRep" } } } }, - "429": { - "description": "Rate limited", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } - } - }, - "tags": [ - "Segments (beta)" - ], - "summary": "Get big segment export", - "description": "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.", - "parameters": [ - { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } } }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Metrics (beta)" + ], + "summary": "Get metric group", + "description": "Get information for a single metric group from the specific project.\n\n### Expanding the metric group response\nLaunchDarkly supports two fields for expanding the \"Get metric group\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with either or both of the following fields:\n\n- `experiments` includes all experiments from the specific project that use the metric group\n- `experimentCount` includes the number of experiments from the specific project that use the metric group\n\nFor example, `expand=experiments` includes the `experiments` field in the response.\n", + "parameters": [ { - "name": "environmentKey", + "name": "projectKey", "in": "path", - "description": "The environment key", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The environment key" + "description": "The project key" } }, { - "name": "segmentKey", + "name": "metricGroupKey", "in": "path", - "description": "The segment key", + "description": "The metric group key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The segment key" + "description": "The metric group key" } }, { - "name": "exportID", - "in": "path", - "description": "The export ID", - "required": true, + "name": "expand", + "in": "query", + "description": "A comma-separated list of properties that can reveal additional information in the response.", "schema": { "type": "string", "format": "string", - "description": "The export ID" + "description": "A comma-separated list of properties that can reveal additional information in the response." } } ], - "operationId": "getBigSegmentExport" - } - }, - "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports": { - "post": { + "operationId": "getMetricGroup" + }, + "patch": { "responses": { - "204": { - "description": "Import request submitted successfully" + "200": { + "description": "Metric group response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetricGroupRep" + } + } + } }, "400": { "description": "Invalid request", @@ -18679,6 +19267,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, "404": { "description": "Invalid resource identifier", "content": { @@ -18689,12 +19287,12 @@ } } }, - "409": { - "description": "Conflicting process", + "405": { + "description": "Method not allowed", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" } } } @@ -18711,10 +19309,10 @@ } }, "tags": [ - "Segments (beta)" + "Metrics (beta)" ], - "summary": "Create big segment import", - "description": "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.", + "summary": "Patch metric group", + "description": "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.", "parameters": [ { "name": "projectKey", @@ -18728,72 +19326,67 @@ } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "segmentKey", + "name": "metricGroupKey", "in": "path", - "description": "The segment key", + "description": "The metric group key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The segment key" + "description": "The metric group key" } } ], "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "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`" - } + "$ref": "#/components/schemas/JSONPatch" + }, + "example": [ + { + "op": "replace", + "path": "/name", + "value": "my-updated-metric-group" } - } + ] } }, "required": true }, - "operationId": "createBigSegmentImport" - } - }, - "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID}": { - "get": { + "operationId": "patchMetricGroup" + }, + "delete": { "responses": { - "200": { - "description": "Segment import response", + "204": { + "description": "Action succeeded" + }, + "400": { + "description": "Invalid request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Import" + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } }, - "400": { - "description": "Invalid request", + "401": { + "description": "Invalid access token", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } @@ -18808,6 +19401,16 @@ } } }, + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -18820,10 +19423,10 @@ } }, "tags": [ - "Segments (beta)" + "Metrics (beta)" ], - "summary": "Get big segment import", - "description": "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.", + "summary": "Delete metric group", + "description": "Delete a metric group by key.", "parameters": [ { "name": "projectKey", @@ -18837,64 +19440,29 @@ } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "segmentKey", - "in": "path", - "description": "The segment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The segment key" - } - }, - { - "name": "importID", + "name": "metricGroupKey", "in": "path", - "description": "The import ID", + "description": "The metric group key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The import ID" + "description": "The metric group key" } } ], - "operationId": "getBigSegmentImport" + "operationId": "deleteMetricGroup" } }, - "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users": { - "post": { + "/api/v2/projects/{projectKey}/release-pipelines": { + "get": { "responses": { - "204": { - "description": "Action succeeded" - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, - "401": { - "description": "Invalid access token", + "200": { + "description": "Release pipeline collection", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/ReleasePipelineCollection" } } } @@ -18908,23 +19476,13 @@ } } } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Segments" + "Release pipelines (beta)" ], - "summary": "Update user context targets on a big segment", - "description": "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.", + "summary": "Get all release pipelines", + "description": "Get all release pipelines for a project.\n\n### Filtering release pipelines\n\nLaunchDarkly supports the following fields for filters:\n\n- `query` is a string that matches against the release pipeline `key`, `name`, and `description`. It is not case sensitive. For example: `?filter=query:examplePipeline`.\n\n- `env` is a string that matches an environment key. For example: `?filter=env:production`.\n", "parameters": [ { "name": "projectKey", @@ -18938,50 +19496,46 @@ } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, + "name": "filter", + "in": "query", + "description": "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.", "schema": { "type": "string", "format": "string", - "description": "The environment key" + "description": "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." } }, { - "name": "segmentKey", - "in": "path", - "description": "The segment key", - "required": true, + "name": "limit", + "in": "query", + "description": "The maximum number of items to return. Defaults to 20.", "schema": { - "type": "string", - "format": "string", - "description": "The segment key" + "type": "integer", + "format": "int64", + "description": "The maximum number of items to return. Defaults to 20." + } + }, + { + "name": "offset", + "in": "query", + "description": "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`.", + "schema": { + "type": "integer", + "format": "int64", + "description": "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`." } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SegmentUserState" - } - } - }, - "required": true - }, - "operationId": "updateBigSegmentTargets" - } - }, - "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users/{userKey}": { - "get": { + "operationId": "getAllReleasePipelines" + }, + "post": { "responses": { - "200": { - "description": "Segment membership for user response", + "201": { + "description": "Release pipeline response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BigSegmentTarget" + "$ref": "#/components/schemas/ReleasePipeline" } } } @@ -18996,12 +19550,12 @@ } } }, - "401": { - "description": "Invalid access token", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } @@ -19016,22 +19570,22 @@ } } }, - "429": { - "description": "Rate limited", + "409": { + "description": "Status conflict", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/StatusConflictErrorRep" } } } } }, "tags": [ - "Segments" + "Release pipelines (beta)" ], - "summary": "Get big segment membership for user", - "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nGet the membership status (included/excluded) for a given user in this big segment. This operation does not support standard segments.\n", + "summary": "Create a release pipeline", + "description": "Creates a new release pipeline.\n\nThe 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](/tag/Projects#operation/patchProject) API to set the `defaultReleasePipelineKey`.\n\nYou can create up to 20 release pipelines per project.\n", "parameters": [ { "name": "projectKey", @@ -19043,63 +19597,30 @@ "format": "string", "description": "The project key" } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "segmentKey", - "in": "path", - "description": "The segment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The segment key" - } - }, - { - "name": "userKey", - "in": "path", - "description": "The user key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The user key" - } } ], - "operationId": "getSegmentMembershipForUser" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateReleasePipelineInput" + } + } + }, + "required": true + }, + "operationId": "postReleasePipeline" } }, - "/api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey}": { + "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}": { "get": { "responses": { "200": { - "description": "Expiring context target response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExpiringTargetGetResponse" - } - } - } - }, - "401": { - "description": "Invalid access token", + "description": "Release pipeline response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/ReleasePipeline" } } } @@ -19113,23 +19634,13 @@ } } } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Segments" + "Release pipelines (beta)" ], - "summary": "Get expiring targets for segment", - "description": "Get a list of a segment's context targets that are scheduled for removal.", + "summary": "Get release pipeline by key", + "description": "Get a release pipeline by key", "parameters": [ { "name": "projectKey", @@ -19143,38 +19654,27 @@ } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "segmentKey", + "name": "pipelineKey", "in": "path", - "description": "The segment key", + "description": "The release pipeline key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The segment key" + "description": "The release pipeline key" } } ], - "operationId": "getExpiringTargetsForSegment" + "operationId": "getReleasePipelineByKey" }, - "patch": { + "put": { "responses": { "200": { - "description": "Expiring target response", + "description": "Release pipeline response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExpiringTargetPatchResponse" + "$ref": "#/components/schemas/ReleasePipeline" } } } @@ -19189,16 +19689,6 @@ } } }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, "403": { "description": "Forbidden", "content": { @@ -19218,33 +19708,13 @@ } } } - }, - "409": { - "description": "Status conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Segments" + "Release pipelines (beta)" ], - "summary": "Update expiring targets for segment", - "description": "\nUpdate expiring context targets for a segment. Updating a context target expiration uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\nIf 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.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring context targets.\n\n
\nClick to expand instructions for updating expiring context targets\n\n#### addExpiringTarget\n\nSchedules a date and time when LaunchDarkly will remove a context from segment targeting. The segment must already have the context as an individual target.\n\n##### Parameters\n\n- `targetType`: The type of individual target for this context. Must be either `included` or `excluded`.\n- `contextKey`: The context key.\n- `contextKind`: The kind of context being targeted.\n- `value`: The date when the context should expire from the segment targeting, in Unix milliseconds.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExpiringTarget\",\n \"targetType\": \"included\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\",\n \"value\": 1754092860000\n }]\n}\n```\n\n#### updateExpiringTarget\n\nUpdates the date and time when LaunchDarkly will remove a context from segment targeting.\n\n##### Parameters\n\n- `targetType`: The type of individual target for this context. Must be either `included` or `excluded`.\n- `contextKey`: The context key.\n- `contextKind`: The kind of context being targeted.\n- `value`: The new date when the context should expire from the segment targeting, in Unix milliseconds.\n- `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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExpiringTarget\",\n \"targetType\": \"included\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\",\n \"value\": 1754179260000\n }]\n}\n```\n\n#### removeExpiringTarget\n\nRemoves the scheduled expiration for the context in the segment.\n\n##### Parameters\n\n- `targetType`: The type of individual target for this context. Must be either `included` or `excluded`.\n- `contextKey`: The context key.\n- `contextKind`: The kind of context being targeted.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExpiringTarget\",\n \"targetType\": \"included\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\",\n }]\n}\n```\n\n
\n", + "summary": "Update a release pipeline", + "description": "Updates a release pipeline.", "parameters": [ { "name": "projectKey", @@ -19258,25 +19728,14 @@ } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "segmentKey", + "name": "pipelineKey", "in": "path", - "description": "The segment key", + "description": "The release pipeline key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The segment key" + "description": "The release pipeline key" } } ], @@ -19284,34 +19743,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/patchSegmentExpiringTargetInputRep" + "$ref": "#/components/schemas/UpdateReleasePipelineInput" } } }, "required": true }, - "operationId": "patchExpiringTargetsForSegment" - } - }, - "/api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey}": { - "get": { + "operationId": "putReleasePipeline" + }, + "delete": { "responses": { - "200": { - "description": "Expiring user target response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExpiringUserTargetGetResponse" - } - } - } + "204": { + "description": "Action succeeded" }, - "401": { - "description": "Invalid access token", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } @@ -19325,23 +19775,13 @@ } } } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Segments" + "Release pipelines (beta)" ], - "summary": "Get expiring user targets for segment", - "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nGet a list of a segment's user targets that are scheduled for removal.\n", + "summary": "Delete release pipeline", + "description": "Deletes a release pipeline.\n\nYou cannot delete the default release pipeline.\n\nIf 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](/tag/Projects#operation/patchProject) API to set the `defaultReleasePipelineKey`.\n", "parameters": [ { "name": "projectKey", @@ -19355,68 +19795,29 @@ } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "segmentKey", + "name": "pipelineKey", "in": "path", - "description": "The segment key", + "description": "The release pipeline key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The segment key" + "description": "The release pipeline key" } } ], - "operationId": "getExpiringUserTargetsForSegment" - }, - "patch": { + "operationId": "deleteReleasePipeline" + } + }, + "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}/releases": { + "get": { "responses": { "200": { - "description": "Expiring user target response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExpiringUserTargetPatchResponse" - } - } - } - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, - "403": { - "description": "Forbidden", + "description": "Release progression collection", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/ReleaseProgressionCollection" } } } @@ -19430,33 +19831,13 @@ } } } - }, - "409": { - "description": "Status conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Segments" + "Release pipelines (beta)" ], - "summary": "Update expiring user targets for segment", - "description": "\n> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](/tag/Segments#operation/patchExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nUpdate expiring user targets for a segment. Updating a user target expiration uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\nIf 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.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring user targets.\n\n
\nClick to expand instructions for updating expiring user targets\n\n#### addExpireUserTargetDate\n\nSchedules a date and time when LaunchDarkly will remove a user from segment targeting.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n- `value`: The date when the user should expire from the segment targeting, in Unix milliseconds.\n\n#### updateExpireUserTargetDate\n\nUpdates the date and time when LaunchDarkly will remove a user from segment targeting.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n- `value`: The new date when the user should expire from the segment targeting, in Unix milliseconds.\n- `version`: The segment version.\n\n#### removeExpireUserTargetDate\n\nRemoves the scheduled expiration for the user in the segment.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n\n
\n", + "summary": "Get release progressions for release pipeline", + "description": "Get details on the progression of all releases, across all flags, for a release pipeline", "parameters": [ { "name": "projectKey", @@ -19470,80 +19851,59 @@ } }, { - "name": "environmentKey", + "name": "pipelineKey", "in": "path", - "description": "The environment key", + "description": "The pipeline key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The environment key" + "description": "The pipeline key" } }, { - "name": "segmentKey", - "in": "path", - "description": "The segment key", - "required": true, + "name": "filter", + "in": "query", + "description": "Accepts filter by `status` and `activePhaseId`. `status` can take a value of `completed` or `active`. `activePhaseId` takes a UUID and will filter results down to releases active on the specified phase. Providing `status equals completed` along with an `activePhaseId` filter will return an error as they are disjoint sets of data. The combination of `status equals active` and `activePhaseId` will return the same results as `activePhaseId` alone.", "schema": { "type": "string", "format": "string", - "description": "The segment key" + "description": "Accepts filter by `status` and `activePhaseId`. `status` can take a value of `completed` or `active`. `activePhaseId` takes a UUID and will filter results down to releases active on the specified phase. Providing `status equals completed` along with an `activePhaseId` filter will return an error as they are disjoint sets of data. The combination of `status equals active` and `activePhaseId` will return the same results as `activePhaseId` alone." } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/patchSegmentRequest" - } + }, + { + "name": "limit", + "in": "query", + "description": "The maximum number of items to return. Defaults to 20.", + "schema": { + "type": "integer", + "format": "int64", + "description": "The maximum number of items to return. Defaults to 20." } }, - "required": true - }, - "operationId": "patchExpiringUserTargetsForSegment" + { + "name": "offset", + "in": "query", + "description": "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`.", + "schema": { + "type": "integer", + "format": "int64", + "description": "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`." + } + } + ], + "operationId": "getAllReleaseProgressionsForReleasePipeline" } }, - "/api/v2/tags": { + "/api/v2/public-ip-list": { "get": { "responses": { "200": { - "description": "Tag collection response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagCollection" - } - } - } - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, - "403": { - "description": "Forbidden", + "description": "Public IP response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/ipList" } } } @@ -19560,53 +19920,22 @@ } }, "tags": [ - "Tags" - ], - "summary": "List tags", - "description": "Get a list of tags.", - "parameters": [ - { - "name": "kind", - "in": "query", - "description": "Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`. Returns all types by default.", - "schema": { - "type": "string", - "format": "string", - "description": "Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`. Returns all types by default." - } - }, - { - "name": "pre", - "in": "query", - "description": "Return tags with the specified prefix", - "schema": { - "type": "string", - "format": "string", - "description": "Return tags with the specified prefix" - } - }, - { - "name": "archived", - "in": "query", - "description": "Whether or not to return archived flags", - "schema": { - "type": "boolean", - "description": "Whether or not to return archived flags" - } - } + "Other" ], - "operationId": "getTags" + "summary": "Gets the public IP list", + "description": "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/).

In the sandbox, click 'Try it' and enter any string in the 'Authorization' field to test this endpoint.", + "operationId": "getIps" } }, - "/api/v2/teams": { + "/api/v2/roles": { "get": { "responses": { "200": { - "description": "Teams collection response", + "description": "Custom roles collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Teams" + "$ref": "#/components/schemas/CustomRoles" } } } @@ -19621,12 +19950,12 @@ } } }, - "405": { - "description": "Method not allowed", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } @@ -19643,156 +19972,42 @@ } }, "tags": [ - "Teams" + "Custom roles" ], - "summary": "List teams", - "description": "Return a list of teams.\n\nBy 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.\n\n### Filtering teams\n\nLaunchDarkly supports the following fields for filters:\n\n- `query` is a string that matches against the teams' names and keys. It is not case-sensitive.\n - A request with `query:abc` returns teams with the string `abc` in their name or key.\n- `nomembers` is a boolean that filters the list of teams who have 0 members\n - A request with `nomembers:true` returns teams that have 0 members\n - A request with `nomembers:false` returns teams that have 1 or more members\n\n### Expanding the teams response\nLaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response.\n", + "summary": "List custom roles", + "description": "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.", "parameters": [ { "name": "limit", "in": "query", - "description": "The number of teams to return in the response. Defaults to 20.", + "description": "The maximum number of custom roles to return. Defaults to 20.", "schema": { "type": "integer", "format": "int64", - "description": "The number of teams to return in the response. Defaults to 20." + "description": "The maximum number of custom roles to return. Defaults to 20." } }, { "name": "offset", "in": "query", - "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items.", + "description": "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`.", "schema": { "type": "integer", "format": "int64", - "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items." - } - }, - { - "name": "filter", - "in": "query", - "description": "A comma-separated list of filters. Each filter is constructed as `field:value`.", - "schema": { - "type": "string", - "format": "string", - "description": "A comma-separated list of filters. Each filter is constructed as `field:value`." - } - }, - { - "name": "expand", - "in": "query", - "description": "A comma-separated list of properties that can reveal additional information in the response.", - "schema": { - "type": "string", - "format": "string", - "description": "A comma-separated list of properties that can reveal additional information in the response." + "description": "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`." } } ], - "operationId": "getTeams" + "operationId": "getCustomRoles" }, "post": { "responses": { "201": { - "description": "Teams response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } - } - }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } - }, - "401": { - "description": "Invalid access token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" - } - } - } - }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } - } - }, - "tags": [ - "Teams" - ], - "summary": "Create team", - "description": "Create a team. To learn more, read [Creating a team](https://docs.launchdarkly.com/home/account/create-teams).\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Create team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", - "parameters": [ - { - "name": "expand", - "in": "query", - "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", - "schema": { - "type": "string", - "format": "string", - "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above." - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/teamPostInput" - }, - "example": { - "customRoleKeys": [ - "example-role1", - "example-role2" - ], - "description": "An example team", - "key": "team-key-123abc", - "memberIDs": [ - "12ab3c45de678910fgh12345" - ], - "name": "Example team" - } - } - }, - "required": true - }, - "operationId": "postTeam" - }, - "patch": { - "responses": { - "200": { - "description": "Teams response", + "description": "Custom role response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkEditTeamsRep" + "$ref": "#/components/schemas/CustomRole" } } } @@ -19849,27 +20064,29 @@ } }, "tags": [ - "Teams (beta)" + "Custom roles" ], - "summary": "Update teams", - "description": "Perform a partial update to multiple teams. Updating teams uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating teams.\n\n
\nClick to expand instructions for updating teams\n\n#### addMembersToTeams\n\nAdd the members to teams.\n\n##### Parameters\n\n- `memberIDs`: List of member IDs to add.\n- `teamKeys`: List of teams to update.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addMembersToTeams\",\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\"\n ],\n \"teamKeys\": [\n \"example-team-1\",\n \"example-team-2\"\n ]\n }]\n}\n```\n\n#### addAllMembersToTeams\n\nAdd all members to the team. Members that match any of the filters are **excluded** from the update.\n\n##### Parameters\n\n- `teamKeys`: List of teams to update.\n- `filterLastSeen`: (Optional) A JSON object with one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive.\n- `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`.\n- `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive.\n- `ignoredMemberIDs`: (Optional) A list of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addAllMembersToTeams\",\n \"teamKeys\": [\n \"example-team-1\",\n \"example-team-2\"\n ],\n \"filterLastSeen\": { \"never\": true }\n }]\n}\n```\n\n
\n", + "summary": "Create custom role", + "description": "Create a new custom role", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/teamsPatchInput" + "$ref": "#/components/schemas/CustomRolePost" }, "example": { - "comment": "Optional comment about the update", - "instructions": [ + "basePermissions": "reader", + "description": "An example role for members of the ops team", + "key": "role-key-123abc", + "name": "Ops team", + "policy": [ { - "kind": "addMembersToTeams", - "memberIDs": [ - "1234a56b7c89d012345e678f" + "actions": [ + "updateOn" ], - "teamKeys": [ - "example-team-1", - "example-team-2" + "effect": "allow", + "resources": [ + "proj/*:env/production:flag/*" ] } ] @@ -19878,28 +20095,18 @@ }, "required": true }, - "operationId": "patchTeams" + "operationId": "postCustomRole" } }, - "/api/v2/teams/{teamKey}": { + "/api/v2/roles/{customRoleKey}": { "get": { "responses": { "200": { - "description": "Teams response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } - } - }, - "400": { - "description": "Invalid request", + "description": "Custom role response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/CustomRole" } } } @@ -19934,16 +20141,6 @@ } } }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -19956,43 +20153,33 @@ } }, "tags": [ - "Teams" + "Custom roles" ], - "summary": "Get team", - "description": "Fetch a team by key.\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Get team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", + "summary": "Get custom role", + "description": "Get a single custom role by key or ID", "parameters": [ { - "name": "teamKey", + "name": "customRoleKey", "in": "path", - "description": "The team key.", + "description": "The custom role key or ID", "required": true, "schema": { "type": "string", "format": "string", - "description": "The team key." - } - }, - { - "name": "expand", - "in": "query", - "description": "A comma-separated list of properties that can reveal additional information in the response.", - "schema": { - "type": "string", - "format": "string", - "description": "A comma-separated list of properties that can reveal additional information in the response." + "description": "The custom role key or ID" } } ], - "operationId": "getTeam" + "operationId": "getCustomRole" }, "patch": { "responses": { "200": { - "description": "Teams response", + "description": "Custom role response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Team" + "$ref": "#/components/schemas/CustomRole" } } } @@ -20027,16 +20214,6 @@ } } }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, "409": { "description": "Status conflict", "content": { @@ -20059,30 +20236,20 @@ } }, "tags": [ - "Teams" + "Custom roles" ], - "summary": "Update team", - "description": "Perform a partial update to a team. Updating a team uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating teams.\n\n
\nClick to expand instructions for updating teams\n\n#### addCustomRoles\n\nAdds custom roles to the team. Team members will have these custom roles granted to them.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### removeCustomRoles\n\nRemoves custom roles from the team. The app will no longer grant these custom roles to the team members.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### addMembers\n\nAdds members to the team.\n\n##### Parameters\n\n- `values`: List of member IDs to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removeMembers\n\nRemoves members from the team.\n\n##### Parameters\n\n- `values`: List of member IDs to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### replaceMembers\n\nReplaces the existing members of the team with the new members.\n\n##### Parameters\n\n- `values`: List of member IDs of the new members.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### addPermissionGrants\n\nAdds 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.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addPermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removePermissionGrants\n\nRemoves 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.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removePermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the description of the team.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Updated team description\"\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the team.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated team name\"\n }]\n}\n```\n\n
\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Update team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", + "summary": "Update custom role", + "description": "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](/#section/Overview/Updates).

To add an element to the `policy` array, set the `path` to `/policy` and then append `/`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.", "parameters": [ { - "name": "teamKey", + "name": "customRoleKey", "in": "path", - "description": "The team key", + "description": "The custom role key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The team key" - } - }, - { - "name": "expand", - "in": "query", - "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", - "schema": { - "type": "string", - "format": "string", - "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above." + "description": "The custom role key" } } ], @@ -20090,14 +20257,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/teamPatchInput" + "$ref": "#/components/schemas/PatchWithComment" }, "example": { - "comment": "Optional comment about the update", - "instructions": [ + "patch": [ { - "kind": "updateDescription", - "value": "New description for the team" + "op": "add", + "path": "/policy/0", + "value": { + "actions": [ + "updateOn" + ], + "effect": "allow", + "resources": [ + "proj/*:env/qa:flag/*" + ] + } } ] } @@ -20105,7 +20280,7 @@ }, "required": true }, - "operationId": "patchTeam" + "operationId": "patchCustomRole" }, "delete": { "responses": { @@ -20144,45 +20319,35 @@ } }, "tags": [ - "Teams" + "Custom roles" ], - "summary": "Delete team", - "description": "Delete a team by key. To learn more, read [Delete a team](https://docs.launchdarkly.com/home/account/manage-teams#delete-a-team).", + "summary": "Delete custom role", + "description": "Delete a custom role by key", "parameters": [ { - "name": "teamKey", + "name": "customRoleKey", "in": "path", - "description": "The team key", + "description": "The custom role key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The team key" + "description": "The custom role key" } } ], - "operationId": "deleteTeam" + "operationId": "deleteCustomRole" } }, - "/api/v2/teams/{teamKey}/maintainers": { + "/api/v2/segments/{projectKey}/{environmentKey}": { "get": { "responses": { "200": { - "description": "Team maintainers response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamMaintainers" - } - } - } - }, - "400": { - "description": "Invalid request", + "description": "Segment collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/UserSegments" } } } @@ -20197,16 +20362,6 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, "404": { "description": "Invalid resource identifier", "content": { @@ -20216,118 +20371,127 @@ } } } - }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } } }, "tags": [ - "Teams" + "Segments" ], - "summary": "Get team maintainers", - "description": "Fetch the maintainers that have been assigned to the team. To learn more, read [Manage team maintainers](https://docs.launchdarkly.com/home/account/manage-teams#manage-team-maintainers).", + "summary": "List segments", + "description": "Get a list of all segments in the given project.\n\nSegments 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.\n\n### Filtering segments\n\nThe `filter` parameter supports the following operators: `equals`, `anyOf`, and `exists`.\n\nYou can also combine filters in the following ways:\n\n- Use a comma (`,`) as an AND operator\n- Use a vertical bar (`|`) as an OR operator\n- Use parentheses (`()`) to group filters\n\n#### Supported fields and operators\n\nYou can only filter certain fields in segments when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for segments, the `filter` parameter supports the following fields and operators:\n\n|
Field
|Description |Supported operators |\n|---|---|---|\n| `excludedKeys` | The segment keys of segments to exclude from the results. | `anyOf` |\n| `external` | Whether the segment is a synced segment. | `exists` |\n| `includedKeys` | The segment keys of segments to include in the results. | `anyOf` |\n| `query` | A \"fuzzy\" search across segment key, name, and description. Supply a string or list of strings to the operator. | `equals` |\n| `tags` | The segment tags. | `anyOf` |\n| `unbounded` | Whether the segment is a standard segment (`false`) or a big segment (`true`). Standard segments include rule-based segments and smaller list-based segments. Big segments include larger list-based segments and synced segments. | `equals` |\n\nHere are a few examples:\n\n* The filter `?filter=tags anyOf [\"enterprise\", \"beta\"],query equals \"toggle\"` matches segments with \"toggle\" in their key, name, or description that also have \"enterprise\" or \"beta\" as a tag.\n* The filter `?filter=excludedKeys anyOf [\"segmentKey1\", \"segmentKey2\"]` excludes the segments with those keys from the results.\n* The filter `?filter=unbounded equals true` matches larger list-based segments and synced segments.\n\nThe documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=tags anyOf [\"enterprise\", \"beta\"]` must be encoded to `%5B`.\n", "parameters": [ { - "name": "teamKey", + "name": "projectKey", "in": "path", - "description": "The team key", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The team key" + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" } }, { "name": "limit", "in": "query", - "description": "The number of maintainers to return in the response. Defaults to 20.", + "description": "The number of segments to return. Defaults to 20.", "schema": { "type": "integer", "format": "int64", - "description": "The number of maintainers to return in the response. Defaults to 20." + "description": "The number of segments to return. Defaults to 20." } }, { "name": "offset", "in": "query", - "description": "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`.", + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", "schema": { "type": "integer", "format": "int64", - "description": "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`." + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`." + } + }, + { + "name": "sort", + "in": "query", + "description": "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.", + "schema": { + "type": "string", + "format": "string", + "description": "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." + } + }, + { + "name": "filter", + "in": "query", + "description": "Accepts filter by `excludedKeys`, `external`, `includedKeys`, `query`, `tags`, `unbounded`. To learn more about the filter syntax, read the 'Filtering segments' section above.", + "schema": { + "type": "string", + "format": "string", + "description": "Accepts filter by `excludedKeys`, `external`, `includedKeys`, `query`, `tags`, `unbounded`. To learn more about the filter syntax, read the 'Filtering segments' section above." } } ], - "operationId": "getTeamMaintainers" - } - }, - "/api/v2/teams/{teamKey}/members": { + "operationId": "getSegments" + }, "post": { "responses": { "201": { - "description": "Team member imports response", + "description": "Segment response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TeamImportsRep" + "$ref": "#/components/schemas/UserSegment" } } } }, - "207": { - "description": "Partial Success", + "400": { + "description": "Invalid request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TeamImportsRep" + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } }, - "400": { - "description": "Invalid request", + "401": { + "description": "Invalid access token", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/UnauthorizedErrorRep" } } } }, - "401": { - "description": "Invalid access token", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } }, - "405": { - "description": "Method not allowed", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -20344,62 +20508,56 @@ } }, "tags": [ - "Teams" + "Segments" ], - "summary": "Add multiple members to team", - "description": "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 [Manage team members](https://docs.launchdarkly.com/home/account/manage-teams#manage-team-members).\n\n**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.\n\nOn 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.\n\nExample `207` response:\n```json\n{\n \"items\": [\n {\n \"status\": \"success\",\n \"value\": \"new-team-member@acme.com\"\n },\n {\n \"message\": \"Line 2: empty row\",\n \"status\": \"error\",\n \"value\": \"\"\n },\n {\n \"message\": \"Line 3: email already exists in the specified team\",\n \"status\": \"error\",\n \"value\": \"existing-team-member@acme.com\"\n },\n {\n \"message\": \"Line 4: invalid email formatting\",\n \"status\": \"error\",\n \"value\": \"invalid email format\"\n }\n ]\n}\n```\n\nMessage | Resolution\n--- | ---\nEmpty row | This line is blank. Add an email address and try again.\nDuplicate entry | This email address appears in the file twice. Remove the email from the file and try again.\nEmail already exists in the specified team | This member is already on your team. Remove the email from the file and try again.\nInvalid formatting | This email address is not formatted correctly. Fix the formatting and try again.\nEmail 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.\n\nOn a `400` response, the `message` field may contain errors specific to this endpoint.\n\nExample `400` response:\n```json\n{\n \"code\": \"invalid_request\",\n \"message\": \"Unable to process file\"\n}\n```\n\nMessage | Resolution\n--- | ---\nUnable to process file | LaunchDarkly could not process the file for an unspecified reason. Review your file for errors and try again.\nFile exceeds 25mb | Break up your file into multiple files of less than 25mbs each.\nAll emails have invalid formatting | None of the email addresses in the file are in the correct format. Fix the formatting and try again.\nAll 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.\nFile is empty | The CSV file does not contain any email addresses. Populate the file and try again.\nNo 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.\n", + "summary": "Create segment", + "description": "Create a new segment.", "parameters": [ { - "name": "teamKey", + "name": "projectKey", "in": "path", - "description": "The team key", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The team key" + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" } } ], "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary", - "description": "CSV file containing email addresses" - } - } + "$ref": "#/components/schemas/SegmentBody" } } }, "required": true }, - "operationId": "postTeamMembers" + "operationId": "postSegment" } }, - "/api/v2/teams/{teamKey}/roles": { + "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}": { "get": { "responses": { "200": { - "description": "Team roles response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamCustomRoles" - } - } - } - }, - "400": { - "description": "Invalid request", + "description": "Segment response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/UserSegment" } } } @@ -20414,16 +20572,6 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, "404": { "description": "Invalid resource identifier", "content": { @@ -20434,16 +20582,6 @@ } } }, - "405": { - "description": "Method not allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MethodNotAllowedErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -20456,55 +20594,65 @@ } }, "tags": [ - "Teams" + "Segments" ], - "summary": "Get team custom roles", - "description": "Fetch the custom roles that have been assigned to the team. To learn more, read [Manage team permissions](https://docs.launchdarkly.com/home/account/manage-teams#manage-team-permissions).", + "summary": "Get segment", + "description": "Get a single segment by key.

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.", "parameters": [ { - "name": "teamKey", + "name": "projectKey", "in": "path", - "description": "The team key", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The team key" + "description": "The project key" } }, { - "name": "limit", - "in": "query", - "description": "The number of roles to return in the response. Defaults to 20.", + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "description": "The number of roles to return in the response. Defaults to 20." + "type": "string", + "format": "string", + "description": "The environment key" } }, { - "name": "offset", - "in": "query", - "description": "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`.", + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "description": "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`." + "type": "string", + "format": "string", + "description": "The segment key" } } ], - "operationId": "getTeamRoles" - } - }, - "/api/v2/templates": { - "get": { + "operationId": "getSegment" + }, + "patch": { "responses": { "200": { - "description": "Workflow templates list response JSON", + "description": "Segment response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkflowTemplatesListingOutputRep" + "$ref": "#/components/schemas/UserSegment" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -20519,6 +20667,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, "404": { "description": "Invalid resource identifier", "content": { @@ -20529,6 +20687,16 @@ } } }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -20541,71 +20709,112 @@ } }, "tags": [ - "Workflow templates" + "Segments" ], - "summary": "Get workflow templates", - "description": "Get workflow templates belonging to an account, or can optionally return templates_endpoints.workflowTemplateSummariesListingOutputRep when summary query param is true", + "summary": "Patch segment", + "description": "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](/#section/Overview/Updates).\n\n### Using semantic patches on a segment\n\nTo 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](/reference#updates-using-semantic-patch).\n\nThe 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:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required) The key of the LaunchDarkly environment.\n* `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.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating segments.\n\n
\nClick to expand instructions for updating segment details and settings\n\n#### addTags\n\nAdds tags to the segment.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addTags\",\n \"values\": [\"tag1\", \"tag2\"]\n }]\n}\n```\n\n#### removeTags\n\nRemoves tags from the segment.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeTags\",\n \"values\": [\"tag1\", \"tag2\"]\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the segment.\n\n##### Parameters\n\n- `value`: Name of the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated segment name\"\n }]\n}\n```\n\n
\n\n
\nClick to expand instructions for updating segment individual targets\n\n#### addExcludedTargets\n\nAdds context keys to the individual context targets excluded from the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be added to.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExcludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addExcludedUsers\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExcludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### addIncludedTargets\n\nAdds 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.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be added to.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addIncludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addIncludedUsers\n\nAdds 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.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addIncludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### removeExcludedTargets\n\nRemoves context keys from the individual context targets excluded from the segment for the specified `contextKind`.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be removed from.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExcludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeExcludedUsers\n\nRemoves user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExcludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n#### removeIncludedTargets\n\nRemoves context keys from the individual context targets included in the segment for the specified `contextKind`.\n\n##### Parameters\n\n- `contextKind`: The context kind the targets should be removed from.\n- `values`: List of keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeIncludedTargets\",\n \"contextKind\": \"org\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeIncludedUsers\n\nRemoves user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeIncludedUsers\",\n \"values\": [ \"user-key-123abc\", \"user-key-456def\" ]\n }]\n}\n```\n\n
\n\n
\nClick to expand instructions for updating segment targeting rules\n\n#### addClauses\n\nAdds the given clauses to the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `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`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n- `ruleId`: ID of a rule in the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addClauses\",\n \"clauses\": [\n {\n \"attribute\": \"email\",\n \"negate\": false,\n \"op\": \"contains\",\n \"values\": [\"value1\"]\n }\n ],\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n }]\n}\n```\n\n#### addRule\n\nAdds a new targeting rule to the segment. The rule may contain `clauses`.\n\n##### Parameters\n\n- `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`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n- `description`: A description of the rule.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"clauses\": [\n {\n \"attribute\": \"email\",\n \"op\": \"contains\",\n \"negate\": false,\n \"values\": [\"@launchdarkly.com\"]\n }\n ],\n \"description\": \"Targeting rule for LaunchDarkly employees\",\n }]\n}\n```\n\n#### addValuesToClause\n\nAdds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addValuesToClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n \"values\": [\"beta_testers\"]\n }]\n}\n```\n\n#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeClauses\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"]\n }]\n}\n```\n\n#### removeRule\n\nRemoves the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeRule\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n }]\n}\n```\n\n#### removeValuesFromClause\n\nRemoves `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeValuesFromClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n \"values\": [\"beta_testers\"]\n }]\n}\n```\n\n#### reorderRules\n\nRearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules in the segment.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all targeting rules in the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"reorderRules\",\n \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n }]\n}\n```\n\n#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the segment.\n- `clauseId`: ID of a clause in that rule.\n- `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\",\n \"clause\": {\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Mexico\", \"Canada\"]\n }\n }]\n}\n```\n\n#### updateRuleDescription\n\nUpdates the description of the segment targeting rule.\n\n##### Parameters\n\n- `description`: The new human-readable description for this rule.\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the segment.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateRuleDescription\",\n \"description\": \"New rule description\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n }]\n}\n```\n\n#### updateRuleRolloutAndContextKind\n\nFor a rule that includes a percentage of targets, updates the percentage and the context kind of the targets to include.\n\n##### Parameters\n\n- `ruleId`: The ID of a targeting rule in the segment that includes a percentage of targets.\n- `weight`: The weight, in thousandths of a percent (0-100000).\n- `contextKind`: The context kind.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"reorderRules\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"weight\": \"20000\",\n \"contextKind\": \"device\"\n }]\n}\n```\n\n
\n\n
\nClick to expand instructions for working with Big Segments\n\nA \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n\nThe following semantic patch instructions apply only to these [larger list-based segments](https://docs.launchdarkly.com/home/flags/segments-create#create-larger-list-based-segments).\n\n#### addBigSegmentExcludedTargets\n\nFor use with [larger list-based segments](https://docs.launchdarkly.com/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets excluded from the segment. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addBigSegmentExcludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### addBigSegmentIncludedTargets\n\nFor use with [larger list-based segments](https://docs.launchdarkly.com/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets included in the segment. Returns an error if this causes the same context key to be both included and excluded.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addBigSegmentIncludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### processBigSegmentImport\n\nFor use with [larger list-based segments](https://docs.launchdarkly.com/home/flags/segments-create#create-larger-list-based-segments) ONLY. Processes a segment import.\n\n##### Parameters\n\n- `importId`: The ID of the import. The import ID is returned in the `Location` header as part of the [Create big segment import](https://apidocs.launchdarkly.com/tag/Segments-(beta)#operation/createBigSegmentImport) request.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"processBigSegmentImport\",\n \"importId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n }]\n}\n```\n\n\n#### removeBigSegmentExcludedTargets\n\nFor use with [larger list-based segments](https://docs.launchdarkly.com/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets excluded from the segment.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeBigSegmentExcludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n#### removeBigSegmentIncludedTargets\n\nFor use with [larger list-based segments](https://docs.launchdarkly.com/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets included in the segment.\n\n##### Parameters\n\n- `values`: List of context keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeBigSegmentIncludedTargets\",\n \"values\": [ \"org-key-123abc\", \"org-key-456def\" ]\n }]\n}\n```\n\n
\n\n### Using JSON patches on a segment\n\nIf you do not include the header described above, you can use a [JSON patch](/reference#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes.\n\nFor example, to update the description for a segment with a JSON patch, use the following request body:\n\n```json\n{\n \"patch\": [\n {\n \"op\": \"replace\",\n \"path\": \"/description\",\n \"value\": \"new description\"\n }\n ]\n}\n```\n\nTo update fields in the segment that are arrays, set the `path` to the name of the field and then append `/`. 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.\n\nFor example, to add a rule to a segment, use the following request body:\n\n```json\n{\n \"patch\":[\n {\n \"op\": \"add\",\n \"path\": \"/rules/0\",\n \"value\": {\n \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }]\n }\n }\n ]\n}\n```\n\nTo 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.\n", "parameters": [ { - "name": "summary", - "in": "query", - "description": "Whether the entire template object or just a summary should be returned", + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, "schema": { - "type": "boolean", - "description": "Whether the entire template object or just a summary should be returned" + "type": "string", + "format": "string", + "description": "The project key" } }, { - "name": "search", - "in": "query", - "description": "The substring in either the name or description of a template", + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The substring in either the name or description of a template" + "description": "The environment key" + } + }, + { + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The segment key" } } ], - "operationId": "getWorkflowTemplates" + "requestBody": { + "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 + }, + "operationId": "patchSegment" }, - "post": { + "delete": { "responses": { - "201": { - "description": "Workflow template response JSON", + "204": { + "description": "Action succeeded" + }, + "401": { + "description": "Invalid access token", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkflowTemplateOutput" + "$ref": "#/components/schemas/UnauthorizedErrorRep" } } } }, - "400": { - "description": "Invalid request", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } }, - "401": { - "description": "Invalid access token", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } }, - "403": { - "description": "Forbidden", + "409": { + "description": "Status conflict", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/StatusConflictErrorRep" } } } @@ -20622,28 +20831,53 @@ } }, "tags": [ - "Workflow templates" + "Segments" ], - "summary": "Create workflow template", - "description": "Create a template for a feature flag workflow", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateWorkflowTemplateInput" - } + "summary": "Delete segment", + "description": "Delete a segment.", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" } }, - "required": true - }, - "operationId": "createWorkflowTemplate" + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The segment key" + } + } + ], + "operationId": "deleteSegment" } }, - "/api/v2/templates/{templateKey}": { - "delete": { + "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts": { + "post": { "responses": { "204": { - "description": "Action completed successfully" + "description": "Action succeeded" }, "400": { "description": "Invalid request", @@ -20665,16 +20899,6 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, "404": { "description": "Invalid resource identifier", "content": { @@ -20697,35 +20921,77 @@ } }, "tags": [ - "Workflow templates" + "Segments" ], - "summary": "Delete workflow template", - "description": "Delete a workflow template", + "summary": "Update context targets on a big segment", + "description": "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.", "parameters": [ { - "name": "templateKey", + "name": "projectKey", "in": "path", - "description": "The template key", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The template key" + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The segment key" } } ], - "operationId": "deleteWorkflowTemplate" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SegmentUserState" + } + } + }, + "required": true + }, + "operationId": "updateBigSegmentContextTargets" } }, - "/api/v2/tokens": { + "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/contexts/{contextKey}": { "get": { "responses": { "200": { - "description": "Access tokens collection response", + "description": "Segment membership for context response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tokens" + "$ref": "#/components/schemas/BigSegmentTarget" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -20740,12 +21006,12 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -20762,54 +21028,64 @@ } }, "tags": [ - "Access tokens" + "Segments" ], - "summary": "List access tokens", - "description": "Fetch a list of all access tokens.", + "summary": "Get big segment membership for context", + "description": "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.", "parameters": [ { - "name": "showAll", - "in": "query", - "description": "If set to true, and the authentication access token has the 'Admin' role, personal access tokens for all members will be retrieved.", + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, "schema": { - "type": "boolean", - "description": "If set to true, and the authentication access token has the 'Admin' role, personal access tokens for all members will be retrieved." + "type": "string", + "format": "string", + "description": "The project key" } }, { - "name": "limit", - "in": "query", - "description": "The number of access tokens to return in the response. Defaults to 25.", - "schema": { - "type": "integer", - "format": "int64", - "description": "The number of access tokens to return in the response. Defaults to 25." + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" } }, { - "name": "offset", - "in": "query", - "description": "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`.", + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "description": "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`." + "type": "string", + "format": "string", + "description": "The segment key" + } + }, + { + "name": "contextKey", + "in": "path", + "description": "The context key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The context key" } } ], - "operationId": "getTokens" - }, + "operationId": "getSegmentMembershipForContext" + } + }, + "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports": { "post": { "responses": { - "201": { - "description": "Access token response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Token" - } - } - } + "200": { + "description": "Action succeeded" }, "400": { "description": "Invalid request", @@ -20831,12 +21107,12 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -20853,55 +21129,67 @@ } }, "tags": [ - "Access tokens" + "Segments" ], - "summary": "Create access token", - "description": "Create a new access token.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AccessTokenPost" - }, - "example": { - "role": "reader" - } + "summary": "Create big segment export", + "description": "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.", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" } }, - "required": true - }, - "operationId": "postToken" + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The segment key" + } + } + ], + "operationId": "createBigSegmentExport" } }, - "/api/v2/tokens/{id}": { + "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID}": { "get": { "responses": { "200": { - "description": "Access token response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Token" - } - } - } - }, - "401": { - "description": "Invalid access token", + "description": "Segment export response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/Export" } } } }, - "403": { - "description": "Forbidden", + "400": { + "description": "Invalid request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -20928,36 +21216,64 @@ } }, "tags": [ - "Access tokens" + "Segments" ], - "summary": "Get access token", - "description": "Get a single access token by ID.", + "summary": "Get big segment export", + "description": "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.", "parameters": [ { - "name": "id", + "name": "projectKey", "in": "path", - "description": "The ID of the access token", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The ID of the access token" + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The segment key" + } + }, + { + "name": "exportID", + "in": "path", + "description": "The export ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The export ID" } } ], - "operationId": "getToken" - }, - "patch": { + "operationId": "getBigSegmentExport" + } + }, + "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports": { + "post": { "responses": { - "200": { - "description": "Access token response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Token" - } - } - } + "204": { + "description": "Import request submitted successfully" }, "400": { "description": "Invalid request", @@ -20979,16 +21295,6 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, "404": { "description": "Invalid resource identifier", "content": { @@ -21000,7 +21306,7 @@ } }, "409": { - "description": "Status conflict", + "description": "Conflicting process", "content": { "application/json": { "schema": { @@ -21009,16 +21315,6 @@ } } }, - "422": { - "description": "Invalid patch content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchFailedErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -21031,63 +21327,93 @@ } }, "tags": [ - "Access tokens" + "Segments" ], - "summary": "Patch access token", - "description": "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](/#section/Overview/Updates).", + "summary": "Create big segment import", + "description": "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.", "parameters": [ { - "name": "id", + "name": "projectKey", "in": "path", - "description": "The ID of the access token to update", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The ID of the access token to update" + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The segment key" } } ], "requestBody": { "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/JSONPatch" - }, - "example": [ - { - "op": "replace", - "path": "/role", - "value": "writer" + "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`" + }, + "waitOnApprovals": { + "type": "boolean", + "description": "Whether to wait for approvals before processing the import" + } } - ] + } } }, "required": true }, - "operationId": "patchToken" - }, - "delete": { + "operationId": "createBigSegmentImport" + } + }, + "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID}": { + "get": { "responses": { - "204": { - "description": "Action succeeded" - }, - "401": { - "description": "Invalid access token", + "200": { + "description": "Segment import response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/Import" } } } }, - "403": { - "description": "Forbidden", + "400": { + "description": "Invalid request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -21114,35 +21440,71 @@ } }, "tags": [ - "Access tokens" + "Segments" ], - "summary": "Delete access token", - "description": "Delete an access token by ID.", + "summary": "Get big segment import", + "description": "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.", "parameters": [ { - "name": "id", + "name": "projectKey", "in": "path", - "description": "The ID of the access token to update", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The ID of the access token to update" + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The segment key" + } + }, + { + "name": "importID", + "in": "path", + "description": "The import ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The import ID" } } ], - "operationId": "deleteToken" + "operationId": "getBigSegmentImport" } }, - "/api/v2/tokens/{id}/reset": { + "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users": { "post": { "responses": { - "200": { - "description": "Access token response", + "204": { + "description": "Action succeeded" + }, + "400": { + "description": "Invalid request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Token" + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -21157,16 +21519,6 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, "404": { "description": "Invalid resource identifier", "content": { @@ -21189,45 +21541,67 @@ } }, "tags": [ - "Access tokens" + "Segments" ], - "summary": "Reset access token", - "description": "Reset an access token's secret key with an optional expiry time for the old key.", + "summary": "Update user context targets on a big segment", + "description": "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.", "parameters": [ { - "name": "id", + "name": "projectKey", "in": "path", - "description": "The ID of the access token to update", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The ID of the access token to update" + "description": "The project key" } }, { - "name": "expiry", - "in": "query", - "description": "An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately.", + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, "schema": { - "type": "integer", - "format": "int64", - "description": "An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately." + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The segment key" } } ], - "operationId": "resetToken" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SegmentUserState" + } + } + }, + "required": true + }, + "operationId": "updateBigSegmentTargets" } }, - "/api/v2/usage/data-export-events": { + "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users/{userKey}": { "get": { "responses": { "200": { - "description": "Usage response", + "description": "Segment membership for user response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SeriesIntervalsRep" + "$ref": "#/components/schemas/BigSegmentTarget" } } } @@ -21252,12 +21626,12 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -21271,67 +21645,71 @@ } } } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusServiceUnavailable" - } - } - } } }, "tags": [ - "Account usage (beta)" + "Segments" ], - "summary": "Get data export events usage", - "description": "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.", + "summary": "Get big segment membership for user", + "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nGet the membership status (included/excluded) for a given user in this big segment. This operation does not support standard segments.\n", "parameters": [ { - "name": "from", - "in": "query", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month." + "description": "The project key" } }, { - "name": "to", - "in": "query", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time." + "description": "The environment key" + } + }, + { + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The segment key" + } + }, + { + "name": "userKey", + "in": "path", + "description": "The user key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The user key" } } ], - "operationId": "getDataExportEventsUsage" + "operationId": "getSegmentMembershipForUser" } }, - "/api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey}": { + "/api/v2/segments/{projectKey}/{segmentKey}/expiring-targets/{environmentKey}": { "get": { "responses": { "200": { - "description": "Usage response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SeriesListRep" - } - } - } - }, - "400": { - "description": "Invalid request", + "description": "Expiring context target response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/ExpiringTargetGetResponse" } } } @@ -21346,16 +21724,6 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, "404": { "description": "Invalid resource identifier", "content": { @@ -21378,10 +21746,10 @@ } }, "tags": [ - "Account usage (beta)" + "Segments" ], - "summary": "Get evaluations usage", - "description": "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.", + "summary": "Get expiring targets for segment", + "description": "Get a list of a segment's context targets that are scheduled for removal.", "parameters": [ { "name": "projectKey", @@ -21406,59 +21774,27 @@ } }, { - "name": "featureFlagKey", + "name": "segmentKey", "in": "path", - "description": "The feature flag key", + "description": "The segment key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The feature flag key" - } - }, - { - "name": "from", - "in": "query", - "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago.", - "schema": { - "type": "string", - "format": "string", - "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago." - } - }, - { - "name": "to", - "in": "query", - "description": "The series of data returned ends at this timestamp. Defaults to the current time.", - "schema": { - "type": "string", - "format": "string", - "description": "The series of data returned ends at this timestamp. Defaults to the current time." - } - }, - { - "name": "tz", - "in": "query", - "description": "The timezone to use for breaks between days when returning daily data.", - "schema": { - "type": "string", - "format": "string", - "description": "The timezone to use for breaks between days when returning daily data." + "description": "The segment key" } } ], - "operationId": "getEvaluationsUsage" - } - }, - "/api/v2/usage/events/{type}": { - "get": { + "operationId": "getExpiringTargetsForSegment" + }, + "patch": { "responses": { "200": { - "description": "Usage response", + "description": "Expiring target response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SeriesListRep" + "$ref": "#/components/schemas/ExpiringTargetPatchResponse" } } } @@ -21503,6 +21839,16 @@ } } }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -21515,65 +21861,67 @@ } }, "tags": [ - "Account usage (beta)" + "Segments" ], - "summary": "Get events usage", - "description": "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.", + "summary": "Update expiring targets for segment", + "description": "\nUpdate expiring context targets for a segment. Updating a context target expiration uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\nIf 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.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring context targets.\n\n
\nClick to expand instructions for updating expiring context targets\n\n#### addExpiringTarget\n\nSchedules a date and time when LaunchDarkly will remove a context from segment targeting. The segment must already have the context as an individual target.\n\n##### Parameters\n\n- `targetType`: The type of individual target for this context. Must be either `included` or `excluded`.\n- `contextKey`: The context key.\n- `contextKind`: The kind of context being targeted.\n- `value`: The date when the context should expire from the segment targeting, in Unix milliseconds.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addExpiringTarget\",\n \"targetType\": \"included\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\",\n \"value\": 1754092860000\n }]\n}\n```\n\n#### updateExpiringTarget\n\nUpdates the date and time when LaunchDarkly will remove a context from segment targeting.\n\n##### Parameters\n\n- `targetType`: The type of individual target for this context. Must be either `included` or `excluded`.\n- `contextKey`: The context key.\n- `contextKind`: The kind of context being targeted.\n- `value`: The new date when the context should expire from the segment targeting, in Unix milliseconds.\n- `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.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExpiringTarget\",\n \"targetType\": \"included\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\",\n \"value\": 1754179260000\n }]\n}\n```\n\n#### removeExpiringTarget\n\nRemoves the scheduled expiration for the context in the segment.\n\n##### Parameters\n\n- `targetType`: The type of individual target for this context. Must be either `included` or `excluded`.\n- `contextKey`: The context key.\n- `contextKind`: The kind of context being targeted.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeExpiringTarget\",\n \"targetType\": \"included\",\n \"contextKey\": \"user-key-123abc\",\n \"contextKind\": \"user\",\n }]\n}\n```\n\n
\n", "parameters": [ { - "name": "type", + "name": "projectKey", "in": "path", - "description": "The type of event to retrieve. Must be either `received` or `published`.", + "description": "The project key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The type of event to retrieve. Must be either `received` or `published`." + "description": "The project key" } }, { - "name": "from", - "in": "query", - "description": "The series of data returned starts from this timestamp. Defaults to 24 hours ago.", + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The series of data returned starts from this timestamp. Defaults to 24 hours ago." + "description": "The environment key" } }, { - "name": "to", - "in": "query", - "description": "The series of data returned ends at this timestamp. Defaults to the current time.", + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The series of data returned ends at this timestamp. Defaults to the current time." + "description": "The segment key" } } ], - "operationId": "getEventsUsage" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/patchSegmentExpiringTargetInputRep" + } + } + }, + "required": true + }, + "operationId": "patchExpiringTargetsForSegment" } }, - "/api/v2/usage/experimentation-keys": { + "/api/v2/segments/{projectKey}/{segmentKey}/expiring-user-targets/{environmentKey}": { "get": { "responses": { "200": { - "description": "Usage response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SeriesIntervalsRep" - } - } - } - }, - "400": { - "description": "Invalid request", + "description": "Expiring user target response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/ExpiringUserTargetGetResponse" } } } @@ -21588,12 +21936,12 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -21607,57 +21955,58 @@ } } } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusServiceUnavailable" - } - } - } } }, "tags": [ - "Account usage (beta)" + "Segments" ], - "summary": "Get experimentation keys usage", - "description": "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.", + "summary": "Get expiring user targets for segment", + "description": "> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nGet a list of a segment's user targets that are scheduled for removal.\n", "parameters": [ { - "name": "from", - "in": "query", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month." + "description": "The project key" } }, { - "name": "to", - "in": "query", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time." + "description": "The environment key" + } + }, + { + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The segment key" } } ], - "operationId": "getExperimentationKeysUsage" - } - }, - "/api/v2/usage/experimentation-units": { - "get": { + "operationId": "getExpiringUserTargetsForSegment" + }, + "patch": { "responses": { "200": { - "description": "Usage response", + "description": "Expiring user target response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SeriesIntervalsRep" + "$ref": "#/components/schemas/ExpiringUserTargetPatchResponse" } } } @@ -21692,76 +22041,99 @@ } } }, - "429": { - "description": "Rate limited", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } }, - "503": { - "description": "Service unavailable", + "409": { + "description": "Status conflict", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StatusServiceUnavailable" + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" } } } } }, "tags": [ - "Account usage (beta)" + "Segments" ], - "summary": "Get experimentation units usage", - "description": "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.", + "summary": "Update expiring user targets for segment", + "description": "\n> ### Contexts are now available\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](/tag/Segments#operation/patchExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/observability/contexts).\n\nUpdate expiring user targets for a segment. Updating a user target expiration uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\nIf 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.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring user targets.\n\n
\nClick to expand instructions for updating expiring user targets\n\n#### addExpireUserTargetDate\n\nSchedules a date and time when LaunchDarkly will remove a user from segment targeting.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n- `value`: The date when the user should expire from the segment targeting, in Unix milliseconds.\n\n#### updateExpireUserTargetDate\n\nUpdates the date and time when LaunchDarkly will remove a user from segment targeting.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n- `value`: The new date when the user should expire from the segment targeting, in Unix milliseconds.\n- `version`: The segment version.\n\n#### removeExpireUserTargetDate\n\nRemoves the scheduled expiration for the user in the segment.\n\n##### Parameters\n\n- `targetType`: A segment's target type, must be either `included` or `excluded`.\n- `userKey`: The user key.\n\n
\n", "parameters": [ { - "name": "from", - "in": "query", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month." + "description": "The project key" } }, { - "name": "to", - "in": "query", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time." + "description": "The environment key" + } + }, + { + "name": "segmentKey", + "in": "path", + "description": "The segment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The segment key" } } ], - "operationId": "getExperimentationUnitsUsage" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/patchSegmentRequest" + } + } + }, + "required": true + }, + "operationId": "patchExpiringUserTargetsForSegment" } }, - "/api/v2/usage/mau": { + "/api/v2/teams": { "get": { "responses": { "200": { - "description": "Usage response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SeriesListRep" - } - } - } - }, - "400": { - "description": "Invalid request", + "description": "Teams collection response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/Teams" } } } @@ -21776,12 +22148,12 @@ } } }, - "403": { - "description": "Forbidden", + "405": { + "description": "Method not allowed", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" } } } @@ -21798,104 +22170,156 @@ } }, "tags": [ - "Account usage (beta)" + "Teams" ], - "summary": "Get MAU usage", - "description": "Get a time-series array of the number of monthly active users (MAU) seen by LaunchDarkly from your account. The granularity is always daily.

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/account/metrics).", + "summary": "List teams", + "description": "Return a list of teams.\n\nBy 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.\n\n### Filtering teams\n\nLaunchDarkly supports the following fields for filters:\n\n- `query` is a string that matches against the teams' names and keys. It is not case-sensitive.\n - A request with `query:abc` returns teams with the string `abc` in their name or key.\n- `nomembers` is a boolean that filters the list of teams who have 0 members\n - A request with `nomembers:true` returns teams that have 0 members\n - A request with `nomembers:false` returns teams that have 1 or more members\n\n### Expanding the teams response\nLaunchDarkly supports expanding several fields in the \"List teams\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,maintainers` includes the `members` and `maintainers` fields in the response.\n", "parameters": [ { - "name": "from", + "name": "limit", "in": "query", - "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago.", + "description": "The number of teams to return in the response. Defaults to 20.", "schema": { - "type": "string", - "format": "string", - "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago." + "type": "integer", + "format": "int64", + "description": "The number of teams to return in the response. Defaults to 20." } }, { - "name": "to", + "name": "offset", "in": "query", - "description": "The series of data returned ends at this timestamp. Defaults to the current time.", + "description": "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.", "schema": { - "type": "string", - "format": "string", - "description": "The series of data returned ends at this timestamp. Defaults to the current time." + "type": "integer", + "format": "int64", + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items." } }, { - "name": "project", + "name": "filter", "in": "query", - "description": "A project key to filter results to. Can be specified multiple times, one query parameter per project key, to view data for multiple projects.", + "description": "A comma-separated list of filters. Each filter is constructed as `field:value`.", "schema": { "type": "string", "format": "string", - "description": "A project key to filter results to. Can be specified multiple times, one query parameter per project key, to view data for multiple projects." + "description": "A comma-separated list of filters. Each filter is constructed as `field:value`." } }, { - "name": "environment", + "name": "expand", "in": "query", - "description": "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.", + "description": "A comma-separated list of properties that can reveal additional information in the response.", "schema": { "type": "string", "format": "string", - "description": "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." + "description": "A comma-separated list of properties that can reveal additional information in the response." + } + } + ], + "operationId": "getTeams" + }, + "post": { + "responses": { + "201": { + "description": "Teams response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } } }, - { - "name": "sdktype", - "in": "query", - "description": "An SDK type to filter results to. Can be specified multiple times, one query parameter per SDK type. Valid values: client, server", - "schema": { - "type": "string", - "format": "string", - "description": "An SDK type to filter results to. Can be specified multiple times, one query parameter per SDK type. Valid values: client, server" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } } }, - { - "name": "sdk", - "in": "query", - "description": "An SDK name to filter results to. Can be specified multiple times, one query parameter per SDK.", - "schema": { - "type": "string", - "format": "string", - "description": "An SDK name to filter results to. Can be specified multiple times, one query parameter per SDK." + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } } }, - { - "name": "anonymous", - "in": "query", - "description": "If specified, filters results to either anonymous or nonanonymous users.", - "schema": { - "type": "string", - "format": "string", - "description": "If specified, filters results to either anonymous or nonanonymous users." + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } } }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Teams" + ], + "summary": "Create team", + "description": "Create a team. To learn more, read [Creating a team](https://docs.launchdarkly.com/home/account/create-teams).\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Create team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", + "parameters": [ { - "name": "groupby", + "name": "expand", "in": "query", - "description": "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", + "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", "schema": { "type": "string", "format": "string", - "description": "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" + "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above." } } ], - "operationId": "getMauUsage" - } - }, - "/api/v2/usage/mau/bycategory": { - "get": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/teamPostInput" + }, + "example": { + "customRoleKeys": [ + "example-role1", + "example-role2" + ], + "description": "An example team", + "key": "team-key-123abc", + "memberIDs": [ + "12ab3c45de678910fgh12345" + ], + "name": "Example team" + } + } + }, + "required": true + }, + "operationId": "postTeam" + }, + "patch": { "responses": { "200": { - "description": "Usage response", + "description": "Teams response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SeriesListRep" + "$ref": "#/components/schemas/BulkEditTeamsRep" } } } @@ -21930,12 +22354,12 @@ } } }, - "404": { - "description": "Invalid resource identifier", + "409": { + "description": "Status conflict", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/StatusConflictErrorRep" } } } @@ -21952,44 +22376,47 @@ } }, "tags": [ - "Account usage (beta)" + "Teams (beta)" ], - "summary": "Get MAU usage by category", - "description": "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`.

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/account/metrics).", - "parameters": [ - { - "name": "from", - "in": "query", - "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago.", - "schema": { - "type": "string", - "format": "string", - "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago." + "summary": "Update teams", + "description": "Perform a partial update to multiple teams. Updating teams uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating teams.\n\n
\nClick to expand instructions for updating teams\n\n#### addMembersToTeams\n\nAdd the members to teams.\n\n##### Parameters\n\n- `memberIDs`: List of member IDs to add.\n- `teamKeys`: List of teams to update.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addMembersToTeams\",\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\"\n ],\n \"teamKeys\": [\n \"example-team-1\",\n \"example-team-2\"\n ]\n }]\n}\n```\n\n#### addAllMembersToTeams\n\nAdd all members to the team. Members that match any of the filters are **excluded** from the update.\n\n##### Parameters\n\n- `teamKeys`: List of teams to update.\n- `filterLastSeen`: (Optional) A JSON object with one of the following formats:\n - `{\"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.\n - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps.\n - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds.\n- `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive.\n- `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`.\n- `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive.\n- `ignoredMemberIDs`: (Optional) A list of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addAllMembersToTeams\",\n \"teamKeys\": [\n \"example-team-1\",\n \"example-team-2\"\n ],\n \"filterLastSeen\": { \"never\": true }\n }]\n}\n```\n\n
\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/teamsPatchInput" + }, + "example": { + "comment": "Optional comment about the update", + "instructions": [ + { + "kind": "addMembersToTeams", + "memberIDs": [ + "1234a56b7c89d012345e678f" + ], + "teamKeys": [ + "example-team-1", + "example-team-2" + ] + } + ] + } } }, - { - "name": "to", - "in": "query", - "description": "The series of data returned ends at this timestamp. Defaults to the current time.", - "schema": { - "type": "string", - "format": "string", - "description": "The series of data returned ends at this timestamp. Defaults to the current time." - } - } - ], - "operationId": "getMauUsageByCategory" + "required": true + }, + "operationId": "patchTeams" } }, - "/api/v2/usage/mau/sdks": { + "/api/v2/teams/{teamKey}": { "get": { "responses": { "200": { - "description": "MAU SDKs response", + "description": "Teams response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SdkListRep" + "$ref": "#/components/schemas/Team" } } } @@ -22024,66 +22451,75 @@ } } }, - "429": { - "description": "Rate limited", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } - } - }, - "tags": [ - "Account usage (beta)" - ], - "summary": "Get MAU SDKs by type", - "description": "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.

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/account/metrics).", - "parameters": [ - { - "name": "from", - "in": "query", - "description": "The data returned starts from this timestamp. Defaults to seven days ago. The timestamp is in Unix milliseconds, for example, 1656694800000.", - "schema": { - "type": "string", - "format": "string", - "description": "The data returned starts from this timestamp. Defaults to seven days ago. The timestamp is in Unix milliseconds, for example, 1656694800000." + }, + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } } }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Teams" + ], + "summary": "Get team", + "description": "Fetch a team by key.\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Get team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", + "parameters": [ { - "name": "to", - "in": "query", - "description": "The data returned ends at this timestamp. Defaults to the current time. The timestamp is in Unix milliseconds, for example, 1657904400000.", + "name": "teamKey", + "in": "path", + "description": "The team key.", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The data returned ends at this timestamp. Defaults to the current time. The timestamp is in Unix milliseconds, for example, 1657904400000." + "description": "The team key." } }, { - "name": "sdktype", + "name": "expand", "in": "query", - "description": "The type of SDK with monthly active users (MAU) to list. Must be either `client` or `server`.", + "description": "A comma-separated list of properties that can reveal additional information in the response.", "schema": { "type": "string", "format": "string", - "description": "The type of SDK with monthly active users (MAU) to list. Must be either `client` or `server`." + "description": "A comma-separated list of properties that can reveal additional information in the response." } } ], - "operationId": "getMauSdksByType" - } - }, - "/api/v2/usage/service-connections": { - "get": { + "operationId": "getTeam" + }, + "patch": { "responses": { "200": { - "description": "Usage response", + "description": "Teams response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SeriesIntervalsRep" + "$ref": "#/components/schemas/Team" } } } @@ -22108,89 +22544,100 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } }, - "429": { - "description": "Rate limited", + "405": { + "description": "Method not allowed", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" } } } }, - "503": { - "description": "Service unavailable", + "409": { + "description": "Status conflict", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StatusServiceUnavailable" + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" } } } } }, "tags": [ - "Account usage (beta)" + "Teams" ], - "summary": "Get service connection usage", - "description": "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.", + "summary": "Update team", + "description": "Perform a partial update to a team. Updating a team uses the semantic patch format.\n\nTo 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating teams. Several of the instructions require one or more member IDs as parameters. The member ID is returned as part of the [List account members](/tag/Account-members#operation/getMembers) response. It is the `_id` field of each element in the `items` array.\n\n\n
\nClick to expand instructions for updating teams\n\n#### addCustomRoles\n\nAdds custom roles to the team. Team members will have these custom roles granted to them.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### removeCustomRoles\n\nRemoves custom roles from the team. The app will no longer grant these custom roles to the team members.\n\n##### Parameters\n\n- `values`: List of custom role keys.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeCustomRoles\",\n \"values\": [ \"example-custom-role\" ]\n }]\n}\n```\n\n#### addMembers\n\nAdds members to the team.\n\n##### Parameters\n\n- `values`: List of member IDs to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removeMembers\n\nRemoves members from the team.\n\n##### Parameters\n\n- `values`: List of member IDs to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removeMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### replaceMembers\n\nReplaces the existing members of the team with the new members.\n\n##### Parameters\n\n- `values`: List of member IDs of the new members.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembers\",\n \"values\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### addPermissionGrants\n\nAdds 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.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"addPermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### removePermissionGrants\n\nRemoves 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.\n\n##### Parameters\n\n- `actionSet`: Name of the action set.\n- `actions`: List of actions.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"removePermissionGrants\",\n \"actions\": [ \"updateTeamName\", \"updateTeamDescription\" ],\n \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ]\n }]\n}\n```\n\n#### updateDescription\n\nUpdates the description of the team.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Updated team description\"\n }]\n}\n```\n\n#### updateName\n\nUpdates the name of the team.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Updated team name\"\n }]\n}\n```\n\n
\n\n### Expanding the teams response\nLaunchDarkly supports four fields for expanding the \"Update team\" response. By default, these fields are **not** included in the response.\n\nTo expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields:\n\n* `members` includes the total count of members that belong to the team.\n* `roles` includes a paginated list of the custom roles that you have assigned to the team.\n* `projects` includes a paginated list of the projects that the team has any write access to.\n* `maintainers` includes a paginated list of the maintainers that you have assigned to the team.\n\nFor example, `expand=members,roles` includes the `members` and `roles` fields in the response.\n", "parameters": [ { - "name": "from", - "in": "query", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + "name": "teamKey", + "in": "path", + "description": "The team key", + "required": true, "schema": { "type": "string", "format": "string", - "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month." + "description": "The team key" } }, { - "name": "to", + "name": "expand", "in": "query", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.", "schema": { "type": "string", "format": "string", - "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time." + "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above." } } ], - "operationId": "getServiceConnectionUsage" - } - }, - "/api/v2/usage/streams/{source}": { - "get": { - "responses": { - "200": { - "description": "Usage response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SeriesListRep" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/teamPatchInput" + }, + "example": { + "comment": "Optional comment about the update", + "instructions": [ + { + "kind": "updateDescription", + "value": "New description for the team" + } + ] } } }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } + "required": true + }, + "operationId": "patchTeam" + }, + "delete": { + "responses": { + "204": { + "description": "Action succeeded" }, "401": { "description": "Invalid access token", @@ -22202,16 +22649,6 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, "404": { "description": "Invalid resource identifier", "content": { @@ -22234,65 +22671,35 @@ } }, "tags": [ - "Account usage (beta)" + "Teams" ], - "summary": "Get stream usage", - "description": "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.", + "summary": "Delete team", + "description": "Delete a team by key. To learn more, read [Delete a team](https://docs.launchdarkly.com/home/account/manage-teams#delete-a-team).", "parameters": [ { - "name": "source", + "name": "teamKey", "in": "path", - "description": "The source of streaming connections to describe. Must be either `client` or `server`.", + "description": "The team key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The source of streaming connections to describe. Must be either `client` or `server`." - } - }, - { - "name": "from", - "in": "query", - "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago.", - "schema": { - "type": "string", - "format": "string", - "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago." - } - }, - { - "name": "to", - "in": "query", - "description": "The series of data returned ends at this timestamp. Defaults to the current time.", - "schema": { - "type": "string", - "format": "string", - "description": "The series of data returned ends at this timestamp. Defaults to the current time." - } - }, - { - "name": "tz", - "in": "query", - "description": "The timezone to use for breaks between days when returning daily data.", - "schema": { - "type": "string", - "format": "string", - "description": "The timezone to use for breaks between days when returning daily data." + "description": "The team key" } } ], - "operationId": "getStreamUsage" + "operationId": "deleteTeam" } }, - "/api/v2/usage/streams/{source}/bysdkversion": { + "/api/v2/teams/{teamKey}/maintainers": { "get": { "responses": { "200": { - "description": "Usage response", + "description": "Team maintainers response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SeriesListRep" + "$ref": "#/components/schemas/TeamMaintainers" } } } @@ -22337,6 +22744,16 @@ } } }, + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -22349,85 +22766,75 @@ } }, "tags": [ - "Account usage (beta)" + "Teams" ], - "summary": "Get stream usage by SDK version", - "description": "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.", + "summary": "Get team maintainers", + "description": "Fetch the maintainers that have been assigned to the team. To learn more, read [Manage team maintainers](https://docs.launchdarkly.com/home/account/manage-teams#manage-team-maintainers).", "parameters": [ { - "name": "source", + "name": "teamKey", "in": "path", - "description": "The source of streaming connections to describe. Must be either `client` or `server`.", + "description": "The team key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The source of streaming connections to describe. Must be either `client` or `server`." - } - }, - { - "name": "from", - "in": "query", - "description": "The series of data returned starts from this timestamp. Defaults to 24 hours ago.", - "schema": { - "type": "string", - "format": "string", - "description": "The series of data returned starts from this timestamp. Defaults to 24 hours ago." - } - }, - { - "name": "to", - "in": "query", - "description": "The series of data returned ends at this timestamp. Defaults to the current time.", - "schema": { - "type": "string", - "format": "string", - "description": "The series of data returned ends at this timestamp. Defaults to the current time." - } - }, - { - "name": "tz", - "in": "query", - "description": "The timezone to use for breaks between days when returning daily data.", - "schema": { - "type": "string", - "format": "string", - "description": "The timezone to use for breaks between days when returning daily data." + "description": "The team key" } }, { - "name": "sdk", + "name": "limit", "in": "query", - "description": "If included, this filters the returned series to only those that match this SDK name.", + "description": "The number of maintainers to return in the response. Defaults to 20.", "schema": { - "type": "string", - "format": "string", - "description": "If included, this filters the returned series to only those that match this SDK name." + "type": "integer", + "format": "int64", + "description": "The number of maintainers to return in the response. Defaults to 20." } }, { - "name": "version", + "name": "offset", "in": "query", - "description": "If included, this filters the returned series to only those that match this SDK version.", + "description": "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`.", "schema": { - "type": "string", - "format": "string", - "description": "If included, this filters the returned series to only those that match this SDK version." + "type": "integer", + "format": "int64", + "description": "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`." } } ], - "operationId": "getStreamUsageBySdkVersion" + "operationId": "getTeamMaintainers" } }, - "/api/v2/usage/streams/{source}/sdkversions": { - "get": { + "/api/v2/teams/{teamKey}/members": { + "post": { "responses": { - "200": { - "description": "SDK Versions response", + "201": { + "description": "Team member imports response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SdkVersionListRep" + "$ref": "#/components/schemas/TeamImportsRep" + } + } + } + }, + "207": { + "description": "Partial Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamImportsRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -22442,12 +22849,12 @@ } } }, - "403": { - "description": "Forbidden", + "405": { + "description": "Method not allowed", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" } } } @@ -22464,35 +22871,52 @@ } }, "tags": [ - "Account usage (beta)" + "Teams" ], - "summary": "Get stream usage SDK versions", - "description": "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.", + "summary": "Add multiple members to team", + "description": "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 [Manage team members](https://docs.launchdarkly.com/home/account/manage-teams#manage-team-members).\n\n**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.\n\nOn 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.\n\nExample `207` response:\n```json\n{\n \"items\": [\n {\n \"status\": \"success\",\n \"value\": \"new-team-member@acme.com\"\n },\n {\n \"message\": \"Line 2: empty row\",\n \"status\": \"error\",\n \"value\": \"\"\n },\n {\n \"message\": \"Line 3: email already exists in the specified team\",\n \"status\": \"error\",\n \"value\": \"existing-team-member@acme.com\"\n },\n {\n \"message\": \"Line 4: invalid email formatting\",\n \"status\": \"error\",\n \"value\": \"invalid email format\"\n }\n ]\n}\n```\n\nMessage | Resolution\n--- | ---\nEmpty row | This line is blank. Add an email address and try again.\nDuplicate entry | This email address appears in the file twice. Remove the email from the file and try again.\nEmail already exists in the specified team | This member is already on your team. Remove the email from the file and try again.\nInvalid formatting | This email address is not formatted correctly. Fix the formatting and try again.\nEmail 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.\n\nOn a `400` response, the `message` field may contain errors specific to this endpoint.\n\nExample `400` response:\n```json\n{\n \"code\": \"invalid_request\",\n \"message\": \"Unable to process file\"\n}\n```\n\nMessage | Resolution\n--- | ---\nUnable to process file | LaunchDarkly could not process the file for an unspecified reason. Review your file for errors and try again.\nFile exceeds 25mb | Break up your file into multiple files of less than 25mbs each.\nAll emails have invalid formatting | None of the email addresses in the file are in the correct format. Fix the formatting and try again.\nAll 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.\nFile is empty | The CSV file does not contain any email addresses. Populate the file and try again.\nNo 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.\n", "parameters": [ { - "name": "source", + "name": "teamKey", "in": "path", - "description": "The source of streaming connections to describe. Must be either `client` or `server`.", + "description": "The team key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The source of streaming connections to describe. Must be either `client` or `server`." + "description": "The team key" } } ], - "operationId": "getStreamUsageSdkversion" + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary", + "description": "CSV file containing email addresses" + } + } + } + } + }, + "required": true + }, + "operationId": "postTeamMembers" } }, - "/api/v2/user-attributes/{projectKey}/{environmentKey}": { + "/api/v2/teams/{teamKey}/roles": { "get": { "responses": { "200": { - "description": "User attribute names response", + "description": "Team roles response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserAttributeNamesRep" + "$ref": "#/components/schemas/TeamCustomRoles" } } } @@ -22536,60 +22960,78 @@ } } } + }, + "405": { + "description": "Method not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MethodNotAllowedErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } }, "tags": [ - "Users (beta)" + "Teams" ], - "summary": "Get user attribute names", - "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get context attribute names\n](/tag/Contexts#operation/getContextAttributeNames) instead of this endpoint.\n\nGet all in-use user attributes in the specified environment. The set of in-use attributes typically consists of all attributes seen within the past 30 days.\n", + "summary": "Get team custom roles", + "description": "Fetch the custom roles that have been assigned to the team. To learn more, read [Manage team permissions](https://docs.launchdarkly.com/home/account/manage-teams#manage-team-permissions).", "parameters": [ { - "name": "projectKey", + "name": "teamKey", "in": "path", - "description": "The project key", + "description": "The team key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The team key" } }, { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, + "name": "limit", + "in": "query", + "description": "The number of roles to return in the response. Defaults to 20.", "schema": { - "type": "string", - "format": "string", - "description": "The environment key" + "type": "integer", + "format": "int64", + "description": "The number of roles to return in the response. Defaults to 20." + } + }, + { + "name": "offset", + "in": "query", + "description": "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`.", + "schema": { + "type": "integer", + "format": "int64", + "description": "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`." } } ], - "operationId": "getUserAttributeNames", - "deprecated": true + "operationId": "getTeamRoles" } }, - "/api/v2/user-search/{projectKey}/{environmentKey}": { + "/api/v2/templates": { "get": { "responses": { "200": { - "description": "Users collection response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Users" - } - } - } - }, - "400": { - "description": "Invalid request", + "description": "Workflow templates list response JSON", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/WorkflowTemplatesListingOutputRep" } } } @@ -22604,16 +23046,6 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" - } - } - } - }, "404": { "description": "Invalid resource identifier", "content": { @@ -22636,121 +23068,109 @@ } }, "tags": [ - "Users" + "Workflow templates" ], - "summary": "Find users", - "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Search for context instances](/tag/Contexts#operation/searchContextInstances) instead of this endpoint.\n\nSearch users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query.\n\nAn example user attribute filter set is `filter=firstName:Anna,activeTrial:false`. This matches users that have the user attribute `firstName` set to `Anna`, that also have the attribute `activeTrial` set to `false`.\n\nTo paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](/#section/Representations).\n", + "summary": "Get workflow templates", + "description": "Get workflow templates belonging to an account, or can optionally return templates_endpoints.workflowTemplateSummariesListingOutputRep when summary query param is true", "parameters": [ { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, + "name": "summary", + "in": "query", + "description": "Whether the entire template object or just a summary should be returned", "schema": { - "type": "string", - "format": "string", - "description": "The environment key" + "type": "boolean", + "description": "Whether the entire template object or just a summary should be returned" } }, { - "name": "q", + "name": "search", "in": "query", - "description": "Full-text search for users based on name, first name, last name, e-mail address, or key", + "description": "The substring in either the name or description of a template", "schema": { "type": "string", "format": "string", - "description": "Full-text search for users based on name, first name, last name, e-mail address, or key" + "description": "The substring in either the name or description of a template" + } + } + ], + "operationId": "getWorkflowTemplates" + }, + "post": { + "responses": { + "201": { + "description": "Workflow template response JSON", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowTemplateOutput" + } + } } }, - { - "name": "limit", - "in": "query", - "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", - "schema": { - "type": "integer", - "format": "int64", - "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } } }, - { - "name": "offset", - "in": "query", - "description": "Deprecated, use `searchAfter` instead. Specifies the first item to return in the collection.", - "deprecated": true, - "schema": { - "type": "integer", - "format": "int64", - "description": "Deprecated, use `searchAfter` instead. Specifies the first item to return in the collection." - } - }, - { - "name": "after", - "in": "query", - "description": "A Unix epoch time in milliseconds specifying the maximum last time a user requested a feature flag from LaunchDarkly", - "schema": { - "type": "integer", - "format": "int64", - "description": "A Unix epoch time in milliseconds specifying the maximum last time a user requested a feature flag from LaunchDarkly" - } - }, - { - "name": "sort", - "in": "query", - "description": "Specifies a field by which to sort. LaunchDarkly supports the `userKey` and `lastSeen` fields. Fields prefixed by a dash ( - ) sort in descending order.", - "schema": { - "type": "string", - "format": "string", - "description": "Specifies a field by which to sort. LaunchDarkly supports the `userKey` and `lastSeen` fields. Fields prefixed by a dash ( - ) sort in descending order." + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } } }, - { - "name": "searchAfter", - "in": "query", - "description": "Limits results to users with sort values after the value you specify. You can use this for pagination, but we recommend using the `next` link we provide instead.", - "schema": { - "type": "string", - "format": "string", - "description": "Limits results to users with sort values after the value you specify. You can use this for pagination, but we recommend using the `next` link we provide instead." + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } } }, - { - "name": "filter", - "in": "query", - "description": "A comma-separated list of user attribute filters. Each filter is in the form of attributeKey:attributeValue", - "schema": { - "type": "string", - "format": "string", - "description": "A comma-separated list of user attribute filters. Each filter is in the form of attributeKey:attributeValue" - } - } - ], - "operationId": "getSearchUsers", - "deprecated": true - } - }, - "/api/v2/users/{projectKey}/{environmentKey}": { - "get": { - "responses": { - "200": { - "description": "Users collection response", + "429": { + "description": "Rate limited", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UsersRep" + "$ref": "#/components/schemas/RateLimitedErrorRep" } } } + } + }, + "tags": [ + "Workflow templates" + ], + "summary": "Create workflow template", + "description": "Create a template for a feature flag workflow", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWorkflowTemplateInput" + } + } + }, + "required": true + }, + "operationId": "createWorkflowTemplate" + } + }, + "/api/v2/templates/{templateKey}": { + "delete": { + "responses": { + "204": { + "description": "Action completed successfully" }, "400": { "description": "Invalid request", @@ -22804,67 +23224,116 @@ } }, "tags": [ - "Users" + "Workflow templates" ], - "summary": "List users", - "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Search for contexts](/tag/Contexts#operation/searchContexts) instead of this endpoint.\n\nList all users in the environment. Includes the total count of users. This is useful for exporting all users in the system for further analysis.\n\nEach page displays users up to a set `limit`. The default is 20. To page through, follow the `next` link in the `_links` object. To learn more, read [Representations](/#section/Representations).\n", + "summary": "Delete workflow template", + "description": "Delete a workflow template", "parameters": [ { - "name": "projectKey", + "name": "templateKey", "in": "path", - "description": "The project key", + "description": "The template key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The template key" + } + } + ], + "operationId": "deleteWorkflowTemplate" + } + }, + "/api/v2/tokens": { + "get": { + "responses": { + "200": { + "description": "Access tokens collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tokens" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } } }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Access tokens" + ], + "summary": "List access tokens", + "description": "Fetch a list of all access tokens.", + "parameters": [ { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, + "name": "showAll", + "in": "query", + "description": "If set to true, and the authentication access token has the 'Admin' role, personal access tokens for all members will be retrieved.", "schema": { - "type": "string", - "format": "string", - "description": "The environment key" + "type": "boolean", + "description": "If set to true, and the authentication access token has the 'Admin' role, personal access tokens for all members will be retrieved." } }, { "name": "limit", "in": "query", - "description": "The number of elements to return per page", + "description": "The number of access tokens to return in the response. Defaults to 25.", "schema": { "type": "integer", "format": "int64", - "description": "The number of elements to return per page" + "description": "The number of access tokens to return in the response. Defaults to 25." } }, { - "name": "searchAfter", + "name": "offset", "in": "query", - "description": "Limits results to users with sort values after the value you specify. You can use this for pagination, but we recommend using the `next` link we provide instead.", + "description": "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`.", "schema": { - "type": "string", - "format": "string", - "description": "Limits results to users with sort values after the value you specify. You can use this for pagination, but we recommend using the `next` link we provide instead." + "type": "integer", + "format": "int64", + "description": "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`." } } ], - "operationId": "getUsers", - "deprecated": true - } - }, - "/api/v2/users/{projectKey}/{environmentKey}/{userKey}": { - "get": { + "operationId": "getTokens" + }, + "post": { "responses": { - "200": { - "description": "User response", + "201": { + "description": "Access token response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserRecord" + "$ref": "#/components/schemas/Token" } } } @@ -22899,16 +23368,6 @@ } } }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -22921,52 +23380,38 @@ } }, "tags": [ - "Users" + "Access tokens" ], - "summary": "Get user", - "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get context instances](/tag/Contexts#operation/getContextInstances) instead of this endpoint.\n\nGet a user by key. The `user` object contains all attributes sent in `variation` calls for that key.\n", - "parameters": [ - { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" + "summary": "Create access token", + "description": "Create a new access token.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccessTokenPost" + }, + "example": { + "role": "reader" + } } }, - { - "name": "userKey", - "in": "path", - "description": "The user key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The user key" - } - } - ], - "operationId": "getUser", - "deprecated": true - }, - "delete": { + "required": true + }, + "operationId": "postToken" + } + }, + "/api/v2/tokens/{id}": { + "get": { "responses": { - "204": { - "description": "Action succeeded" + "200": { + "description": "Access token response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Token" + } + } + } }, "401": { "description": "Invalid access token", @@ -22998,16 +23443,6 @@ } } }, - "409": { - "description": "Status conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StatusConflictErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -23020,58 +23455,33 @@ } }, "tags": [ - "Users" + "Access tokens" ], - "summary": "Delete user", - "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Delete context instances](/tag/Contexts#operation/deleteContextInstances) instead of this endpoint.\n\nDelete a user by key.\n", + "summary": "Get access token", + "description": "Get a single access token by ID.", "parameters": [ { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "userKey", + "name": "id", "in": "path", - "description": "The user key", + "description": "The ID of the access token", "required": true, "schema": { "type": "string", "format": "string", - "description": "The user key" + "description": "The ID of the access token" } } ], - "operationId": "deleteUser", - "deprecated": true - } - }, - "/api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags": { - "get": { + "operationId": "getToken" + }, + "patch": { "responses": { "200": { - "description": "User flag settings collection response", + "description": "Access token response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserFlagSettings" + "$ref": "#/components/schemas/Token" } } } @@ -23116,6 +23526,26 @@ } } }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, + "422": { + "description": "Invalid patch content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchFailedErrorRep" + } + } + } + }, "429": { "description": "Rate limited", "content": { @@ -23128,71 +23558,46 @@ } }, "tags": [ - "User settings" + "Access tokens" ], - "summary": "List flag settings for user", - "description": "Get the current flag settings for a given user.

The `_value` is the flag variation that the user receives. The `setting` indicates whether you've explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be `false`. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled and the `alternate.page` flag disabled, and that the user has not been explicitly targeted to receive a particular variation.", + "summary": "Patch access token", + "description": "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](/#section/Overview/Updates).", "parameters": [ { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "userKey", + "name": "id", "in": "path", - "description": "The user key", + "description": "The ID of the access token to update", "required": true, "schema": { "type": "string", "format": "string", - "description": "The user key" + "description": "The ID of the access token to update" } } ], - "operationId": "getUserFlagSettings", - "deprecated": true - } - }, - "/api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey}": { - "get": { - "responses": { - "200": { - "description": "User flag settings response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserFlagSetting" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONPatch" + }, + "example": [ + { + "op": "replace", + "path": "/role", + "value": "writer" } - } + ] } }, - "400": { - "description": "Invalid request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" - } - } - } + "required": true + }, + "operationId": "patchToken" + }, + "delete": { + "responses": { + "204": { + "description": "Action succeeded" }, "401": { "description": "Invalid access token", @@ -23236,70 +23641,35 @@ } }, "tags": [ - "User settings" + "Access tokens" ], - "summary": "Get flag setting for user", - "description": "Get a single flag setting for a user by flag key.

The `_value` is the flag variation that the user receives. The `setting` indicates whether you've explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be `false`. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled.", + "summary": "Delete access token", + "description": "Delete an access token by ID.", "parameters": [ { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The project key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "userKey", - "in": "path", - "description": "The user key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The user key" - } - }, - { - "name": "featureFlagKey", + "name": "id", "in": "path", - "description": "The feature flag key", + "description": "The ID of the access token to update", "required": true, "schema": { "type": "string", "format": "string", - "description": "The feature flag key" + "description": "The ID of the access token to update" } } ], - "operationId": "getUserFlagSetting", - "deprecated": true - }, - "put": { + "operationId": "deleteToken" + } + }, + "/api/v2/tokens/{id}/reset": { + "post": { "responses": { - "204": { - "description": "Action succeeded" - }, - "400": { - "description": "Invalid request", + "200": { + "description": "Access token response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvalidRequestErrorRep" + "$ref": "#/components/schemas/Token" } } } @@ -23346,79 +23716,55 @@ } }, "tags": [ - "User settings" + "Access tokens" ], - "summary": "Update flag settings for user", - "description": "Enable or disable a feature flag for a user based on their key.\n\nOmitting the `setting` attribute from the request body, or including a `setting` of `null`, erases the current setting for a user.\n\nIf you previously patched the flag, and the patch included the user's data, LaunchDarkly continues to use that data. If LaunchDarkly has never encountered the user's key before, it calculates the flag values based on the user key alone.\n", + "summary": "Reset access token", + "description": "Reset an access token's secret key with an optional expiry time for the old key.", "parameters": [ { - "name": "projectKey", + "name": "id", "in": "path", - "description": "The project key", + "description": "The ID of the access token to update", "required": true, "schema": { "type": "string", "format": "string", - "description": "The project key" - } - }, - { - "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The environment key" - } - }, - { - "name": "userKey", - "in": "path", - "description": "The user key", - "required": true, - "schema": { - "type": "string", - "format": "string", - "description": "The user key" + "description": "The ID of the access token to update" } }, { - "name": "featureFlagKey", - "in": "path", - "description": "The feature flag key", - "required": true, + "name": "expiry", + "in": "query", + "description": "An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately.", "schema": { - "type": "string", - "format": "string", - "description": "The feature flag key" + "type": "integer", + "format": "int64", + "description": "An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately." } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValuePut" - } - } - }, - "required": true - }, - "operationId": "putFlagSetting", - "deprecated": true + "operationId": "resetToken" } }, - "/api/v2/users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey}": { + "/api/v2/usage/data-export-events": { "get": { "responses": { "200": { - "description": "Expiring user target response", + "description": "Usage response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExpiringUserTargetGetResponse" + "$ref": "#/components/schemas/SeriesIntervalsRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -23443,78 +23789,86 @@ } } }, - "404": { - "description": "Invalid resource identifier", + "429": { + "description": "Rate limited", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/RateLimitedErrorRep" } } } }, - "429": { - "description": "Rate limited", + "503": { + "description": "Service unavailable", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/StatusServiceUnavailable" } } } } }, "tags": [ - "User settings" + "Account usage (beta)" ], - "summary": "Get expiring dates on flags for user", - "description": "Get a list of flags for which the given user is scheduled for removal.", + "summary": "Get data export events usage", + "description": "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.", "parameters": [ { - "name": "projectKey", - "in": "path", - "description": "The project key", - "required": true, + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", "schema": { "type": "string", "format": "string", - "description": "The project key" + "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month." } }, { - "name": "userKey", - "in": "path", - "description": "The user key", - "required": true, + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", "schema": { "type": "string", "format": "string", - "description": "The user key" + "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time." + } + }, + { + "name": "projectKey", + "in": "query", + "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project.", + "schema": { + "type": "string", + "format": "string", + "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project." } }, { "name": "environmentKey", - "in": "path", - "description": "The environment key", - "required": true, + "in": "query", + "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project.", "schema": { "type": "string", "format": "string", - "description": "The environment key" + "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project." } } ], - "operationId": "getExpiringFlagsForUser", - "deprecated": true - }, - "patch": { + "operationId": "getDataExportEventsUsage" + } + }, + "/api/v2/usage/evaluations/{projectKey}/{environmentKey}/{featureFlagKey}": { + "get": { "responses": { "200": { - "description": "Expiring user target response", + "description": "Usage response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExpiringUserTargetPatchResponse" + "$ref": "#/components/schemas/SeriesListRep" } } } @@ -23571,10 +23925,10 @@ } }, "tags": [ - "User settings" + "Account usage (beta)" ], - "summary": "Update expiring user target for flags", - "description": "Schedule the specified user for removal from individual targeting on one or more flags. The user must already be individually targeted for each flag.\n\nYou can add, update, or remove a scheduled removal date. You can only schedule a user for removal on a single variation per flag.\n\nUpdating 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring user targets.\n\n
\nClick to expand instructions for updating expiring user targets\n\n#### addExpireUserTargetDate\n\nAdds a date and time that LaunchDarkly will remove the user from the flag's individual targeting.\n\n##### Parameters\n\n* `flagKey`: The flag key\n* `variationId`: ID of a variation on the flag\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag.\n\n#### updateExpireUserTargetDate\n\nUpdates the date and time that LaunchDarkly will remove the user from the flag's individual targeting.\n\n##### Parameters\n\n* `flagKey`: The flag key\n* `variationId`: ID of a variation on the flag\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag.\n* `version`: 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.\n\n#### removeExpireUserTargetDate\n\nRemoves the scheduled removal of the user from the flag's individual targeting. The user will remain part of the flag's individual targeting until explicitly removed, or until another removal is scheduled.\n\n##### Parameters\n\n* `flagKey`: The flag key\n* `variationId`: ID of a variation on the flag\n\n
\n", + "summary": "Get evaluations usage", + "description": "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.", "parameters": [ { "name": "projectKey", @@ -23588,123 +23942,110 @@ } }, { - "name": "userKey", + "name": "environmentKey", "in": "path", - "description": "The user key", + "description": "The environment key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The user key" + "description": "The environment key" } }, { - "name": "environmentKey", + "name": "featureFlagKey", "in": "path", - "description": "The environment key", + "description": "The feature flag key", "required": true, "schema": { "type": "string", "format": "string", - "description": "The environment key" + "description": "The feature flag key" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/patchUsersRequest" - } + }, + { + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago." } }, - "required": true - }, - "operationId": "patchExpiringFlagsForUser", - "deprecated": true + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp. Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp. Defaults to the current time." + } + }, + { + "name": "tz", + "in": "query", + "description": "The timezone to use for breaks between days when returning daily data.", + "schema": { + "type": "string", + "format": "string", + "description": "The timezone to use for breaks between days when returning daily data." + } + } + ], + "operationId": "getEvaluationsUsage" } }, - "/api/v2/versions": { + "/api/v2/usage/events/{type}": { "get": { "responses": { "200": { - "description": "Versions information response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionsRep" - } - } - } - }, - "401": { - "description": "Invalid access token", + "description": "Usage response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/SeriesListRep" } } } }, - "403": { - "description": "Forbidden", + "400": { + "description": "Invalid request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } }, - "429": { - "description": "Rate limited", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" - } - } - } - } - }, - "tags": [ - "Other" - ], - "summary": "Get version information", - "description": "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.", - "operationId": "getVersions" - } - }, - "/api/v2/webhooks": { - "get": { - "responses": { - "200": { - "description": "Webhooks response", + "401": { + "description": "Invalid access token", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Webhooks" + "$ref": "#/components/schemas/UnauthorizedErrorRep" } } } }, - "401": { - "description": "Invalid access token", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnauthorizedErrorRep" + "$ref": "#/components/schemas/ForbiddenErrorRep" } } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Invalid resource identifier", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForbiddenErrorRep" + "$ref": "#/components/schemas/NotFoundErrorRep" } } } @@ -23721,20 +24062,55 @@ } }, "tags": [ - "Webhooks" + "Account usage (beta)" ], - "summary": "List webhooks", - "description": "Fetch a list of all webhooks.", - "operationId": "getAllWebhooks" - }, - "post": { + "summary": "Get events usage", + "description": "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.", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "The type of event to retrieve. Must be either `received` or `published`.", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The type of event to retrieve. Must be either `received` or `published`." + } + }, + { + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp. Defaults to 24 hours ago.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned starts from this timestamp. Defaults to 24 hours ago." + } + }, + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp. Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp. Defaults to the current time." + } + } + ], + "operationId": "getEventsUsage" + } + }, + "/api/v2/usage/experimentation-keys": { + "get": { "responses": { "200": { - "description": "Webhook response", + "description": "Usage response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "$ref": "#/components/schemas/SeriesIntervalsRep" } } } @@ -23778,55 +24154,87 @@ } } } + }, + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusServiceUnavailable" + } + } + } } }, "tags": [ - "Webhooks" + "Account usage (beta)" ], - "summary": "Creates a webhook", - "description": "Create a new webhook.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/webhookPost" - }, - "example": { - "name": "apidocs test webhook", - "on": true, - "sign": false, - "statements": [ - { - "actions": [ - "*" - ], - "effect": "allow", - "resources": [ - "proj/test" - ] - } - ], - "tags": [ - "example-tag" - ], - "url": "https://example.com" - } + "summary": "Get experimentation keys usage", + "description": "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.", + "parameters": [ + { + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month." } }, - "required": true - }, - "operationId": "postWebhook" + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time." + } + }, + { + "name": "projectKey", + "in": "query", + "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project.", + "schema": { + "type": "string", + "format": "string", + "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project." + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project.", + "schema": { + "type": "string", + "format": "string", + "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project." + } + } + ], + "operationId": "getExperimentationKeysUsage" } }, - "/api/v2/webhooks/{id}": { + "/api/v2/usage/experimentation-units": { "get": { "responses": { "200": { - "description": "Webhook response", + "description": "Usage response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "$ref": "#/components/schemas/SeriesIntervalsRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" } } } @@ -23851,55 +24259,86 @@ } } }, - "404": { - "description": "Invalid resource identifier", + "429": { + "description": "Rate limited", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" + "$ref": "#/components/schemas/RateLimitedErrorRep" } } } }, - "429": { - "description": "Rate limited", + "503": { + "description": "Service unavailable", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitedErrorRep" + "$ref": "#/components/schemas/StatusServiceUnavailable" } } } } }, "tags": [ - "Webhooks" + "Account usage (beta)" ], - "summary": "Get webhook", - "description": "Get a single webhook by ID.", + "summary": "Get experimentation units usage", + "description": "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.", "parameters": [ { - "name": "id", - "in": "path", - "description": "The ID of the webhook", - "required": true, + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", "schema": { "type": "string", "format": "string", - "description": "The ID of the webhook" + "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month." + } + }, + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time." + } + }, + { + "name": "projectKey", + "in": "query", + "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project.", + "schema": { + "type": "string", + "format": "string", + "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project." + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project.", + "schema": { + "type": "string", + "format": "string", + "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project." } } ], - "operationId": "getWebhook" - }, - "patch": { + "operationId": "getExperimentationUnitsUsage" + } + }, + "/api/v2/usage/mau": { + "get": { "responses": { "200": { - "description": "Webhook response", + "description": "Usage response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Webhook" + "$ref": "#/components/schemas/SeriesListRep" } } } @@ -23934,16 +24373,6 @@ } } }, - "404": { - "description": "Invalid resource identifier", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundErrorRep" - } - } - } - }, "429": { "description": "Rate limited", "content": { @@ -23956,46 +24385,117 @@ } }, "tags": [ - "Webhooks" + "Account usage (beta)" ], - "summary": "Update webhook", - "description": "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](/#section/Overview/Updates).", + "summary": "Get MAU usage", + "description": "Get a time-series array of the number of monthly active users (MAU) seen by LaunchDarkly from your account. The granularity is always daily.

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/account/metrics).", "parameters": [ { - "name": "id", - "in": "path", - "description": "The ID of the webhook to update", - "required": true, + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago.", "schema": { "type": "string", "format": "string", - "description": "The ID of the webhook to update" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JSONPatch" - }, - "example": [ - { - "op": "replace", - "path": "/on", - "value": false - } - ] + "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago." } }, - "required": true - }, - "operationId": "patchWebhook" - }, - "delete": { - "responses": { - "204": { - "description": "Action succeeded" + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp. Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp. Defaults to the current time." + } + }, + { + "name": "project", + "in": "query", + "description": "A project key to filter results to. Can be specified multiple times, one query parameter per project key, to view data for multiple projects.", + "schema": { + "type": "string", + "format": "string", + "description": "A project key to filter results to. Can be specified multiple times, one query parameter per project key, to view data for multiple projects." + } + }, + { + "name": "environment", + "in": "query", + "description": "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.", + "schema": { + "type": "string", + "format": "string", + "description": "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." + } + }, + { + "name": "sdktype", + "in": "query", + "description": "An SDK type to filter results to. Can be specified multiple times, one query parameter per SDK type. Valid values: client, server", + "schema": { + "type": "string", + "format": "string", + "description": "An SDK type to filter results to. Can be specified multiple times, one query parameter per SDK type. Valid values: client, server" + } + }, + { + "name": "sdk", + "in": "query", + "description": "An SDK name to filter results to. Can be specified multiple times, one query parameter per SDK.", + "schema": { + "type": "string", + "format": "string", + "description": "An SDK name to filter results to. Can be specified multiple times, one query parameter per SDK." + } + }, + { + "name": "anonymous", + "in": "query", + "description": "If specified, filters results to either anonymous or nonanonymous users.", + "schema": { + "type": "string", + "format": "string", + "description": "If specified, filters results to either anonymous or nonanonymous users." + } + }, + { + "name": "groupby", + "in": "query", + "description": "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", + "schema": { + "type": "string", + "format": "string", + "description": "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" + } + } + ], + "operationId": "getMauUsage" + } + }, + "/api/v2/usage/mau/bycategory": { + "get": { + "responses": { + "200": { + "description": "Usage response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SeriesListRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } }, "401": { "description": "Invalid access token", @@ -24039,310 +24539,9634 @@ } }, "tags": [ - "Webhooks" + "Account usage (beta)" ], - "summary": "Delete webhook", - "description": "Delete a webhook by ID.", + "summary": "Get MAU usage by category", + "description": "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`.

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/account/metrics).", "parameters": [ { - "name": "id", - "in": "path", - "description": "The ID of the webhook to delete", - "required": true, + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago.", "schema": { "type": "string", "format": "string", - "description": "The ID of the webhook to delete" + "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago." + } + }, + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp. Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp. Defaults to the current time." } } ], - "operationId": "deleteWebhook" + "operationId": "getMauUsageByCategory" } - } - }, - "components": { - "schemas": { - "Access": { - "type": "object", - "required": [ - "denied", - "allowed" - ], - "properties": { - "denied": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AccessDenied" + }, + "/api/v2/usage/mau/sdks": { + "get": { + "responses": { + "200": { + "description": "MAU SDKs response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SdkListRep" + } + } } }, - "allowed": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AccessAllowedRep" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } } - } - } - }, - "AccessAllowedReason": { - "type": "object", - "required": [ - "effect" - ], - "properties": { - "resources": { - "type": "array", - "description": "Resource specifier strings", - "items": { - "type": "string" - }, - "example": [ - "proj/*:env/*;qa_*:/flag/*" - ] }, - "notResources": { - "type": "array", - "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.", - "items": { - "type": "string" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } } }, - "actions": { - "type": "array", - "description": "Actions to perform on a resource", - "items": { - "$ref": "#/components/schemas/ActionSpecifier" - }, - "example": [ - "*" - ] - }, - "notActions": { - "type": "array", - "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", - "items": { - "$ref": "#/components/schemas/ActionSpecifier" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } } }, - "effect": { - "type": "string", - "description": "Whether this statement should allow or deny actions on the resources.", - "example": "allow", - "enum": [ - "allow", - "deny" - ] - }, - "role_name": { - "type": "string" + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } } - } - }, - "AccessAllowedRep": { - "type": "object", - "required": [ - "action", - "reason" + }, + "tags": [ + "Account usage (beta)" ], - "properties": { - "action": { - "$ref": "#/components/schemas/ActionIdentifier" + "summary": "Get MAU SDKs by type", + "description": "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.

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/account/metrics).", + "parameters": [ + { + "name": "from", + "in": "query", + "description": "The data returned starts from this timestamp. Defaults to seven days ago. The timestamp is in Unix milliseconds, for example, 1656694800000.", + "schema": { + "type": "string", + "format": "string", + "description": "The data returned starts from this timestamp. Defaults to seven days ago. The timestamp is in Unix milliseconds, for example, 1656694800000." + } }, - "reason": { - "$ref": "#/components/schemas/AccessAllowedReason" - } - } - }, - "AccessDenied": { - "type": "object", - "required": [ - "action", - "reason" - ], - "properties": { - "action": { - "$ref": "#/components/schemas/ActionIdentifier" + { + "name": "to", + "in": "query", + "description": "The data returned ends at this timestamp. Defaults to the current time. The timestamp is in Unix milliseconds, for example, 1657904400000.", + "schema": { + "type": "string", + "format": "string", + "description": "The data returned ends at this timestamp. Defaults to the current time. The timestamp is in Unix milliseconds, for example, 1657904400000." + } }, - "reason": { - "$ref": "#/components/schemas/AccessDeniedReason" + { + "name": "sdktype", + "in": "query", + "description": "The type of SDK with monthly active users (MAU) to list. Must be either `client` or `server`.", + "schema": { + "type": "string", + "format": "string", + "description": "The type of SDK with monthly active users (MAU) to list. Must be either `client` or `server`." + } } - } - }, - "AccessDeniedReason": { - "type": "object", - "required": [ - "effect" ], - "properties": { - "resources": { - "type": "array", - "description": "Resource specifier strings", - "items": { - "type": "string" - }, - "example": [ - "proj/*:env/*;qa_*:/flag/*" - ] + "operationId": "getMauSdksByType" + } + }, + "/api/v2/usage/service-connections": { + "get": { + "responses": { + "200": { + "description": "Usage response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SeriesIntervalsRep" + } + } + } }, - "notResources": { - "type": "array", - "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.", - "items": { - "type": "string" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } } }, - "actions": { - "type": "array", - "description": "Actions to perform on a resource", - "items": { - "$ref": "#/components/schemas/ActionSpecifier" - }, - "example": [ - "*" - ] + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "notActions": { - "type": "array", - "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", - "items": { - "$ref": "#/components/schemas/ActionSpecifier" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } } }, - "effect": { - "type": "string", - "description": "Whether this statement should allow or deny actions on the resources.", - "example": "allow", - "enum": [ - "allow", - "deny" - ] + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } }, - "role_name": { - "type": "string" + "503": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusServiceUnavailable" + } + } + } } - } - }, - "AccessTokenPost": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "A human-friendly name for the access token" + }, + "tags": [ + "Account usage (beta)" + ], + "summary": "Get service connection usage", + "description": "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.", + "parameters": [ + { + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month." + } }, - "description": { - "type": "string", - "description": "A description for the access token" + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time." + } }, - "role": { - "type": "string", - "description": "Built-in role for the token", - "enum": [ - "reader", - "writer", - "admin" - ] + { + "name": "projectKey", + "in": "query", + "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project.", + "schema": { + "type": "string", + "format": "string", + "description": "A project key. If specified, `environmentKey` is required and results apply to the corresponding environment in this project." + } }, - "customRoleIds": { - "type": "array", - "description": "A list of custom role IDs to use as access limits for the access token", - "items": { - "type": "string" + { + "name": "environmentKey", + "in": "query", + "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project.", + "schema": { + "type": "string", + "format": "string", + "description": "An environment key. If specified, `projectKey` is required and results apply to the corresponding environment in this project." + } + } + ], + "operationId": "getServiceConnectionUsage" + } + }, + "/api/v2/usage/streams/{source}": { + "get": { + "responses": { + "200": { + "description": "Usage response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SeriesListRep" + } + } } }, - "inlineRole": { - "type": "array", - "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.", - "items": { - "$ref": "#/components/schemas/StatementPost" + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } } }, - "serviceToken": { - "type": "boolean", - "description": "Whether the token is a service token https://docs.launchdarkly.com/home/account/api#service-tokens" + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } }, - "defaultApiVersion": { - "type": "integer", - "description": "The default API version for this token" - } - } - }, - "ActionIdentifier": { - "type": "string" - }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Account usage (beta)" + ], + "summary": "Get stream usage", + "description": "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.", + "parameters": [ + { + "name": "source", + "in": "path", + "description": "The source of streaming connections to describe. Must be either `client` or `server`.", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The source of streaming connections to describe. Must be either `client` or `server`." + } + }, + { + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned starts from this timestamp. Defaults to 30 days ago." + } + }, + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp. Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp. Defaults to the current time." + } + }, + { + "name": "tz", + "in": "query", + "description": "The timezone to use for breaks between days when returning daily data.", + "schema": { + "type": "string", + "format": "string", + "description": "The timezone to use for breaks between days when returning daily data." + } + } + ], + "operationId": "getStreamUsage" + } + }, + "/api/v2/usage/streams/{source}/bysdkversion": { + "get": { + "responses": { + "200": { + "description": "Usage response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SeriesListRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Account usage (beta)" + ], + "summary": "Get stream usage by SDK version", + "description": "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.", + "parameters": [ + { + "name": "source", + "in": "path", + "description": "The source of streaming connections to describe. Must be either `client` or `server`.", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The source of streaming connections to describe. Must be either `client` or `server`." + } + }, + { + "name": "from", + "in": "query", + "description": "The series of data returned starts from this timestamp. Defaults to 24 hours ago.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned starts from this timestamp. Defaults to 24 hours ago." + } + }, + { + "name": "to", + "in": "query", + "description": "The series of data returned ends at this timestamp. Defaults to the current time.", + "schema": { + "type": "string", + "format": "string", + "description": "The series of data returned ends at this timestamp. Defaults to the current time." + } + }, + { + "name": "tz", + "in": "query", + "description": "The timezone to use for breaks between days when returning daily data.", + "schema": { + "type": "string", + "format": "string", + "description": "The timezone to use for breaks between days when returning daily data." + } + }, + { + "name": "sdk", + "in": "query", + "description": "If included, this filters the returned series to only those that match this SDK name.", + "schema": { + "type": "string", + "format": "string", + "description": "If included, this filters the returned series to only those that match this SDK name." + } + }, + { + "name": "version", + "in": "query", + "description": "If included, this filters the returned series to only those that match this SDK version.", + "schema": { + "type": "string", + "format": "string", + "description": "If included, this filters the returned series to only those that match this SDK version." + } + } + ], + "operationId": "getStreamUsageBySdkVersion" + } + }, + "/api/v2/usage/streams/{source}/sdkversions": { + "get": { + "responses": { + "200": { + "description": "SDK Versions response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SdkVersionListRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Account usage (beta)" + ], + "summary": "Get stream usage SDK versions", + "description": "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.", + "parameters": [ + { + "name": "source", + "in": "path", + "description": "The source of streaming connections to describe. Must be either `client` or `server`.", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The source of streaming connections to describe. Must be either `client` or `server`." + } + } + ], + "operationId": "getStreamUsageSdkversion" + } + }, + "/api/v2/user-attributes/{projectKey}/{environmentKey}": { + "get": { + "responses": { + "200": { + "description": "User attribute names response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAttributeNamesRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + } + }, + "tags": [ + "Users (beta)" + ], + "summary": "Get user attribute names", + "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get context attribute names\n](/tag/Contexts#operation/getContextAttributeNames) instead of this endpoint.\n\nGet all in-use user attributes in the specified environment. The set of in-use attributes typically consists of all attributes seen within the past 30 days.\n", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + } + ], + "operationId": "getUserAttributeNames", + "deprecated": true + } + }, + "/api/v2/user-search/{projectKey}/{environmentKey}": { + "get": { + "responses": { + "200": { + "description": "Users collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Users" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Users" + ], + "summary": "Find users", + "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Search for context instances](/tag/Contexts#operation/searchContextInstances) instead of this endpoint.\n\nSearch users in LaunchDarkly based on their last active date, a user attribute filter set, or a search query.\n\nAn example user attribute filter set is `filter=firstName:Anna,activeTrial:false`. This matches users that have the user attribute `firstName` set to `Anna`, that also have the attribute `activeTrial` set to `false`.\n\nTo paginate through results, follow the `next` link in the `_links` object. To learn more, read [Representations](/#section/Representations).\n", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "q", + "in": "query", + "description": "Full-text search for users based on name, first name, last name, e-mail address, or key", + "schema": { + "type": "string", + "format": "string", + "description": "Full-text search for users based on name, first name, last name, e-mail address, or key" + } + }, + { + "name": "limit", + "in": "query", + "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", + "schema": { + "type": "integer", + "format": "int64", + "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)" + } + }, + { + "name": "offset", + "in": "query", + "description": "Deprecated, use `searchAfter` instead. Specifies the first item to return in the collection.", + "deprecated": true, + "schema": { + "type": "integer", + "format": "int64", + "description": "Deprecated, use `searchAfter` instead. Specifies the first item to return in the collection." + } + }, + { + "name": "after", + "in": "query", + "description": "A Unix epoch time in milliseconds specifying the maximum last time a user requested a feature flag from LaunchDarkly", + "schema": { + "type": "integer", + "format": "int64", + "description": "A Unix epoch time in milliseconds specifying the maximum last time a user requested a feature flag from LaunchDarkly" + } + }, + { + "name": "sort", + "in": "query", + "description": "Specifies a field by which to sort. LaunchDarkly supports the `userKey` and `lastSeen` fields. Fields prefixed by a dash ( - ) sort in descending order.", + "schema": { + "type": "string", + "format": "string", + "description": "Specifies a field by which to sort. LaunchDarkly supports the `userKey` and `lastSeen` fields. Fields prefixed by a dash ( - ) sort in descending order." + } + }, + { + "name": "searchAfter", + "in": "query", + "description": "Limits results to users with sort values after the value you specify. You can use this for pagination, but we recommend using the `next` link we provide instead.", + "schema": { + "type": "string", + "format": "string", + "description": "Limits results to users with sort values after the value you specify. You can use this for pagination, but we recommend using the `next` link we provide instead." + } + }, + { + "name": "filter", + "in": "query", + "description": "A comma-separated list of user attribute filters. Each filter is in the form of attributeKey:attributeValue", + "schema": { + "type": "string", + "format": "string", + "description": "A comma-separated list of user attribute filters. Each filter is in the form of attributeKey:attributeValue" + } + } + ], + "operationId": "getSearchUsers", + "deprecated": true + } + }, + "/api/v2/users/{projectKey}/{environmentKey}": { + "get": { + "responses": { + "200": { + "description": "Users collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsersRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Users" + ], + "summary": "List users", + "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Search for contexts](/tag/Contexts#operation/searchContexts) instead of this endpoint.\n\nList all users in the environment. Includes the total count of users. This is useful for exporting all users in the system for further analysis.\n\nEach page displays users up to a set `limit`. The default is 20. To page through, follow the `next` link in the `_links` object. To learn more, read [Representations](/#section/Representations).\n", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "limit", + "in": "query", + "description": "The number of elements to return per page", + "schema": { + "type": "integer", + "format": "int64", + "description": "The number of elements to return per page" + } + }, + { + "name": "searchAfter", + "in": "query", + "description": "Limits results to users with sort values after the value you specify. You can use this for pagination, but we recommend using the `next` link we provide instead.", + "schema": { + "type": "string", + "format": "string", + "description": "Limits results to users with sort values after the value you specify. You can use this for pagination, but we recommend using the `next` link we provide instead." + } + } + ], + "operationId": "getUsers", + "deprecated": true + } + }, + "/api/v2/users/{projectKey}/{environmentKey}/{userKey}": { + "get": { + "responses": { + "200": { + "description": "User response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRecord" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Users" + ], + "summary": "Get user", + "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get context instances](/tag/Contexts#operation/getContextInstances) instead of this endpoint.\n\nGet a user by key. The `user` object contains all attributes sent in `variation` calls for that key.\n", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "userKey", + "in": "path", + "description": "The user key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The user key" + } + } + ], + "operationId": "getUser", + "deprecated": true + }, + "delete": { + "responses": { + "204": { + "description": "Action succeeded" + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Users" + ], + "summary": "Delete user", + "description": "> ### Use contexts instead\n>\n> After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Delete context instances](/tag/Contexts#operation/deleteContextInstances) instead of this endpoint.\n\nDelete a user by key.\n", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "userKey", + "in": "path", + "description": "The user key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The user key" + } + } + ], + "operationId": "deleteUser", + "deprecated": true + } + }, + "/api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags": { + "get": { + "responses": { + "200": { + "description": "User flag settings collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserFlagSettings" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "User settings" + ], + "summary": "List flag settings for user", + "description": "Get the current flag settings for a given user.

The `_value` is the flag variation that the user receives. The `setting` indicates whether you've explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be `false`. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled and the `alternate.page` flag disabled, and that the user has not been explicitly targeted to receive a particular variation.", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "userKey", + "in": "path", + "description": "The user key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The user key" + } + } + ], + "operationId": "getUserFlagSettings", + "deprecated": true + } + }, + "/api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey}": { + "get": { + "responses": { + "200": { + "description": "User flag settings response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserFlagSetting" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "User settings" + ], + "summary": "Get flag setting for user", + "description": "Get a single flag setting for a user by flag key.

The `_value` is the flag variation that the user receives. The `setting` indicates whether you've explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be `false`. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled.", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "userKey", + "in": "path", + "description": "The user key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The user key" + } + }, + { + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The feature flag key" + } + } + ], + "operationId": "getUserFlagSetting", + "deprecated": true + }, + "put": { + "responses": { + "204": { + "description": "Action succeeded" + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "User settings" + ], + "summary": "Update flag settings for user", + "description": "Enable or disable a feature flag for a user based on their key.\n\nOmitting the `setting` attribute from the request body, or including a `setting` of `null`, erases the current setting for a user.\n\nIf you previously patched the flag, and the patch included the user's data, LaunchDarkly continues to use that data. If LaunchDarkly has never encountered the user's key before, it calculates the flag values based on the user key alone.\n", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "userKey", + "in": "path", + "description": "The user key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The user key" + } + }, + { + "name": "featureFlagKey", + "in": "path", + "description": "The feature flag key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The feature flag key" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValuePut" + } + } + }, + "required": true + }, + "operationId": "putFlagSetting", + "deprecated": true + } + }, + "/api/v2/users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey}": { + "get": { + "responses": { + "200": { + "description": "Expiring user target response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExpiringUserTargetGetResponse" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "User settings" + ], + "summary": "Get expiring dates on flags for user", + "description": "Get a list of flags for which the given user is scheduled for removal.", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "userKey", + "in": "path", + "description": "The user key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The user key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + } + ], + "operationId": "getExpiringFlagsForUser", + "deprecated": true + }, + "patch": { + "responses": { + "200": { + "description": "Expiring user target response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExpiringUserTargetPatchResponse" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "User settings" + ], + "summary": "Update expiring user target for flags", + "description": "Schedule the specified user for removal from individual targeting on one or more flags. The user must already be individually targeted for each flag.\n\nYou can add, update, or remove a scheduled removal date. You can only schedule a user for removal on a single variation per flag.\n\nUpdating 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](/reference#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating expiring user targets.\n\n
\nClick to expand instructions for updating expiring user targets\n\n#### addExpireUserTargetDate\n\nAdds a date and time that LaunchDarkly will remove the user from the flag's individual targeting.\n\n##### Parameters\n\n* `flagKey`: The flag key\n* `variationId`: ID of a variation on the flag\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag.\n\n#### updateExpireUserTargetDate\n\nUpdates the date and time that LaunchDarkly will remove the user from the flag's individual targeting.\n\n##### Parameters\n\n* `flagKey`: The flag key\n* `variationId`: ID of a variation on the flag\n* `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag.\n* `version`: 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.\n\n#### removeExpireUserTargetDate\n\nRemoves the scheduled removal of the user from the flag's individual targeting. The user will remain part of the flag's individual targeting until explicitly removed, or until another removal is scheduled.\n\n##### Parameters\n\n* `flagKey`: The flag key\n* `variationId`: ID of a variation on the flag\n\n
\n", + "parameters": [ + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "userKey", + "in": "path", + "description": "The user key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The user key" + } + }, + { + "name": "environmentKey", + "in": "path", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/patchUsersRequest" + } + } + }, + "required": true + }, + "operationId": "patchExpiringFlagsForUser", + "deprecated": true + } + }, + "/api/v2/versions": { + "get": { + "responses": { + "200": { + "description": "Versions information response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionsRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Other" + ], + "summary": "Get version information", + "description": "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.", + "operationId": "getVersions" + } + }, + "/api/v2/webhooks": { + "get": { + "responses": { + "200": { + "description": "Webhooks response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Webhooks" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Webhooks" + ], + "summary": "List webhooks", + "description": "Fetch a list of all webhooks.", + "operationId": "getAllWebhooks" + }, + "post": { + "responses": { + "200": { + "description": "Webhook response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Webhooks" + ], + "summary": "Creates a webhook", + "description": "Create a new webhook.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhookPost" + }, + "example": { + "name": "apidocs test webhook", + "on": true, + "sign": false, + "statements": [ + { + "actions": [ + "*" + ], + "effect": "allow", + "resources": [ + "proj/test" + ] + } + ], + "tags": [ + "example-tag" + ], + "url": "https://example.com" + } + } + }, + "required": true + }, + "operationId": "postWebhook" + } + }, + "/api/v2/webhooks/{id}": { + "get": { + "responses": { + "200": { + "description": "Webhook response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Webhooks" + ], + "summary": "Get webhook", + "description": "Get a single webhook by ID.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The ID of the webhook", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The ID of the webhook" + } + } + ], + "operationId": "getWebhook" + }, + "patch": { + "responses": { + "200": { + "description": "Webhook response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Webhook" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvalidRequestErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Webhooks" + ], + "summary": "Update webhook", + "description": "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](/#section/Overview/Updates).", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The ID of the webhook to update", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The ID of the webhook to update" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONPatch" + }, + "example": [ + { + "op": "replace", + "path": "/on", + "value": false + } + ] + } + }, + "required": true + }, + "operationId": "patchWebhook" + }, + "delete": { + "responses": { + "204": { + "description": "Action succeeded" + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Webhooks" + ], + "summary": "Delete webhook", + "description": "Delete a webhook by ID.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The ID of the webhook to delete", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The ID of the webhook to delete" + } + } + ], + "operationId": "deleteWebhook" + } + }, + "/api/v2/tags": { + "get": { + "description": "Get a list of tags.", + "operationId": "getTags", + "parameters": [ + { + "description": "Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`. Returns all types by default.", + "explode": true, + "in": "query", + "name": "kind", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + }, + "style": "form" + }, + { + "description": "Return tags with the specified prefix", + "explode": true, + "in": "query", + "name": "pre", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "Whether or not to return archived flags", + "explode": true, + "in": "query", + "name": "archived", + "required": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "description": "The number of tags to return. Maximum is 1000.", + "explode": true, + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The index of the first tag to return. Default is 0.", + "explode": true, + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The time to retrieve tags as of. Default is the current time.", + "explode": true, + "in": "query", + "name": "asOf", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TagsCollection" + } + } + }, + "description": "Tag collection response" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Invalid access token" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Rate Limited" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "List tags", + "tags": [ + "Tags" + ] + } + }, + "/api/v2/projects/{projectKey}/ai-configs": { + "get": { + "description": "Get a list of all AI configs in the given project.", + "operationId": "getAIConfigs", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "example": "default", + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "A sort to apply to the list of AI configs.", + "explode": true, + "in": "query", + "name": "sort", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "description": "The number of AI configs to return.", + "explode": true, + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", + "explode": true, + "in": "query", + "name": "offset", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A filter to apply to the list of AI configs.", + "explode": true, + "in": "query", + "name": "filter", + "required": false, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AIConfigs" + } + } + }, + "description": "Successful response" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "List AI configs", + "tags": [ + "AI configs (beta)" + ] + }, + "post": { + "description": "Create a new AI config within the given project.", + "operationId": "postAIConfig", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AIConfigPost" + } + } + }, + "description": "AI config object to create", + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AIConfig" + } + } + }, + "description": "AI config created" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Create new AI config", + "tags": [ + "AI configs (beta)" + ] + } + }, + "/api/v2/projects/{projectKey}/ai-configs/{configKey}": { + "delete": { + "description": "Delete an existing AI config.", + "operationId": "deleteAIConfig", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "example": "default", + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "configKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "No content" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Delete AI config", + "tags": [ + "AI configs (beta)" + ] + }, + "get": { + "description": "Retrieve a specific AI config by its key.", + "operationId": "getAIConfig", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "configKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AIConfig" + } + } + }, + "description": "AI config found" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Get AI config", + "tags": [ + "AI configs (beta)" + ] + }, + "patch": { + "description": "Edit an existing AI config.\n\nThe request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.\n\nHere's an example:\n ```\n {\n \"description\": \"Example updated description\",\n \"tags\": [\"new-tag\"]\n }\n ```\n", + "operationId": "patchAIConfig", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "configKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AIConfigPatch" + } + } + }, + "description": "AI config object to update" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AIConfig" + } + } + }, + "description": "AI config updated" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Update AI config", + "tags": [ + "AI configs (beta)" + ] + } + }, + "/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations": { + "post": { + "description": "Create a new variation for a given AI config.\n\nThe model in the request body requires a modelName and parameters, for example:\n\n```\n \"model\": {\n \"modelName\": \"claude-3-opus-20240229\",\n \"parameters\": {\n \"max_tokens\": 1024\n }\n }\n```\n", + "operationId": "postAIConfigVariation", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "configKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AIConfigVariationPost" + } + } + }, + "description": "AI config variation object to create", + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AIConfigVariation" + } + } + }, + "description": "AI config variation created" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Create AI config variation", + "tags": [ + "AI configs (beta)" + ] + } + }, + "/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}": { + "delete": { + "description": "Delete a specific variation of an AI config by config key and variation key.", + "operationId": "deleteAIConfigVariation", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "configKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "variationKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "No content" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Delete AI config variation", + "tags": [ + "AI configs (beta)" + ] + }, + "get": { + "description": "Get an AI config variation by key. The response includes all variation versions for the given variation key.", + "operationId": "getAIConfigVariation", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "example": "default", + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "example": "default", + "explode": false, + "in": "path", + "name": "configKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "example": "default", + "explode": false, + "in": "path", + "name": "variationKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AIConfigVariationsResponse" + } + } + }, + "description": "Successful response" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Get AI config variation", + "tags": [ + "AI configs (beta)" + ] + }, + "patch": { + "description": "Edit an existing variation of an AI config. This creates a new version of the variation.\n\nThe request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.\n\nHere's an example:\n```\n {\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"The new message\"\n }\n ]\n }\n```\n", + "operationId": "patchAIConfigVariation", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "configKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "variationKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AIConfigVariationPatch" + } + } + }, + "description": "AI config variation object to update" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AIConfigVariation" + } + } + }, + "description": "AI config variation updated" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Update AI config variation", + "tags": [ + "AI configs (beta)" + ] + } + }, + "/api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics": { + "get": { + "description": "Retrieve usage metrics for an AI config by config key.", + "operationId": "getAIConfigMetrics", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "configKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "The starting time, as milliseconds since epoch (inclusive).", + "explode": true, + "in": "query", + "name": "from", + "required": true, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`.", + "explode": true, + "in": "query", + "name": "to", + "required": true, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "An environment key. Only metrics from this environment will be included.", + "explode": true, + "in": "query", + "name": "env", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Metrics" + } + } + }, + "description": "Metrics computed" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Get AI config metrics", + "tags": [ + "AI configs (beta)" + ] + } + }, + "/api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics-by-variation": { + "get": { + "description": "Retrieve usage metrics for an AI config by config key, with results split by variation.", + "operationId": "getAIConfigMetricsByVariation", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "configKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "The starting time, as milliseconds since epoch (inclusive).", + "explode": true, + "in": "query", + "name": "from", + "required": true, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`.", + "explode": true, + "in": "query", + "name": "to", + "required": true, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "An environment key. Only metrics from this environment will be included.", + "explode": true, + "in": "query", + "name": "env", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetricsByVariation" + } + } + }, + "description": "Metrics computed" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Get AI config metrics by variation", + "tags": [ + "AI configs (beta)" + ] + } + }, + "/api/v2/projects/{projectKey}/ai-configs/model-configs": { + "get": { + "description": "Get all AI model configs for a project.", + "operationId": "listModelConfigs", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "example": "default", + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ModelConfig" + }, + "type": "array" + } + } + }, + "description": "Successful response" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "List AI model configs", + "tags": [ + "AI configs (beta)" + ] + }, + "post": { + "description": "Create an AI model config. You can use this in any variation for any AI config in your project.", + "operationId": "postModelConfig", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "example": "default", + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelConfigPost" + } + } + }, + "description": "AI model config object to create", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelConfig" + } + } + }, + "description": "Successful response" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Create an AI model config", + "tags": [ + "AI configs (beta)" + ] + } + }, + "/api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey}": { + "delete": { + "description": "Delete an AI model config.", + "operationId": "deleteModelConfig", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "example": "default", + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "explode": false, + "in": "path", + "name": "modelConfigKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "No content" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Delete an AI model config", + "tags": [ + "AI configs (beta)" + ] + }, + "get": { + "description": "Get an AI model config by key.", + "operationId": "getModelConfig", + "parameters": [ + { + "description": "Version of the endpoint.", + "explode": false, + "in": "header", + "name": "LD-API-Version", + "required": true, + "schema": { + "enum": [ + "beta" + ], + "type": "string" + }, + "style": "simple" + }, + { + "example": "default", + "explode": false, + "in": "path", + "name": "projectKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "example": "default", + "explode": false, + "in": "path", + "name": "modelConfigKey", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelConfig" + } + } + }, + "description": "Successful response" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Bad request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Not found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Internal server error" + } + }, + "summary": "Get AI model config", + "tags": [ + "AI configs (beta)" + ] + } + }, + "/api/v2/engineering-insights/charts/deployments/frequency": { + "get": { + "responses": { + "200": { + "description": "Chart response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightsChart" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights charts (beta)" + ], + "summary": "Get deployment frequency chart data", + "description": "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).\n\n### Expanding the chart response\n\nLaunchDarkly supports expanding the chart response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `metrics` includes details on the metrics related to deployment frequency\n\nFor example, use `?expand=metrics` to include the `metrics` field in the response. By default, this field is **not** included in the response.\n", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "The project key", + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "The environment key", + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "applicationKey", + "in": "query", + "description": "Comma separated list of application keys", + "schema": { + "type": "string", + "format": "string", + "description": "Comma separated list of application keys" + } + }, + { + "name": "from", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is 7 days ago.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "to", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is now.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "bucketType", + "in": "query", + "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`." + } + }, + { + "name": "bucketMs", + "in": "query", + "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).", + "schema": { + "type": "integer", + "format": "int64", + "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds)." + } + }, + { + "name": "groupBy", + "in": "query", + "description": "Options: `application`, `kind`", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `application`, `kind`" + } + }, + { + "name": "expand", + "in": "query", + "description": "Options: `metrics`", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `metrics`" + } + } + ], + "operationId": "getDeploymentFrequencyChart" + } + }, + "/api/v2/engineering-insights/charts/flags/stale": { + "get": { + "responses": { + "200": { + "description": "Chart response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightsChart" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights charts (beta)" + ], + "summary": "Get stale flags chart data", + "description": "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).\n\n### Expanding the chart response\n\nLaunchDarkly supports expanding the chart response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `metrics` includes details on the metrics related to stale flags\n\nFor example, use `?expand=metrics` to include the `metrics` field in the response. By default, this field is **not** included in the response.\n", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "applicationKey", + "in": "query", + "description": "Comma separated list of application keys", + "schema": { + "type": "string", + "format": "string", + "description": "Comma separated list of application keys" + } + }, + { + "name": "groupBy", + "in": "query", + "description": "Property to group results by. Options: `maintainer`", + "schema": { + "type": "string", + "format": "string", + "description": "Property to group results by. Options: `maintainer`" + } + }, + { + "name": "maintainerId", + "in": "query", + "description": "Comma-separated list of individual maintainers to filter results.", + "schema": { + "type": "string", + "format": "string", + "description": "Comma-separated list of individual maintainers to filter results." + } + }, + { + "name": "maintainerTeamKey", + "in": "query", + "description": "Comma-separated list of team maintainer keys to filter results.", + "schema": { + "type": "string", + "format": "string", + "description": "Comma-separated list of team maintainer keys to filter results." + } + }, + { + "name": "expand", + "in": "query", + "description": "Options: `metrics`", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `metrics`" + } + } + ], + "operationId": "getStaleFlagsChart" + } + }, + "/api/v2/engineering-insights/charts/flags/status": { + "get": { + "responses": { + "200": { + "description": "Chart response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightsChart" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights charts (beta)" + ], + "summary": "Get flag status chart data", + "description": "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).", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "applicationKey", + "in": "query", + "description": "Comma separated list of application keys", + "schema": { + "type": "string", + "format": "string", + "description": "Comma separated list of application keys" + } + } + ], + "operationId": "getFlagStatusChart" + } + }, + "/api/v2/engineering-insights/charts/lead-time": { + "get": { + "responses": { + "200": { + "description": "Chart response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightsChart" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights charts (beta)" + ], + "summary": "Get lead time chart data", + "description": "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).", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "The environment key", + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "applicationKey", + "in": "query", + "description": "Comma separated list of application keys", + "schema": { + "type": "string", + "format": "string", + "description": "Comma separated list of application keys" + } + }, + { + "name": "from", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is 7 days ago.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds. Default value is 7 days ago." + } + }, + { + "name": "to", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is now.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds. Default value is now." + } + }, + { + "name": "bucketType", + "in": "query", + "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`." + } + }, + { + "name": "bucketMs", + "in": "query", + "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).", + "schema": { + "type": "integer", + "format": "int64", + "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds)." + } + }, + { + "name": "groupBy", + "in": "query", + "description": "Options: `application`, `stage`. Default: `stage`.", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `application`, `stage`. Default: `stage`." + } + }, + { + "name": "expand", + "in": "query", + "description": "Options: `metrics`, `percentiles`.", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `metrics`, `percentiles`." + } + } + ], + "operationId": "getLeadTimeChart" + } + }, + "/api/v2/engineering-insights/charts/releases/frequency": { + "get": { + "responses": { + "200": { + "description": "Chart response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightsChart" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights charts (beta)" + ], + "summary": "Get release frequency chart data", + "description": "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).", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "applicationKey", + "in": "query", + "description": "Comma separated list of application keys", + "schema": { + "type": "string", + "format": "string", + "description": "Comma separated list of application keys" + } + }, + { + "name": "hasExperiments", + "in": "query", + "description": "Filter events to those associated with an experiment (`true`) or without an experiment (`false`)", + "schema": { + "type": "boolean", + "format": "boolean", + "description": "Filter events to those associated with an experiment (`true`) or without an experiment (`false`)" + } + }, + { + "name": "global", + "in": "query", + "description": "Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`", + "schema": { + "type": "string", + "format": "string", + "description": "Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`" + } + }, + { + "name": "groupBy", + "in": "query", + "description": "Property to group results by. Options: `impact`", + "schema": { + "type": "string", + "format": "string", + "description": "Property to group results by. Options: `impact`" + } + }, + { + "name": "from", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is 7 days ago.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "to", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is now.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "bucketType", + "in": "query", + "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.", + "schema": { + "type": "string", + "format": "string", + "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`." + } + }, + { + "name": "bucketMs", + "in": "query", + "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).", + "schema": { + "type": "integer", + "format": "int64", + "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds)." + } + }, + { + "name": "expand", + "in": "query", + "description": "Options: `metrics`", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `metrics`" + } + } + ], + "operationId": "getReleaseFrequencyChart" + } + }, + "/api/v2/engineering-insights/deployment-events": { + "post": { + "responses": { + "201": { + "description": "Created" + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights deployments (beta)" + ], + "summary": "Create deployment event", + "description": "Create deployment event", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostDeploymentEventInput" + } + } + }, + "required": true + }, + "operationId": "createDeploymentEvent" + } + }, + "/api/v2/engineering-insights/deployments": { + "get": { + "responses": { + "200": { + "description": "Deployment collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentCollectionRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights deployments (beta)" + ], + "summary": "List deployments", + "description": "Get a list of deployments\n\n### Expanding the deployment collection response\n\nLaunchDarkly supports expanding the deployment collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `pullRequests` includes details on all of the pull requests associated with each deployment\n* `flagReferences` includes details on all of the references to flags in each deployment\n\nFor example, use `?expand=pullRequests` to include the `pullRequests` field in the response. By default, this field is **not** included in the response.\n", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "applicationKey", + "in": "query", + "description": "Comma separated list of application keys", + "schema": { + "type": "string", + "format": "string", + "description": "Comma separated list of application keys" + } + }, + { + "name": "limit", + "in": "query", + "description": "The number of deployments to return. Default is 20. Maximum allowed is 100.", + "schema": { + "type": "integer", + "format": "int64", + "description": "The number of deployments to return. Default is 20. Maximum allowed is 100." + } + }, + { + "name": "expand", + "in": "query", + "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`", + "schema": { + "type": "string", + "format": "string", + "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`" + } + }, + { + "name": "from", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is 7 days ago.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds. Default value is 7 days ago." + } + }, + { + "name": "to", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is now.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds. Default value is now." + } + }, + { + "name": "after", + "in": "query", + "description": "Identifier used for pagination", + "schema": { + "type": "string", + "format": "string", + "description": "Identifier used for pagination" + } + }, + { + "name": "before", + "in": "query", + "description": "Identifier used for pagination", + "schema": { + "type": "string", + "format": "string", + "description": "Identifier used for pagination" + } + }, + { + "name": "kind", + "in": "query", + "description": "The deployment kind", + "schema": { + "type": "string", + "format": "string", + "description": "The deployment kind" + } + }, + { + "name": "status", + "in": "query", + "description": "The deployment status", + "schema": { + "type": "string", + "format": "string", + "description": "The deployment status" + } + } + ], + "operationId": "getDeployments" + } + }, + "/api/v2/engineering-insights/deployments/{deploymentID}": { + "get": { + "responses": { + "200": { + "description": "Deployment response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights deployments (beta)" + ], + "summary": "Get deployment", + "description": "Get a deployment by ID.\n\nThe deployment ID is returned as part of the [List deployments](#operation/getDeployments) response. It is the `id` field of each element in the `items` array.\n\n### Expanding the deployment response\n\nLaunchDarkly supports expanding the deployment response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `pullRequests` includes details on all of the pull requests associated with each deployment\n* `flagReferences` includes details on all of the references to flags in each deployment\n\nFor example, use `?expand=pullRequests` to include the `pullRequests` field in the response. By default, this field is **not** included in the response.\n", + "parameters": [ + { + "name": "deploymentID", + "in": "path", + "description": "The deployment ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The deployment ID" + } + }, + { + "name": "expand", + "in": "query", + "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`", + "schema": { + "type": "string", + "format": "string", + "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`" + } + } + ], + "operationId": "getDeployment" + }, + "patch": { + "responses": { + "200": { + "description": "Deployment response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights deployments (beta)" + ], + "summary": "Update deployment", + "description": "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](/#section/Overview/Updates).

The deployment ID is returned as part of the [List deployments](#operation/getDeployments) response. It is the `id` field of each element in the `items` array.", + "parameters": [ + { + "name": "deploymentID", + "in": "path", + "description": "The deployment ID", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The deployment ID" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONPatch" + }, + "example": [ + { + "op": "replace", + "path": "/status", + "value": "finished" + } + ] + } + }, + "required": true + }, + "operationId": "updateDeployment" + } + }, + "/api/v2/engineering-insights/flag-events": { + "get": { + "responses": { + "200": { + "description": "Flag event collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlagEventCollectionRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights flag events (beta)" + ], + "summary": "List flag events", + "description": "Get a list of flag events\n\n### Expanding the flag event collection response\n\nLaunchDarkly supports expanding the flag event collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `experiments` includes details on all of the experiments run on each flag\n\nFor example, use `?expand=experiments` to include the `experiments` field in the response. By default, this field is **not** included in the response.\n", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "applicationKey", + "in": "query", + "description": "Comma separated list of application keys", + "schema": { + "type": "string", + "format": "string", + "description": "Comma separated list of application keys" + } + }, + { + "name": "query", + "in": "query", + "description": "Filter events by flag key", + "schema": { + "type": "string", + "format": "string", + "description": "Filter events by flag key" + } + }, + { + "name": "impactSize", + "in": "query", + "description": "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`", + "schema": { + "type": "string", + "format": "string", + "description": "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`" + } + }, + { + "name": "hasExperiments", + "in": "query", + "description": "Filter events to those associated with an experiment (`true`) or without an experiment (`false`)", + "schema": { + "type": "boolean", + "format": "boolean", + "description": "Filter events to those associated with an experiment (`true`) or without an experiment (`false`)" + } + }, + { + "name": "global", + "in": "query", + "description": "Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`", + "schema": { + "type": "string", + "format": "string", + "description": "Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`" + } + }, + { + "name": "expand", + "in": "query", + "description": "Expand properties in response. Options: `experiments`", + "schema": { + "type": "string", + "format": "string", + "description": "Expand properties in response. Options: `experiments`" + } + }, + { + "name": "limit", + "in": "query", + "description": "The number of deployments to return. Default is 20. Maximum allowed is 100.", + "schema": { + "type": "integer", + "format": "int64", + "description": "The number of deployments to return. Default is 20. Maximum allowed is 100." + } + }, + { + "name": "from", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is 7 days ago.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds. Default value is 7 days ago." + } + }, + { + "name": "to", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is now.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp in milliseconds. Default value is now." + } + }, + { + "name": "after", + "in": "query", + "description": "Identifier used for pagination", + "schema": { + "type": "string", + "format": "string", + "description": "Identifier used for pagination" + } + }, + { + "name": "before", + "in": "query", + "description": "Identifier used for pagination", + "schema": { + "type": "string", + "format": "string", + "description": "Identifier used for pagination" + } + } + ], + "operationId": "getFlagEvents" + } + }, + "/api/v2/engineering-insights/insights/group": { + "post": { + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightGroup" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "409": { + "description": "Status conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusConflictErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights scores (beta)" + ], + "summary": "Create insight group", + "description": "Create insight group", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostInsightGroupParams" + } + } + }, + "required": true + }, + "operationId": "createInsightGroup" + } + }, + "/api/v2/engineering-insights/insights/groups": { + "get": { + "responses": { + "200": { + "description": "Insight groups collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightGroupCollection" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights scores (beta)" + ], + "summary": "List insight groups", + "description": "List groups for which you are collecting insights\n\n### Expanding the insight groups collection response\n\nLaunchDarkly supports expanding the insight groups collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `scores` includes details on all of the scores used in the engineering insights metrics views for each group\n* `environment` includes details on each environment associated with each group\n* `metadata` includes counts of the number of insight groups with particular indicators, such as \"execellent,\" \"good,\" \"fair,\" and so on.\n\nFor example, use `?expand=scores` to include the `scores` field in the response. By default, this field is **not** included in the response.\n", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "The number of insight groups to return. Default is 20. Must be between 1 and 20 inclusive.", + "schema": { + "type": "integer", + "format": "int64", + "description": "The number of insight groups to return. Default is 20. Must be between 1 and 20 inclusive." + } + }, + { + "name": "offset", + "in": "query", + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.", + "schema": { + "type": "integer", + "format": "int64", + "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`." + } + }, + { + "name": "sort", + "in": "query", + "description": "Sort flag list by field. Prefix field with - to sort in descending order. Allowed fields: name", + "schema": { + "type": "string", + "format": "string", + "description": "Sort flag list by field. Prefix field with - to sort in descending order. Allowed fields: name" + } + }, + { + "name": "query", + "in": "query", + "description": "Filter list of insights groups by name.", + "schema": { + "type": "string", + "format": "string", + "description": "Filter list of insights groups by name." + } + }, + { + "name": "expand", + "in": "query", + "description": "Options: `scores`, `environment`, `metadata`", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `scores`, `environment`, `metadata`" + } + } + ], + "operationId": "getInsightGroups" + } + }, + "/api/v2/engineering-insights/insights/groups/{insightGroupKey}": { + "get": { + "responses": { + "200": { + "description": "Insight group response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightGroup" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights scores (beta)" + ], + "summary": "Get insight group", + "description": "Get insight group\n\n### Expanding the insight group response\n\nLaunchDarkly supports expanding the insight group response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `scores` includes details on all of the scores used in the engineering insights metrics views for this group\n* `environment` includes details on each environment associated with this group\n\nFor example, use `?expand=scores` to include the `scores` field in the response. By default, this field is **not** included in the response.\n", + "parameters": [ + { + "name": "insightGroupKey", + "in": "path", + "description": "The insight group key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The insight group key" + } + }, + { + "name": "expand", + "in": "query", + "description": "Options: `scores`, `environment`", + "schema": { + "type": "string", + "format": "string", + "description": "Options: `scores`, `environment`" + } + } + ], + "operationId": "getInsightGroup" + }, + "patch": { + "responses": { + "200": { + "description": "Insight group response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightGroup" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "422": { + "description": "Invalid patch content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchFailedErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights scores (beta)" + ], + "summary": "Patch insight group", + "description": "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](/#section/Overview/Updates).", + "parameters": [ + { + "name": "insightGroupKey", + "in": "path", + "description": "The insight group key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The insight group key" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONPatch" + }, + "example": [ + { + "op": "replace", + "path": "/name", + "value": "Prod group" + } + ] + } + }, + "required": true + }, + "operationId": "patchInsightGroup" + }, + "delete": { + "responses": { + "204": { + "description": "Action succeeded" + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights scores (beta)" + ], + "summary": "Delete insight group", + "description": "Delete insight group", + "parameters": [ + { + "name": "insightGroupKey", + "in": "path", + "description": "The insight group key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The insight group key" + } + } + ], + "operationId": "deleteInsightGroup" + } + }, + "/api/v2/engineering-insights/insights/scores": { + "get": { + "responses": { + "200": { + "description": "Insight score response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightScores" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights scores (beta)" + ], + "summary": "Get insight scores", + "description": "Return insights scores, based on the given parameters. This data is also used in engineering insights metrics views.", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "The environment key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The environment key" + } + }, + { + "name": "applicationKey", + "in": "query", + "description": "Comma separated list of application keys", + "schema": { + "type": "string", + "format": "string", + "description": "Comma separated list of application keys" + } + } + ], + "operationId": "getInsightsScores" + } + }, + "/api/v2/engineering-insights/pull-requests": { + "get": { + "responses": { + "200": { + "description": "Pull request collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PullRequestCollectionRep" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights pull requests (beta)" + ], + "summary": "List pull requests", + "description": "Get a list of pull requests\n\n### Expanding the pull request collection response\n\nLaunchDarkly supports expanding the pull request collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `deployments` includes details on all of the deployments associated with each pull request\n* `flagReferences` includes details on all of the references to flags in each pull request\n* `leadTime` includes details about the lead time of the pull request for each stage\n\nFor example, use `?expand=deployments` to include the `deployments` field in the response. By default, this field is **not** included in the response.\n", + "parameters": [ + { + "name": "projectKey", + "in": "query", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + }, + { + "name": "environmentKey", + "in": "query", + "description": "Required if you are using the sort parameter's leadTime option to sort pull requests.", + "schema": { + "type": "string", + "format": "string", + "description": "Required if you are using the sort parameter's leadTime option to sort pull requests." + } + }, + { + "name": "applicationKey", + "in": "query", + "description": "Filter the results to pull requests deployed to a comma separated list of applications", + "schema": { + "type": "string", + "format": "string", + "description": "Filter the results to pull requests deployed to a comma separated list of applications" + } + }, + { + "name": "status", + "in": "query", + "description": "Filter results to pull requests with the given status. Options: `open`, `merged`, `closed`, `deployed`.", + "schema": { + "type": "string", + "format": "string", + "description": "Filter results to pull requests with the given status. Options: `open`, `merged`, `closed`, `deployed`." + } + }, + { + "name": "query", + "in": "query", + "description": "Filter list of pull requests by title or author", + "schema": { + "type": "string", + "format": "string", + "description": "Filter list of pull requests by title or author" + } + }, + { + "name": "limit", + "in": "query", + "description": "The number of pull requests to return. Default is 20. Maximum allowed is 100.", + "schema": { + "type": "integer", + "format": "int64", + "description": "The number of pull requests to return. Default is 20. Maximum allowed is 100." + } + }, + { + "name": "expand", + "in": "query", + "description": "Expand properties in response. Options: `deployments`, `flagReferences`, `leadTime`.", + "schema": { + "type": "string", + "format": "string", + "description": "Expand properties in response. Options: `deployments`, `flagReferences`, `leadTime`." + } + }, + { + "name": "sort", + "in": "query", + "description": "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.", + "schema": { + "type": "string", + "format": "string", + "description": "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." + } + }, + { + "name": "from", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is 7 days ago.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "to", + "in": "query", + "description": "Unix timestamp in milliseconds. Default value is now.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "after", + "in": "query", + "description": "Identifier used for pagination", + "schema": { + "type": "string", + "format": "string", + "description": "Identifier used for pagination" + } + }, + { + "name": "before", + "in": "query", + "description": "Identifier used for pagination", + "schema": { + "type": "string", + "format": "string", + "description": "Identifier used for pagination" + } + } + ], + "operationId": "getPullRequests" + } + }, + "/api/v2/engineering-insights/repositories": { + "get": { + "responses": { + "200": { + "description": "Repository collection response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightsRepositoryCollection" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights repositories (beta)" + ], + "summary": "List repositories", + "description": "Get a list of repositories\n\n### Expanding the repository collection response\n\nLaunchDarkly supports expanding the repository collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `projects` includes details on all of the LaunchDarkly projects associated with each repository\n\nFor example, use `?expand=projects` to include the `projects` field in the response. By default, this field is **not** included in the response.\n", + "parameters": [ + { + "name": "expand", + "in": "query", + "description": "Expand properties in response. Options: `projects`", + "schema": { + "type": "string", + "format": "string", + "description": "Expand properties in response. Options: `projects`" + } + } + ], + "operationId": "getInsightsRepositories" + } + }, + "/api/v2/engineering-insights/repositories/projects": { + "put": { + "responses": { + "200": { + "description": "Repositories projects response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightsRepositoryProjectCollection" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights repositories (beta)" + ], + "summary": "Associate repositories with projects", + "description": "Associate repositories with projects", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsightsRepositoryProjectMappings" + } + } + }, + "required": true + }, + "operationId": "associateRepositoriesAndProjects" + } + }, + "/api/v2/engineering-insights/repositories/{repositoryKey}/projects/{projectKey}": { + "delete": { + "responses": { + "204": { + "description": "Action succeeded" + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationFailedErrorRep" + } + } + } + }, + "401": { + "description": "Invalid access token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedErrorRep" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenErrorRep" + } + } + } + }, + "404": { + "description": "Invalid resource identifier", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundErrorRep" + } + } + } + }, + "429": { + "description": "Rate limited", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitedErrorRep" + } + } + } + } + }, + "tags": [ + "Insights repositories (beta)" + ], + "summary": "Remove repository project association", + "description": "Remove repository project association", + "parameters": [ + { + "name": "repositoryKey", + "in": "path", + "description": "The repository key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The repository key" + } + }, + { + "name": "projectKey", + "in": "path", + "description": "The project key", + "required": true, + "schema": { + "type": "string", + "format": "string", + "description": "The project key" + } + } + ], + "operationId": "deleteRepositoryProject" + } + } + }, + "components": { + "schemas": { + "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": { + "resources": { + "type": "array", + "description": "Resource specifier strings", + "items": { + "type": "string" + }, + "example": [ + "proj/*:env/*;qa_*:/flag/*" + ] + }, + "notResources": { + "type": "array", + "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.", + "items": { + "type": "string" + } + }, + "actions": { + "type": "array", + "description": "Actions to perform on a resource", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "example": [ + "*" + ] + }, + "notActions": { + "type": "array", + "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + } + }, + "effect": { + "type": "string", + "description": "Whether this statement should allow or deny actions on the resources.", + "example": "allow", + "enum": [ + "allow", + "deny" + ] + }, + "role_name": { + "type": "string" + } + } + }, + "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": { + "resources": { + "type": "array", + "description": "Resource specifier strings", + "items": { + "type": "string" + }, + "example": [ + "proj/*:env/*;qa_*:/flag/*" + ] + }, + "notResources": { + "type": "array", + "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.", + "items": { + "type": "string" + } + }, + "actions": { + "type": "array", + "description": "Actions to perform on a resource", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "example": [ + "*" + ] + }, + "notActions": { + "type": "array", + "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + } + }, + "effect": { + "type": "string", + "description": "Whether this statement should allow or deny actions on the resources.", + "example": "allow", + "enum": [ + "allow", + "deny" + ] + }, + "role_name": { + "type": "string" + } + } + }, + "AccessTokenPost": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A human-friendly name for the access token" + }, + "description": { + "type": "string", + "description": "A description for the access token" + }, + "role": { + "type": "string", + "description": "Built-in role for the token", + "enum": [ + "reader", + "writer", + "admin" + ] + }, + "customRoleIds": { + "type": "array", + "description": "A list of custom role IDs to use as access limits for the access token", + "items": { + "type": "string" + } + }, + "inlineRole": { + "type": "array", + "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.", + "items": { + "$ref": "#/components/schemas/StatementPost" + } + }, + "serviceToken": { + "type": "boolean", + "description": "Whether the token is a service token https://docs.launchdarkly.com/home/account/api#service-tokens" + }, + "defaultApiVersion": { + "type": "integer", + "description": "The default API version for this token" + } + } + }, + "ActionIdentifier": { + "type": "string" + }, "ActionInput": { "type": "object", "properties": { - "instructions": { - "description": "An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag.", - "example": "{\"instructions\": [{ \"kind\": \"turnFlagOn\"}]}" + "instructions": { + "description": "An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag.", + "example": "{\"instructions\": [{ \"kind\": \"turnFlagOn\"}]}" + } + } + }, + "ActionOutput": { + "type": "object", + "required": [ + "kind", + "instructions" + ], + "properties": { + "kind": { + "type": "string", + "description": "The type of action for this stage", + "example": "patch" + }, + "instructions": { + "description": "An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag.", + "example": "[{\"kind\": \"turnFlagOn\"}]", + "$ref": "#/components/schemas/Instructions" + } + } + }, + "ActionSpecifier": { + "type": "string" + }, + "AllVariationsSummary": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariationSummary" + } + }, + "ApplicationCollectionRep": { + "type": "object", + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "items": { + "type": "array", + "description": "A list of applications", + "items": { + "$ref": "#/components/schemas/ApplicationRep" + } + }, + "totalCount": { + "type": "integer", + "description": "The number of applications", + "example": 1 + } + } + }, + "ApplicationFlagCollectionRep": { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "A list of the flags that have been evaluated by the application", + "items": { + "$ref": "#/components/schemas/FlagListingRep" + } + }, + "totalCount": { + "type": "integer", + "description": "The number of flags that have been evaluated by the application", + "example": 1 + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + } + } + }, + "ApplicationRep": { + "type": "object", + "required": [ + "autoAdded", + "key", + "kind", + "name" + ], + "properties": { + "flags": { + "description": "Details about the flags that have been evaluated by the application", + "$ref": "#/components/schemas/ApplicationFlagCollectionRep" + }, + "_access": { + "description": "Details on the allowed and denied actions for this application", + "$ref": "#/components/schemas/Access" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "_version": { + "type": "integer", + "description": "Version of the application" + }, + "autoAdded": { + "type": "boolean", + "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.", + "example": true + }, + "creationDate": { + "description": "Timestamp of when the application version was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "description": { + "type": "string", + "description": "The application description", + "example": "The LaunchDarkly Cafe app" + }, + "key": { + "type": "string", + "description": "The unique identifier of this application", + "example": "com.launchdarkly.cafe" + }, + "kind": { + "type": "string", + "description": "To distinguish the kind of application", + "example": "mobile", + "enum": [ + "browser", + "mobile", + "server" + ] + }, + "_maintainer": { + "description": "Associated maintainer member or team info for the application", + "$ref": "#/components/schemas/MaintainerRep" + }, + "name": { + "type": "string", + "description": "The name of the application", + "example": "LaunchDarklyCafe" + } + } + }, + "ApplicationVersionRep": { + "type": "object", + "required": [ + "autoAdded", + "key", + "name" + ], + "properties": { + "_access": { + "description": "Details on the allowed and denied actions for this application version", + "$ref": "#/components/schemas/Access" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "_version": { + "type": "integer", + "description": "Version of the application version" + }, + "autoAdded": { + "type": "boolean", + "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. ", + "example": true + }, + "creationDate": { + "description": "Timestamp of when the application version was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "key": { + "type": "string", + "description": "The unique identifier of this application version", + "example": "2" + }, + "name": { + "type": "string", + "description": "The name of this version", + "example": "01.02.03" + }, + "supported": { + "type": "boolean", + "description": "Whether this version is supported. Only applicable if the application kind is mobile.", + "example": true + } + } + }, + "ApplicationVersionsCollectionRep": { + "type": "object", + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "items": { + "type": "array", + "description": "A list of the versions for this application", + "items": { + "$ref": "#/components/schemas/ApplicationVersionRep" + } + }, + "totalCount": { + "type": "integer", + "description": "The number of versions for this application", + "example": 1 + } + } + }, + "ApprovalRequestResponse": { + "type": "object", + "required": [ + "_id", + "_version", + "creationDate", + "serviceKind", + "reviewStatus", + "allReviews", + "notifyMemberIds", + "status", + "instructions", + "conflicts", + "_links" + ], + "properties": { + "_id": { + "type": "string", + "description": "The ID of this approval request", + "example": "12ab3c45de678910abc12345" + }, + "_version": { + "type": "integer", + "description": "Version of the approval request", + "example": 1 + }, + "creationDate": { + "description": "Timestamp of when the approval request was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "serviceKind": { + "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.", + "example": "launchdarkly", + "$ref": "#/components/schemas/ApprovalRequestServiceKind" + }, + "requestorId": { + "type": "string", + "description": "The ID of the member who requested the approval", + "example": "12ab3c45de678910abc12345" + }, + "description": { + "type": "string", + "description": "A human-friendly name for the approval request", + "example": "example: request approval from someone" + }, + "reviewStatus": { + "type": "string", + "description": "Current status of the review of this approval request", + "example": "pending", + "enum": [ + "approved", + "declined", + "pending" + ] + }, + "allReviews": { + "type": "array", + "description": "An array of individual reviews of this approval request", + "items": { + "$ref": "#/components/schemas/ReviewResponse" + } + }, + "notifyMemberIds": { + "type": "array", + "description": "An array of member IDs. These members are notified to review the approval request.", + "items": { + "type": "string" + }, + "example": [ + "1234a56b7c89d012345e678f" + ] + }, + "appliedDate": { + "description": "Timestamp of when the approval request was applied", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "appliedByMemberId": { + "type": "string", + "description": "The member ID of the member who applied the approval request", + "example": "1234a56b7c89d012345e678f" + }, + "appliedByServiceTokenId": { + "type": "string", + "description": "The service token ID of the service token which applied the approval request", + "example": "1234a56b7c89d012345e678f" + }, + "status": { + "type": "string", + "description": "Current status of the approval request", + "example": "pending", + "enum": [ + "pending", + "completed", + "failed", + "scheduled" + ] + }, + "instructions": { + "description": "List of instructions in semantic patch format to be applied to the feature flag", + "example": "[{\"kind\": \"turnFlagOn\"}]", + "$ref": "#/components/schemas/Instructions" + }, + "conflicts": { + "type": "array", + "description": "Details on any conflicting approval requests", + "items": { + "$ref": "#/components/schemas/Conflict" + } + }, + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" + }, + "executionDate": { + "description": "Timestamp for when instructions will be executed", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "operatingOnId": { + "type": "string", + "description": "ID of scheduled change to edit or delete", + "example": "12ab3c45de678910abc12345" + }, + "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", + "$ref": "#/components/schemas/IntegrationMetadata" + }, + "source": { + "description": "Details about the source feature flag, if copied", + "$ref": "#/components/schemas/CopiedFromEnv" + }, + "customWorkflowMetadata": { + "description": "Details about the custom workflow, if this approval request is part of a custom workflow", + "$ref": "#/components/schemas/CustomWorkflowMeta" + }, + "resourceId": { + "type": "string", + "description": "String representation of a resource" + }, + "approvalSettings": { + "description": "The settings for this approval", + "$ref": "#/components/schemas/ApprovalSettings" + } + } + }, + "ApprovalRequestServiceKind": { + "type": "string" + }, + "ApprovalSettings": { + "type": "object", + "required": [ + "required", + "bypassApprovalsForPendingChanges", + "minNumApprovals", + "canReviewOwnRequest", + "canApplyDeclinedChanges", + "serviceKind", + "serviceConfig", + "requiredApprovalTags" + ], + "properties": { + "required": { + "type": "boolean", + "description": "If approvals are required for this environment", + "example": true + }, + "bypassApprovalsForPendingChanges": { + "type": "boolean", + "description": "Whether to skip approvals for pending changes", + "example": false + }, + "minNumApprovals": { + "type": "integer", + "description": "Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.", + "example": 1 + }, + "canReviewOwnRequest": { + "type": "boolean", + "description": "Allow someone who makes an approval request to apply their own change", + "example": false + }, + "canApplyDeclinedChanges": { + "type": "boolean", + "description": "Allow applying the change as long as at least one person has approved", + "example": true + }, + "autoApplyApprovedChanges": { + "type": "boolean", + "description": "Automatically apply changes that have been approved by all reviewers. This field is only applicable for approval services other than LaunchDarkly.", + "example": true + }, + "serviceKind": { + "type": "string", + "description": "Which service to use for managing approvals", + "example": "launchdarkly" + }, + "serviceConfig": { + "type": "object", + "additionalProperties": {}, + "example": {} + }, + "requiredApprovalTags": { + "type": "array", + "description": "Require approval only on flags with the provided tags. Otherwise all flags will require approval.", + "items": { + "type": "string" + }, + "example": [ + "require-approval" + ] + }, + "serviceKindConfigurationId": { + "type": "string", + "description": "Optional field for integration configuration ID of a custom approval integration. This is an Enterprise-only feature.", + "example": "1ef45a85-218f-4428-a8b2-a97e5f56c258" + }, + "resourceKind": { + "type": "string", + "description": "The kind of resource for which the approval settings apply, for example, flag or segment" + } + } + }, + "ApprovalsCapabilityConfig": { + "type": "object", + "properties": { + "additionalFormVariables": { + "type": "array", + "description": "The additional form variables for the approvals capability", + "items": { + "$ref": "#/components/schemas/FormVariable" + }, + "example": "invalid example" + } + } + }, + "AssignedToRep": { + "type": "object", + "properties": { + "membersCount": { + "type": "integer", + "description": "The number of individual members this role is assigned to" + }, + "teamsCount": { + "type": "integer", + "description": "The number of teams this role is assigned to" + } + } + }, + "Audience": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "environment": { + "description": "Details about the environment. When the environment has been deleted, this field is omitted.", + "$ref": "#/components/schemas/EnvironmentSummary" + }, + "name": { + "type": "string", + "description": "The release phase name", + "example": "Phase 1 - Testing" + }, + "configuration": { + "description": "The configuration for the audience's rollout.", + "$ref": "#/components/schemas/AudienceConfiguration" + }, + "segmentKeys": { + "type": "array", + "description": "A list of segment keys", + "items": { + "type": "string" + }, + "example": [ + "segment-key-123abc" + ] + } + } + }, + "AudienceConfiguration": { + "type": "object", + "required": [ + "releaseStrategy", + "requireApproval" + ], + "properties": { + "releaseStrategy": { + "description": "The release strategy", + "example": "monitoredRelease", + "$ref": "#/components/schemas/ReleaseStrategy" + }, + "requireApproval": { + "type": "boolean", + "description": "Whether or not the audience requires approval", + "example": true + }, + "notifyMemberIds": { + "type": "array", + "description": "An array of member IDs. These members are notified to review the approval request.", + "items": { + "type": "string" + }, + "example": [ + "1234a56b7c89d012345e678f" + ] + }, + "notifyTeamKeys": { + "type": "array", + "description": "An array of team keys. The members of these teams are notified to review the approval request.", + "items": { + "type": "string" + }, + "example": [ + "example-reviewer-team" + ] + }, + "releaseGuardianConfiguration": { + "description": "The configuration for the release guardian.", + "$ref": "#/components/schemas/ReleaseGuardianConfiguration" + } + } + }, + "AudiencePost": { + "type": "object", + "required": [ + "environmentKey", + "name" + ], + "properties": { + "environmentKey": { + "type": "string", + "description": "A project-unique key for the environment." + }, + "name": { + "type": "string", + "description": "The audience name" + }, + "segmentKeys": { + "type": "array", + "description": "Segments targeted by this audience.", + "items": { + "type": "string" + } + }, + "configuration": { + "description": "The configuration for the audience's rollout.", + "$ref": "#/components/schemas/AudienceConfiguration" + } + } + }, + "AudienceStatus": { + "type": "string" + }, + "Audiences": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Audience" + } + }, + "AuditLogEntryListingRep": { + "type": "object", + "required": [ + "_links", + "_id", + "_accountId", + "date", + "accesses", + "kind", + "name", + "description", + "shortDescription" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "_id": { + "type": "string", + "description": "The ID of the audit log entry", + "example": "1234a56b7c89d012345e678f" + }, + "_accountId": { + "type": "string", + "description": "The ID of the account to which this audit log entry belongs", + "example": "1234a56b7c89d012345e678f" + }, + "date": { + "description": "Timestamp of the audit log entry", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "accesses": { + "type": "array", + "description": "Details on the actions performed and resources acted on in this audit log entry", + "items": { + "$ref": "#/components/schemas/ResourceAccess" + } + }, + "kind": { + "description": "The type of resource this audit log entry refers to", + "example": "flag", + "$ref": "#/components/schemas/ResourceKind" + }, + "name": { + "type": "string", + "description": "The name of the resource this audit log entry refers to", + "example": "Example feature flag" + }, + "description": { + "type": "string", + "description": "Description of the change recorded in the audit log entry", + "example": "Example, turning on the flag for testing" + }, + "shortDescription": { + "type": "string", + "description": "Shorter version of the change recorded in the audit log entry", + "example": "Example, turning on the flag" + }, + "comment": { + "type": "string", + "description": "Optional comment for the audit log entry", + "example": "This is an automated test" + }, + "subject": { + "description": "Details of the subject who initiated the action described in the audit log entry", + "$ref": "#/components/schemas/SubjectDataRep" + }, + "member": { + "description": "Details of the member who initiated the action described in the audit log entry", + "$ref": "#/components/schemas/MemberDataRep" + }, + "token": { + "description": "Details of the access token that initiated the action described in the audit log entry", + "$ref": "#/components/schemas/TokenSummary" + }, + "app": { + "description": "Details of the authorized application that initiated the action described in the audit log entry", + "$ref": "#/components/schemas/AuthorizedAppDataRep" + }, + "titleVerb": { + "type": "string", + "description": "The action and resource recorded in this audit log entry", + "example": "turned on the flag" + }, + "title": { + "type": "string", + "description": "A description of what occurred, in the format member titleVerb target" + }, + "target": { + "description": "Details of the resource acted upon in this audit log entry", + "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", + "$ref": "#/components/schemas/TargetResourceRep" + }, + "parent": { + "$ref": "#/components/schemas/ParentResourceRep" + } + } + }, + "AuditLogEntryListingRepCollection": { + "type": "object", + "required": [ + "items", + "_links" + ], + "properties": { + "items": { + "type": "array", + "description": "An array of audit log entries", + "items": { + "$ref": "#/components/schemas/AuditLogEntryListingRep" + } + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + } + } + }, + "AuditLogEntryRep": { + "type": "object", + "required": [ + "_links", + "_id", + "_accountId", + "date", + "accesses", + "kind", + "name", + "description", + "shortDescription" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "_id": { + "type": "string", + "description": "The ID of the audit log entry", + "example": "1234a56b7c89d012345e678f" + }, + "_accountId": { + "type": "string", + "description": "The ID of the account to which this audit log entry belongs", + "example": "1234a56b7c89d012345e678f" + }, + "date": { + "description": "Timestamp of the audit log entry", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "accesses": { + "type": "array", + "description": "Details on the actions performed and resources acted on in this audit log entry", + "items": { + "$ref": "#/components/schemas/ResourceAccess" + } + }, + "kind": { + "description": "The type of resource this audit log entry refers to", + "example": "flag", + "$ref": "#/components/schemas/ResourceKind" + }, + "name": { + "type": "string", + "description": "The name of the resource this audit log entry refers to", + "example": "Example feature flag" + }, + "description": { + "type": "string", + "description": "Description of the change recorded in the audit log entry", + "example": "Example, turning on the flag for testing" + }, + "shortDescription": { + "type": "string", + "description": "Shorter version of the change recorded in the audit log entry", + "example": "Example, turning on the flag" + }, + "comment": { + "type": "string", + "description": "Optional comment for the audit log entry", + "example": "This is an automated test" + }, + "subject": { + "description": "Details of the subject who initiated the action described in the audit log entry", + "$ref": "#/components/schemas/SubjectDataRep" + }, + "member": { + "description": "Details of the member who initiated the action described in the audit log entry", + "$ref": "#/components/schemas/MemberDataRep" + }, + "token": { + "description": "Details of the access token that initiated the action described in the audit log entry", + "$ref": "#/components/schemas/TokenSummary" + }, + "app": { + "description": "Details of the authorized application that initiated the action described in the audit log entry", + "$ref": "#/components/schemas/AuthorizedAppDataRep" + }, + "titleVerb": { + "type": "string", + "description": "The action and resource recorded in this audit log entry", + "example": "turned on the flag" + }, + "title": { + "type": "string", + "description": "A description of what occurred, in the format member titleVerb target" + }, + "target": { + "description": "Details of the resource acted upon in this audit log entry", + "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", + "$ref": "#/components/schemas/TargetResourceRep" + }, + "parent": { + "$ref": "#/components/schemas/ParentResourceRep" + }, + "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" + }, + "triggerBody": { + "description": "A JSON representation of the external trigger for this audit log entry, if any" + }, + "merge": { + "description": "A JSON representation of the merge information for this audit log entry, if any" + }, + "previousVersion": { + "description": "If the audit log entry has been updated, this is a JSON representation of the previous version of the entity" + }, + "currentVersion": { + "description": "If the audit log entry has been updated, this is a JSON representation of the current version of the entity" + }, + "subentries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuditLogEntryListingRep" + } + } + } + }, + "AuditLogEventsHookCapabilityConfigPost": { + "type": "object", + "properties": { + "statements": { + "description": "The set of resources you wish to subscribe to audit log notifications for.", + "$ref": "#/components/schemas/StatementPostList" + } + } + }, + "AuditLogEventsHookCapabilityConfigRep": { + "type": "object", + "properties": { + "statements": { + "type": "array", + "description": "The set of resources you wish to subscribe to audit log notifications for.", + "items": { + "$ref": "#/components/schemas/Statement" + } + } + } + }, + "AuthorizedAppDataRep": { + "type": "object", + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } + }, + "_id": { + "type": "string", + "description": "The ID of the authorized application" + }, + "isScim": { + "type": "boolean", + "description": "Whether the application is authorized through SCIM" + }, + "name": { + "type": "string", + "description": "The authorized application name" + }, + "maintainerName": { + "type": "string", + "description": "The name of the maintainer for this authorized application" + } + } + }, + "BayesianBetaBinomialStatsRep": { + "type": "object", + "properties": { + "priorAlpha": { + "type": "number", + "description": "Sum of converted pseudo-units for prior distribution" + }, + "priorBeta": { + "type": "number", + "description": "Sum of non-converted pseudo-units for prior distribution" + }, + "priorMean": { + "type": "number", + "description": "Mean of the prior distribution" + }, + "dataWeight": { + "type": "number", + "description": "The precision weight of the data mean" + } + } + }, + "BayesianNormalStatsRep": { + "type": "object", + "properties": { + "dataWeight": { + "type": "number", + "description": "The precision weight of the data mean" + }, + "priorMean": { + "type": "number", + "description": "Mean of the prior distribution" + } + } + }, + "BigSegmentStoreIntegration": { + "type": "object", + "required": [ + "_links", + "_id", + "integrationKey", + "projectKey", + "environmentKey", + "config", + "on", + "tags", + "name", + "version", + "_status" + ], + "properties": { + "_links": { + "description": "The location and content type of related resources", + "$ref": "#/components/schemas/BigSegmentStoreIntegrationLinks" + }, + "_id": { + "type": "string", + "description": "The integration ID", + "example": "12ab3c4d5ef1a2345bcde67f" + }, + "integrationKey": { + "type": "string", + "description": "The integration key", + "example": "redis", + "enum": [ + "redis", + "dynamodb" + ] + }, + "projectKey": { + "type": "string", + "description": "The project key", + "example": "default" + }, + "environmentKey": { + "type": "string", + "description": "The environment key", + "example": "development" + }, + "config": { + "description": "The delivery configuration for the given integration provider. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.", + "$ref": "#/components/schemas/FormVariableConfig" + }, + "on": { + "type": "boolean", + "description": "Whether the configuration is turned on", + "example": true + }, + "tags": { + "type": "array", + "description": "List of tags for this configuration", + "items": { + "type": "string" + }, + "example": [] + }, + "name": { + "type": "string", + "description": "Name of the configuration", + "example": "Development environment configuration" + }, + "version": { + "type": "integer", + "description": "Version of the current configuration", + "example": 1 + }, + "_access": { + "description": "Details on the allowed and denied actions for this configuration", + "$ref": "#/components/schemas/Access" + }, + "_status": { + "description": "Details on the connection status of the persistent store integration", + "$ref": "#/components/schemas/BigSegmentStoreStatus" + } + } + }, + "BigSegmentStoreIntegrationCollection": { + "type": "object", + "required": [ + "_links", + "items" + ], + "properties": { + "_links": { + "description": "The location and content type of related resources", + "$ref": "#/components/schemas/BigSegmentStoreIntegrationCollectionLinks" + }, + "items": { + "type": "array", + "description": "An array of persistent store integration configurations", + "items": { + "$ref": "#/components/schemas/BigSegmentStoreIntegration" + } + } + } + }, + "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": { + "available": { + "type": "boolean", + "description": "Whether the persistent store integration is fully synchronized with the LaunchDarkly environment, and the lastSync occurred within a few minutes", + "example": true + }, + "potentiallyStale": { + "type": "boolean", + "description": "Whether the persistent store integration may not be fully synchronized with the LaunchDarkly environment. true if the integration could be stale.", + "example": false + }, + "lastSync": { + "description": "Timestamp of when the most recent successful sync occurred between the persistent store integration and the LaunchDarkly environment.", + "example": "1717263000000", + "$ref": "#/components/schemas/UnixMillis" + }, + "lastError": { + "description": "Timestamp of when the most recent synchronization error occurred, if any", + "example": "1714584600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StoreIntegrationError" + } + } + } + }, + "BigSegmentTarget": { + "type": "object", + "required": [ + "userKey", + "included", + "excluded" + ], + "properties": { + "userKey": { + "type": "string", + "description": "The target key" + }, + "included": { + "type": "boolean", + "description": "Indicates whether the target is included.
Included targets are always segment members, regardless of segment rules." + }, + "excluded": { + "type": "boolean", + "description": "Indicates whether the target is excluded.
Segment rules bypass excluded targets, so they will never be included based on rules. Excluded targets may still be included explicitly." + } + } + }, + "BooleanDefaults": { + "type": "object", + "properties": { + "trueDisplayName": { + "type": "string", + "description": "The display name for the true variation, displayed in the LaunchDarkly user interface", + "example": "True" + }, + "falseDisplayName": { + "type": "string", + "description": "The display name for the false variation, displayed in the LaunchDarkly user interface", + "example": "False" + }, + "trueDescription": { + "type": "string", + "description": "The description for the true variation", + "example": "serve true" + }, + "falseDescription": { + "type": "string", + "description": "The description for the false variation", + "example": "serve false" + }, + "onVariation": { + "type": "integer", + "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", + "example": 0 + }, + "offVariation": { + "type": "integer", + "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off", + "example": 1 + } + } + }, + "BooleanFlagDefaults": { + "type": "object", + "required": [ + "trueDisplayName", + "falseDisplayName", + "trueDescription", + "falseDescription", + "onVariation", + "offVariation" + ], + "properties": { + "trueDisplayName": { + "type": "string", + "description": "The display name for the true variation, displayed in the LaunchDarkly user interface", + "example": "True" + }, + "falseDisplayName": { + "type": "string", + "description": "The display name for the false variation, displayed in the LaunchDarkly user interface", + "example": "False" + }, + "trueDescription": { + "type": "string", + "description": "The description for the true variation", + "example": "serve true" + }, + "falseDescription": { + "type": "string", + "description": "The description for the false variation", + "example": "serve false" + }, + "onVariation": { + "type": "integer", + "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", + "example": 0 + }, + "offVariation": { + "type": "integer", + "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off", + "example": 1 + } + } + }, + "BranchCollectionRep": { + "type": "object", + "required": [ + "_links", + "items" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "items": { + "type": "array", + "description": "An array of branches", + "items": { + "$ref": "#/components/schemas/BranchRep" + } + } + } + }, + "BranchRep": { + "type": "object", + "required": [ + "name", + "head", + "syncTime", + "_links" + ], + "properties": { + "name": { + "type": "string", + "description": "The branch name", + "example": "main" + }, + "head": { + "type": "string", + "description": "An ID representing the branch HEAD. For example, a commit SHA.", + "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" + }, + "updateSequenceId": { + "type": "integer", + "format": "int64", + "description": "An optional ID used to prevent older data from overwriting newer data", + "example": 25 + }, + "syncTime": { + "description": "A timestamp indicating when the branch was last synced", + "example": "1636558831870", + "$ref": "#/components/schemas/UnixMillis" + }, + "references": { + "type": "array", + "description": "An array of flag references found on the branch", + "items": { + "$ref": "#/components/schemas/ReferenceRep" + } + }, + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" + } + } + }, + "BulkEditMembersRep": { + "type": "object", + "properties": { + "members": { + "type": "array", + "description": "A list of members IDs of the members who were successfully updated.", + "items": { + "type": "string" + }, + "example": [ + "1234a56b7c89d012345e678f" + ] + }, + "errors": { + "type": "array", + "description": "A list of member IDs and errors for the members whose updates failed.", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "example": [ + { + "507f1f77bcf86cd799439011": "you cannot modify your own role" + } + ] + } + } + }, + "BulkEditTeamsRep": { + "type": "object", + "properties": { + "memberIDs": { + "type": "array", + "description": "A list of member IDs of the members who were added to the teams.", + "items": { + "type": "string" + }, + "example": [ + "1234a56b7c89d012345e678f" + ] + }, + "teamKeys": { + "type": "array", + "description": "A list of team keys of the teams that were successfully updated.", + "items": { + "type": "string" + }, + "example": [ + "example-team-1" + ] + }, + "errors": { + "type": "array", + "description": "A list of team keys and errors for the teams whose updates failed.", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "example": [ + { + "example-team-2": "example failure message" + } + ] + } + } + }, + "CallerIdentityRep": { + "type": "object", + "properties": { + "accountId": { + "type": "string" + }, + "environmentId": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "environmentName": { + "type": "string" + }, + "projectName": { + "type": "string" + }, + "authKind": { + "type": "string" + }, + "tokenKind": { + "type": "string" + }, + "clientId": { + "type": "string" + }, + "tokenName": { + "type": "string" + }, + "tokenId": { + "type": "string" + }, + "memberId": { + "type": "string" + }, + "serviceToken": { + "type": "boolean" + } + } + }, + "CapabilityConfigPost": { + "type": "object", + "properties": { + "approvals": { + "description": "The approvals capability configuration for this integration", + "example": "{\"additionalFormVariables\": \"[]\"}", + "$ref": "#/components/schemas/ApprovalsCapabilityConfig" + }, + "auditLogEventsHook": { + "description": "The audit log events hook capability configuration for the integration", + "example": "{\"key\": \"value\"}", + "$ref": "#/components/schemas/AuditLogEventsHookCapabilityConfigPost" + } + } + }, + "CapabilityConfigRep": { + "type": "object", + "properties": { + "approvals": { + "description": "The approvals capability configuration for this integration", + "$ref": "#/components/schemas/ApprovalsCapabilityConfig" + }, + "auditLogEventsHook": { + "description": "The audit log events hook capability configuration for the integration", + "example": "{\"policy\": \"value\"}", + "$ref": "#/components/schemas/AuditLogEventsHookCapabilityConfigRep" + } + } + }, + "Clause": { + "type": "object", + "required": [ + "attribute", + "op", + "values", + "negate" + ], + "properties": { + "_id": { + "type": "string" + }, + "attribute": { + "type": "string" + }, + "op": { + "$ref": "#/components/schemas/Operator" + }, + "values": { + "type": "array", + "items": {} + }, + "contextKind": { + "type": "string" + }, + "negate": { + "type": "boolean" + } + } + }, + "Client": { + "type": "object", + "required": [ + "_links", + "name", + "_accountId", + "_clientId", + "redirectUri", + "_creationDate" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/oauth/clients", + "type": "application/json" + }, + "self": { + "href": "/api/v2/oauth/clients/50666563-9144-4125-b822-33f308227e45", + "type": "application/json" + } + } + }, + "name": { + "type": "string", + "description": "Client name" + }, + "description": { + "type": "string", + "description": "Client description" + }, + "_accountId": { + "type": "string", + "description": "The account ID the client is registered under" + }, + "_clientId": { + "type": "string", + "description": "The client's unique ID" + }, + "_clientSecret": { + "type": "string", + "description": "The client secret. This will only be shown upon creation." + }, + "redirectUri": { + "type": "string", + "description": "The client's redirect URI" + }, + "_creationDate": { + "description": "Timestamp of client creation date", + "example": "1494437420312", + "$ref": "#/components/schemas/UnixMillis" + } + } + }, + "ClientCollection": { + "type": "object", + "required": [ + "_links", + "items" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/oauth/clients", + "type": "application/json" + } + } + }, + "items": { + "type": "array", + "description": "List of client objects", + "items": { + "$ref": "#/components/schemas/Client" + } + } + } + }, + "ClientSideAvailability": { + "type": "object", + "properties": { + "usingMobileKey": { + "type": "boolean" + }, + "usingEnvironmentId": { + "type": "boolean" + } + } + }, + "ClientSideAvailabilityPost": { + "type": "object", + "required": [ + "usingEnvironmentId", + "usingMobileKey" + ], + "properties": { + "usingEnvironmentId": { + "type": "boolean", + "description": "Whether to enable availability for client-side SDKs. Defaults to false.", + "example": true + }, + "usingMobileKey": { + "type": "boolean", + "description": "Whether to enable availability for mobile SDKs. Defaults to true.", + "example": true + } + } + }, + "CompletedBy": { + "type": "object", + "properties": { + "member": { + "description": "The LaunchDarkly member who marked this phase as complete", + "$ref": "#/components/schemas/MemberSummary" + }, + "token": { + "description": "The service token used to mark this phase as complete", + "$ref": "#/components/schemas/TokenSummary" + } + } + }, + "ConditionInput": { + "type": "object", + "properties": { + "scheduleKind": { + "description": "Whether the scheduled execution of the workflow stage is relative or absolute. If relative, the waitDuration and waitDurationUnit specify when the execution occurs. If absolute, the executionDate specifies when the execution occurs.", + "example": "relative", + "enum": [ + "absolute", + "relative" + ], + "$ref": "#/components/schemas/ScheduleKind" + }, + "executionDate": { + "description": "For workflow stages whose scheduled execution is absolute, the time, in Unix milliseconds, when the stage should start.", + "example": "1706810400000", + "$ref": "#/components/schemas/UnixMillis" + }, + "waitDuration": { + "type": "integer", + "description": "For workflow stages whose scheduled execution is relative, how far in the future the stage should start.", + "example": 2 + }, + "waitDurationUnit": { + "description": "For workflow stages whose scheduled execution is relative, the unit of measure for the waitDuration.", + "example": "calendarDay", + "enum": [ + "minute", + "hour", + "calendarDay", + "calendarWeek" + ], + "$ref": "#/components/schemas/DurationUnit" + }, + "executeNow": { + "type": "boolean", + "description": "Whether the workflow stage should be executed immediately", + "example": false + }, + "description": { + "type": "string", + "description": "A description of the approval required for this stage", + "example": "Require example-team approval for final stage" + }, + "notifyMemberIds": { + "type": "array", + "description": "A list of member IDs for the members to request approval from for this stage", + "items": { + "type": "string" + }, + "example": [ + "507f1f77bcf86cd799439011" + ] + }, + "notifyTeamKeys": { + "type": "array", + "description": "A list of team keys for the teams to request approval from for this stage", + "items": { + "type": "string" + }, + "example": [ + "example-team" + ] + }, + "kind": { + "description": "The type of condition to meet before executing this stage of the workflow. Use schedule to schedule a workflow stage. Use ld-approval to add an approval request to a workflow stage.", + "example": "schedule", + "$ref": "#/components/schemas/ConditionKind" + } + } + }, + "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" + }, + "scheduleKind": { + "$ref": "#/components/schemas/ScheduleKind" + }, + "executionDate": { + "$ref": "#/components/schemas/UnixMillis" + }, + "waitDuration": { + "type": "integer" + }, + "waitDurationUnit": { + "$ref": "#/components/schemas/DurationUnit" + }, + "description": { + "type": "string" + }, + "notifyMemberIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "allReviews": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReviewOutput" + } + }, + "reviewStatus": { + "type": "string" + }, + "appliedDate": { + "$ref": "#/components/schemas/UnixMillis" + } + } + }, + "Conflict": { + "type": "object", + "properties": { + "instruction": { + "description": "Instruction in semantic patch format to be applied to the feature flag", + "$ref": "#/components/schemas/Instruction" + }, + "reason": { + "type": "string", + "description": "Reason why the conflict exists" + } + } + }, + "ConflictOutput": { + "type": "object", + "required": [ + "stageId", + "message" + ], + "properties": { + "stageId": { + "type": "string", + "description": "The stage ID", + "example": "12ab3c4d5ef1a2345bcde67f" + }, + "message": { + "type": "string", + "description": "Message about the conflict" + } + } + }, + "ContextAttributeName": { + "type": "object", + "required": [ + "name", + "weight" + ], + "properties": { + "name": { + "type": "string", + "description": "A context attribute's name.", + "example": "/firstName" + }, + "weight": { + "type": "integer", + "description": "A relative estimate of the number of contexts seen recently that have an attribute with the associated name.", + "example": 2225 + }, + "redacted": { + "type": "boolean", + "description": "Whether or not the attribute has one or more redacted values.", + "example": false + } + } + }, + "ContextAttributeNames": { + "type": "object", + "required": [ + "kind", + "names" + ], + "properties": { + "kind": { + "type": "string", + "description": "The kind associated with this collection of context attribute names.", + "example": "user" + }, + "names": { + "type": "array", + "description": "A collection of context attribute names.", + "items": { + "$ref": "#/components/schemas/ContextAttributeName" + } + } + } + }, + "ContextAttributeNamesCollection": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "description": "A collection of context attribute name data grouped by kind.", + "items": { + "$ref": "#/components/schemas/ContextAttributeNames" + } + } + } + }, + "ContextAttributeValue": { + "type": "object", + "required": [ + "name", + "weight" + ], + "properties": { + "name": { + "description": "A value for a context attribute.", + "example": "Sandy" + }, + "weight": { + "type": "integer", + "description": "A relative estimate of the number of contexts seen recently that have a matching value for a given attribute.", + "example": 35 + } + } + }, + "ContextAttributeValues": { + "type": "object", + "required": [ + "kind", + "values" + ], + "properties": { + "kind": { + "type": "string", + "description": "The kind associated with this collection of context attribute values.", + "example": "user" + }, + "values": { + "type": "array", + "description": "A collection of context attribute values.", + "items": { + "$ref": "#/components/schemas/ContextAttributeValue" + } + } + } + }, + "ContextAttributeValuesCollection": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "description": "A collection of context attribute value data grouped by kind.", + "items": { + "$ref": "#/components/schemas/ContextAttributeValues" + } + } + } + }, + "ContextInstance": { + "type": "object", + "additionalProperties": {} + }, + "ContextInstanceEvaluation": { + "type": "object", + "required": [ + "name", + "key", + "_value", + "_links" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the flag.", + "example": "My Flag" + }, + "key": { + "type": "string", + "description": "Key of the flag.", + "example": "flag-key-123abc" + }, + "_value": { + "description": "The value of the flag variation that the context receives. If there is no defined default rule, this is null.", + "example": "true" + }, + "reason": { + "description": "Contains information about why that variation was selected.", + "example": "{\"kind\": \"RULE_MATCH\"}", + "$ref": "#/components/schemas/ContextInstanceEvaluationReason" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "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" + } + } + } + } + }, + "ContextInstanceEvaluationReason": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "description": "Describes the general reason that LaunchDarkly selected this variation.", + "example": "OFF" + }, + "ruleIndex": { + "type": "integer", + "description": "The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based.", + "example": 3 + }, + "ruleID": { + "type": "string", + "description": "The unique identifier of the matching rule if the kind is 'RULE_MATCH'.", + "example": "1234567890" + }, + "prerequisiteKey": { + "type": "string", + "description": "The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'.", + "example": "someotherflagkey" + }, + "inExperiment": { + "type": "boolean", + "description": "Indicates whether the context was evaluated as part of an experiment.", + "example": true + }, + "errorKind": { + "type": "string", + "description": "The specific error type if the kind is 'ERROR'.", + "example": "tried to use uninitialized Context" + } + } + }, + "ContextInstanceEvaluations": { + "type": "object", + "required": [ + "items", + "_links" + ], + "properties": { + "items": { + "type": "array", + "description": "Details on the flag evaluations for this context instance", + "items": { + "$ref": "#/components/schemas/ContextInstanceEvaluation" + }, + "example": [ + { + "_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, + "key": "sort.order", + "name": "SortOrder", + "reason": { + "kind": "FALLTHROUGH" + } + }, + { + "_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, + "key": "alternate.page", + "name": "AlternatePage", + "reason": { + "kind": "RULE_MATCH", + "ruleID": "b2530cdf-14c6-4e16-b660-00239e08f19b", + "ruleIndex": 1 + } + } + ] + }, + "totalCount": { + "type": "integer", + "description": "The number of flags", + "example": 2 + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate", + "type": "application/json" + } + } + } + } + }, + "ContextInstanceRecord": { + "type": "object", + "required": [ + "id", + "context" + ], + "properties": { + "lastSeen": { + "type": "string", + "format": "date-time", + "description": "Timestamp of the last time an evaluation occurred for this context instance", + "example": "2022-04-15T15:00:57.526470334Z" + }, + "id": { + "type": "string", + "description": "The context instance ID", + "example": "b3JnOmxhdW5jaGRhcmtseQ" + }, + "applicationId": { + "type": "string", + "description": "An identifier representing the application where the LaunchDarkly SDK is running", + "example": "GoSDK/1.2" + }, + "anonymousKinds": { + "type": "array", + "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", + "items": { + "type": "string" + }, + "example": [ + "device", + "privateKind" + ] + }, + "context": { + "description": "The context, including its kind and attributes", + "example": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/projects/my-project/environments/my-environment", + "type": "application/json" + }, + "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" + } + } + }, + "_access": { + "description": "Details on the allowed and denied actions for this context instance", + "$ref": "#/components/schemas/Access" + } + } + }, + "ContextInstanceSearch": { + "type": "object", + "properties": { + "filter": { + "type": "string", + "description": "A collection of context instance filters", + "example": "{\"filter\": \"kindKeys:{\"contains\": [\"user:Henry\"]},\"sort\": \"-ts\",\"limit\": 50}" + }, + "sort": { + "type": "string", + "description": "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.", + "example": "-ts" + }, + "limit": { + "type": "integer", + "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", + "example": 10 + }, + "continuationToken": { + "type": "string", + "description": "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 instead, because this value is an obfuscated string.", + "example": "QAGFKH1313KUGI2351" + } + } + }, + "ContextInstanceSegmentMembership": { + "type": "object", + "required": [ + "name", + "key", + "description", + "unbounded", + "external", + "isMember", + "isIndividuallyTargeted", + "isRuleTargeted", + "_links" + ], + "properties": { + "name": { + "type": "string", + "description": "A human-friendly name for the segment", + "example": "Segment Name" + }, + "key": { + "type": "string", + "description": "A unique key used to reference the segment", + "example": "segment-key-123abc" + }, + "description": { + "type": "string", + "description": "A description of the segment's purpose", + "example": "Segment description" + }, + "unbounded": { + "type": "boolean", + "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.", + "example": false + }, + "external": { + "type": "string", + "description": "If the segment is a synced segment, the name of the external source", + "example": "https://amplitude.com/myCohort" + }, + "isMember": { + "type": "boolean", + "description": "Whether the context is a member of this segment, either by explicit inclusion or by rule matching", + "example": true + }, + "isIndividuallyTargeted": { + "type": "boolean", + "description": "Whether the context is explicitly included in this segment", + "example": true + }, + "isRuleTargeted": { + "type": "boolean", + "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 (isIndividuallyTargeted is true).", + "example": false + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + } + } + }, + "ContextInstanceSegmentMemberships": { + "type": "object", + "required": [ + "items", + "_links" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextInstanceSegmentMembership" + } + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + } + } + }, + "ContextInstances": { + "type": "object", + "required": [ + "_environmentId", + "items" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "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" + } + } + }, + "totalCount": { + "type": "integer", + "description": "The number of unique context instances", + "example": 100 + }, + "_environmentId": { + "type": "string", + "description": "The environment ID", + "example": "57be1db38b75bf0772d11384" + }, + "continuationToken": { + "type": "string", + "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 next link instead.", + "example": "QAGFKH1313KUGI2351" + }, + "items": { + "type": "array", + "description": "A collection of context instances. Can include multiple versions of context instances that have the same id, but different applicationIds.", + "items": { + "$ref": "#/components/schemas/ContextInstanceRecord" + } + } + } + }, + "ContextKindCreatedFrom": { + "type": "string" + }, + "ContextKindRep": { + "type": "object", + "required": [ + "key", + "name", + "description", + "version", + "creationDate", + "lastModified", + "createdFrom" + ], + "properties": { + "key": { + "type": "string", + "description": "The context kind key", + "example": "organization-key-123abc" + }, + "name": { + "type": "string", + "description": "The context kind name", + "example": "Organization" + }, + "description": { + "type": "string", + "description": "The context kind description", + "example": "An example context kind, to enable targeting based on organization" + }, + "version": { + "type": "integer", + "description": "The context kind version", + "example": 4 + }, + "creationDate": { + "description": "Timestamp of when the context kind was created", + "example": "1668530155141", + "$ref": "#/components/schemas/UnixMillis" + }, + "lastModified": { + "description": "Timestamp of when the context kind was most recently changed", + "example": "1670341705251", + "$ref": "#/components/schemas/UnixMillis" + }, + "lastSeen": { + "description": "Timestamp of when a context of this context kind was most recently evaluated", + "example": "1671563538193", + "$ref": "#/components/schemas/UnixMillis" + }, + "createdFrom": { + "description": "How the context kind was created", + "example": "auto-add", + "enum": [ + "default", + "auto-add", + "manual" + ], + "$ref": "#/components/schemas/ContextKindCreatedFrom" + }, + "hideInTargeting": { + "type": "boolean", + "description": "Alias for archived.", + "example": false + }, + "archived": { + "type": "boolean", + "description": "Whether the context kind is archived. Archived context kinds are unavailable for targeting.", + "example": false + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + } + } + }, + "ContextKindsCollectionRep": { + "type": "object", + "required": [ + "items", + "_links" + ], + "properties": { + "items": { + "type": "array", + "description": "An array of context kinds", + "items": { + "$ref": "#/components/schemas/ContextKindRep" + } + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + } + } + }, + "ContextRecord": { + "type": "object", + "required": [ + "context" + ], + "properties": { + "lastSeen": { + "type": "string", + "format": "date-time", + "description": "Timestamp of the last time an evaluation occurred for this context", + "example": "2022-04-15T15:00:57.526470334Z" + }, + "applicationId": { + "type": "string", + "description": "An identifier representing the application where the LaunchDarkly SDK is running", + "example": "GoSDK/1.2" + }, + "context": { + "description": "The context, including its kind and attributes", + "example": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/projects/my-project/environments/my-environment", + "type": "application/json" + }, + "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" + } + } + }, + "_access": { + "description": "Details on the allowed and denied actions for this context instance", + "$ref": "#/components/schemas/Access" + }, + "associatedContexts": { + "type": "integer", + "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.", + "example": 0 + } + } + }, + "ContextSearch": { + "type": "object", + "properties": { + "filter": { + "type": "string", + "description": "A collection of context filters", + "example": "*.name startsWith Jo,kind anyOf [\"user\",\"organization\"]" + }, + "sort": { + "type": "string", + "description": "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.", + "example": "-ts" + }, + "limit": { + "type": "integer", + "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", + "example": 10 + }, + "continuationToken": { + "type": "string", + "description": "Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the next link instead, because this value is an obfuscated string.", + "example": "QAGFKH1313KUGI2351" + } + } + }, + "Contexts": { + "type": "object", + "required": [ + "_environmentId", + "items" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "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" + } + } + }, + "totalCount": { + "type": "integer", + "description": "The number of contexts", + "example": 100 + }, + "_environmentId": { + "type": "string", + "description": "The environment ID where the context was evaluated", + "example": "57be1db38b75bf0772d11384" + }, + "continuationToken": { + "type": "string", + "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 next link instead.", + "example": "QAGFKH1313KUGI2351" + }, + "items": { + "type": "array", + "description": "A collection of contexts. Can include multiple versions of contexts that have the same kind and key, but different applicationIds.", + "items": { + "$ref": "#/components/schemas/ContextRecord" + } + } + } + }, + "CopiedFromEnv": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "description": "Key of feature flag copied", + "example": "source-flag-key-123abc" + }, + "version": { + "type": "integer", + "description": "Version of feature flag copied", + "example": 1 + } + } + }, + "CreateApprovalRequestRequest": { + "type": "object", + "required": [ + "resourceId", + "description", + "instructions" + ], + "properties": { + "resourceId": { + "type": "string", + "description": "String representation of the resource specifier", + "example": "proj/projKey:env/envKey:flag/flagKey" + }, + "comment": { + "type": "string", + "description": "Optional comment describing the approval request", + "example": "optional comment" + }, + "description": { + "type": "string", + "description": "A brief description of the changes you're requesting", + "example": "Requesting to update targeting" + }, + "instructions": { + "description": "List of instructions in semantic patch format to be applied to the feature flag. Review the [Update feature flag](/tag/Feature-flags) documentation for details on available instructions.", + "example": "[{\"kind\": \"addUserTargets\", \"values\": [ \"user-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]", + "$ref": "#/components/schemas/Instructions" + }, + "notifyMemberIds": { + "type": "array", + "description": "An array of member IDs. These members are notified to review the approval request.", + "items": { + "type": "string" + }, + "example": [ + "1234a56b7c89d012345e678f" + ] + }, + "notifyTeamKeys": { + "type": "array", + "description": "An array of team keys. The members of these teams are notified to review the approval request.", + "items": { + "type": "string" + }, + "example": [ + "example-reviewer-team" + ] + }, + "integrationConfig": { + "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 manifest.json for that integration, at https://github.com/launchdarkly/integration-framework.", + "$ref": "#/components/schemas/FormVariableConfig" + } + } + }, + "CreatePhaseInput": { + "type": "object", + "required": [ + "audiences", + "name" + ], + "properties": { + "audiences": { + "type": "array", + "description": "An ordered list of the audiences for this release phase. Each audience corresponds to a LaunchDarkly environment.", + "items": { + "$ref": "#/components/schemas/AudiencePost" + } + }, + "name": { + "type": "string", + "description": "The release phase name", + "example": "Phase 1 - Testing" + }, + "configuration": { + "description": "The configuration for the phase's rollout.", + "$ref": "#/components/schemas/PhaseConfiguration" } } }, - "ActionOutput": { + "CreateReleaseInput": { "type": "object", "required": [ - "kind", - "instructions" + "releasePipelineKey" + ], + "properties": { + "releaseVariationId": { + "type": "string", + "description": "The variation id to release to across all phases" + }, + "releasePipelineKey": { + "type": "string", + "description": "The key of the release pipeline to attach the flag to" + } + } + }, + "CreateReleasePipelineInput": { + "type": "object", + "required": [ + "key", + "name", + "phases" + ], + "properties": { + "description": { + "type": "string", + "description": "The release pipeline description", + "example": "Standard pipeline to roll out to production" + }, + "key": { + "type": "string", + "description": "The unique identifier of this release pipeline", + "example": "standard-pipeline" + }, + "name": { + "type": "string", + "description": "The name of the release pipeline", + "example": "Standard Pipeline" + }, + "phases": { + "type": "array", + "description": "A logical grouping of one or more environments that share attributes for rolling out changes", + "items": { + "$ref": "#/components/schemas/CreatePhaseInput" + } + }, + "tags": { + "type": "array", + "description": "A list of tags for this release pipeline", + "items": { + "type": "string" + }, + "example": [ + "example-tag" + ] + }, + "isProjectDefault": { + "type": "boolean", + "description": "Whether or not the newly created pipeline should be set as the default pipeline for this project" + }, + "isLegacy": { + "type": "boolean", + "description": "Whether or not the pipeline is enabled for Release Automation." + } + } + }, + "CreateWorkflowTemplateInput": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "workflowId": { + "$ref": "#/components/schemas/FeatureWorkflowId" + }, + "stages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StageInput" + } + }, + "projectKey": { + "type": "string" + }, + "environmentKey": { + "type": "string" + }, + "flagKey": { + "type": "string" + } + } + }, + "CredibleIntervalRep": { + "type": "object", + "properties": { + "upper": { + "type": "number", + "description": "The upper bound", + "example": 0.6713222134386467 + }, + "lower": { + "type": "number", + "description": "The lower bound", + "example": 0.4060771673663068 + } + } + }, + "CustomProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/customProperty" + } + }, + "CustomRole": { + "type": "object", + "required": [ + "_id", + "_links", + "key", + "name", + "policy" + ], + "properties": { + "_id": { + "type": "string", + "description": "The ID of the custom role", + "example": "1234a56b7c89d012345e678f" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "_access": { + "description": "Details on the allowed and denied actions for this custom role", + "$ref": "#/components/schemas/Access" + }, + "description": { + "type": "string", + "description": "The description of the custom role", + "example": "This custom role is just an example" + }, + "key": { + "type": "string", + "description": "The key of the custom role", + "example": "example-custom-role" + }, + "name": { + "type": "string", + "description": "The name of the custom role", + "example": "Example custom role" + }, + "policy": { + "type": "array", + "description": "An array of the policies that comprise this custom role", + "items": { + "$ref": "#/components/schemas/Statement" + } + }, + "basePermissions": { + "description": "Base permissions to use for this role. Only applicable to roles created prior to October 2024.", + "example": "reader", + "$ref": "#/components/schemas/RoleType" + }, + "resourceCategory": { + "description": "The category of resources this role is intended to manage. Can be organization, project, or any.", + "$ref": "#/components/schemas/ResourceCategory" + }, + "assignedTo": { + "description": "The number of teams and members this role is assigned to", + "$ref": "#/components/schemas/AssignedToRep" + } + } + }, + "CustomRolePost": { + "type": "object", + "required": [ + "name", + "key", + "policy" + ], + "properties": { + "name": { + "type": "string", + "description": "A human-friendly name for the custom role", + "example": "Ops team" + }, + "key": { + "type": "string", + "description": "The custom role key", + "example": "role-key-123abc" + }, + "description": { + "type": "string", + "description": "Description of custom role", + "example": "An example role for members of the ops team" + }, + "policy": { + "description": "Resource statements for custom role", + "$ref": "#/components/schemas/StatementPostList" + }, + "basePermissions": { + "description": "Base permissions to use for this role. Only applicable to roles created prior to October 2024.", + "example": "reader", + "enum": [ + "reader", + "no_access" + ], + "$ref": "#/components/schemas/RoleType" + } + } + }, + "CustomRoles": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "items": { + "type": "array", + "description": "An array of custom roles", + "items": { + "$ref": "#/components/schemas/CustomRole" + } + }, + "totalCount": { + "type": "integer", + "description": "The total number of custom roles" + } + } + }, + "CustomWorkflowInput": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "maintainerId": { + "description": "The ID of the workflow maintainer. Defaults to the workflow creator.", + "example": "12ab3c45de678910abc12345", + "$ref": "#/components/schemas/ObjectId" + }, + "name": { + "type": "string", + "description": "The workflow name", + "example": "Progressive rollout starting in two days" + }, + "description": { + "type": "string", + "description": "The workflow description", + "example": "Turn flag on for 10% of users each day" + }, + "stages": { + "type": "array", + "description": "A list of the workflow stages", + "items": { + "$ref": "#/components/schemas/StageInput" + } + }, + "templateKey": { + "type": "string", + "description": "The template key" + } + } + }, + "CustomWorkflowMeta": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the workflow stage that required this approval request", + "example": "Example workflow name" + }, + "stage": { + "description": "Details on the stage of the workflow where this approval request is required", + "$ref": "#/components/schemas/CustomWorkflowStageMeta" + } + } + }, + "CustomWorkflowOutput": { + "type": "object", + "required": [ + "_id", + "_version", + "_conflicts", + "_creationDate", + "_maintainerId", + "_links", + "name", + "_execution" + ], + "properties": { + "_id": { + "type": "string", + "description": "The ID of the workflow", + "example": "12ab3c4d5ef1a2345bcde67f" + }, + "_version": { + "type": "integer", + "description": "The version of the workflow", + "example": 1 + }, + "_conflicts": { + "type": "array", + "description": "Any conflicts that are present in the workflow stages", + "items": { + "$ref": "#/components/schemas/ConflictOutput" + } + }, + "_creationDate": { + "description": "Timestamp of when the workflow was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "_maintainerId": { + "type": "string", + "description": "The member ID of the maintainer of the workflow. Defaults to the workflow creator.", + "example": "12ab3c45de678910abc12345" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "name": { + "type": "string", + "description": "The name of the workflow", + "example": "Progressive rollout starting in two days" + }, + "description": { + "type": "string", + "description": "A brief description of the workflow", + "example": "Turn flag on for 10% of customers each day" + }, + "kind": { + "type": "string", + "description": "The kind of workflow", + "example": "custom" + }, + "stages": { + "type": "array", + "description": "The stages that make up the workflow. Each stage contains conditions and actions.", + "items": { + "$ref": "#/components/schemas/StageOutput" + } + }, + "_execution": { + "description": "The current execution status of the workflow", + "example": "{\"status\": \"completed\"}", + "$ref": "#/components/schemas/ExecutionOutput" + }, + "meta": { + "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", + "$ref": "#/components/schemas/WorkflowTemplateMetadata" + }, + "templateKey": { + "type": "string", + "description": "For workflows being created from a workflow template, this value is the template's key", + "example": "example-workflow-template" + } + } + }, + "CustomWorkflowStageMeta": { + "type": "object", + "properties": { + "index": { + "type": "integer", + "description": "The zero-based index of the workflow stage", + "example": 0 + }, + "name": { + "type": "string", + "description": "The name of the workflow stage", + "example": "Stage 1" + } + } + }, + "CustomWorkflowsListingOutput": { + "type": "object", + "required": [ + "items", + "totalCount", + "_links" + ], + "properties": { + "items": { + "type": "array", + "description": "An array of workflows", + "items": { + "$ref": "#/components/schemas/CustomWorkflowOutput" + } + }, + "totalCount": { + "type": "integer", + "description": "Total number of workflows", + "example": 1 + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + } + } + }, + "DateVersion": { + "type": "integer" + }, + "DefaultClientSideAvailability": { + "type": "object", + "required": [ + "usingMobileKey", + "usingEnvironmentId" + ], + "properties": { + "usingMobileKey": { + "type": "boolean", + "description": "Whether to enable availability for mobile SDKs", + "example": true + }, + "usingEnvironmentId": { + "type": "boolean", + "description": "Whether to enable availability for client-side SDKs", + "example": true + } + } + }, + "DefaultClientSideAvailabilityPost": { + "type": "object", + "required": [ + "usingEnvironmentId", + "usingMobileKey" + ], + "properties": { + "usingEnvironmentId": { + "type": "boolean", + "description": "Whether to enable availability for client-side SDKs.", + "example": true + }, + "usingMobileKey": { + "type": "boolean", + "description": "Whether to enable availability for mobile SDKs.", + "example": true + } + } + }, + "Defaults": { + "type": "object", + "required": [ + "onVariation", + "offVariation" ], "properties": { - "kind": { - "type": "string", - "description": "The type of action for this stage", - "example": "patch" + "onVariation": { + "type": "integer", + "description": "The index, from the array of variations for this flag, of the variation to serve by default when targeting is on.", + "example": 0 }, - "instructions": { - "description": "An array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag.", - "example": "[{\"kind\": \"turnFlagOn\"}]", - "$ref": "#/components/schemas/Instructions" + "offVariation": { + "type": "integer", + "description": "The index, from the array of variations for this flag, of the variation to serve by default when targeting is off.", + "example": 1 } } }, - "ActionSpecifier": { - "type": "string" - }, - "AllVariationsSummary": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/VariationSummary" + "DependentExperimentListRep": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DependentExperimentRep" } }, - "ApplicationCollectionRep": { + "DependentExperimentRep": { "type": "object", + "required": [ + "key", + "name", + "environmentId", + "environmentKey", + "creationDate", + "_links" + ], "properties": { + "key": { + "type": "string", + "description": "The experiment key", + "example": "experiment-key-123abc" + }, + "name": { + "type": "string", + "description": "The experiment name", + "example": "Example experiment" + }, + "environmentId": { + "type": "string", + "description": "The environment ID", + "example": "1234a56b7c89d012345e678f" + }, + "environmentKey": { + "type": "string", + "description": "The environment key", + "example": "production" + }, + "creationDate": { + "description": "Timestamp of when the experiment was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "archivedDate": { + "description": "Timestamp of when the experiment was archived", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" - }, - "items": { - "type": "array", - "description": "A list of applications", - "items": { - "$ref": "#/components/schemas/ApplicationRep" + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/projects/my-project/environments/my-environment", + "type": "application/json" + }, + "self": { + "href": "/api/v2/projects/my-project/environments/my-environment/experiments/example-experiment", + "type": "application/json" + } } - }, - "totalCount": { - "type": "integer", - "description": "The number of applications", - "example": 1 } } }, - "ApplicationFlagCollectionRep": { + "DependentFlag": { "type": "object", + "required": [ + "key", + "_links", + "_site" + ], "properties": { - "items": { - "type": "array", - "description": "A list of the flags that have been evaluated by the application", - "items": { - "$ref": "#/components/schemas/FlagListingRep" - } + "name": { + "type": "string", + "description": "The flag name", + "example": "Example dependent flag" }, - "totalCount": { - "type": "integer", - "description": "The number of flags that have been evaluated by the application", - "example": 1 + "key": { + "type": "string", + "description": "The flag key", + "example": "dependent-flag-key-123abc" }, "_links": { "type": "object", @@ -24350,25 +34174,31 @@ "$ref": "#/components/schemas/Link" }, "description": "The location and content type of related resources" + }, + "_site": { + "description": "Details on how to access the dependent flag in the LaunchDarkly UI", + "example": "{ \"href\": \"/example-project/example-environment/features/example-dependent-flag\", \"type\": \"text/html\" }", + "$ref": "#/components/schemas/Link" } } }, - "ApplicationRep": { + "DependentFlagEnvironment": { "type": "object", "required": [ - "autoAdded", "key", - "kind", - "name" + "_links", + "_site" ], "properties": { - "flags": { - "description": "Details about the flags that have been evaluated by the application", - "$ref": "#/components/schemas/ApplicationFlagCollectionRep" + "name": { + "type": "string", + "description": "The environment name", + "example": "Example environment" }, - "_access": { - "description": "Details on the allowed and denied actions for this application", - "$ref": "#/components/schemas/Access" + "key": { + "type": "string", + "description": "The environment key", + "example": "environment-key-123abc" }, "_links": { "type": "object", @@ -24377,62 +34207,27 @@ }, "description": "The location and content type of related resources" }, - "_version": { - "type": "integer", - "description": "Version of the application" - }, - "autoAdded": { - "type": "boolean", - "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.", - "example": true - }, - "creationDate": { - "description": "Timestamp of when the application version was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "description": { - "type": "string", - "description": "The application description", - "example": "The LaunchDarkly Cafe app" - }, - "key": { - "type": "string", - "description": "The unique identifier of this application", - "example": "com.launchdarkly.cafe" - }, - "kind": { - "type": "string", - "description": "To distinguish the kind of application", - "example": "mobile", - "enum": [ - "browser", - "mobile", - "server" - ] - }, - "_maintainer": { - "description": "Associated maintainer member or team info for the application", - "$ref": "#/components/schemas/MaintainerRep" - }, - "name": { - "type": "string", - "description": "The name of the application", - "example": "LaunchDarklyCafe" + "_site": { + "description": "Details on how to access the dependent flag in this environment in the LaunchDarkly UI", + "example": "{ \"href\": \"/example-project/example-environment/features/example-dependent-flag\", \"type\": \"text/html\" }", + "$ref": "#/components/schemas/Link" } } }, - "ApplicationVersionRep": { + "DependentFlagsByEnvironment": { "type": "object", "required": [ - "autoAdded", - "key", - "name" + "items", + "_links", + "_site" ], "properties": { - "_access": { - "description": "Details on the allowed and denied actions for this application version", - "$ref": "#/components/schemas/Access" + "items": { + "type": "array", + "description": "A list of dependent flags, which are flags that use the requested flag as a prerequisite", + "items": { + "$ref": "#/components/schemas/DependentFlag" + } }, "_links": { "type": "object", @@ -24441,325 +34236,384 @@ }, "description": "The location and content type of related resources" }, - "_version": { - "type": "integer", - "description": "Version of the application version" - }, - "autoAdded": { - "type": "boolean", - "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. ", - "example": true - }, - "creationDate": { - "description": "Timestamp of when the application version was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, + "_site": { + "description": "Details on how to access the prerequisite flag in the LaunchDarkly UI", + "example": "{ \"href\": \"/example-project/~/features/example-prereq-flag\", \"type\": \"text/html\" }", + "$ref": "#/components/schemas/Link" + } + } + }, + "DependentMetricGroupRep": { + "type": "object", + "required": [ + "key", + "name", + "kind", + "_links" + ], + "properties": { "key": { "type": "string", - "description": "The unique identifier of this application version", - "example": "2" + "description": "A unique key to reference the metric group", + "example": "metric-group-key-123abc" }, "name": { "type": "string", - "description": "The name of this version", - "example": "01.02.03" + "description": "A human-friendly name for the metric group", + "example": "My metric group" + }, + "kind": { + "type": "string", + "description": "The type of the metric group", + "example": "funnel", + "enum": [ + "funnel", + "standard" + ] }, - "supported": { - "type": "boolean", - "description": "Whether this version is supported. Only applicable if the application kind is mobile.", - "example": true - } - } - }, - "ApplicationVersionsCollectionRep": { - "type": "object", - "properties": { "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" - }, - "items": { - "type": "array", - "description": "A list of the versions for this application", - "items": { - "$ref": "#/components/schemas/ApplicationVersionRep" + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/projects/my-project", + "type": "application/json" + }, + "self": { + "href": "/api/v2/projects/my-project/metric-groups/my-metric-group", + "type": "application/json" + } } - }, - "totalCount": { - "type": "integer", - "description": "The number of versions for this application", - "example": 1 } } }, - "ApprovalRequestResponse": { + "DependentMetricGroupRepWithMetrics": { "type": "object", "required": [ - "_id", - "_version", - "creationDate", - "serviceKind", - "reviewStatus", - "allReviews", - "notifyMemberIds", - "status", - "instructions", - "conflicts", + "key", + "name", + "kind", "_links" ], "properties": { - "_id": { - "type": "string", - "description": "The ID of this approval request", - "example": "12ab3c45de678910abc12345" - }, - "_version": { - "type": "integer", - "description": "Version of the approval request", - "example": 1 - }, - "creationDate": { - "description": "Timestamp of when the approval request was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "serviceKind": { - "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.", - "example": "launchdarkly", - "$ref": "#/components/schemas/ApprovalRequestServiceKind" - }, - "requestorId": { + "key": { "type": "string", - "description": "The ID of the member who requested the approval", - "example": "12ab3c45de678910abc12345" + "description": "A unique key to reference the metric group", + "example": "metric-group-key-123abc" }, - "description": { + "name": { "type": "string", - "description": "A human-friendly name for the approval request", - "example": "example: request approval from someone" + "description": "A human-friendly name for the metric group", + "example": "My metric group" }, - "reviewStatus": { + "kind": { "type": "string", - "description": "Current status of the review of this approval request", - "example": "pending", + "description": "The type of the metric group", + "example": "funnel", "enum": [ - "approved", - "declined", - "pending" + "funnel", + "standard" ] }, - "allReviews": { - "type": "array", - "description": "An array of individual reviews of this approval request", - "items": { - "$ref": "#/components/schemas/ReviewResponse" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/projects/my-project", + "type": "application/json" + }, + "self": { + "href": "/api/v2/projects/my-project/metric-groups/my-metric-group", + "type": "application/json" + } } }, - "notifyMemberIds": { + "metrics": { "type": "array", - "description": "An array of member IDs. These members are notified to review the approval request.", + "description": "The metrics in the metric group", "items": { - "type": "string" - }, - "example": [ - "1234a56b7c89d012345e678f" - ] - }, - "appliedDate": { - "description": "Timestamp of when the approval request was applied", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "$ref": "#/components/schemas/MetricInGroupRep" + } + } + } + }, + "DependentMetricOrMetricGroupRep": { + "type": "object", + "required": [ + "key", + "_versionId", + "name", + "kind", + "_links", + "isGroup" + ], + "properties": { + "key": { + "type": "string", + "description": "A unique key to reference the metric or metric group", + "example": "metric-key-123abc" }, - "appliedByMemberId": { + "_versionId": { "type": "string", - "description": "The member ID of the member who applied the approval request", - "example": "1234a56b7c89d012345e678f" + "description": "The version ID of the metric or metric group" }, - "appliedByServiceTokenId": { + "name": { "type": "string", - "description": "The service token ID of the service token which applied the approval request", - "example": "1234a56b7c89d012345e678f" + "description": "A human-friendly name for the metric or metric group", + "example": "My metric" }, - "status": { + "kind": { "type": "string", - "description": "Current status of the approval request", - "example": "pending", + "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", + "example": "custom", "enum": [ - "pending", - "completed", - "failed", - "scheduled" + "pageview", + "click", + "custom", + "funnel", + "standard" ] }, - "instructions": { - "description": "List of instructions in semantic patch format to be applied to the feature flag", - "example": "[{\"kind\": \"turnFlagOn\"}]", - "$ref": "#/components/schemas/Instructions" + "isNumeric": { + "type": "boolean", + "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", + "example": true }, - "conflicts": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/metrics/my-project/my-metric", + "type": "application/json" + } + } + }, + "isGroup": { + "type": "boolean", + "description": "Whether this is a metric group or a metric" + }, + "metrics": { "type": "array", - "description": "Details on any conflicting approval requests", + "description": "An ordered list of the metrics in this metric group", "items": { - "$ref": "#/components/schemas/Conflict" + "$ref": "#/components/schemas/MetricInGroupRep" } + } + } + }, + "Destination": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "The ID of this Data Export destination", + "example": "610addeadbeefaa86ec9a7d4" }, "_links": { "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" - }, - "executionDate": { - "description": "Timestamp for when instructions will be executed", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/destinations", + "type": "application/json" + }, + "self": { + "href": "/api/v2/destinations/my-project/my-environment/610addeadbeefaa86ec9a7d4", + "type": "application/json" + } + } }, - "operatingOnId": { + "name": { "type": "string", - "description": "ID of scheduled change to edit or delete", - "example": "12ab3c45de678910abc12345" + "description": "A human-readable name for your Data Export destination", + "example": "example-destination" }, - "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", - "$ref": "#/components/schemas/IntegrationMetadata" + "kind": { + "type": "string", + "description": "The type of Data Export destination", + "example": "google-pubsub", + "enum": [ + "google-pubsub", + "kinesis", + "mparticle", + "segment", + "azure-event-hubs", + "snowflake-v2" + ] }, - "source": { - "description": "Details about the source feature flag, if copied", - "$ref": "#/components/schemas/CopiedFromEnv" + "version": { + "type": "number", + "example": 1 }, - "customWorkflowMetadata": { - "description": "Details about the custom workflow, if this approval request is part of a custom workflow", - "$ref": "#/components/schemas/CustomWorkflowMeta" + "config": { + "description": "An object with the configuration parameters required for the destination type", + "example": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}" }, - "resourceId": { - "type": "string", - "description": "String representation of a resource" + "on": { + "type": "boolean", + "description": "Whether the export is on, that is, the status of the integration", + "example": true }, - "approvalSettings": { - "description": "The settings for this approval", - "$ref": "#/components/schemas/ApprovalSettings" + "_access": { + "description": "Details on the allowed and denied actions for this Data Export destination", + "$ref": "#/components/schemas/Access" } } }, - "ApprovalRequestServiceKind": { - "type": "string" - }, - "ApprovalSettings": { + "DestinationPost": { "type": "object", - "required": [ - "required", - "bypassApprovalsForPendingChanges", - "minNumApprovals", - "canReviewOwnRequest", - "canApplyDeclinedChanges", - "serviceKind", - "serviceConfig", - "requiredApprovalTags" - ], "properties": { - "required": { - "type": "boolean", - "description": "If approvals are required for this environment", - "example": true - }, - "bypassApprovalsForPendingChanges": { - "type": "boolean", - "description": "Whether to skip approvals for pending changes", - "example": false + "name": { + "type": "string", + "description": "A human-readable name for your Data Export destination", + "example": "example-destination" }, - "minNumApprovals": { - "type": "integer", - "description": "Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.", - "example": 1 + "kind": { + "type": "string", + "description": "The type of Data Export destination", + "example": "google-pubsub", + "enum": [ + "google-pubsub", + "kinesis", + "mparticle", + "segment", + "azure-event-hubs", + "snowflake-v2" + ] }, - "canReviewOwnRequest": { - "type": "boolean", - "description": "Allow someone who makes an approval request to apply their own change", - "example": false + "config": { + "description": "An object with the configuration parameters required for the destination type", + "example": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}" }, - "canApplyDeclinedChanges": { + "on": { "type": "boolean", - "description": "Allow applying the change as long as at least one person has approved", + "description": "Whether the export is on. Displayed as the integration status in the LaunchDarkly UI.", "example": true - }, - "serviceKind": { - "type": "string", - "description": "Which service to use for managing approvals", - "example": "launchdarkly" - }, - "serviceConfig": { + } + } + }, + "Destinations": { + "type": "object", + "properties": { + "_links": { "type": "object", - "additionalProperties": {}, - "example": {} + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/destinations", + "type": "application/json" + } + } }, - "requiredApprovalTags": { + "items": { "type": "array", - "description": "Require approval only on flags with the provided tags. Otherwise all flags will require approval.", + "description": "An array of Data Export destinations", "items": { - "type": "string" - }, - "example": [ - "require-approval" + "$ref": "#/components/schemas/Destination" + } + } + } + }, + "Distribution": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The type of distribution.", + "example": "normal", + "enum": [ + "normal", + "beta" ] + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "description": "The parameters of the distribution. The parameters are different for each distribution type. When kind is normal, the parameters of the distribution are 'mu' and 'sigma'. When kind is beta, the parameters of the distribution are 'alpha' and 'beta.'" } } }, - "Audience": { + "DurationUnit": { + "type": "string" + }, + "DynamicOptions": { "type": "object", - "required": [ - "environment", - "name" - ], "properties": { - "environment": { - "description": "Details about the environment", - "$ref": "#/components/schemas/EnvironmentSummary" + "endpoint": { + "$ref": "#/components/schemas/Endpoint" }, - "name": { - "type": "string", - "description": "The release phase name", - "example": "Phase 1 - Testing" + "parser": { + "$ref": "#/components/schemas/DynamicOptionsParser" } } }, - "AudiencePost": { + "DynamicOptionsParser": { "type": "object", - "required": [ - "environmentKey", - "name" - ], "properties": { - "environmentKey": { - "type": "string", - "description": "A project-unique key for the environment." + "optionsItems": { + "$ref": "#/components/schemas/OptionsArray" }, - "name": { - "type": "string", - "description": "The audience name" + "optionsPath": { + "type": "string" } } }, - "Audiences": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Audience" + "Endpoint": { + "type": "object", + "properties": { + "headers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HeaderItems" + } + }, + "hmacSignature": { + "$ref": "#/components/schemas/HMACSignature" + }, + "method": { + "type": "string" + }, + "url": { + "type": "string" + } } }, - "AuditLogEntryListingRep": { + "Environment": { "type": "object", "required": [ "_links", "_id", - "_accountId", - "date", - "accesses", - "kind", + "key", "name", - "description", - "shortDescription" + "apiKey", + "mobileKey", + "color", + "defaultTtl", + "secureMode", + "defaultTrackEvents", + "requireComments", + "confirmChanges", + "tags", + "critical" ], "properties": { "_links": { @@ -24767,125 +34621,173 @@ "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/projects/my-project/environments/my-environment", + "type": "application/json" + } + } }, "_id": { "type": "string", - "description": "The ID of the audit log entry", - "example": "1234a56b7c89d012345e678f" + "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.", + "example": "57be1db38b75bf0772d11384" }, - "_accountId": { + "key": { "type": "string", - "description": "The ID of the account to which this audit log entry belongs", - "example": "1234a56b7c89d012345e678f" - }, - "date": { - "description": "Timestamp of the audit log entry", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "accesses": { - "type": "array", - "description": "Details on the actions performed and resources acted on in this audit log entry", - "items": { - "$ref": "#/components/schemas/ResourceAccess" - } - }, - "kind": { - "description": "The type of resource this audit log entry refers to", - "example": "flag", - "$ref": "#/components/schemas/ResourceKind" + "description": "A project-unique key for the new environment", + "example": "environment-key-123abc" }, "name": { "type": "string", - "description": "The name of the resource this audit log entry refers to", - "example": "Example feature flag" + "description": "A human-friendly name for the new environment", + "example": "My Environment" }, - "description": { + "apiKey": { "type": "string", - "description": "Description of the change recorded in the audit log entry", - "example": "Example, turning on the flag for testing" + "description": "The SDK key for the environment. Use this for authorization in server-side SDKs.", + "example": "sdk-xxx" }, - "shortDescription": { + "mobileKey": { "type": "string", - "description": "Shorter version of the change recorded in the audit log entry", - "example": "Example, turning on the flag" + "description": "The mobile key for the environment. Use this for authorization in mobile SDKs.", + "example": "mob-xxx" }, - "comment": { + "color": { "type": "string", - "description": "Optional comment for the audit log entry", - "example": "This is an automated test" + "description": "The color used to indicate this environment in the UI", + "example": "F5A623" }, - "subject": { - "description": "Details of the subject who initiated the action described in the audit log entry", - "$ref": "#/components/schemas/SubjectDataRep" + "defaultTtl": { + "type": "integer", + "description": "The default time (in minutes) that the PHP SDK can cache feature flag rules locally", + "example": 5 }, - "member": { - "description": "Details of the member who initiated the action described in the audit log entry", - "$ref": "#/components/schemas/MemberDataRep" + "secureMode": { + "type": "boolean", + "description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user", + "example": true }, - "token": { - "description": "Details of the access token that initiated the action described in the audit log entry", - "$ref": "#/components/schemas/TokenSummary" + "defaultTrackEvents": { + "type": "boolean", + "description": "Enables tracking detailed information for new flags by default", + "example": false }, - "app": { - "description": "Details of the authorized application that initiated the action described in the audit log entry", - "$ref": "#/components/schemas/AuthorizedAppDataRep" + "requireComments": { + "type": "boolean", + "description": "Whether members who modify flags and segments through the LaunchDarkly user interface are required to add a comment", + "example": true }, - "titleVerb": { - "type": "string", - "description": "The action and resource recorded in this audit log entry", - "example": "turned on the flag" + "confirmChanges": { + "type": "boolean", + "description": "Whether members who modify flags and segments through the LaunchDarkly user interface are required to confirm those changes", + "example": true }, - "title": { - "type": "string", - "description": "A description of what occurred, in the format member titleVerb target" + "tags": { + "type": "array", + "description": "A list of tags for this environment", + "items": { + "type": "string" + }, + "example": [ + "ops" + ] }, - "target": { - "description": "Details of the resource acted upon in this audit log entry", - "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", - "$ref": "#/components/schemas/TargetResourceRep" + "approvalSettings": { + "description": "Details on the approval settings for this environment", + "$ref": "#/components/schemas/ApprovalSettings" }, - "parent": { - "$ref": "#/components/schemas/ParentResourceRep" + "resourceApprovalSettings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ApprovalSettings" + }, + "description": "Details on the approval settings for this environment for each resource kind" + }, + "critical": { + "type": "boolean", + "description": "Whether the environment is critical", + "example": true } } }, - "AuditLogEntryListingRepCollection": { + "EnvironmentPost": { "type": "object", "required": [ - "items", - "_links" + "name", + "key", + "color" ], "properties": { - "items": { + "name": { + "type": "string", + "description": "A human-friendly name for the new environment", + "example": "My Environment" + }, + "key": { + "type": "string", + "description": "A project-unique key for the new environment", + "example": "environment-key-123abc" + }, + "color": { + "type": "string", + "description": "A color to indicate this environment in the UI", + "example": "F5A623" + }, + "defaultTtl": { + "type": "integer", + "description": "The default time (in minutes) that the PHP SDK can cache feature flag rules locally", + "example": 5 + }, + "secureMode": { + "type": "boolean", + "description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user", + "example": true + }, + "defaultTrackEvents": { + "type": "boolean", + "description": "Enables tracking detailed information for new flags by default", + "example": false + }, + "confirmChanges": { + "type": "boolean", + "description": "Requires confirmation for all flag and segment changes via the UI in this environment", + "example": false + }, + "requireComments": { + "type": "boolean", + "description": "Requires comments for all flag and segment changes via the UI in this environment", + "example": false + }, + "tags": { "type": "array", - "description": "An array of audit log entries", + "description": "Tags to apply to the new environment", "items": { - "$ref": "#/components/schemas/AuditLogEntryListingRep" - } - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "type": "string" }, - "description": "The location and content type of related resources" + "example": [ + "ops" + ] + }, + "source": { + "description": "Indicates that the new environment created will be cloned from the provided source environment", + "$ref": "#/components/schemas/SourceEnv" + }, + "critical": { + "type": "boolean", + "description": "Whether the environment is critical", + "example": true } } }, - "AuditLogEntryRep": { + "EnvironmentSummary": { "type": "object", "required": [ "_links", - "_id", - "_accountId", - "date", - "accesses", - "kind", + "key", "name", - "description", - "shortDescription" + "color" ], "properties": { "_links": { @@ -24893,921 +34795,868 @@ "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" - }, - "_id": { - "type": "string", - "description": "The ID of the audit log entry", - "example": "1234a56b7c89d012345e678f" - }, - "_accountId": { - "type": "string", - "description": "The ID of the account to which this audit log entry belongs", - "example": "1234a56b7c89d012345e678f" - }, - "date": { - "description": "Timestamp of the audit log entry", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "accesses": { - "type": "array", - "description": "Details on the actions performed and resources acted on in this audit log entry", - "items": { - "$ref": "#/components/schemas/ResourceAccess" + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/projects/my-project/environments/my-environment", + "type": "application/json" + } } }, - "kind": { - "description": "The type of resource this audit log entry refers to", - "example": "flag", - "$ref": "#/components/schemas/ResourceKind" - }, - "name": { - "type": "string", - "description": "The name of the resource this audit log entry refers to", - "example": "Example feature flag" - }, - "description": { - "type": "string", - "description": "Description of the change recorded in the audit log entry", - "example": "Example, turning on the flag for testing" - }, - "shortDescription": { - "type": "string", - "description": "Shorter version of the change recorded in the audit log entry", - "example": "Example, turning on the flag" - }, - "comment": { + "key": { "type": "string", - "description": "Optional comment for the audit log entry", - "example": "This is an automated test" - }, - "subject": { - "description": "Details of the subject who initiated the action described in the audit log entry", - "$ref": "#/components/schemas/SubjectDataRep" - }, - "member": { - "description": "Details of the member who initiated the action described in the audit log entry", - "$ref": "#/components/schemas/MemberDataRep" - }, - "token": { - "description": "Details of the access token that initiated the action described in the audit log entry", - "$ref": "#/components/schemas/TokenSummary" - }, - "app": { - "description": "Details of the authorized application that initiated the action described in the audit log entry", - "$ref": "#/components/schemas/AuthorizedAppDataRep" + "description": "A project-unique key for the environment", + "example": "environment-key-123abc" }, - "titleVerb": { + "name": { "type": "string", - "description": "The action and resource recorded in this audit log entry", - "example": "turned on the flag" + "description": "A human-friendly name for the environment", + "example": "My Environment" }, - "title": { + "color": { "type": "string", - "description": "A description of what occurred, in the format member titleVerb target" - }, - "target": { - "description": "Details of the resource acted upon in this audit log entry", - "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", - "$ref": "#/components/schemas/TargetResourceRep" - }, - "parent": { - "$ref": "#/components/schemas/ParentResourceRep" - }, - "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" - }, - "triggerBody": { - "description": "A JSON representation of the external trigger for this audit log entry, if any" - }, - "merge": { - "description": "A JSON representation of the merge information for this audit log entry, if any" - }, - "previousVersion": { - "description": "If the audit log entry has been updated, this is a JSON representation of the previous version of the entity" + "description": "The color used to indicate this environment in the UI", + "example": "F5A623" + } + } + }, + "Environments": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "currentVersion": { - "description": "If the audit log entry has been updated, this is a JSON representation of the current version of the entity" + "totalCount": { + "type": "integer", + "description": "The number of environments returned", + "example": 2 }, - "subentries": { + "items": { "type": "array", + "description": "An array of environments", "items": { - "$ref": "#/components/schemas/AuditLogEntryListingRep" + "$ref": "#/components/schemas/Environment" } } } }, - "AuthorizedAppDataRep": { + "EvaluationReason": { "type": "object", + "required": [ + "kind" + ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } + "kind": { + "type": "string", + "description": "Describes the general reason that LaunchDarkly selected this variation.", + "example": "OFF" }, - "_id": { + "ruleIndex": { + "type": "integer", + "description": "The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based.", + "example": 3 + }, + "ruleID": { "type": "string", - "description": "The ID of the authorized application" + "description": "The unique identifier of the matching rule if the kind is 'RULE_MATCH'.", + "example": "1234567890" }, - "isScim": { + "prerequisiteKey": { + "type": "string", + "description": "The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'.", + "example": "someotherflagkey" + }, + "inExperiment": { "type": "boolean", - "description": "Whether the application is authorized through SCIM" + "description": "Indicates whether the evaluation occurred as part of an experiment.", + "example": true }, - "name": { + "errorKind": { "type": "string", - "description": "The authorized application name" - }, - "maintainerName": { + "description": "The specific error type if the kind is 'ERROR'.", + "example": "USER_NOT_SPECIFIED" + } + } + }, + "ExecutionOutput": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { "type": "string", - "description": "The name of the maintainer for this authorized application" + "description": "The status of the execution of this workflow stage", + "example": "completed" + }, + "stopDate": { + "description": "Timestamp of when the workflow was completed.", + "example": "1718467200000", + "$ref": "#/components/schemas/UnixMillis" } } }, - "BigSegmentStoreIntegration": { + "ExpandableApprovalRequestResponse": { "type": "object", "required": [ - "_links", "_id", - "integrationKey", - "projectKey", - "environmentKey", - "config", - "on", - "tags", - "name", - "version", - "_status" + "_version", + "creationDate", + "serviceKind", + "reviewStatus", + "allReviews", + "notifyMemberIds", + "status", + "instructions", + "conflicts", + "_links" ], "properties": { - "_links": { - "description": "The location and content type of related resources", - "$ref": "#/components/schemas/BigSegmentStoreIntegrationLinks" - }, "_id": { "type": "string", - "description": "The integration ID", - "example": "12ab3c4d5ef1a2345bcde67f" + "description": "The ID of this approval request", + "example": "12ab3c45de678910abc12345" }, - "integrationKey": { - "type": "string", - "description": "The integration key", - "example": "redis", - "enum": [ - "redis", - "dynamodb" - ] + "_version": { + "type": "integer", + "description": "Version of the approval request", + "example": 1 }, - "projectKey": { + "creationDate": { + "description": "Timestamp of when the approval request was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "serviceKind": { + "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.", + "example": "launchdarkly", + "$ref": "#/components/schemas/ApprovalRequestServiceKind" + }, + "requestorId": { "type": "string", - "description": "The project key", - "example": "default" + "description": "The ID of the member who requested the approval", + "example": "12ab3c45de678910abc12345" }, - "environmentKey": { + "description": { "type": "string", - "description": "The environment key", - "example": "development" + "description": "A human-friendly name for the approval request", + "example": "example: request approval from someone" }, - "config": { - "description": "The delivery configuration for the given integration provider. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.", - "$ref": "#/components/schemas/FormVariableConfig" + "reviewStatus": { + "type": "string", + "description": "Current status of the review of this approval request", + "example": "pending", + "enum": [ + "approved", + "declined", + "pending" + ] }, - "on": { - "type": "boolean", - "description": "Whether the configuration is turned on", - "example": true + "allReviews": { + "type": "array", + "description": "An array of individual reviews of this approval request", + "items": { + "$ref": "#/components/schemas/ReviewResponse" + } }, - "tags": { + "notifyMemberIds": { "type": "array", - "description": "List of tags for this configuration", + "description": "An array of member IDs. These members are notified to review the approval request.", "items": { "type": "string" }, - "example": [] + "example": [ + "1234a56b7c89d012345e678f" + ] }, - "name": { + "appliedDate": { + "description": "Timestamp of when the approval request was applied", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "appliedByMemberId": { "type": "string", - "description": "Name of the configuration", - "example": "Development environment configuration" + "description": "The member ID of the member who applied the approval request", + "example": "1234a56b7c89d012345e678f" }, - "version": { - "type": "integer", - "description": "Version of the current configuration", - "example": 1 + "appliedByServiceTokenId": { + "type": "string", + "description": "The service token ID of the service token which applied the approval request", + "example": "1234a56b7c89d012345e678f" }, - "_access": { - "description": "Details on the allowed and denied actions for this configuration", - "$ref": "#/components/schemas/Access" + "status": { + "type": "string", + "description": "Current status of the approval request", + "example": "pending", + "enum": [ + "pending", + "completed", + "failed", + "scheduled" + ] }, - "_status": { - "description": "Details on the connection status of the persistent store integration", - "$ref": "#/components/schemas/BigSegmentStoreStatus" - } - } - }, - "BigSegmentStoreIntegrationCollection": { - "type": "object", - "required": [ - "_links", - "items" - ], - "properties": { - "_links": { - "description": "The location and content type of related resources", - "$ref": "#/components/schemas/BigSegmentStoreIntegrationCollectionLinks" + "instructions": { + "description": "List of instructions in semantic patch format to be applied to the feature flag", + "example": "[{\"kind\": \"turnFlagOn\"}]", + "$ref": "#/components/schemas/Instructions" }, - "items": { + "conflicts": { "type": "array", - "description": "An array of persistent store integration configurations", + "description": "Details on any conflicting approval requests", "items": { - "$ref": "#/components/schemas/BigSegmentStoreIntegration" + "$ref": "#/components/schemas/Conflict" } - } - } - }, - "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" + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" }, - "parent": { - "$ref": "#/components/schemas/Link" + "executionDate": { + "description": "Timestamp for when instructions will be executed", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" }, - "project": { - "$ref": "#/components/schemas/Link" + "operatingOnId": { + "type": "string", + "description": "ID of scheduled change to edit or delete", + "example": "12ab3c45de678910abc12345" }, - "environment": { - "$ref": "#/components/schemas/Link" - } - } - }, - "BigSegmentStoreStatus": { - "type": "object", - "properties": { - "available": { - "type": "boolean", - "description": "Whether the persistent store integration is fully synchronized with the LaunchDarkly environment, and the lastSync occurred within a few minutes", - "example": true + "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", + "$ref": "#/components/schemas/IntegrationMetadata" }, - "potentiallyStale": { - "type": "boolean", - "description": "Whether the persistent store integration may not be fully synchronized with the LaunchDarkly environment. true if the integration could be stale.", - "example": false + "source": { + "description": "Details about the source feature flag, if copied", + "$ref": "#/components/schemas/CopiedFromEnv" }, - "lastSync": { - "description": "Timestamp of when the most recent successful sync occurred between the persistent store integration and the LaunchDarkly environment.", - "example": "1717263000000", - "$ref": "#/components/schemas/UnixMillis" + "customWorkflowMetadata": { + "description": "Details about the custom workflow, if this approval request is part of a custom workflow", + "$ref": "#/components/schemas/CustomWorkflowMeta" }, - "lastError": { - "description": "Timestamp of when the most recent synchronization error occurred, if any", - "example": "1714584600000", - "$ref": "#/components/schemas/UnixMillis" + "resourceId": { + "type": "string", + "description": "String representation of a resource" }, - "errors": { + "approvalSettings": { + "description": "The settings for this approval", + "$ref": "#/components/schemas/ApprovalSettings" + }, + "project": { + "description": "Project the approval request belongs to", + "$ref": "#/components/schemas/Project" + }, + "environments": { "type": "array", + "description": "List of environments the approval impacts", "items": { - "$ref": "#/components/schemas/StoreIntegrationError" + "$ref": "#/components/schemas/Environment" } + }, + "flag": { + "description": "Flag the approval request belongs to", + "$ref": "#/components/schemas/ExpandedFlagRep" + }, + "resource": { + "description": "Resource the approval request belongs to", + "$ref": "#/components/schemas/ExpandedResourceRep" } } }, - "BigSegmentTarget": { + "ExpandableApprovalRequestsResponse": { "type": "object", "required": [ - "userKey", - "included", - "excluded" + "items", + "totalCount", + "_links" ], "properties": { - "userKey": { - "type": "string", - "description": "The target key" + "items": { + "type": "array", + "description": "An array of approval requests", + "items": { + "$ref": "#/components/schemas/ExpandableApprovalRequestResponse" + } }, - "included": { - "type": "boolean", - "description": "Indicates whether the target is included.
Included targets are always segment members, regardless of segment rules." + "totalCount": { + "type": "integer", + "description": "Total number of approval requests", + "example": 1 }, - "excluded": { - "type": "boolean", - "description": "Indicates whether the target is excluded.
Segment rules bypass excluded targets, so they will never be included based on rules. Excluded targets may still be included explicitly." + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" } } }, - "BooleanDefaults": { + "ExpandedFlagRep": { "type": "object", + "required": [ + "name", + "kind", + "key", + "_version", + "creationDate", + "variations", + "temporary", + "tags", + "_links", + "customProperties", + "archived" + ], "properties": { - "trueDisplayName": { + "name": { "type": "string", - "description": "The display name for the true variation, displayed in the LaunchDarkly user interface", - "example": "True" + "description": "A human-friendly name for the feature flag", + "example": "My Flag" }, - "falseDisplayName": { + "kind": { "type": "string", - "description": "The display name for the false variation, displayed in the LaunchDarkly user interface", - "example": "False" + "description": "Kind of feature flag", + "example": "boolean", + "enum": [ + "boolean", + "multivariate" + ] }, - "trueDescription": { + "description": { "type": "string", - "description": "The description for the true variation", - "example": "serve true" + "description": "Description of the feature flag", + "example": "This flag controls the example widgets" }, - "falseDescription": { + "key": { "type": "string", - "description": "The description for the false variation", - "example": "serve false" - }, - "onVariation": { - "type": "integer", - "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", - "example": 0 + "description": "A unique key used to reference the flag in your code", + "example": "flag-key-123abc" }, - "offVariation": { + "_version": { "type": "integer", - "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off", + "description": "Version of the feature flag", "example": 1 - } - } - }, - "BooleanFlagDefaults": { - "type": "object", - "required": [ - "trueDisplayName", - "falseDisplayName", - "trueDescription", - "falseDescription", - "onVariation", - "offVariation" - ], - "properties": { - "trueDisplayName": { - "type": "string", - "description": "The display name for the true variation, displayed in the LaunchDarkly user interface", - "example": "True" }, - "falseDisplayName": { - "type": "string", - "description": "The display name for the false variation, displayed in the LaunchDarkly user interface", - "example": "False" + "creationDate": { + "description": "Timestamp of flag creation date", + "example": "1494437420312", + "$ref": "#/components/schemas/UnixMillis" }, - "trueDescription": { - "type": "string", - "description": "The description for the true variation", - "example": "serve true" + "includeInSnippet": { + "type": "boolean", + "description": "Deprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK", + "example": true, + "deprecated": true }, - "falseDescription": { + "clientSideAvailability": { + "description": "Which type of client-side SDKs the feature flag is available to", + "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}", + "$ref": "#/components/schemas/ClientSideAvailability" + }, + "variations": { + "type": "array", + "description": "An array of possible variations for the flag", + "items": { + "$ref": "#/components/schemas/Variation" + }, + "example": [ + { + "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05", + "value": true + }, + { + "_id": "a00bf58d-d252-476c-b915-15a74becacb4", + "value": false + } + ] + }, + "temporary": { + "type": "boolean", + "description": "Whether the flag is a temporary flag", + "example": true + }, + "tags": { + "type": "array", + "description": "Tags for the feature flag", + "items": { + "type": "string" + }, + "example": [ + "example-tag" + ] + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/flags/my-project", + "type": "application/json" + }, + "self": { + "href": "/api/v2/flags/my-project/my-flag", + "type": "application/json" + } + } + }, + "maintainerId": { "type": "string", - "description": "The description for the false variation", - "example": "serve false" + "description": "The ID of the member who maintains the flag", + "example": "569f183514f4432160000007" }, - "onVariation": { - "type": "integer", - "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", - "example": 0 + "_maintainer": { + "description": "Details on the member who maintains this feature flag", + "$ref": "#/components/schemas/MemberSummary" + }, + "customProperties": { + "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.", + "example": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}", + "$ref": "#/components/schemas/CustomProperties" + }, + "archived": { + "type": "boolean", + "description": "Boolean indicating if the feature flag is archived", + "example": false + }, + "archivedDate": { + "description": "If archived is true, date of archive", + "example": "1494437420312", + "$ref": "#/components/schemas/UnixMillis" }, - "offVariation": { - "type": "integer", - "description": "The variation index of the flag variation to use for the default targeting behavior when a flag's targeting is off", - "example": 1 + "defaults": { + "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.", + "example": "{\"onVariation\":0,\"offVariation\":1}", + "$ref": "#/components/schemas/Defaults" } } }, - "BranchCollectionRep": { + "ExpandedResourceRep": { "type": "object", "required": [ - "_links", - "items" + "kind" ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "kind": { + "type": "string", + "description": "The type of resource", + "example": "flag" }, - "items": { - "type": "array", - "description": "An array of branches", - "items": { - "$ref": "#/components/schemas/BranchRep" - } + "flag": { + "$ref": "#/components/schemas/ExpandedFlagRep" + }, + "segment": { + "$ref": "#/components/schemas/UserSegment" } } }, - "BranchRep": { + "Experiment": { "type": "object", "required": [ + "key", "name", - "head", - "syncTime", + "_maintainerId", + "_creationDate", + "environmentKey", "_links" ], "properties": { + "_id": { + "type": "string", + "description": "The experiment ID", + "example": "12ab3c45de678910fgh12345" + }, + "key": { + "type": "string", + "description": "The experiment key", + "example": "experiment-key-123abc" + }, "name": { "type": "string", - "description": "The branch name", - "example": "main" + "description": "The experiment name", + "example": "Example experiment" }, - "head": { + "description": { "type": "string", - "description": "An ID representing the branch HEAD. For example, a commit SHA.", - "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" + "description": "The experiment description", + "example": "An example experiment, used in testing" }, - "updateSequenceId": { - "type": "integer", - "format": "int64", - "description": "An optional ID used to prevent older data from overwriting newer data", - "example": 25 + "_maintainerId": { + "type": "string", + "description": "The ID of the member who maintains this experiment.", + "example": "12ab3c45de678910fgh12345" }, - "syncTime": { - "description": "A timestamp indicating when the branch was last synced", - "example": "1636558831870", + "_creationDate": { + "description": "Timestamp of when the experiment was created", + "example": "1654104600000", "$ref": "#/components/schemas/UnixMillis" }, - "references": { - "type": "array", - "description": "An array of flag references found on the branch", - "items": { - "$ref": "#/components/schemas/ReferenceRep" - } + "environmentKey": { + "type": "string" + }, + "archivedDate": { + "description": "Timestamp of when the experiment was archived", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" }, "_links": { "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" - } - } - }, - "BulkEditMembersRep": { - "type": "object", - "properties": { - "members": { - "type": "array", - "description": "A list of members IDs of the members who were successfully updated.", - "items": { - "type": "string" - }, - "example": [ - "1234a56b7c89d012345e678f" - ] - }, - "errors": { - "type": "array", - "description": "A list of member IDs and errors for the members whose updates failed.", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "additionalProperties": { + "$ref": "#/components/schemas/Link" }, - "example": [ - { - "507f1f77bcf86cd799439011": "you cannot modify your own role" + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/projects/my-project/environments/my-environment", + "type": "application/json" + }, + "self": { + "href": "/api/v2/projects/my-project/environments/my-environment/experiments/my-experiment", + "type": "application/json" } - ] - } - } - }, - "BulkEditTeamsRep": { - "type": "object", - "properties": { - "memberIDs": { - "type": "array", - "description": "A list of member IDs of the members who were added to the teams.", - "items": { - "type": "string" - }, - "example": [ - "1234a56b7c89d012345e678f" - ] + } }, - "teamKeys": { - "type": "array", - "description": "A list of team keys of the teams that were successfully updated.", - "items": { - "type": "string" - }, - "example": [ - "example-team-1" - ] + "holdoutId": { + "type": "string", + "description": "The holdout ID", + "example": "f3b74309-d581-44e1-8a2b-bb2933b4fe40" }, - "errors": { + "currentIteration": { + "description": "Details on the current iteration", + "$ref": "#/components/schemas/IterationRep" + }, + "draftIteration": { + "description": "Details on the current iteration. This iteration may be already started, or may still be a draft.", + "$ref": "#/components/schemas/IterationRep" + }, + "previousIterations": { "type": "array", - "description": "A list of team keys and errors for the teams whose updates failed.", + "description": "Details on the previous iterations for this experiment.", "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "example": [ - { - "example-team-2": "example failure message" - } - ] + "$ref": "#/components/schemas/IterationRep" + } } } }, - "Clause": { + "ExperimentAllocationRep": { "type": "object", "required": [ - "attribute", - "op", - "values", - "negate" + "defaultVariation", + "canReshuffle" ], "properties": { - "_id": { - "type": "string" - }, - "attribute": { - "type": "string" - }, - "op": { - "$ref": "#/components/schemas/Operator" - }, - "values": { - "type": "array", - "items": {} - }, - "contextKind": { - "type": "string" + "defaultVariation": { + "type": "integer" }, - "negate": { + "canReshuffle": { "type": "boolean" } } }, - "Client": { + "ExperimentBayesianResultsRep": { "type": "object", - "required": [ - "_links", - "name", - "_accountId", - "_clientId", - "redirectUri", - "_creationDate" - ], "properties": { "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/oauth/clients", - "type": "application/json" - }, - "self": { - "href": "/api/v2/oauth/clients/50666563-9144-4125-b822-33f308227e45", - "type": "application/json" - } - } - }, - "name": { - "type": "string", - "description": "Client name" - }, - "description": { - "type": "string", - "description": "Client description" - }, - "_accountId": { - "type": "string", - "description": "The account ID the client is registered under" + "description": "The location and content type of related resources" }, - "_clientId": { - "type": "string", - "description": "The client's unique ID" + "treatmentResults": { + "type": "array", + "description": "Deprecated, use results instead. Only populated when response does not contain results sliced by multiple attributes.", + "items": { + "$ref": "#/components/schemas/TreatmentResultRep" + }, + "deprecated": true }, - "_clientSecret": { - "type": "string", - "description": "The client secret. This will only be shown upon creation." + "metricSeen": { + "$ref": "#/components/schemas/MetricSeen" }, - "redirectUri": { - "type": "string", - "description": "The client's redirect URI" + "probabilityOfMismatch": { + "type": "number", + "description": "The probability of a Sample Ratio Mismatch", + "example": 0.9999999999999738 }, - "_creationDate": { - "description": "Timestamp of client creation date", - "example": "1494437420312", - "$ref": "#/components/schemas/UnixMillis" + "results": { + "type": "array", + "description": "A list of attribute values and their corresponding treatment results", + "items": { + "$ref": "#/components/schemas/SlicedResultsRep" + } } } }, - "ClientCollection": { + "ExperimentCollectionRep": { "type": "object", "required": [ - "_links", "items" ], "properties": { + "items": { + "type": "array", + "description": "An array of experiments", + "items": { + "$ref": "#/components/schemas/Experiment" + } + }, + "total_count": { + "type": "integer", + "description": "The total number of experiments in this project and environment. Does not include legacy experiments." + }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/oauth/clients", - "type": "application/json" - } - } + "description": "The location and content type of related resources" + } + } + }, + "ExperimentEnabledPeriodRep": { + "type": "object", + "properties": { + "startDate": { + "$ref": "#/components/schemas/UnixMillis" }, - "items": { - "type": "array", - "description": "List of client objects", - "items": { - "$ref": "#/components/schemas/Client" - } + "stopDate": { + "$ref": "#/components/schemas/UnixMillis" } } }, - "ClientSideAvailability": { + "ExperimentEnvironmentSettingRep": { "type": "object", "properties": { - "usingMobileKey": { - "type": "boolean" + "startDate": { + "$ref": "#/components/schemas/UnixMillis" }, - "usingEnvironmentId": { - "type": "boolean" + "stopDate": { + "$ref": "#/components/schemas/UnixMillis" + }, + "enabledPeriods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentEnabledPeriodRep" + } } } }, - "ClientSideAvailabilityPost": { + "ExperimentInfoRep": { "type": "object", "required": [ - "usingEnvironmentId", - "usingMobileKey" + "baselineIdx", + "items" ], "properties": { - "usingEnvironmentId": { - "type": "boolean", - "description": "Whether to enable availability for client-side SDKs. Defaults to false.", - "example": true + "baselineIdx": { + "type": "integer" }, - "usingMobileKey": { - "type": "boolean", - "description": "Whether to enable availability for mobile SDKs. Defaults to true.", - "example": true + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LegacyExperimentRep" + } } } }, - "CompletedBy": { + "ExperimentPatchInput": { "type": "object", + "required": [ + "instructions" + ], "properties": { - "member": { - "description": "The LaunchDarkly member who marked this phase as complete", - "$ref": "#/components/schemas/MemberSummary" + "comment": { + "type": "string", + "description": "Optional comment describing the update", + "example": "Optional comment" }, - "token": { - "description": "The service token used to mark this phase as complete", - "$ref": "#/components/schemas/TokenSummary" + "instructions": { + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", + "example": "[{\"kind\": \"updateName\", \"value\": \"Updated experiment name\"}]", + "$ref": "#/components/schemas/Instructions" } } }, - "ConditionInput": { + "ExperimentPost": { "type": "object", + "required": [ + "name", + "key", + "iteration" + ], "properties": { - "scheduleKind": { - "description": "Whether the scheduled execution of the workflow stage is relative or absolute. If relative, the waitDuration and waitDurationUnit specify when the execution occurs. If absolute, the executionDate specifies when the execution occurs.", - "example": "relative", - "enum": [ - "absolute", - "relative" - ], - "$ref": "#/components/schemas/ScheduleKind" - }, - "executionDate": { - "description": "For workflow stages whose scheduled execution is absolute, the time, in Unix milliseconds, when the stage should start.", - "example": "1706810400000", - "$ref": "#/components/schemas/UnixMillis" - }, - "waitDuration": { - "type": "integer", - "description": "For workflow stages whose scheduled execution is relative, how far in the future the stage should start.", - "example": 2 - }, - "waitDurationUnit": { - "description": "For workflow stages whose scheduled execution is relative, the unit of measure for the waitDuration.", - "example": "calendarDay", - "enum": [ - "minute", - "hour", - "calendarDay", - "calendarWeek" - ], - "$ref": "#/components/schemas/DurationUnit" - }, - "executeNow": { - "type": "boolean", - "description": "Whether the workflow stage should be executed immediately", - "example": false + "name": { + "type": "string", + "description": "The experiment name", + "example": "Example experiment" }, "description": { "type": "string", - "description": "A description of the approval required for this stage", - "example": "Require example-team approval for final stage" + "description": "The experiment description", + "example": "An example experiment, used in testing" }, - "notifyMemberIds": { - "type": "array", - "description": "A list of member IDs for the members to request approval from for this stage", - "items": { - "type": "string" - }, - "example": [ - "507f1f77bcf86cd799439011" - ] + "maintainerId": { + "type": "string", + "description": "The ID of the member who maintains this experiment", + "example": "12ab3c45de678910fgh12345" }, - "notifyTeamKeys": { - "type": "array", - "description": "A list of team keys for the teams to request approval from for this stage", - "items": { - "type": "string" - }, - "example": [ - "example-team" - ] + "key": { + "type": "string", + "description": "The experiment key", + "example": "experiment-key-123abc" }, - "kind": { - "description": "The type of condition to meet before executing this stage of the workflow. Use schedule to schedule a workflow stage. Use ld-approval to add an approval request to a workflow stage.", - "example": "schedule", - "$ref": "#/components/schemas/ConditionKind" + "iteration": { + "description": "Details on the construction of the initial iteration", + "$ref": "#/components/schemas/IterationInput" + }, + "holdoutId": { + "type": "string", + "description": "The ID of the holdout", + "example": "f3b74309-d581-44e1-8a2b-bb2933b4fe40" } } }, - "ConditionKind": { - "type": "string" - }, - "ConditionOutput": { + "ExpiringTarget": { "type": "object", "required": [ "_id", - "_execution", - "description", - "notifyMemberIds", - "allReviews", - "reviewStatus" + "_version", + "expirationDate", + "contextKind", + "contextKey", + "_resourceId" ], "properties": { "_id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "_execution": { - "$ref": "#/components/schemas/ExecutionOutput" + "type": "string", + "description": "The ID of this expiring target", + "example": "12ab3c45de678910abc12345" }, - "scheduleKind": { - "$ref": "#/components/schemas/ScheduleKind" + "_version": { + "type": "integer", + "description": "The version of this expiring target", + "example": 1 }, - "executionDate": { + "expirationDate": { + "description": "A timestamp for when the target expires", + "example": "1672358400000", "$ref": "#/components/schemas/UnixMillis" }, - "waitDuration": { - "type": "integer" - }, - "waitDurationUnit": { - "$ref": "#/components/schemas/DurationUnit" - }, - "description": { - "type": "string" - }, - "notifyMemberIds": { - "type": "array", - "items": { - "type": "string" - } - }, - "allReviews": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReviewOutput" - } - }, - "reviewStatus": { - "type": "string" + "contextKind": { + "type": "string", + "description": "The context kind of the context to be removed", + "example": "user" }, - "appliedDate": { - "$ref": "#/components/schemas/UnixMillis" - } - } - }, - "ConfidenceIntervalRep": { - "type": "object", - "properties": { - "upper": { - "type": "number" + "contextKey": { + "type": "string", + "description": "A unique key used to represent the context to be removed", + "example": "context-key-123abc" }, - "lower": { - "type": "number" - } - } - }, - "Conflict": { - "type": "object", - "properties": { - "instruction": { - "description": "Instruction in semantic patch format to be applied to the feature flag", - "$ref": "#/components/schemas/Instruction" + "targetType": { + "type": "string", + "description": "A segment's target type, included or excluded. Included when expiring targets are updated on a segment.", + "example": "included" }, - "reason": { + "variationId": { "type": "string", - "description": "Reason why the conflict exists" + "description": "A unique ID used to represent the flag variation. Included when expiring targets are updated on a feature flag.", + "example": "cc4332e2-bd4d-4fe0-b509-dfd2caf8dd73" + }, + "_resourceId": { + "description": "Details on the segment or flag this expiring target belongs to, its environment, and its project", + "$ref": "#/components/schemas/ResourceId" } } }, - "ConflictOutput": { + "ExpiringTargetError": { "type": "object", "required": [ - "stageId", + "instructionIndex", "message" ], "properties": { - "stageId": { - "type": "string", - "description": "The stage ID", - "example": "12ab3c4d5ef1a2345bcde67f" + "instructionIndex": { + "type": "integer", + "description": "The index of the PATCH instruction where the error occurred", + "example": 1 }, "message": { "type": "string", - "description": "Message about the conflict" + "description": "The error message related to a failed PATCH instruction", + "example": "example error message" } } }, - "ContextAttributeName": { + "ExpiringTargetGetResponse": { "type": "object", "required": [ - "name", - "weight" + "items" ], "properties": { - "name": { - "type": "string", - "description": "A context attribute's name.", - "example": "/firstName" - }, - "weight": { - "type": "integer", - "description": "A relative estimate of the number of contexts seen recently that have an attribute with the associated name.", - "example": 2225 + "items": { + "type": "array", + "description": "A list of expiring targets", + "items": { + "$ref": "#/components/schemas/ExpiringTarget" + } }, - "redacted": { - "type": "boolean", - "description": "Whether or not the attribute has one or more redacted values.", - "example": false + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" } } }, - "ContextAttributeNames": { + "ExpiringTargetPatchResponse": { "type": "object", "required": [ - "kind", - "names" + "items" ], "properties": { - "kind": { - "type": "string", - "description": "The kind associated with this collection of context attribute names.", - "example": "user" + "items": { + "type": "array", + "description": "A list of the results from each instruction", + "items": { + "$ref": "#/components/schemas/ExpiringTarget" + } }, - "names": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "totalInstructions": { + "type": "integer" + }, + "successfulInstructions": { + "type": "integer" + }, + "failedInstructions": { + "type": "integer" + }, + "errors": { "type": "array", - "description": "A collection of context attribute names.", "items": { - "$ref": "#/components/schemas/ContextAttributeName" + "$ref": "#/components/schemas/ExpiringTargetError" } } } }, - "ContextAttributeNamesCollection": { + "ExpiringUserTargetGetResponse": { "type": "object", "required": [ "items" @@ -25815,53 +35664,67 @@ "properties": { "items": { "type": "array", - "description": "A collection of context attribute name data grouped by kind.", + "description": "An array of expiring user targets", "items": { - "$ref": "#/components/schemas/ContextAttributeNames" + "$ref": "#/components/schemas/ExpiringUserTargetItem" } + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" } } }, - "ContextAttributeValue": { + "ExpiringUserTargetItem": { "type": "object", "required": [ - "name", - "weight" + "_id", + "_version", + "expirationDate", + "userKey", + "_resourceId" ], "properties": { - "name": { - "description": "A value for a context attribute.", - "example": "Sandy" + "_id": { + "type": "string", + "description": "The ID of this expiring user target", + "example": "12ab3c45de678910fgh12345" }, - "weight": { + "_version": { "type": "integer", - "description": "A relative estimate of the number of contexts seen recently that have a matching value for a given attribute.", - "example": 35 - } - } - }, - "ContextAttributeValues": { - "type": "object", - "required": [ - "kind", - "values" - ], - "properties": { - "kind": { + "description": "The version of this expiring user target", + "example": 1 + }, + "expirationDate": { + "description": "A timestamp for when the user target expires", + "example": "1658192820000", + "$ref": "#/components/schemas/UnixMillis" + }, + "userKey": { "type": "string", - "description": "The kind associated with this collection of context attribute values.", - "example": "user" + "description": "A unique key used to represent the user", + "example": "example-user-key" }, - "values": { - "type": "array", - "description": "A collection of context attribute values.", - "items": { - "$ref": "#/components/schemas/ContextAttributeValue" - } + "targetType": { + "type": "string", + "description": "A segment's target type. Included when expiring user targets are updated on a segment.", + "example": "included" + }, + "variationId": { + "type": "string", + "description": "A unique key used to represent the flag variation. Included when expiring user targets are updated on a feature flag.", + "example": "ce67d625-a8b9-4fb5-a344-ab909d9d4f4d" + }, + "_resourceId": { + "description": "Details on the resource from which the user is expiring", + "$ref": "#/components/schemas/ResourceIDResponse" } } }, - "ContextAttributeValuesCollection": { + "ExpiringUserTargetPatchResponse": { "type": "object", "required": [ "items" @@ -25869,214 +35732,264 @@ "properties": { "items": { "type": "array", - "description": "A collection of context attribute value data grouped by kind.", + "description": "An array of expiring user targets", "items": { - "$ref": "#/components/schemas/ContextAttributeValues" + "$ref": "#/components/schemas/ExpiringUserTargetItem" + } + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "totalInstructions": { + "type": "integer", + "description": "The total count of instructions sent in the PATCH request", + "example": 1 + }, + "successfulInstructions": { + "type": "integer", + "description": "The total count of successful instructions sent in the PATCH request", + "example": 1 + }, + "failedInstructions": { + "type": "integer", + "description": "The total count of the failed instructions sent in the PATCH request", + "example": 0 + }, + "errors": { + "type": "array", + "description": "An array of error messages for the failed instructions", + "items": { + "$ref": "#/components/schemas/ExpiringTargetError" } } } }, - "ContextInstance": { - "type": "object", - "additionalProperties": {} - }, - "ContextInstanceEvaluation": { + "Export": { "type": "object", "required": [ - "name", - "key", - "_value", + "id", + "segmentKey", + "creationTime", + "status", + "sizeBytes", + "size", + "initiator", "_links" ], "properties": { - "name": { + "id": { "type": "string", - "description": "Name of the flag.", - "example": "My Flag" + "description": "The export ID", + "example": "1234a567-bcd8-9123-4567-abcd1234567f" }, - "key": { + "segmentKey": { "type": "string", - "description": "Key of the flag.", - "example": "flag-key-123abc" + "description": "The segment key", + "example": "example-big-segment" }, - "_value": { - "description": "The value of the flag variation that the context receives. If there is no defined default rule, this is null.", - "example": "true" + "creationTime": { + "description": "Timestamp of when this export was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" }, - "reason": { - "description": "Contains information about why that variation was selected.", - "example": "{\"kind\": \"RULE_MATCH\"}", - "$ref": "#/components/schemas/ContextInstanceEvaluationReason" + "status": { + "type": "string", + "description": "The export status", + "example": "complete" + }, + "sizeBytes": { + "type": "integer", + "format": "int64", + "description": "The export size, in bytes", + "example": 18 + }, + "size": { + "type": "string", + "description": "The export size, with units", + "example": "18 B" + }, + "initiator": { + "description": "Details on the member who initiated the export", + "example": "{\"name\": \"Ariel Flores\", \"email\": \"ariel@acme.com\"}", + "$ref": "#/components/schemas/InitiatorRep" }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "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, including the location of the exported file" } } }, - "ContextInstanceEvaluationReason": { + "Extinction": { "type": "object", "required": [ - "kind" + "revision", + "message", + "time", + "flagKey", + "projKey" ], "properties": { - "kind": { + "revision": { "type": "string", - "description": "Describes the general reason that LaunchDarkly selected this variation.", - "example": "OFF" - }, - "ruleIndex": { - "type": "integer", - "description": "The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based.", - "example": 3 + "description": "The identifier for the revision where flag became extinct. For example, a commit SHA.", + "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" }, - "ruleID": { + "message": { "type": "string", - "description": "The unique identifier of the matching rule if the kind is 'RULE_MATCH'.", - "example": "1234567890" + "description": "Description of the extinction. For example, the commit message for the revision.", + "example": "Remove flag for launched feature" }, - "prerequisiteKey": { - "type": "string", - "description": "The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'.", - "example": "someotherflagkey" + "time": { + "description": "Time of extinction", + "example": "1636558831870", + "$ref": "#/components/schemas/UnixMillis" }, - "inExperiment": { - "type": "boolean", - "description": "Indicates whether the context was evaluated as part of an experiment.", - "example": true + "flagKey": { + "type": "string", + "description": "The feature flag key", + "example": "enable-feature" }, - "errorKind": { + "projKey": { "type": "string", - "description": "The specific error type if the kind is 'ERROR'.", - "example": "tried to use uninitialized Context" + "description": "The project key", + "example": "default" } } }, - "ContextInstanceEvaluations": { + "ExtinctionCollectionRep": { "type": "object", "required": [ - "items", - "_links" + "_links", + "items" ], "properties": { - "items": { - "type": "array", - "description": "Details on the flag evaluations for this context instance", - "items": { - "$ref": "#/components/schemas/ContextInstanceEvaluation" - }, - "example": [ - { - "_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, - "key": "sort.order", - "name": "SortOrder", - "reason": { - "kind": "FALLTHROUGH" - } - }, - { - "_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, - "key": "alternate.page", - "name": "AlternatePage", - "reason": { - "kind": "RULE_MATCH", - "ruleID": "b2530cdf-14c6-4e16-b660-00239e08f19b", - "ruleIndex": 1 - } - } - ] - }, - "totalCount": { - "type": "integer", - "description": "The number of flags", - "example": 2 - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/projects/{projectKey}/environments/{environmentKey}/flags/evaluate", - "type": "application/json" + "description": "The location and content type of related resources" + }, + "items": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Extinction" } - } + }, + "description": "An array of extinction events" } } }, - "ContextInstanceRecord": { + "ExtinctionListPost": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Extinction" + } + }, + "FeatureFlag": { "type": "object", "required": [ - "id", - "context" + "name", + "kind", + "key", + "_version", + "creationDate", + "variations", + "temporary", + "tags", + "_links", + "experiments", + "customProperties", + "archived", + "environments" ], "properties": { - "lastSeen": { + "name": { "type": "string", - "format": "date-time", - "description": "Timestamp of the last time an evaluation occurred for this context instance", - "example": "2022-04-15T15:00:57.526470334Z" + "description": "A human-friendly name for the feature flag", + "example": "My Flag" }, - "id": { + "kind": { "type": "string", - "description": "The context instance ID", - "example": "b3JnOmxhdW5jaGRhcmtseQ" + "description": "Kind of feature flag", + "example": "boolean", + "enum": [ + "boolean", + "multivariate" + ] }, - "applicationId": { + "description": { "type": "string", - "description": "An identifier representing the application where the LaunchDarkly SDK is running", - "example": "GoSDK/1.2" + "description": "Description of the feature flag", + "example": "This flag controls the example widgets" + }, + "key": { + "type": "string", + "description": "A unique key used to reference the flag in your code", + "example": "flag-key-123abc" + }, + "_version": { + "type": "integer", + "description": "Version of the feature flag", + "example": 1 + }, + "creationDate": { + "description": "Timestamp of flag creation date", + "example": "1494437420312", + "$ref": "#/components/schemas/UnixMillis" + }, + "includeInSnippet": { + "type": "boolean", + "description": "Deprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK", + "example": true, + "deprecated": true + }, + "clientSideAvailability": { + "description": "Which type of client-side SDKs the feature flag is available to", + "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}", + "$ref": "#/components/schemas/ClientSideAvailability" + }, + "variations": { + "type": "array", + "description": "An array of possible variations for the flag", + "items": { + "$ref": "#/components/schemas/Variation" + }, + "example": [ + { + "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05", + "value": true + }, + { + "_id": "a00bf58d-d252-476c-b915-15a74becacb4", + "value": false + } + ] + }, + "temporary": { + "type": "boolean", + "description": "Whether the flag is a temporary flag", + "example": true }, - "anonymousKinds": { + "tags": { "type": "array", - "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", + "description": "Tags for the feature flag", "items": { "type": "string" }, "example": [ - "device", - "privateKind" + "example-tag" ] }, - "context": { - "description": "The context, including its kind and attributes", - "example": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}" - }, "_links": { "type": "object", "additionalProperties": { @@ -26085,252 +35998,409 @@ "description": "The location and content type of related resources", "example": { "parent": { - "href": "/api/v2/projects/my-project/environments/my-environment", + "href": "/api/v2/flags/my-project", "type": "application/json" }, "self": { - "href": "/api/v2/projects/my-project/environments/my-env/context-instances/organization:launch-darkly:user:henry?filter=applicationId:\"GoSDK/1.2\"", + "href": "/api/v2/flags/my-project/my-flag", "type": "application/json" - }, - "site": { - "href": "/my-project/my-environment/context-instances/organization:launch-darkly:user:henry", - "type": "text/html" } } }, - "_access": { - "description": "Details on the allowed and denied actions for this context instance", - "$ref": "#/components/schemas/Access" - } - } - }, - "ContextInstanceSearch": { - "type": "object", - "properties": { - "filter": { + "maintainerId": { "type": "string", - "description": "A collection of context instance filters", - "example": "{\"filter\": \"kindKeys:{\"contains\": [\"user:Henry\"]},\"sort\": \"-ts\",\"limit\": 50}" + "description": "Associated maintainerId for the feature flag", + "example": "569f183514f4432160000007" }, - "sort": { + "_maintainer": { + "description": "Associated maintainer member info for the feature flag", + "$ref": "#/components/schemas/MemberSummary" + }, + "maintainerTeamKey": { "type": "string", - "description": "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.", - "example": "-ts" + "description": "The key of the associated team that maintains this feature flag", + "example": "team-1" }, - "limit": { - "type": "integer", - "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", - "example": 10 + "_maintainerTeam": { + "description": "Associated maintainer team info for the feature flag", + "$ref": "#/components/schemas/MaintainerTeam" }, - "continuationToken": { - "type": "string", - "description": "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 instead, because this value is an obfuscated string.", - "example": "QAGFKH1313KUGI2351" + "goalIds": { + "type": "array", + "description": "Deprecated, use experiments instead", + "items": { + "type": "string" + }, + "example": [], + "deprecated": true + }, + "experiments": { + "description": "Experimentation data for the feature flag", + "example": "{\"baselineIdx\": 0,\"items\": []}", + "$ref": "#/components/schemas/ExperimentInfoRep" + }, + "customProperties": { + "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.", + "example": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}", + "$ref": "#/components/schemas/CustomProperties" + }, + "archived": { + "type": "boolean", + "description": "Boolean indicating if the feature flag is archived", + "example": false + }, + "archivedDate": { + "description": "If archived is true, date of archive", + "example": "1494437420312", + "$ref": "#/components/schemas/UnixMillis" + }, + "deprecated": { + "type": "boolean", + "description": "Boolean indicating if the feature flag is deprecated", + "example": false + }, + "deprecatedDate": { + "description": "If deprecated is true, date of deprecation", + "example": "1494437420312", + "$ref": "#/components/schemas/UnixMillis" + }, + "defaults": { + "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.", + "example": "{\"onVariation\":0,\"offVariation\":1}", + "$ref": "#/components/schemas/Defaults" + }, + "_purpose": { + "type": "string" + }, + "migrationSettings": { + "description": "Migration-related settings for the flag", + "$ref": "#/components/schemas/FlagMigrationSettingsRep" + }, + "environments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FeatureFlagConfig" + }, + "description": "Details on the environments for this flag. Only returned if the request is filtered by environment, using the filterEnv query parameter.", + "example": { + "my-environment": { + "_environmentName": "My Environment", + "_site": { + "href": "/default/my-environment/features/client-side-flag", + "type": "text/html" + }, + "_summary": { + "prerequisites": 0, + "variations": { + "0": { + "contextTargets": 1, + "isFallthrough": true, + "nullRules": 0, + "rules": 0, + "targets": 1 + }, + "1": { + "isOff": true, + "nullRules": 0, + "rules": 0, + "targets": 0 + } + } + }, + "archived": false, + "contextTargets": [ + { + "contextKind": "device", + "values": [ + "device-key-123abc" + ], + "variation": 0 + } + ], + "fallthrough": { + "variation": 0 + }, + "lastModified": 1627071171347, + "offVariation": 1, + "on": false, + "prerequisites": [], + "rules": [], + "salt": "61eddeadbeef4da1facecafe3a60a397", + "sel": "810edeadbeef4844facecafe438f2999492", + "targets": [ + { + "contextKind": "user", + "values": [ + "user-key-123abc" + ], + "variation": 0 + } + ], + "trackEvents": false, + "trackEventsFallthrough": false, + "version": 1 + } + } } } }, - "ContextInstanceSegmentMembership": { + "FeatureFlagBody": { "type": "object", "required": [ "name", - "key", - "description", - "unbounded", - "external", - "isMember", - "isIndividuallyTargeted", - "isRuleTargeted", - "_links" + "key" ], "properties": { "name": { "type": "string", - "description": "A human-friendly name for the segment", - "example": "Segment Name" + "description": "A human-friendly name for the feature flag", + "example": "My flag" }, "key": { "type": "string", - "description": "A unique key used to reference the segment", - "example": "segment-key-123abc" + "description": "A unique key used to reference the flag in your code", + "example": "flag-key-123abc" }, "description": { "type": "string", - "description": "A description of the segment's purpose", - "example": "Segment description" + "description": "Description of the feature flag. Defaults to an empty string.", + "example": "This flag controls the example widgets" }, - "unbounded": { + "includeInSnippet": { "type": "boolean", - "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.", - "example": false - }, - "external": { - "type": "string", - "description": "If the segment is a synced segment, the name of the external source", - "example": "https://amplitude.com/myCohort" + "description": "Deprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK. Defaults to false.", + "deprecated": true }, - "isMember": { - "type": "boolean", - "description": "Whether the context is a member of this segment, either by explicit inclusion or by rule matching", - "example": true + "clientSideAvailability": { + "description": "Which type of client-side SDKs the feature flag is available to", + "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}", + "$ref": "#/components/schemas/ClientSideAvailabilityPost" }, - "isIndividuallyTargeted": { - "type": "boolean", - "description": "Whether the context is explicitly included in this segment", - "example": true + "variations": { + "type": "array", + "description": "An array of possible variations for the flag. The variation values must be unique. If omitted, two boolean variations of true and false will be used.", + "items": { + "$ref": "#/components/schemas/Variation" + }, + "example": [ + { + "value": true + }, + { + "value": false + } + ] }, - "isRuleTargeted": { + "temporary": { "type": "boolean", - "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 (isIndividuallyTargeted is true).", + "description": "Whether the flag is a temporary flag. Defaults to true.", "example": false }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "tags": { + "type": "array", + "description": "Tags for the feature flag. Defaults to an empty array.", + "items": { + "type": "string" }, - "description": "The location and content type of related resources" + "example": [ + "example-tag" + ] + }, + "customProperties": { + "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.", + "example": "{ \"jira.issues\": {\"name\": \"Jira issues\", \"value\": [\"is-123\", \"is-456\"]} }", + "$ref": "#/components/schemas/CustomProperties" + }, + "defaults": { + "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.", + "example": "{\"onVariation\":0, \"offVariation\":1}", + "$ref": "#/components/schemas/Defaults" + }, + "purpose": { + "type": "string", + "description": "Purpose of the flag", + "example": "migration", + "enum": [ + "migration", + "holdout" + ] + }, + "migrationSettings": { + "description": "Settings relevant to flags where purpose is migration", + "$ref": "#/components/schemas/MigrationSettingsPost" + }, + "maintainerId": { + "type": "string", + "description": "The ID of the member who maintains this feature flag", + "example": "12ab3c45de678910fgh12345" + }, + "maintainerTeamKey": { + "type": "string", + "description": "The key of the team that maintains this feature flag", + "example": "team-1" + }, + "initialPrerequisites": { + "type": "array", + "description": "Initial set of prerequisite flags for all environments", + "items": { + "$ref": "#/components/schemas/FlagPrerequisitePost" + } } } }, - "ContextInstanceSegmentMemberships": { + "FeatureFlagConfig": { "type": "object", "required": [ - "items", - "_links" + "on", + "archived", + "salt", + "sel", + "lastModified", + "version", + "_site", + "_environmentName", + "trackEvents", + "trackEventsFallthrough" ], "properties": { - "items": { + "on": { + "type": "boolean", + "description": "Whether the flag is on" + }, + "archived": { + "type": "boolean", + "description": "Boolean indicating if the feature flag is archived" + }, + "salt": { + "type": "string" + }, + "sel": { + "type": "string" + }, + "lastModified": { + "description": "Timestamp of when the flag configuration was most recently modified", + "$ref": "#/components/schemas/UnixMillis" + }, + "version": { + "type": "integer", + "description": "Version of the feature flag" + }, + "targets": { "type": "array", + "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.", "items": { - "$ref": "#/components/schemas/ContextInstanceSegmentMembership" + "$ref": "#/components/schemas/Target" } }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - } - } - }, - "ContextInstances": { - "type": "object", - "required": [ - "_environmentId", - "items" - ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "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" - } + "contextTargets": { + "type": "array", + "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.", + "items": { + "$ref": "#/components/schemas/Target" } }, - "totalCount": { - "type": "integer", - "description": "The number of unique context instances", - "example": 100 + "rules": { + "type": "array", + "description": "An array of the rules for how to serve a variation to specific targets based on their attributes", + "items": { + "$ref": "#/components/schemas/Rule" + } }, - "_environmentId": { - "type": "string", - "description": "The environment ID", - "example": "57be1db38b75bf0772d11384" + "fallthrough": { + "description": "Details on the variation or rollout to serve as part of the flag's default rule", + "$ref": "#/components/schemas/VariationOrRolloutRep" }, - "continuationToken": { - "type": "string", - "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 next link instead.", - "example": "QAGFKH1313KUGI2351" + "offVariation": { + "type": "integer", + "description": "The ID of the variation to serve when the flag is off" }, - "items": { + "prerequisites": { "type": "array", - "description": "A collection of context instances. Can include multiple versions of context instances that have the same id, but different applicationIds.", + "description": "An array of the prerequisite flags and their variations that are required before this flag takes effect", "items": { - "$ref": "#/components/schemas/ContextInstanceRecord" + "$ref": "#/components/schemas/Prerequisite" } + }, + "_site": { + "description": "Details on how to access the flag configuration in the LaunchDarkly UI", + "$ref": "#/components/schemas/Link" + }, + "_access": { + "description": "Details on the allowed and denied actions for this flag", + "$ref": "#/components/schemas/Access" + }, + "_environmentName": { + "type": "string", + "description": "The environment name" + }, + "trackEvents": { + "type": "boolean", + "description": "Whether LaunchDarkly tracks events for the feature flag, for all rules" + }, + "trackEventsFallthrough": { + "type": "boolean", + "description": "Whether LaunchDarkly tracks events for the feature flag, for the default rule" + }, + "_debugEventsUntilDate": { + "$ref": "#/components/schemas/UnixMillis" + }, + "_summary": { + "description": "A summary of the prerequisites and variations for this flag", + "$ref": "#/components/schemas/FlagSummary" + }, + "evaluation": { + "description": "Evaluation information for the flag", + "$ref": "#/components/schemas/FlagConfigEvaluation" + }, + "migrationSettings": { + "description": "Migration-related settings for the flag configuration", + "$ref": "#/components/schemas/FlagConfigMigrationSettingsRep" } } }, - "ContextKindCreatedFrom": { - "type": "string" - }, - "ContextKindRep": { + "FeatureFlagScheduledChange": { "type": "object", "required": [ - "key", - "name", - "description", - "version", - "creationDate", - "lastModified", - "createdFrom" + "_id", + "_creationDate", + "_maintainerId", + "_version", + "executionDate", + "instructions" ], "properties": { - "key": { - "type": "string", - "description": "The context kind key", - "example": "organization-key-123abc" + "_id": { + "description": "The ID of this scheduled change", + "example": "12ab3c45de678910abc12345", + "$ref": "#/components/schemas/FeatureWorkflowId" }, - "name": { - "type": "string", - "description": "The context kind name", - "example": "Organization" + "_creationDate": { + "description": "Timestamp of when the scheduled change was created", + "example": "1654123897062", + "$ref": "#/components/schemas/UnixMillis" }, - "description": { + "_maintainerId": { "type": "string", - "description": "The context kind description", - "example": "An example context kind, to enable targeting based on organization" + "description": "The ID of the scheduled change maintainer", + "example": "12ab3c45de678910abc12345" }, - "version": { + "_version": { "type": "integer", - "description": "The context kind version", - "example": 4 - }, - "creationDate": { - "description": "Timestamp of when the context kind was created", - "example": "1668530155141", - "$ref": "#/components/schemas/UnixMillis" - }, - "lastModified": { - "description": "Timestamp of when the context kind was most recently changed", - "example": "1670341705251", - "$ref": "#/components/schemas/UnixMillis" + "description": "Version of the scheduled change", + "example": 1 }, - "lastSeen": { - "description": "Timestamp of when a context of this context kind was most recently evaluated", - "example": "1671563538193", + "executionDate": { + "description": "When the scheduled changes should be executed", + "example": "1636558831870", "$ref": "#/components/schemas/UnixMillis" }, - "createdFrom": { - "description": "How the context kind was created", - "example": "auto-add", - "enum": [ - "default", - "auto-add", - "manual" - ], - "$ref": "#/components/schemas/ContextKindCreatedFrom" - }, - "hideInTargeting": { - "type": "boolean", - "description": "Alias for archived.", - "example": false + "instructions": { + "description": "The actions to perform on the execution date for these scheduled changes", + "example": "[ { \"kind\": \"turnFlagOn\" }]", + "$ref": "#/components/schemas/Instructions" }, - "archived": { - "type": "boolean", - "description": "Whether the context kind is archived. Archived context kinds are unavailable for targeting.", - "example": false + "conflicts": { + "description": "Details on any conflicting scheduled changes" }, "_links": { "type": "object", @@ -26341,18 +36411,17 @@ } } }, - "ContextKindsCollectionRep": { + "FeatureFlagScheduledChanges": { "type": "object", "required": [ - "items", - "_links" + "items" ], "properties": { "items": { "type": "array", - "description": "An array of context kinds", + "description": "Array of scheduled changes", "items": { - "$ref": "#/components/schemas/ContextKindRep" + "$ref": "#/components/schemas/FeatureFlagScheduledChange" } }, "_links": { @@ -26364,89 +36433,82 @@ } } }, - "ContextRecord": { + "FeatureFlagStatus": { "type": "object", "required": [ - "context" + "name" ], "properties": { - "lastSeen": { + "name": { "type": "string", - "format": "date-time", - "description": "Timestamp of the last time an evaluation occurred for this context", - "example": "2022-04-15T15:00:57.526470334Z" + "description": "Status of the flag", + "example": "inactive", + "enum": [ + "new", + "inactive", + "active", + "launched" + ] }, - "applicationId": { + "lastRequested": { "type": "string", - "description": "An identifier representing the application where the LaunchDarkly SDK is running", - "example": "GoSDK/1.2" + "format": "date-time", + "description": "Timestamp of last time flag was requested", + "example": "2020-02-05T18:17:01.514Z" }, - "context": { - "description": "The context, including its kind and attributes", - "example": "{\"kind\": \"user\", \"key\": \"context-key-123abc\", \"name\": \"Sandy Smith\", \"email\": \"sandy@example.com\"}" + "default": { + "description": "Default value seen from code" + } + } + }, + "FeatureFlagStatusAcrossEnvironments": { + "type": "object", + "required": [ + "environments", + "key", + "_links" + ], + "properties": { + "environments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FeatureFlagStatus" + }, + "description": "Flag status for environment.", + "example": { + "production": { + "lastRequested": "2020-02-05T18:17:01.514Z", + "name": "inactive" + } + } + }, + "key": { + "type": "string", + "description": "feature flag key", + "example": "flag-key-123abc" }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", "example": { "parent": { - "href": "/api/v2/projects/my-project/environments/my-environment", + "href": "/api/v2/flag-status", "type": "application/json" }, "self": { - "href": "/api/v2/projects/my-project/environments/my-env/contexts/organization:launch-darkly:user:henry?filter=applicationId:\"GoSDK/1.2\"", + "href": "/api/v2/flag-status/my-project/my-flag", "type": "application/json" - }, - "site": { - "href": "/my-project/my-environment/context/organization:launch-darkly:user:henry", - "type": "text/html" } } - }, - "_access": { - "description": "Details on the allowed and denied actions for this context instance", - "$ref": "#/components/schemas/Access" - }, - "associatedContexts": { - "type": "integer", - "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.", - "example": 0 - } - } - }, - "ContextSearch": { - "type": "object", - "properties": { - "filter": { - "type": "string", - "description": "A collection of context filters", - "example": "*.name startsWith Jo,kind anyOf [\"user\",\"organization\"]" - }, - "sort": { - "type": "string", - "description": "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.", - "example": "-ts" - }, - "limit": { - "type": "integer", - "description": "Specifies the maximum number of items in the collection to return (max: 50, default: 20)", - "example": 10 - }, - "continuationToken": { - "type": "string", - "description": "Limits results to contexts with sort values after the value specified. You can use this for pagination, however, we recommend using the next link instead, because this value is an obfuscated string.", - "example": "QAGFKH1313KUGI2351" } } }, - "Contexts": { + "FeatureFlagStatuses": { "type": "object", "required": [ - "_environmentId", - "items" + "_links" ], "properties": { "_links": { @@ -26454,193 +36516,231 @@ "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", "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", + "href": "/api/v2/flag-statuses/my-project/my-environment", "type": "application/json" } } }, - "totalCount": { - "type": "integer", - "description": "The number of contexts", - "example": 100 - }, - "_environmentId": { - "type": "string", - "description": "The environment ID where the context was evaluated", - "example": "57be1db38b75bf0772d11384" - }, - "continuationToken": { - "type": "string", - "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 next link instead.", - "example": "QAGFKH1313KUGI2351" - }, "items": { "type": "array", - "description": "A collection of contexts. Can include multiple versions of contexts that have the same kind and key, but different applicationIds.", "items": { - "$ref": "#/components/schemas/ContextRecord" + "$ref": "#/components/schemas/FlagStatusRep" } } } }, - "CopiedFromEnv": { + "FeatureFlags": { "type": "object", "required": [ - "key" + "items", + "_links" ], "properties": { - "key": { - "type": "string", - "description": "Key of feature flag copied", - "example": "source-flag-key-123abc" + "items": { + "type": "array", + "description": "An array of feature flags", + "items": { + "$ref": "#/components/schemas/FeatureFlag" + } }, - "version": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/flags/default", + "type": "application/json" + } + } + }, + "totalCount": { "type": "integer", - "description": "Version of feature flag copied", + "description": "The total number of flags", "example": 1 + }, + "totalCountWithDifferences": { + "type": "integer", + "description": "The number of flags that have differences between environments. Only shown when query parameter compare is true.", + "example": 0 } } }, - "CreatePhaseInput": { + "FeatureWorkflowId": { + "type": "string" + }, + "FileRep": { "type": "object", - "required": [ - "audiences", - "name" - ], "properties": { - "audiences": { - "type": "array", - "description": "An ordered list of the audiences for this release phase. Each audience corresponds to a LaunchDarkly environment.", - "items": { - "$ref": "#/components/schemas/AudiencePost" - } + "filename": { + "type": "string", + "description": "The imported file name, including the extension", + "example": "bigsegimport.csv" }, - "name": { + "status": { "type": "string", - "description": "The release phase name", - "example": "Phase 1 - Testing" + "description": "The imported file status", + "example": "complete" } } }, - "CreateReleasePipelineInput": { + "FlagConfigApprovalRequestResponse": { "type": "object", "required": [ - "key", - "name", - "phases" + "_id", + "_version", + "creationDate", + "serviceKind", + "reviewStatus", + "allReviews", + "notifyMemberIds", + "status", + "instructions", + "conflicts", + "_links" ], "properties": { - "description": { + "_id": { "type": "string", - "description": "The release pipeline description", - "example": "Standard pipeline to roll out to production" + "description": "The ID of this approval request", + "example": "12ab3c45de678910abc12345" }, - "key": { + "_version": { + "type": "integer", + "description": "Version of the approval request", + "example": 1 + }, + "creationDate": { + "description": "Timestamp of when the approval request was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "serviceKind": { + "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.", + "example": "launchdarkly", + "$ref": "#/components/schemas/ApprovalRequestServiceKind" + }, + "requestorId": { "type": "string", - "description": "The unique identifier of this release pipeline", - "example": "standard-pipeline" + "description": "The ID of the member who requested the approval", + "example": "12ab3c45de678910abc12345" }, - "name": { + "description": { "type": "string", - "description": "The name of the release pipeline", - "example": "Standard Pipeline" + "description": "A human-friendly name for the approval request", + "example": "example: request approval from someone" }, - "phases": { + "reviewStatus": { + "type": "string", + "description": "Current status of the review of this approval request", + "example": "pending", + "enum": [ + "approved", + "declined", + "pending" + ] + }, + "allReviews": { "type": "array", - "description": "A logical grouping of one or more environments that share attributes for rolling out changes", + "description": "An array of individual reviews of this approval request", "items": { - "$ref": "#/components/schemas/CreatePhaseInput" + "$ref": "#/components/schemas/ReviewResponse" } }, - "tags": { + "notifyMemberIds": { "type": "array", - "description": "A list of tags for this release pipeline", + "description": "An array of member IDs. These members are notified to review the approval request.", "items": { "type": "string" }, "example": [ - "example-tag" + "1234a56b7c89d012345e678f" ] - } - } - }, - "CreateWorkflowTemplateInput": { - "type": "object", - "required": [ - "key" - ], - "properties": { - "key": { - "type": "string" }, - "name": { - "type": "string" + "appliedDate": { + "description": "Timestamp of when the approval request was applied", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" }, - "description": { - "type": "string" + "appliedByMemberId": { + "type": "string", + "description": "The member ID of the member who applied the approval request", + "example": "1234a56b7c89d012345e678f" }, - "workflowId": { - "$ref": "#/components/schemas/FeatureWorkflowId" + "appliedByServiceTokenId": { + "type": "string", + "description": "The service token ID of the service token which applied the approval request", + "example": "1234a56b7c89d012345e678f" }, - "stages": { + "status": { + "type": "string", + "description": "Current status of the approval request", + "example": "pending", + "enum": [ + "pending", + "completed", + "failed", + "scheduled" + ] + }, + "instructions": { + "description": "List of instructions in semantic patch format to be applied to the feature flag", + "example": "[{\"kind\": \"turnFlagOn\"}]", + "$ref": "#/components/schemas/Instructions" + }, + "conflicts": { "type": "array", + "description": "Details on any conflicting approval requests", "items": { - "$ref": "#/components/schemas/StageInput" + "$ref": "#/components/schemas/Conflict" } }, - "projectKey": { - "type": "string" + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" }, - "environmentKey": { - "type": "string" + "executionDate": { + "description": "Timestamp for when instructions will be executed", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" }, - "flagKey": { - "type": "string" - } - } - }, - "CredibleIntervalRep": { - "type": "object", - "properties": { - "upper": { - "type": "number", - "description": "The upper bound", - "example": 0.6713222134386467 + "operatingOnId": { + "type": "string", + "description": "ID of scheduled change to edit or delete", + "example": "12ab3c45de678910abc12345" }, - "lower": { - "type": "number", - "description": "The lower bound", - "example": 0.4060771673663068 + "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", + "$ref": "#/components/schemas/IntegrationMetadata" + }, + "source": { + "description": "Details about the source feature flag, if copied", + "$ref": "#/components/schemas/CopiedFromEnv" + }, + "customWorkflowMetadata": { + "description": "Details about the custom workflow, if this approval request is part of a custom workflow", + "$ref": "#/components/schemas/CustomWorkflowMeta" } } }, - "CustomProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/customProperty" - } - }, - "CustomRole": { + "FlagConfigApprovalRequestsResponse": { "type": "object", "required": [ - "_id", - "_links", - "key", - "name", - "policy" + "items", + "_links" ], "properties": { - "_id": { - "type": "string", - "description": "The ID of the custom role", - "example": "1234a56b7c89d012345e678f" + "items": { + "type": "array", + "description": "An array of approval requests", + "items": { + "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" + } }, "_links": { "type": "object", @@ -26648,417 +36748,382 @@ "$ref": "#/components/schemas/Link" }, "description": "The location and content type of related resources" - }, - "_access": { - "description": "Details on the allowed and denied actions for this custom role", - "$ref": "#/components/schemas/Access" - }, - "description": { - "type": "string", - "description": "The description of the custom role", - "example": "This custom role is just an example" - }, - "key": { - "type": "string", - "description": "The key of the custom role", - "example": "example-custom-role" - }, - "name": { - "type": "string", - "description": "The name of the custom role", - "example": "Example custom role" - }, - "policy": { + } + } + }, + "FlagConfigEvaluation": { + "type": "object", + "properties": { + "contextKinds": { "type": "array", - "description": "An array of the policies that comprise this custom role", "items": { - "$ref": "#/components/schemas/Statement" + "type": "string" } - }, - "basePermissions": { - "description": "Base permissions to use for this role", - "example": "reader", - "$ref": "#/components/schemas/RoleType" } } }, - "CustomRolePost": { + "FlagConfigMigrationSettingsRep": { + "type": "object", + "properties": { + "checkRatio": { + "type": "integer" + } + } + }, + "FlagCopyConfigEnvironment": { "type": "object", "required": [ - "name", - "key", - "policy" + "key" ], "properties": { - "name": { - "type": "string", - "description": "A human-friendly name for the custom role", - "example": "Ops team" - }, "key": { "type": "string", - "description": "The custom role key", - "example": "role-key-123abc" + "description": "The environment key" }, - "description": { + "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": { + "description": "The source environment", + "example": "{\"key\": \"source-env-key-123abc\", \"currentVersion\": 1}", + "$ref": "#/components/schemas/FlagCopyConfigEnvironment" + }, + "target": { + "description": "The target environment", + "example": "{\"key\": \"target-env-key-123abc\", \"currentVersion\": 1}", + "$ref": "#/components/schemas/FlagCopyConfigEnvironment" + }, + "comment": { "type": "string", - "description": "Description of custom role", - "example": "An example role for members of the ops team" + "description": "Optional comment" }, - "policy": { - "description": "Resource statements for custom role", - "$ref": "#/components/schemas/StatementPostList" + "includedActions": { + "type": "array", + "description": "Optional list of the flag changes to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If you include neither, then all flag changes will be copied.", + "items": { + "type": "string", + "enum": [ + "updateOn", + "updateRules", + "updateFallthrough", + "updateOffVariation", + "updatePrerequisites", + "updateTargets", + "updateFlagConfigMigrationSettings" + ] + }, + "example": [ + "updateOn" + ] }, - "basePermissions": { - "description": "Base permissions to use for this role.", - "example": "reader", - "enum": [ - "reader", - "no_access" - ], - "$ref": "#/components/schemas/RoleType" + "excludedActions": { + "type": "array", + "description": "Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If you include neither, then all flag changes will be copied.", + "items": { + "type": "string", + "enum": [ + "updateOn", + "updateRules", + "updateFallthrough", + "updateOffVariation", + "updatePrerequisites", + "updateTargets", + "updateFlagConfigMigrationSettings" + ] + }, + "example": [ + "updateOn" + ] } } }, - "CustomRoles": { + "FlagFollowersByProjEnvGetRep": { "type": "object", + "required": [ + "_links" + ], "properties": { "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/projects/my-project/flags/my-flay/environments/my-environment/followers", + "type": "application/json" + } + } }, "items": { "type": "array", - "description": "An array of custom roles", + "description": "An array of flags and their followers", "items": { - "$ref": "#/components/schemas/CustomRole" + "$ref": "#/components/schemas/followersPerFlag" } } } }, - "CustomWorkflowInput": { + "FlagFollowersGetRep": { "type": "object", "required": [ - "name" + "_links", + "items" ], "properties": { - "maintainerId": { - "description": "The ID of the workflow maintainer. Defaults to the workflow creator.", - "example": "12ab3c45de678910abc12345", - "$ref": "#/components/schemas/ObjectId" - }, - "name": { - "type": "string", - "description": "The workflow name", - "example": "Progressive rollout starting in two days" - }, - "description": { - "type": "string", - "description": "The workflow description", - "example": "Turn flag on for 10% of users each day" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/projects/my-project/flags/my-flay/environments/my-environment/followers", + "type": "application/json" + } + } }, - "stages": { + "items": { "type": "array", - "description": "A list of the workflow stages", + "description": "An array of members who are following this flag", "items": { - "$ref": "#/components/schemas/StageInput" + "$ref": "#/components/schemas/FollowFlagMember" } - }, - "templateKey": { - "type": "string", - "description": "The template key" } } }, - "CustomWorkflowMeta": { + "FlagImportConfigurationPost": { "type": "object", + "required": [ + "config" + ], "properties": { + "config": { + "description": "The global configuration settings, as specified by the formVariables in the manifest.json for this configuration.", + "example": "{\"workspaceApiKey\": \"An API key with read permissions in the external feature management system\", \"workspaceId\": \"The ID of the workspace in the external system\", \"environmentId\": \"The ID of the environment in the external system\", \"splitTag\": \"If provided, imports only the flags from the external system with this tag. Leave blank to import all flags.\", \"ldApiKey\": \"An API key with create flag permissions in your LaunchDarkly account\", \"ldTag\": \"A tag to apply to all flags imported to LaunchDarkly\", \"ldMaintainer\": \"The ID of the member who will be the maintainer of the imported flags\"}", + "$ref": "#/components/schemas/FormVariableConfig" + }, + "tags": { + "type": "array", + "description": "Tags to associate with the configuration", + "items": { + "type": "string" + }, + "example": [ + "example-tag" + ] + }, "name": { "type": "string", - "description": "The name of the workflow stage that required this approval request", - "example": "Example workflow name" - }, - "stage": { - "description": "Details on the stage of the workflow where this approval request is required", - "$ref": "#/components/schemas/CustomWorkflowStageMeta" + "description": "Name to identify the configuration", + "example": "Sample configuration" } } }, - "CustomWorkflowOutput": { + "FlagImportIntegration": { "type": "object", "required": [ - "_id", - "_version", - "_conflicts", - "_creationDate", - "_maintainerId", "_links", + "_id", + "integrationKey", + "projectKey", + "config", + "tags", "name", - "_execution" + "version", + "_status" ], "properties": { + "_links": { + "description": "The location and content type of related resources", + "$ref": "#/components/schemas/FlagImportIntegrationLinks" + }, "_id": { "type": "string", - "description": "The ID of the workflow", + "description": "The integration ID", "example": "12ab3c4d5ef1a2345bcde67f" }, - "_version": { - "type": "integer", - "description": "The version of the workflow", - "example": 1 - }, - "_conflicts": { - "type": "array", - "description": "Any conflicts that are present in the workflow stages", - "items": { - "$ref": "#/components/schemas/ConflictOutput" - } - }, - "_creationDate": { - "description": "Timestamp of when the workflow was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "_maintainerId": { - "type": "string", - "description": "The member ID of the maintainer of the workflow. Defaults to the workflow creator.", - "example": "12ab3c45de678910abc12345" - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "name": { + "integrationKey": { "type": "string", - "description": "The name of the workflow", - "example": "Progressive rollout starting in two days" + "description": "The integration key", + "example": "split", + "enum": [ + "split", + "unleash" + ] }, - "description": { + "projectKey": { "type": "string", - "description": "A brief description of the workflow", - "example": "Turn flag on for 10% of customers each day" + "description": "The project key", + "example": "default" }, - "kind": { - "type": "string", - "description": "The kind of workflow", - "example": "custom" + "config": { + "description": "The configuration for the given import integration. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.", + "$ref": "#/components/schemas/FormVariableConfig" }, - "stages": { + "tags": { "type": "array", - "description": "The stages that make up the workflow. Each stage contains conditions and actions.", + "description": "List of tags for this configuration", "items": { - "$ref": "#/components/schemas/StageOutput" - } - }, - "_execution": { - "description": "The current execution status of the workflow", - "example": "{\"status\": \"completed\"}", - "$ref": "#/components/schemas/ExecutionOutput" - }, - "meta": { - "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", - "$ref": "#/components/schemas/WorkflowTemplateMetadata" + "type": "string" + }, + "example": [] }, - "templateKey": { + "name": { "type": "string", - "description": "For workflows being created from a workflow template, this value is the template's key", - "example": "example-workflow-template" - } - } - }, - "CustomWorkflowStageMeta": { - "type": "object", - "properties": { - "index": { + "description": "Name of the configuration", + "example": "Development environment configuration" + }, + "version": { "type": "integer", - "description": "The zero-based index of the workflow stage", - "example": 0 + "description": "Version of the current configuration", + "example": 1 }, - "name": { - "type": "string", - "description": "The name of the workflow stage", - "example": "Stage 1" + "_access": { + "description": "Details on the allowed and denied actions for this configuration", + "$ref": "#/components/schemas/Access" + }, + "_status": { + "description": "Details on the status of the import job", + "$ref": "#/components/schemas/FlagImportStatus" } } }, - "CustomWorkflowsListingOutput": { + "FlagImportIntegrationCollection": { "type": "object", "required": [ - "items", - "totalCount", - "_links" + "_links", + "items" ], "properties": { + "_links": { + "description": "The location and content type of related resources", + "$ref": "#/components/schemas/FlagImportIntegrationCollectionLinks" + }, "items": { "type": "array", - "description": "An array of workflows", + "description": "An array of flag import configurations", "items": { - "$ref": "#/components/schemas/CustomWorkflowOutput" + "$ref": "#/components/schemas/FlagImportIntegration" } - }, - "totalCount": { - "type": "integer", - "description": "Total number of workflows", - "example": 1 - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" } } }, - "DateVersion": { - "type": "integer" - }, - "DefaultClientSideAvailability": { + "FlagImportIntegrationCollectionLinks": { "type": "object", "required": [ - "usingMobileKey", - "usingEnvironmentId" + "self" ], "properties": { - "usingMobileKey": { - "type": "boolean", - "description": "Whether to enable availability for mobile SDKs", - "example": true + "self": { + "$ref": "#/components/schemas/Link" }, - "usingEnvironmentId": { - "type": "boolean", - "description": "Whether to enable availability for client-side SDKs", - "example": true + "parent": { + "$ref": "#/components/schemas/Link" } } }, - "DefaultClientSideAvailabilityPost": { + "FlagImportIntegrationLinks": { "type": "object", "required": [ - "usingEnvironmentId", - "usingMobileKey" + "self", + "parent", + "project" ], "properties": { - "usingEnvironmentId": { - "type": "boolean", - "description": "Whether to enable availability for client-side SDKs.", - "example": true + "self": { + "$ref": "#/components/schemas/Link" }, - "usingMobileKey": { - "type": "boolean", - "description": "Whether to enable availability for mobile SDKs.", - "example": true + "parent": { + "$ref": "#/components/schemas/Link" + }, + "project": { + "$ref": "#/components/schemas/Link" } } }, - "Defaults": { + "FlagImportStatus": { "type": "object", - "required": [ - "onVariation", - "offVariation" - ], "properties": { - "onVariation": { - "type": "integer", - "description": "The index, from the array of variations for this flag, of the variation to serve by default when targeting is on.", - "example": 0 + "status": { + "type": "string", + "description": "The current status of the import integrations related import job", + "example": "pending", + "enum": [ + "complete", + "importing", + "pending", + "failed", + "partial" + ] }, - "offVariation": { - "type": "integer", - "description": "The index, from the array of variations for this flag, of the variation to serve by default when targeting is off.", - "example": 1 + "lastImport": { + "description": "Timestamp of when the most recent successful import occurred.", + "example": "1717263000000", + "$ref": "#/components/schemas/UnixMillis" + }, + "lastError": { + "description": "Timestamp of when the most recent import error occurred, if any", + "example": "1714584600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusResponse" + } } } }, - "DependentExperimentListRep": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DependentExperimentRep" - } - }, - "DependentExperimentRep": { + "FlagInput": { "type": "object", "required": [ - "key", - "name", - "environmentId", - "environmentKey", - "creationDate", - "_links" + "ruleId", + "flagConfigVersion" ], "properties": { - "key": { - "type": "string", - "description": "The experiment key", - "example": "experiment-key-123abc" - }, - "name": { + "ruleId": { "type": "string", - "description": "The experiment name", - "example": "Example experiment" + "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.", + "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" }, - "environmentId": { - "type": "string", - "description": "The environment ID", - "example": "1234a56b7c89d012345e678f" + "flagConfigVersion": { + "type": "integer", + "description": "The flag version", + "example": 12 }, - "environmentKey": { + "notInExperimentVariationId": { "type": "string", - "description": "The environment key", - "example": "production" - }, - "creationDate": { - "description": "Timestamp of when the experiment was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "archivedDate": { - "description": "Timestamp of when the experiment was archived", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/projects/my-project/environments/my-environment", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/my-project/environments/my-environment/experiments/example-experiment", - "type": "application/json" - } - } + "description": "The ID of the variation to route traffic not part of the experiment analysis to. Defaults to variation ID of baseline treatment, if set.", + "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" } } }, - "DependentFlag": { + "FlagLinkCollectionRep": { "type": "object", "required": [ - "key", - "_links", - "_site" + "items", + "_links" ], "properties": { - "name": { - "type": "string", - "description": "The flag name", - "example": "Example dependent flag" - }, - "key": { - "type": "string", - "description": "The flag key", - "example": "dependent-flag-key-123abc" + "items": { + "type": "array", + "description": "An array of flag links", + "items": { + "$ref": "#/components/schemas/FlagLinkRep" + } }, "_links": { "type": "object", @@ -27066,61 +37131,43 @@ "$ref": "#/components/schemas/Link" }, "description": "The location and content type of related resources" - }, - "_site": { - "description": "Details on how to access the dependent flag in the LaunchDarkly UI", - "example": "{ \"href\": \"/example-project/example-environment/features/example-dependent-flag\", \"type\": \"text/html\" }", - "$ref": "#/components/schemas/Link" } } }, - "DependentFlagEnvironment": { + "FlagLinkMember": { "type": "object", "required": [ - "key", "_links", - "_site" + "_id" ], "properties": { - "name": { - "type": "string", - "description": "The environment name", - "example": "Example environment" - }, - "key": { - "type": "string", - "description": "The environment key", - "example": "environment-key-123abc" - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + } }, - "_site": { - "description": "Details on how to access the dependent flag in this environment in the LaunchDarkly UI", - "example": "{ \"href\": \"/example-project/example-environment/features/example-dependent-flag\", \"type\": \"text/html\" }", - "$ref": "#/components/schemas/Link" + "_id": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" } } }, - "DependentFlagsByEnvironment": { + "FlagLinkRep": { "type": "object", "required": [ - "items", "_links", - "_site" + "_id", + "_deepLink", + "_timestamp", + "_createdAt" ], "properties": { - "items": { - "type": "array", - "description": "A list of dependent flags, which are flags that use the requested flag as a prerequisite", - "items": { - "$ref": "#/components/schemas/DependentFlag" - } - }, "_links": { "type": "object", "additionalProperties": { @@ -27128,153 +37175,148 @@ }, "description": "The location and content type of related resources" }, - "_site": { - "description": "Details on how to access the prerequisite flag in the LaunchDarkly UI", - "example": "{ \"href\": \"/example-project/~/features/example-prereq-flag\", \"type\": \"text/html\" }", - "$ref": "#/components/schemas/Link" - } - } - }, - "DependentMetricGroupRep": { - "type": "object", - "required": [ - "key", - "name", - "kind", - "_links" - ], - "properties": { - "key": { + "_key": { "type": "string", - "description": "A unique key to reference the metric group", - "example": "metric-group-key-123abc" + "description": "The flag link key", + "example": "flag-link-key-123abc" }, - "name": { + "_integrationKey": { "type": "string", - "description": "A human-friendly name for the metric group", - "example": "My metric group" + "description": "The integration key for an integration whose manifest.json includes the flagLink capability, if this is a flag link for an existing integration" }, - "kind": { + "_id": { "type": "string", - "description": "The type of the metric group", - "example": "funnel", - "enum": [ - "funnel" - ] + "description": "The ID of this flag link", + "example": "1234a56b7c89d012345e678f" }, - "_links": { + "_deepLink": { + "type": "string", + "description": "The URL for the external resource the flag is linked to", + "example": "https://example.com/archives/123123123" + }, + "_timestamp": { + "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.", + "example": "{\"milliseconds\": 1655342199935, \"seconds\": 1655342199, \"rfc3339\": \"2022-06-16T01:16:39Z\", \"simple\": \"2022-06-16 01:16:39\"}", + "$ref": "#/components/schemas/TimestampRep" + }, + "title": { + "type": "string", + "description": "The title of the flag link", + "example": "Example link title" + }, + "description": { + "type": "string", + "description": "The description of the flag link", + "example": "Example link description" + }, + "_metadata": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Link" + "type": "string" }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/projects/my-project", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/my-project/metric-groups/my-metric-group", - "type": "application/json" - } - } + "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 manifest.json file under flagLink." + }, + "_createdAt": { + "description": "Timestamp of when the flag link was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "_member": { + "description": "Details on the member associated with this flag link", + "$ref": "#/components/schemas/FlagLinkMember" } } }, - "DependentMetricGroupRepWithMetrics": { + "FlagListingRep": { "type": "object", "required": [ - "key", "name", - "kind", - "_links" + "key" ], "properties": { - "key": { - "type": "string", - "description": "A unique key to reference the metric group", - "example": "metric-group-key-123abc" - }, "name": { "type": "string", - "description": "A human-friendly name for the metric group", - "example": "My metric group" + "description": "The flag name", + "example": "Example flag" }, - "kind": { + "key": { "type": "string", - "description": "The type of the metric group", - "example": "funnel", - "enum": [ - "funnel" - ] + "description": "The flag key", + "example": "flag-key-123abc" }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/projects/my-project", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/my-project/metric-groups/my-metric-group", - "type": "application/json" - } } }, - "metrics": { - "type": "array", - "description": "The metrics in the metric group", - "items": { - "$ref": "#/components/schemas/MetricInGroupRep" - } + "_site": { + "$ref": "#/components/schemas/Link" } } }, - "DependentMetricOrMetricGroupRep": { + "FlagMigrationSettingsRep": { + "type": "object", + "properties": { + "contextKind": { + "type": "string", + "description": "The context kind targeted by this migration flag. Only applicable for six-stage migrations.", + "example": "device" + }, + "stageCount": { + "type": "integer", + "description": "The number of stages for this migration flag", + "example": 6 + } + } + }, + "FlagPrerequisitePost": { "type": "object", "required": [ "key", - "_versionId", - "name", - "kind", - "_links", - "isGroup" + "variationId" ], "properties": { "key": { "type": "string", - "description": "A unique key to reference the metric or metric group", - "example": "metric-key-123abc" + "description": "Flag key of the prerequisite flag" }, - "_versionId": { + "variationId": { "type": "string", - "description": "The version ID of the metric or metric group" - }, - "name": { + "description": "ID of a variation of the prerequisite flag" + } + } + }, + "FlagRep": { + "type": "object", + "required": [ + "_links" + ], + "properties": { + "targetingRule": { "type": "string", - "description": "A human-friendly name for the metric or metric group", - "example": "My metric" + "description": "The targeting rule", + "example": "fallthrough" }, - "kind": { + "targetingRuleDescription": { "type": "string", - "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", - "example": "custom", - "enum": [ - "pageview", - "click", - "custom", - "funnel", - "standard" - ] + "description": "The rule description", + "example": "Customers who live in Canada" }, - "isNumeric": { - "type": "boolean", - "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", - "example": true + "targetingRuleClauses": { + "type": "array", + "description": "An array of clauses used for individual targeting based on attributes", + "items": {} + }, + "flagConfigVersion": { + "type": "integer", + "description": "The flag version", + "example": 12 + }, + "notInExperimentVariationId": { + "type": "string", + "description": "The ID of the variation to route traffic not part of the experiment analysis to", + "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" }, "_links": { "type": "object", @@ -27284,180 +37326,128 @@ "description": "The location and content type of related resources", "example": { "self": { - "href": "/api/v2/metrics/my-project/my-metric", + "href": "/api/v2/flags/my-project/my-flag", "type": "application/json" } } + } + } + }, + "FlagScheduledChangesInput": { + "type": "object", + "required": [ + "instructions" + ], + "properties": { + "comment": { + "type": "string", + "description": "Optional comment describing the update to the scheduled changes", + "example": "optional comment" }, - "isGroup": { - "type": "boolean", - "description": "Whether this is a metric group or a metric" - }, - "metrics": { - "type": "array", - "description": "An ordered list of the metrics in this metric group", - "items": { - "$ref": "#/components/schemas/MetricInGroupRep" - } + "instructions": { + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", + "example": "[ { \"kind\": \"replaceScheduledChangesInstructions\", \"value\": [ { \"kind\": \"turnFlagOff\" } ] } ]", + "$ref": "#/components/schemas/Instructions" } } }, - "Destination": { + "FlagStatusRep": { "type": "object", + "required": [ + "name", + "_links" + ], "properties": { - "_id": { + "name": { "type": "string", - "description": "The ID of this Data Export destination", - "example": "610addeadbeefaa86ec9a7d4" + "description": "Status of the flag", + "example": "inactive", + "enum": [ + "new", + "inactive", + "active", + "launched" + ] + }, + "lastRequested": { + "type": "string", + "format": "date-time", + "description": "Timestamp of last time flag was requested", + "example": "2020-02-05T18:17:01.514Z" + }, + "default": { + "description": "Default value seen from code" }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", "example": { "parent": { - "href": "/api/v2/destinations", + "href": "/api/v2/flags/my-project/my-flag", "type": "application/json" }, "self": { - "href": "/api/v2/destinations/my-project/my-environment/610addeadbeefaa86ec9a7d4", + "href": "/api/v2/flag-statuses/my-project/my-flag", "type": "application/json" } } - }, - "name": { - "type": "string", - "description": "A human-readable name for your Data Export destination", - "example": "example-destination" - }, - "kind": { - "type": "string", - "description": "The type of Data Export destination", - "example": "google-pubsub", - "enum": [ - "google-pubsub", - "kinesis", - "mparticle", - "segment", - "azure-event-hubs" - ] - }, - "version": { - "type": "number", - "example": 1 - }, - "config": { - "description": "An object with the configuration parameters required for the destination type", - "example": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}" - }, - "on": { - "type": "boolean", - "description": "Whether the export is on, that is, the status of the integration", - "example": true - }, - "_access": { - "description": "Details on the allowed and denied actions for this Data Export destination", - "$ref": "#/components/schemas/Access" } } }, - "DestinationPost": { + "FlagSummary": { "type": "object", + "required": [ + "variations", + "prerequisites" + ], "properties": { - "name": { - "type": "string", - "description": "A human-readable name for your Data Export destination", - "example": "example-destination" - }, - "kind": { - "type": "string", - "description": "The type of Data Export destination", - "example": "google-pubsub", - "enum": [ - "google-pubsub", - "kinesis", - "mparticle", - "segment", - "azure-event-hubs" - ] - }, - "config": { - "description": "An object with the configuration parameters required for the destination type", - "example": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}" + "variations": { + "description": "A summary of the variations for this flag", + "$ref": "#/components/schemas/AllVariationsSummary" }, - "on": { - "type": "boolean", - "description": "Whether the export is on. Displayed as the integration status in the LaunchDarkly UI.", - "example": true + "prerequisites": { + "type": "integer", + "description": "The number of prerequisites for this flag" } } }, - "Destinations": { + "FlagTriggerInput": { "type": "object", "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/destinations", - "type": "application/json" - } - } + "comment": { + "type": "string", + "description": "Optional comment describing the update", + "example": "optional comment" }, - "items": { + "instructions": { "type": "array", - "description": "An array of Data Export destinations", + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"trigger_action\"}.", "items": { - "$ref": "#/components/schemas/Destination" - } + "$ref": "#/components/schemas/Instruction" + }, + "example": [ + { + "kind": "disableTrigger" + } + ] } } }, - "Distribution": { + "FlagsInput": { "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The type of distribution.", - "example": "normal", - "enum": [ - "normal", - "beta" - ] - }, - "parameters": { - "type": "object", - "additionalProperties": {}, - "description": "The parameters of the distribution. The parameters are different for each distribution type. When kind is normal, the parameters of the distribution are 'mu' and 'sigma'. When kind is beta, the parameters of the distribution are 'alpha' and 'beta.'" - } + "additionalProperties": { + "$ref": "#/components/schemas/FlagInput" } }, - "DurationUnit": { - "type": "string" - }, - "Environment": { + "FollowFlagMember": { "type": "object", "required": [ "_links", "_id", - "key", - "name", - "apiKey", - "mobileKey", - "color", - "defaultTtl", - "secureMode", - "defaultTrackEvents", - "requireComments", - "confirmChanges", - "tags", - "critical" + "role", + "email" ], "properties": { "_links": { @@ -27468,709 +37458,442 @@ "description": "The location and content type of related resources", "example": { "self": { - "href": "/api/v2/projects/my-project/environments/my-environment", + "href": "/api/v2/members/569f183514f4432160000007", "type": "application/json" } } }, "_id": { "type": "string", - "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.", - "example": "57be1db38b75bf0772d11384" - }, - "key": { - "type": "string", - "description": "A project-unique key for the new environment", - "example": "environment-key-123abc" + "description": "The member's ID", + "example": "569f183514f4432160000007" }, - "name": { + "firstName": { "type": "string", - "description": "A human-friendly name for the new environment", - "example": "My Environment" + "description": "The member's first name", + "example": "Ariel" }, - "apiKey": { + "lastName": { "type": "string", - "description": "The SDK key for the environment. Use this for authorization in server-side SDKs.", - "example": "sdk-xxx" + "description": "The member's last name", + "example": "Flores" }, - "mobileKey": { + "role": { "type": "string", - "description": "The mobile key for the environment. Use this for authorization in mobile SDKs.", - "example": "mob-xxx" + "description": "The member's built-in role. If the member has no custom roles, this role will be in effect.", + "example": "admin" }, - "color": { + "email": { "type": "string", - "description": "The color used to indicate this environment in the UI", - "example": "F5A623" - }, - "defaultTtl": { - "type": "integer", - "description": "The default time (in minutes) that the PHP SDK can cache feature flag rules locally", - "example": 5 - }, - "secureMode": { - "type": "boolean", - "description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user", - "example": true - }, - "defaultTrackEvents": { - "type": "boolean", - "description": "Enables tracking detailed information for new flags by default", - "example": false - }, - "requireComments": { - "type": "boolean", - "description": "Whether members who modify flags and segments through the LaunchDarkly user interface are required to add a comment", - "example": true - }, - "confirmChanges": { - "type": "boolean", - "description": "Whether members who modify flags and segments through the LaunchDarkly user interface are required to confirm those changes", - "example": true - }, - "tags": { - "type": "array", - "description": "A list of tags for this environment", - "items": { - "type": "string" - }, - "example": [ - "ops" - ] - }, - "approvalSettings": { - "description": "Details on the approval settings for this environment", - "$ref": "#/components/schemas/ApprovalSettings" - }, - "critical": { - "type": "boolean", - "description": "Whether the environment is critical", - "example": true + "description": "The member's email address", + "example": "ariel@acme.com" } } }, - "EnvironmentPost": { + "ForbiddenErrorRep": { "type": "object", "required": [ - "name", - "key", - "color" + "code", + "message" ], "properties": { - "name": { - "type": "string", - "description": "A human-friendly name for the new environment", - "example": "My Environment" - }, - "key": { + "code": { "type": "string", - "description": "A project-unique key for the new environment", - "example": "environment-key-123abc" + "description": "Specific error code encountered", + "example": "forbidden" }, - "color": { + "message": { "type": "string", - "description": "A color to indicate this environment in the UI", - "example": "F5A623" + "description": "Description of the error", + "example": "Forbidden. Access to the requested resource was denied." + } + } + }, + "FormVariable": { + "type": "object", + "properties": { + "key": { + "type": "string" }, - "defaultTtl": { - "type": "integer", - "description": "The default time (in minutes) that the PHP SDK can cache feature flag rules locally", - "example": 5 + "name": { + "type": "string" }, - "secureMode": { - "type": "boolean", - "description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user", - "example": true + "type": { + "type": "string" }, - "defaultTrackEvents": { - "type": "boolean", - "description": "Enables tracking detailed information for new flags by default", - "example": false + "description": { + "type": "string" }, - "confirmChanges": { - "type": "boolean", - "description": "Requires confirmation for all flag and segment changes via the UI in this environment", - "example": false + "placeholder": { + "type": "string" }, - "requireComments": { - "type": "boolean", - "description": "Requires comments for all flag and segment changes via the UI in this environment", - "example": false + "isOptional": { + "type": "boolean" }, - "tags": { + "defaultValue": {}, + "allowedValues": { "type": "array", - "description": "Tags to apply to the new environment", "items": { "type": "string" - }, - "example": [ - "ops" - ] - }, - "source": { - "description": "Indicates that the new environment created will be cloned from the provided source environment", - "$ref": "#/components/schemas/SourceEnv" + } }, - "critical": { - "type": "boolean", - "description": "Whether the environment is critical", - "example": true + "dynamicOptions": { + "$ref": "#/components/schemas/DynamicOptions" } } }, - "EnvironmentSummary": { + "FormVariableConfig": { "type": "object", - "required": [ - "_links", - "key", - "name", - "color" - ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/projects/my-project/environments/my-environment", - "type": "application/json" - } - } - }, - "key": { - "type": "string", - "description": "A project-unique key for the environment", - "example": "environment-key-123abc" - }, - "name": { - "type": "string", - "description": "A human-friendly name for the environment", - "example": "My Environment" - }, - "color": { - "type": "string", - "description": "The color used to indicate this environment in the UI", - "example": "F5A623" - } - } + "additionalProperties": {} }, - "Environments": { + "HMACSignature": { "type": "object", - "required": [ - "items" - ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "headerName": { + "type": "string" }, - "totalCount": { - "type": "integer", - "description": "The number of environments returned", - "example": 2 + "hmacSecretFormVariableKey": { + "type": "string" + } + } + }, + "HeaderItems": { + "type": "object", + "properties": { + "name": { + "type": "string" }, - "items": { - "type": "array", - "description": "An array of environments", - "items": { - "$ref": "#/components/schemas/Environment" - } + "value": { + "type": "string" } } }, - "EvaluationReason": { + "HoldoutDetailRep": { "type": "object", "required": [ - "kind" + "_id", + "status", + "holdoutAmount", + "createdAt", + "updatedAt", + "baseExperiment" ], "properties": { - "kind": { - "type": "string", - "description": "Describes the general reason that LaunchDarkly selected this variation.", - "example": "OFF" - }, - "ruleIndex": { - "type": "integer", - "description": "The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based.", - "example": 3 + "_id": { + "type": "string" }, - "ruleID": { + "status": { "type": "string", - "description": "The unique identifier of the matching rule if the kind is 'RULE_MATCH'.", - "example": "1234567890" + "enum": [ + "created", + "enabled", + "running", + "ended" + ] }, - "prerequisiteKey": { + "description": { + "type": "string" + }, + "holdoutAmount": { "type": "string", - "description": "The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'.", - "example": "someotherflagkey" + "description": "The percentage of traffic allocated to this holdout." }, - "inExperiment": { + "isDirty": { "type": "boolean", - "description": "Indicates whether the evaluation occurred as part of an experiment.", - "example": true + "description": "Indicates if the holdout experiment is running and if any related experiments are running." }, - "errorKind": { - "type": "string", - "description": "The specific error type if the kind is 'ERROR'.", - "example": "USER_NOT_SPECIFIED" + "createdAt": { + "$ref": "#/components/schemas/UnixMillis" + }, + "updatedAt": { + "$ref": "#/components/schemas/UnixMillis" + }, + "baseExperiment": { + "$ref": "#/components/schemas/Experiment" + }, + "relatedExperiments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Experiment" + } } } }, - "ExecutionOutput": { + "HoldoutPatchInput": { "type": "object", "required": [ - "status" + "instructions" ], "properties": { - "status": { + "comment": { "type": "string", - "description": "The status of the execution of this workflow stage", - "example": "completed" + "description": "Optional comment describing the update", + "example": "Optional comment" }, - "stopDate": { - "description": "Timestamp of when the workflow was completed.", - "example": "1718467200000", - "$ref": "#/components/schemas/UnixMillis" + "instructions": { + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", + "example": "[{\"kind\": \"updateName\", \"name\": \"Updated holdout name\"}]", + "$ref": "#/components/schemas/Instructions" } } }, - "ExpandableApprovalRequestResponse": { + "HoldoutPostRequest": { "type": "object", - "required": [ - "_id", - "_version", - "creationDate", - "serviceKind", - "reviewStatus", - "allReviews", - "notifyMemberIds", - "status", - "instructions", - "conflicts", - "_links" - ], "properties": { - "_id": { + "name": { "type": "string", - "description": "The ID of this approval request", - "example": "12ab3c45de678910abc12345" - }, - "_version": { - "type": "integer", - "description": "Version of the approval request", - "example": 1 - }, - "creationDate": { - "description": "Timestamp of when the approval request was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "serviceKind": { - "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.", - "example": "launchdarkly", - "$ref": "#/components/schemas/ApprovalRequestServiceKind" + "description": "A human-friendly name for the holdout", + "example": "holdout-one-name" }, - "requestorId": { + "key": { "type": "string", - "description": "The ID of the member who requested the approval", - "example": "12ab3c45de678910abc12345" + "description": "A key that identifies the holdout", + "example": "holdout-key" }, "description": { "type": "string", - "description": "A human-friendly name for the approval request", - "example": "example: request approval from someone" + "description": "Description of the holdout", + "example": "My holdout-one description" }, - "reviewStatus": { + "randomizationunit": { "type": "string", - "description": "Current status of the review of this approval request", - "example": "pending", - "enum": [ - "approved", - "declined", - "pending" - ] - }, - "allReviews": { - "type": "array", - "description": "An array of individual reviews of this approval request", - "items": { - "$ref": "#/components/schemas/ReviewResponse" - } + "description": "The chosen randomization unit for the holdout base experiment", + "example": "user" }, - "notifyMemberIds": { + "attributes": { "type": "array", - "description": "An array of member IDs. These members are notified to review the approval request.", + "description": "The attributes that the holdout iteration's results can be sliced by", "items": { "type": "string" }, "example": [ - "1234a56b7c89d012345e678f" + "country", + "device", + "os" ] }, - "appliedDate": { - "description": "Timestamp of when the approval request was applied", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "appliedByMemberId": { - "type": "string", - "description": "The member ID of the member who applied the approval request", - "example": "1234a56b7c89d012345e678f" - }, - "appliedByServiceTokenId": { + "holdoutamount": { "type": "string", - "description": "The service token ID of the service token which applied the approval request", - "example": "1234a56b7c89d012345e678f" + "description": "Audience allocation for the holdout", + "example": "10" }, - "status": { + "primarymetrickey": { "type": "string", - "description": "Current status of the approval request", - "example": "pending", - "enum": [ - "pending", - "completed", - "failed", - "scheduled" - ] - }, - "instructions": { - "description": "List of instructions in semantic patch format to be applied to the feature flag", - "example": "[{\"kind\": \"turnFlagOn\"}]", - "$ref": "#/components/schemas/Instructions" + "description": "The key of the primary metric for this holdout", + "example": "metric-key-123abc" }, - "conflicts": { + "metrics": { "type": "array", - "description": "Details on any conflicting approval requests", + "description": "Details on the metrics for this experiment", "items": { - "$ref": "#/components/schemas/Conflict" + "$ref": "#/components/schemas/MetricInput" } }, - "_links": { - "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" - }, - "executionDate": { - "description": "Timestamp for when instructions will be executed", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "operatingOnId": { + "prerequisiteflagkey": { "type": "string", - "description": "ID of scheduled change to edit or delete", - "example": "12ab3c45de678910abc12345" - }, - "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", - "$ref": "#/components/schemas/IntegrationMetadata" + "description": "The key of the flag that the holdout is dependent on", + "example": "flag-key-123abc" + } + } + }, + "HoldoutRep": { + "type": "object", + "required": [ + "_id", + "status", + "holdoutAmount", + "createdAt", + "updatedAt", + "baseExperiment" + ], + "properties": { + "_id": { + "type": "string" }, - "source": { - "description": "Details about the source feature flag, if copied", - "$ref": "#/components/schemas/CopiedFromEnv" + "status": { + "type": "string", + "enum": [ + "created", + "enabled", + "running", + "ended" + ] }, - "customWorkflowMetadata": { - "description": "Details about the custom workflow, if this approval request is part of a custom workflow", - "$ref": "#/components/schemas/CustomWorkflowMeta" + "description": { + "type": "string" }, - "resourceId": { + "holdoutAmount": { "type": "string", - "description": "String representation of a resource" + "description": "The percentage of traffic allocated to this holdout." }, - "approvalSettings": { - "description": "The settings for this approval", - "$ref": "#/components/schemas/ApprovalSettings" + "createdAt": { + "$ref": "#/components/schemas/UnixMillis" }, - "project": { - "description": "Project the approval request belongs to", - "$ref": "#/components/schemas/Project" + "updatedAt": { + "$ref": "#/components/schemas/UnixMillis" }, - "environments": { + "baseExperiment": { + "$ref": "#/components/schemas/Experiment" + }, + "experiments": { "type": "array", - "description": "List of environments the approval impacts", "items": { - "$ref": "#/components/schemas/Environment" + "$ref": "#/components/schemas/RelatedExperimentRep" } - }, - "flag": { - "description": "Flag the approval request belongs to", - "$ref": "#/components/schemas/ExpandedFlagRep" } } }, - "ExpandableApprovalRequestsResponse": { + "HoldoutsCollectionRep": { "type": "object", - "required": [ - "items", - "totalCount", - "_links" - ], "properties": { "items": { "type": "array", - "description": "An array of approval requests", "items": { - "$ref": "#/components/schemas/ExpandableApprovalRequestResponse" + "$ref": "#/components/schemas/SimpleHoldoutRep" } }, - "totalCount": { - "type": "integer", - "description": "Total number of approval requests", - "example": 1 - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/my-project/environments/my-environment/holdouts?limit=20", + "type": "application/json" + } + } + }, + "total_count": { + "type": "integer", + "description": "The total number of holdouts in this project and environment." } } }, - "ExpandedFlagRep": { + "HunkRep": { "type": "object", "required": [ - "name", - "kind", - "key", - "_version", - "creationDate", - "variations", - "temporary", - "tags", - "_links", - "customProperties", - "archived" + "startingLineNumber" ], "properties": { - "name": { - "type": "string", - "description": "A human-friendly name for the feature flag", - "example": "My Flag" + "startingLineNumber": { + "type": "integer", + "description": "Line number of beginning of code reference hunk", + "example": 45 }, - "kind": { + "lines": { "type": "string", - "description": "Kind of feature flag", - "example": "boolean", - "enum": [ - "boolean", - "multivariate" - ] + "description": "Contextual lines of code that include the referenced feature flag", + "example": "var enableFeature = 'enable-feature';" }, - "description": { + "projKey": { "type": "string", - "description": "Description of the feature flag", - "example": "This flag controls the example widgets" + "description": "The project key", + "example": "default" }, - "key": { + "flagKey": { "type": "string", - "description": "A unique key used to reference the flag in your code", - "example": "flag-key-123abc" - }, - "_version": { - "type": "integer", - "description": "Version of the feature flag", - "example": 1 - }, - "creationDate": { - "description": "Timestamp of flag creation date", - "example": "1494437420312", - "$ref": "#/components/schemas/UnixMillis" - }, - "includeInSnippet": { - "type": "boolean", - "description": "Deprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK", - "example": true, - "deprecated": true - }, - "clientSideAvailability": { - "description": "Which type of client-side SDKs the feature flag is available to", - "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}", - "$ref": "#/components/schemas/ClientSideAvailability" - }, - "variations": { - "type": "array", - "description": "An array of possible variations for the flag", - "items": { - "$ref": "#/components/schemas/Variation" - }, - "example": [ - { - "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05", - "value": true - }, - { - "_id": "a00bf58d-d252-476c-b915-15a74becacb4", - "value": false - } - ] - }, - "temporary": { - "type": "boolean", - "description": "Whether the flag is a temporary flag", - "example": true + "description": "The feature flag key", + "example": "enable-feature" }, - "tags": { + "aliases": { "type": "array", - "description": "Tags for the feature flag", + "description": "An array of flag key aliases", "items": { "type": "string" }, "example": [ - "example-tag" + "enableFeature", + "EnableFeature" ] - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/flags/my-project", - "type": "application/json" - }, - "self": { - "href": "/api/v2/flags/my-project/my-flag", - "type": "application/json" - } - } - }, - "maintainerId": { - "type": "string", - "description": "The ID of the member who maintains the flag", - "example": "569f183514f4432160000007" - }, - "_maintainer": { - "description": "Details on the member who maintains this feature flag", - "$ref": "#/components/schemas/MemberSummary" - }, - "customProperties": { - "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.", - "example": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}", - "$ref": "#/components/schemas/CustomProperties" - }, - "archived": { - "type": "boolean", - "description": "Boolean indicating if the feature flag is archived", - "example": false - }, - "archivedDate": { - "description": "If archived is true, date of archive", - "example": "1494437420312", - "$ref": "#/components/schemas/UnixMillis" - }, - "defaults": { - "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.", - "example": "{\"onVariation\":0,\"offVariation\":1}", - "$ref": "#/components/schemas/Defaults" } } }, - "Experiment": { + "Import": { "type": "object", "required": [ - "key", - "name", - "_maintainerId", - "_creationDate", + "id", + "segmentKey", + "creationTime", + "mode", + "status", "_links" ], "properties": { - "_id": { + "id": { "type": "string", - "description": "The experiment ID", - "example": "12ab3c45de678910fgh12345" + "description": "The import ID", + "example": "1234a567-bcd8-9123-4567-abcd1234567f" }, - "key": { + "segmentKey": { "type": "string", - "description": "The experiment key", - "example": "experiment-key-123abc" + "description": "The segment key", + "example": "example-big-segment" }, - "name": { - "type": "string", - "description": "The experiment name", - "example": "Example experiment" + "creationTime": { + "description": "Timestamp of when this import was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" }, - "description": { + "mode": { "type": "string", - "description": "The experiment description", - "example": "An example experiment, used in testing" + "description": "The import mode used, either merge or replace", + "example": "replace" }, - "_maintainerId": { + "status": { "type": "string", - "description": "The ID of the member who maintains this experiment.", - "example": "12ab3c45de678910fgh12345" - }, - "_creationDate": { - "description": "Timestamp of when the experiment was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "environmentKey": { - "type": "string" + "description": "The import status", + "example": "complete" }, - "archivedDate": { - "description": "Timestamp of when the experiment was archived", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "files": { + "type": "array", + "description": "The imported files and their status", + "items": { + "$ref": "#/components/schemas/FileRep" + }, + "example": [ + { + "filename": "bigsegimport.csv", + "status": "complete" + } + ] }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/projects/my-project/environments/my-environment", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/my-project/environments/my-environment/experiments/my-experiment", - "type": "application/json" - } - } - }, - "currentIteration": { - "description": "Details on the current iteration", - "$ref": "#/components/schemas/IterationRep" - }, - "draftIteration": { - "description": "Details on the current iteration. This iteration may be already started, or may still be a draft.", - "$ref": "#/components/schemas/IterationRep" - }, - "previousIterations": { - "type": "array", - "description": "Details on the previous iterations for this experiment.", - "items": { - "$ref": "#/components/schemas/IterationRep" - } + "description": "The location and content type of related resources" } } }, - "ExperimentAllocationRep": { + "InitiatorRep": { "type": "object", - "required": [ - "defaultVariation", - "canReshuffle" - ], "properties": { - "defaultVariation": { - "type": "integer" + "name": { + "type": "string", + "description": "The name of the member who initiated the export", + "example": "Bob Loblaw" }, - "canReshuffle": { - "type": "boolean" + "email": { + "type": "string", + "description": "The email address of the member who initiated the export", + "example": "ariel@acme.com" } } }, - "ExperimentBayesianResultsRep": { + "Instruction": { + "type": "object", + "additionalProperties": {} + }, + "Instructions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Instruction" + } + }, + "Integration": { "type": "object", "properties": { "_links": { @@ -28180,48 +37903,80 @@ }, "description": "The location and content type of related resources" }, - "treatmentResults": { - "type": "array", - "description": "Deprecated, use results instead. Only populated when response does not contain results sliced by multiple attributes.", - "items": { - "$ref": "#/components/schemas/TreatmentResultRep" - }, - "deprecated": true + "_id": { + "type": "string", + "description": "The ID for this integration audit log subscription", + "example": "1234a56b7c89d012345e678f" }, - "metricSeen": { - "$ref": "#/components/schemas/MetricSeen" + "kind": { + "type": "string", + "description": "The type of integration", + "example": "datadog" }, - "probabilityOfMismatch": { - "type": "number", - "description": "The probability of a Sample Ratio Mismatch", - "example": 0.9999999999999738 + "name": { + "type": "string", + "description": "A human-friendly name for the integration", + "example": "Example Datadog integration" }, - "results": { + "config": { + "type": "object", + "additionalProperties": {}, + "description": "Details on configuration for an integration of this type. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration." + }, + "statements": { "type": "array", - "description": "A list of attribute values and their corresponding treatment results", + "description": "Represents a Custom role policy, defining a resource kinds filter the integration audit log subscription responds to.", "items": { - "$ref": "#/components/schemas/SlicedResultsRep" + "$ref": "#/components/schemas/Statement" } + }, + "on": { + "type": "boolean", + "description": "Whether the integration is currently active", + "example": true + }, + "tags": { + "type": "array", + "description": "An array of tags for this integration", + "items": { + "type": "string" + }, + "example": [ + "testing" + ] + }, + "_access": { + "description": "Details on the allowed and denied actions for this subscription", + "$ref": "#/components/schemas/Access" + }, + "_status": { + "description": "Details on the most recent successes and errors for this integration", + "$ref": "#/components/schemas/IntegrationSubscriptionStatusRep" + }, + "url": { + "type": "string", + "description": "Slack webhook receiver URL. Only used for legacy Slack webhook integrations." + }, + "apiKey": { + "type": "string", + "description": "Datadog API key. Only used for legacy Datadog webhook integrations." } } }, - "ExperimentCollectionRep": { + "IntegrationConfigurationCollectionRep": { "type": "object", "required": [ - "items" + "items", + "_links" ], "properties": { "items": { "type": "array", - "description": "An array of experiments", + "description": "An array of integration configurations", "items": { - "$ref": "#/components/schemas/Experiment" + "$ref": "#/components/schemas/IntegrationConfigurationsRep" } }, - "total_count": { - "type": "integer", - "description": "The total number of experiments in this project and environment. Does not include legacy experiments." - }, "_links": { "type": "object", "additionalProperties": { @@ -28231,1134 +37986,1218 @@ } } }, - "ExperimentEnabledPeriodRep": { - "type": "object", - "properties": { - "startDate": { - "$ref": "#/components/schemas/UnixMillis" - }, - "stopDate": { - "$ref": "#/components/schemas/UnixMillis" - } - } - }, - "ExperimentEnvironmentSettingRep": { + "IntegrationConfigurationPost": { "type": "object", + "required": [ + "name", + "configValues" + ], "properties": { - "startDate": { - "$ref": "#/components/schemas/UnixMillis" + "name": { + "type": "string", + "description": "The name of the integration configuration", + "example": "Example integration configuration" }, - "stopDate": { - "$ref": "#/components/schemas/UnixMillis" + "enabled": { + "type": "boolean", + "description": "Whether the integration configuration is enabled. If omitted, defaults to true", + "example": true }, - "enabledPeriods": { + "tags": { "type": "array", + "description": "Tags for the integration", "items": { - "$ref": "#/components/schemas/ExperimentEnabledPeriodRep" + "type": "string" + }, + "example": [ + "ops" + ] + }, + "configValues": { + "type": "object", + "additionalProperties": {}, + "description": "The unique set of fields required to configure the integration. Refer to the formVariables field in the corresponding manifest.json at https://github.com/launchdarkly/integration-framework/tree/main/integrations for a full list of fields for the integration you wish to configure.", + "example": { + "optional": "an optional property", + "required": "the required property", + "url": "https://example.com" } + }, + "capabilityConfig": { + "description": "The capability configuration for the integration", + "example": "{\"auditLogEventsHook\": \"policy\": []\"}", + "$ref": "#/components/schemas/CapabilityConfigPost" } } }, - "ExperimentInfoRep": { + "IntegrationConfigurationsRep": { "type": "object", "required": [ - "baselineIdx", - "items" + "_links", + "_id", + "name" ], "properties": { - "baselineIdx": { - "type": "integer" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "items": { + "_id": { + "type": "string", + "description": "The unique identifier for this integration configuration" + }, + "name": { + "type": "string", + "description": "A human-friendly name for the integration", + "example": "Example Datadog integration" + }, + "_createdAt": { + "description": "The time the integration configuration was created", + "$ref": "#/components/schemas/UnixMillis" + }, + "_integrationKey": { + "type": "string", + "description": "The type of integration", + "example": "datadog" + }, + "tags": { "type": "array", + "description": "An array of tags for this integration", "items": { - "$ref": "#/components/schemas/LegacyExperimentRep" - } - } - } - }, - "ExperimentMetadataRep": { - "type": "object", - "properties": { - "key": {} - } - }, - "ExperimentPatchInput": { - "type": "object", - "required": [ - "instructions" - ], - "properties": { - "comment": { - "type": "string", - "description": "Optional comment describing the update", - "example": "Optional comment" + "type": "string" + }, + "example": [ + "testing" + ] }, - "instructions": { - "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", - "example": "[{\"kind\": \"updateName\", \"value\": \"Updated experiment name\"}]", - "$ref": "#/components/schemas/Instructions" + "enabled": { + "type": "boolean", + "description": "Whether the integration is currently active" + }, + "_access": { + "description": "Details on the allowed and denied actions for this integration configuration", + "$ref": "#/components/schemas/Access" + }, + "configValues": { + "type": "object", + "additionalProperties": {}, + "description": "Details on configuration for an integration of this type. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration." + }, + "capabilityConfig": { + "description": "The capability configuration for the integration", + "example": "{\"auditLogEventsHook\": \"statements\": []\"}", + "$ref": "#/components/schemas/CapabilityConfigRep" } } }, - "ExperimentPost": { + "IntegrationDeliveryConfiguration": { "type": "object", "required": [ + "_links", + "_id", + "integrationKey", + "projectKey", + "environmentKey", + "config", + "on", + "tags", "name", - "key", - "iteration" + "version" ], "properties": { - "name": { - "type": "string", - "description": "The experiment name", - "example": "Example experiment" + "_links": { + "description": "The location and content type of related resources", + "$ref": "#/components/schemas/IntegrationDeliveryConfigurationLinks" }, - "description": { + "_id": { "type": "string", - "description": "The experiment description", - "example": "An example experiment, used in testing" + "description": "The integration ID", + "example": "12ab3c4d5ef1a2345bcde67f" }, - "maintainerId": { + "integrationKey": { "type": "string", - "description": "The ID of the member who maintains this experiment", - "example": "12ab3c45de678910fgh12345" + "description": "The integration key", + "example": "example-integration-key" }, - "key": { + "projectKey": { "type": "string", - "description": "The experiment key", - "example": "experiment-key-123abc" + "description": "The project key", + "example": "default" }, - "iteration": { - "description": "Details on the construction of the initial iteration", - "$ref": "#/components/schemas/IterationInput" - } - } - }, - "ExperimentResults": { - "type": "object", - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } + "environmentKey": { + "type": "string", + "description": "The environment key", + "example": "development" }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentMetadataRep" - } + "config": { + "description": "The delivery configuration for the given integration provider. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.", + "$ref": "#/components/schemas/FormVariableConfig" }, - "totals": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentTotalsRep" - } + "on": { + "type": "boolean", + "description": "Whether the configuration is turned on", + "example": true }, - "series": { + "tags": { "type": "array", + "description": "List of tags for this configuration", "items": { - "$ref": "#/components/schemas/ExperimentTimeSeriesSlice" - } - }, - "stats": { - "$ref": "#/components/schemas/ExperimentStatsRep" - }, - "granularity": { - "type": "string" - }, - "metricSeen": { - "$ref": "#/components/schemas/MetricSeen" - } - } - }, - "ExperimentStatsRep": { - "type": "object", - "properties": { - "pValue": { - "type": "number" + "type": "string" + }, + "example": [] }, - "chi2": { - "type": "number" + "name": { + "type": "string", + "description": "Name of the configuration", + "example": "Development environment configuration" }, - "winningVariationIdx": { - "type": "integer" + "version": { + "type": "integer", + "description": "Version of the current configuration", + "example": 1 }, - "minSampleSizeMet": { - "type": "boolean" + "_access": { + "description": "Details on the allowed and denied actions for this configuration", + "$ref": "#/components/schemas/Access" } } }, - "ExperimentTimeSeriesSlice": { + "IntegrationDeliveryConfigurationCollection": { "type": "object", + "required": [ + "_links", + "items" + ], "properties": { - "Time": { - "$ref": "#/components/schemas/UnixMillis" + "_links": { + "description": "The location and content type of related resources", + "$ref": "#/components/schemas/IntegrationDeliveryConfigurationCollectionLinks" }, - "VariationData": { - "$ref": "#/components/schemas/ExperimentTimeSeriesVariationSlices" + "items": { + "type": "array", + "description": "An array of integration delivery configurations", + "items": { + "$ref": "#/components/schemas/IntegrationDeliveryConfiguration" + } } } }, - "ExperimentTimeSeriesVariationSlice": { + "IntegrationDeliveryConfigurationCollectionLinks": { "type": "object", + "required": [ + "self" + ], "properties": { - "value": { - "type": "number" - }, - "count": { - "type": "integer", - "format": "int64" - }, - "cumulativeValue": { - "type": "number" - }, - "cumulativeCount": { - "type": "integer", - "format": "int64" - }, - "conversionRate": { - "type": "number" - }, - "cumulativeConversionRate": { - "type": "number" - }, - "confidenceInterval": { - "$ref": "#/components/schemas/ConfidenceIntervalRep" + "self": { + "$ref": "#/components/schemas/Link" }, - "cumulativeConfidenceInterval": { - "$ref": "#/components/schemas/ConfidenceIntervalRep" + "parent": { + "$ref": "#/components/schemas/Link" } } }, - "ExperimentTimeSeriesVariationSlices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExperimentTimeSeriesVariationSlice" - } - }, - "ExperimentTotalsRep": { + "IntegrationDeliveryConfigurationLinks": { "type": "object", + "required": [ + "self", + "parent", + "project", + "environment" + ], "properties": { - "cumulativeValue": { - "type": "number" - }, - "cumulativeCount": { - "type": "integer", - "format": "int64" - }, - "cumulativeImpressionCount": { - "type": "integer", - "format": "int64" - }, - "cumulativeConversionRate": { - "type": "number" - }, - "cumulativeConfidenceInterval": { - "$ref": "#/components/schemas/ConfidenceIntervalRep" + "self": { + "$ref": "#/components/schemas/Link" }, - "pValue": { - "type": "number" + "parent": { + "$ref": "#/components/schemas/Link" }, - "improvement": { - "type": "number" + "project": { + "$ref": "#/components/schemas/Link" }, - "minSampleSize": { - "type": "integer", - "format": "int64" + "environment": { + "$ref": "#/components/schemas/Link" } } }, - "ExpiringTarget": { + "IntegrationDeliveryConfigurationPost": { "type": "object", "required": [ - "_id", - "_version", - "expirationDate", - "contextKind", - "contextKey", - "_resourceId" + "config" ], "properties": { - "_id": { - "type": "string", - "description": "The ID of this expiring target", - "example": "12ab3c45de678910abc12345" - }, - "_version": { - "type": "integer", - "description": "The version of this expiring target", - "example": 1 - }, - "expirationDate": { - "description": "A timestamp for when the target expires", - "example": "1672358400000", - "$ref": "#/components/schemas/UnixMillis" - }, - "contextKind": { - "type": "string", - "description": "The context kind of the context to be removed", - "example": "user" + "on": { + "type": "boolean", + "description": "Whether the integration configuration is active. Default value is false.", + "example": false }, - "contextKey": { - "type": "string", - "description": "A unique key used to represent the context to be removed", - "example": "context-key-123abc" + "config": { + "description": "The global integration settings, as specified by the formVariables in the manifest.json for this integration.", + "example": "{\"required\": \"example value for required formVariables property for sample-integration\", \"optional\": \"example value for optional formVariables property for sample-integration\"}", + "$ref": "#/components/schemas/FormVariableConfig" }, - "targetType": { - "type": "string", - "description": "A segment's target type, included or excluded. Included when expiring targets are updated on a segment.", - "example": "included" + "tags": { + "type": "array", + "description": "Tags to associate with the integration", + "items": { + "type": "string" + }, + "example": [ + "example-tag" + ] }, - "variationId": { + "name": { "type": "string", - "description": "A unique ID used to represent the flag variation. Included when expiring targets are updated on a feature flag.", - "example": "cc4332e2-bd4d-4fe0-b509-dfd2caf8dd73" - }, - "_resourceId": { - "description": "Details on the segment or flag this expiring target belongs to, its environment, and its project", - "$ref": "#/components/schemas/ResourceId" + "description": "Name to identify the integration", + "example": "Sample integration" } } }, - "ExpiringTargetError": { + "IntegrationDeliveryConfigurationResponse": { "type": "object", - "required": [ - "instructionIndex", - "message" - ], "properties": { - "instructionIndex": { + "statusCode": { "type": "integer", - "description": "The index of the PATCH instruction where the error occurred", - "example": 1 + "description": "The status code returned by the validation", + "example": 200 }, - "message": { - "type": "string", - "description": "The error message related to a failed PATCH instruction", - "example": "example error message" - } - } - }, - "ExpiringTargetGetResponse": { - "type": "object", - "required": [ - "items" - ], - "properties": { - "items": { - "type": "array", - "description": "A list of expiring targets", - "items": { - "$ref": "#/components/schemas/ExpiringTarget" - } + "error": { + "type": "string" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "timestamp": { + "description": "Timestamp of when the validation was performed", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "responseBody": { + "type": "string", + "description": "JSON response to the validation request" } } }, - "ExpiringTargetPatchResponse": { + "IntegrationMetadata": { "type": "object", "required": [ - "items" + "externalId", + "externalStatus", + "externalUrl", + "lastChecked" ], "properties": { - "items": { - "type": "array", - "description": "A list of the results from each instruction", - "items": { - "$ref": "#/components/schemas/ExpiringTarget" - } - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "totalInstructions": { - "type": "integer" + "externalId": { + "type": "string" }, - "successfulInstructions": { - "type": "integer" + "externalStatus": { + "$ref": "#/components/schemas/IntegrationStatus" }, - "failedInstructions": { - "type": "integer" + "externalUrl": { + "type": "string" }, - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExpiringTargetError" - } + "lastChecked": { + "$ref": "#/components/schemas/UnixMillis" } } }, - "ExpiringUserTargetGetResponse": { + "IntegrationStatus": { "type": "object", "required": [ - "items" + "display", + "value" ], "properties": { - "items": { - "type": "array", - "description": "An array of expiring user targets", - "items": { - "$ref": "#/components/schemas/ExpiringUserTargetItem" - } + "display": { + "type": "string" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "value": { + "type": "string" } } }, - "ExpiringUserTargetItem": { + "IntegrationStatusRep": { "type": "object", - "required": [ - "_id", - "_version", - "expirationDate", - "userKey", - "_resourceId" - ], "properties": { - "_id": { - "type": "string", - "description": "The ID of this expiring user target", - "example": "12ab3c45de678910fgh12345" + "statusCode": { + "type": "integer" }, - "_version": { - "type": "integer", - "description": "The version of this expiring user target", - "example": 1 + "responseBody": { + "type": "string" }, - "expirationDate": { - "description": "A timestamp for when the user target expires", - "example": "1658192820000", + "timestamp": { "$ref": "#/components/schemas/UnixMillis" + } + } + }, + "IntegrationSubscriptionStatusRep": { + "type": "object", + "properties": { + "successCount": { + "type": "integer" }, - "userKey": { - "type": "string", - "description": "A unique key used to represent the user", - "example": "example-user-key" + "lastSuccess": { + "$ref": "#/components/schemas/UnixMillis" }, - "targetType": { - "type": "string", - "description": "A segment's target type. Included when expiring user targets are updated on a segment.", - "example": "included" + "lastError": { + "$ref": "#/components/schemas/UnixMillis" }, - "variationId": { - "type": "string", - "description": "A unique key used to represent the flag variation. Included when expiring user targets are updated on a feature flag.", - "example": "ce67d625-a8b9-4fb5-a344-ab909d9d4f4d" + "errorCount": { + "type": "integer" }, - "_resourceId": { - "description": "Details on the resource from which the user is expiring", - "$ref": "#/components/schemas/ResourceIDResponse" + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationStatusRep" + } } } }, - "ExpiringUserTargetPatchResponse": { + "Integrations": { "type": "object", - "required": [ - "items" - ], "properties": { - "items": { - "type": "array", - "description": "An array of expiring user targets", - "items": { - "$ref": "#/components/schemas/ExpiringUserTargetItem" - } - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "totalInstructions": { - "type": "integer", - "description": "The total count of instructions sent in the PATCH request", - "example": 1 - }, - "successfulInstructions": { - "type": "integer", - "description": "The total count of successful instructions sent in the PATCH request", - "example": 1 - }, - "failedInstructions": { - "type": "integer", - "description": "The total count of the failed instructions sent in the PATCH request", - "example": 0 + } }, - "errors": { + "items": { "type": "array", - "description": "An array of error messages for the failed instructions", "items": { - "$ref": "#/components/schemas/ExpiringTargetError" + "$ref": "#/components/schemas/Integration" } + }, + "key": { + "type": "string" } } }, - "Export": { + "InvalidRequestErrorRep": { "type": "object", "required": [ - "id", - "segmentKey", - "creationTime", - "status", - "sizeBytes", - "size", - "initiator", - "_links" + "code", + "message" ], "properties": { - "id": { - "type": "string", - "description": "The export ID", - "example": "1234a567-bcd8-9123-4567-abcd1234567f" - }, - "segmentKey": { - "type": "string", - "description": "The segment key", - "example": "example-big-segment" - }, - "creationTime": { - "description": "Timestamp of when this export was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "status": { + "code": { "type": "string", - "description": "The export status", - "example": "complete" - }, - "sizeBytes": { - "type": "integer", - "format": "int64", - "description": "The export size, in bytes", - "example": 18 + "description": "Specific error code encountered", + "example": "invalid_request" }, - "size": { + "message": { "type": "string", - "description": "The export size, with units", - "example": "18 B" - }, - "initiator": { - "description": "Details on the member who initiated the export", - "example": "{\"name\": \"Ariel Flores\", \"email\": \"ariel@acme.com\"}", - "$ref": "#/components/schemas/InitiatorRep" - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources, including the location of the exported file" + "description": "Description of the error", + "example": "Invalid request body" } } }, - "Extinction": { + "IterationInput": { "type": "object", "required": [ - "revision", - "message", - "time", - "flagKey", - "projKey" + "hypothesis", + "metrics", + "treatments", + "flags" ], "properties": { - "revision": { + "hypothesis": { "type": "string", - "description": "The identifier for the revision where flag became extinct. For example, a commit SHA.", - "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" + "description": "The expected outcome of this experiment", + "example": "Example hypothesis, the new button placement will increase conversion" }, - "message": { - "type": "string", - "description": "Description of the extinction. For example, the commit message for the revision.", - "example": "Remove flag for launched feature" + "canReshuffleTraffic": { + "type": "boolean", + "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.", + "example": true }, - "time": { - "description": "Time of extinction", - "example": "1636558831870", - "$ref": "#/components/schemas/UnixMillis" + "metrics": { + "description": "Details on the metrics for this experiment", + "$ref": "#/components/schemas/MetricsInput" }, - "flagKey": { + "primarySingleMetricKey": { "type": "string", - "description": "The feature flag key", - "example": "enable-feature" + "description": "The key of the primary metric for this experiment. Either primarySingleMetricKey or primaryFunnelKey must be present.", + "example": "metric-key-123abc" }, - "projKey": { + "primaryFunnelKey": { "type": "string", - "description": "The project key", - "example": "default" - } - } - }, - "ExtinctionCollectionRep": { - "type": "object", - "required": [ - "_links", - "items" - ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "description": "The key of the primary funnel group for this experiment. Either primarySingleMetricKey or primaryFunnelKey must be present.", + "example": "metric-group-key-123abc" }, - "items": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Extinction" - } + "treatments": { + "description": "Details on the variations you are testing in the experiment. You establish these variations in feature flags, and then reuse them in experiments.", + "$ref": "#/components/schemas/TreatmentsInput" + }, + "flags": { + "description": "Details on the feature flag and targeting rules for this iteration", + "example": "{\"example-flag-key\": { \"ruleId\": \"e432f62b-55f6-49dd-a02f-eb24acf39d05\", \"flagConfigVersion\": 12, \"notInExperimentVariationId\": \"e432f62b-55f6-49dd-a02f-eb24acf39d05\" }}", + "$ref": "#/components/schemas/FlagsInput" + }, + "randomizationUnit": { + "type": "string", + "description": "The unit of randomization for this iteration. Defaults to user.", + "example": "user" + }, + "attributes": { + "type": "array", + "description": "The attributes that this iteration's results can be sliced by", + "items": { + "type": "string" }, - "description": "An array of extinction events" + "example": [ + "country", + "device", + "os" + ] } } }, - "ExtinctionListPost": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Extinction" - } - }, - "FeatureFlag": { + "IterationRep": { "type": "object", "required": [ - "name", - "kind", - "key", - "_version", - "creationDate", - "variations", - "temporary", - "tags", - "_links", - "experiments", - "customProperties", - "archived", - "deprecated", - "environments" + "hypothesis", + "status", + "createdAt" ], "properties": { - "name": { - "type": "string", - "description": "A human-friendly name for the feature flag", - "example": "My Flag" - }, - "kind": { + "_id": { "type": "string", - "description": "Kind of feature flag", - "example": "boolean", - "enum": [ - "boolean", - "multivariate" - ] + "description": "The iteration ID", + "example": "12ab3c45de678910fgh12345" }, - "description": { + "hypothesis": { "type": "string", - "description": "Description of the feature flag", - "example": "This flag controls the example widgets" + "description": "The expected outcome of this experiment", + "example": "The new button placement will increase conversion" }, - "key": { + "status": { "type": "string", - "description": "A unique key used to reference the flag in your code", - "example": "flag-key-123abc" + "description": "The status of the iteration: not_started, running, stopped", + "example": "running" }, - "_version": { - "type": "integer", - "description": "Version of the feature flag", - "example": 1 + "createdAt": { + "description": "Timestamp of when the iteration was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" }, - "creationDate": { - "description": "Timestamp of flag creation date", - "example": "1494437420312", + "startedAt": { + "description": "Timestamp of when the iteration started", + "example": "1655314200000", "$ref": "#/components/schemas/UnixMillis" }, - "includeInSnippet": { - "type": "boolean", - "description": "Deprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK", - "example": true, - "deprecated": true + "endedAt": { + "description": "Timestamp of when the iteration ended", + "example": "1656610200000", + "$ref": "#/components/schemas/UnixMillis" }, - "clientSideAvailability": { - "description": "Which type of client-side SDKs the feature flag is available to", - "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}", - "$ref": "#/components/schemas/ClientSideAvailability" + "winningTreatmentId": { + "type": "string", + "description": "The ID of the treatment chosen when the experiment stopped", + "example": "122c9f3e-da26-4321-ba68-e0fc02eced58" }, - "variations": { - "type": "array", - "description": "An array of possible variations for the flag", - "items": { - "$ref": "#/components/schemas/Variation" - }, - "example": [ - { - "_id": "e432f62b-55f6-49dd-a02f-eb24acf39d05", - "value": true - }, - { - "_id": "a00bf58d-d252-476c-b915-15a74becacb4", - "value": false - } - ] + "winningReason": { + "type": "string", + "description": "The reason you stopped the experiment", + "example": "We ran this iteration for two weeks and the winning variation was clear" }, - "temporary": { + "canReshuffleTraffic": { "type": "boolean", - "description": "Whether the flag is a temporary flag", + "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).", "example": true }, - "tags": { - "type": "array", - "description": "Tags for the feature flag", - "items": { - "type": "string" - }, - "example": [ - "example-tag" - ] - }, - "_links": { + "flags": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Link" + "$ref": "#/components/schemas/FlagRep" }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/flags/my-project", - "type": "application/json" - }, - "self": { - "href": "/api/v2/flags/my-project/my-flag", - "type": "application/json" - } - } + "description": "Details on the flag used in this experiment" }, - "maintainerId": { - "type": "string", - "description": "Associated maintainerId for the feature flag", - "example": "569f183514f4432160000007" + "primaryMetric": { + "description": "Deprecated, use primarySingleMetric and primaryFunnel instead. Details on the primary metric for this experiment.", + "deprecated": true, + "$ref": "#/components/schemas/DependentMetricOrMetricGroupRep" }, - "_maintainer": { - "description": "Associated maintainer member info for the feature flag", - "$ref": "#/components/schemas/MemberSummary" + "primarySingleMetric": { + "description": "Details on the primary metric for this experiment", + "$ref": "#/components/schemas/MetricV2Rep" }, - "maintainerTeamKey": { - "type": "string", - "description": "The key of the associated team that maintains this feature flag", - "example": "team-1" + "primaryFunnel": { + "description": "Details on the primary funnel group for this experiment", + "$ref": "#/components/schemas/DependentMetricGroupRepWithMetrics" }, - "_maintainerTeam": { - "description": "Associated maintainer team info for the feature flag", - "$ref": "#/components/schemas/MaintainerTeam" + "randomizationUnit": { + "type": "string", + "description": "The unit of randomization for this iteration", + "example": "user" }, - "goalIds": { + "attributes": { "type": "array", - "description": "Deprecated, use experiments instead", + "description": "The available attribute filters for this iteration", "items": { "type": "string" - }, - "example": [], - "deprecated": true - }, - "experiments": { - "description": "Experimentation data for the feature flag", - "example": "{\"baselineIdx\": 0,\"items\": []}", - "$ref": "#/components/schemas/ExperimentInfoRep" - }, - "customProperties": { - "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.", - "example": "{\"jira.issues\":{\"name\":\"Jira issues\",\"value\":[\"is-123\",\"is-456\"]}}", - "$ref": "#/components/schemas/CustomProperties" - }, - "archived": { - "type": "boolean", - "description": "Boolean indicating if the feature flag is archived", - "example": false - }, - "archivedDate": { - "description": "If archived is true, date of archive", - "example": "1494437420312", - "$ref": "#/components/schemas/UnixMillis" + } }, - "deprecated": { - "type": "boolean", - "description": "Boolean indicating if the feature flag is deprecated", - "example": false + "treatments": { + "type": "array", + "description": "Details on the variations you are testing in the experiment", + "items": { + "$ref": "#/components/schemas/TreatmentRep" + } }, - "deprecatedDate": { - "description": "If deprecated is true, date of deprecation", - "example": "1494437420312", - "$ref": "#/components/schemas/UnixMillis" + "secondaryMetrics": { + "type": "array", + "description": "Deprecated, use metrics instead. Details on the secondary metrics for this experiment.", + "items": { + "$ref": "#/components/schemas/MetricV2Rep" + }, + "deprecated": true }, - "defaults": { - "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.", - "example": "{\"onVariation\":0,\"offVariation\":1}", - "$ref": "#/components/schemas/Defaults" + "metrics": { + "type": "array", + "description": "Details on the metrics for this experiment", + "items": { + "$ref": "#/components/schemas/DependentMetricOrMetricGroupRep" + } }, - "_purpose": { - "type": "string" + "layerSnapshot": { + "description": "Snapshot of the layer state on iteration stop, if part of a layer. Otherwise omitted.", + "$ref": "#/components/schemas/LayerSnapshotRep" + } + } + }, + "JSONPatch": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PatchOperation" + } + }, + "LastSeenMetadata": { + "type": "object", + "properties": { + "tokenId": { + "type": "string", + "description": "The ID of the token used in the member's last session", + "example": "5b52207f8ca8e631d31fdb2b" + } + } + }, + "LayerCollectionRep": { + "type": "object", + "required": [ + "items", + "totalCount", + "_links" + ], + "properties": { + "items": { + "type": "array", + "description": "The layers in the project", + "items": { + "$ref": "#/components/schemas/LayerRep" + } }, - "migrationSettings": { - "description": "Migration-related settings for the flag", - "$ref": "#/components/schemas/FlagMigrationSettingsRep" + "totalCount": { + "type": "integer", + "description": "The total number of layers in the project" }, - "environments": { + "_links": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/FeatureFlagConfig" + "$ref": "#/components/schemas/Link" }, - "description": "Details on the environments for this flag. Only returned if the request is filtered by environment, using the filterEnv query parameter.", + "description": "The location and content type of related resources", "example": { - "my-environment": { - "_environmentName": "My Environment", - "_site": { - "href": "/default/my-environment/features/client-side-flag", - "type": "text/html" - }, - "_summary": { - "prerequisites": 0, - "variations": { - "0": { - "contextTargets": 1, - "isFallthrough": true, - "nullRules": 0, - "rules": 0, - "targets": 1 - }, - "1": { - "isOff": true, - "nullRules": 0, - "rules": 0, - "targets": 0 - } - } - }, - "archived": false, - "contextTargets": [ - { - "contextKind": "device", - "values": [ - "device-key-123abc" - ], - "variation": 0 - } - ], - "fallthrough": { - "variation": 0 - }, - "lastModified": 1627071171347, - "offVariation": 1, - "on": false, - "prerequisites": [], - "rules": [], - "salt": "61eddeadbeef4da1facecafe3a60a397", - "sel": "810edeadbeef4844facecafe438f2999492", - "targets": [ - { - "contextKind": "user", - "values": [ - "user-key-123abc" - ], - "variation": 0 - } - ], - "trackEvents": false, - "trackEventsFallthrough": false, - "version": 1 + "self": { + "href": "/api/v2/projects/my-project/layers", + "type": "application/json" } } } } }, - "FeatureFlagBody": { + "LayerConfigurationRep": { + "type": "object", + "required": [ + "reservations" + ], + "properties": { + "reservations": { + "type": "array", + "description": "The experiment reservations for the layer", + "items": { + "$ref": "#/components/schemas/LayerReservationRep" + } + } + } + }, + "LayerPatchInput": { + "type": "object", + "required": [ + "instructions" + ], + "properties": { + "comment": { + "type": "string", + "description": "Optional comment describing the update", + "example": "Optional comment" + }, + "environmentKey": { + "type": "string", + "description": "The environment key used for making environment specific updates. For example, updating the reservation of an experiment", + "example": "production" + }, + "instructions": { + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", + "example": "[{\"kind\": \"updateName\", \"name\": \"Updated layer name\"}]", + "$ref": "#/components/schemas/Instructions" + } + } + }, + "LayerPost": { "type": "object", "required": [ + "key", "name", - "key" + "description" ], "properties": { + "key": { + "type": "string", + "description": "Unique identifier for the layer", + "example": "checkout-flow" + }, "name": { "type": "string", - "description": "A human-friendly name for the feature flag", - "example": "My flag" + "description": "Layer name", + "example": "Checkout Flow" }, + "description": { + "type": "string", + "description": "The checkout flow for the application" + } + } + }, + "LayerRep": { + "type": "object", + "required": [ + "key", + "name", + "description", + "createdAt" + ], + "properties": { "key": { "type": "string", - "description": "A unique key used to reference the flag in your code", - "example": "flag-key-123abc" + "description": "The key of the layer", + "example": "checkout-flow" + }, + "name": { + "type": "string", + "description": "The name of the layer", + "example": "Checkout Flow" }, "description": { "type": "string", - "description": "Description of the feature flag. Defaults to an empty string.", - "example": "This flag controls the example widgets" + "description": "The description of the layer", + "example": "The checkout flow for the application" }, - "includeInSnippet": { - "type": "boolean", - "description": "Deprecated, use clientSideAvailability. Whether this flag should be made available to the client-side JavaScript SDK. Defaults to false.", - "deprecated": true + "createdAt": { + "description": "The date and time when the layer was created", + "$ref": "#/components/schemas/UnixMillis" }, - "clientSideAvailability": { - "description": "Which type of client-side SDKs the feature flag is available to", - "example": "{\"usingMobileKey\":true,\"usingEnvironmentId\":false}", - "$ref": "#/components/schemas/ClientSideAvailabilityPost" + "randomizationUnit": { + "type": "string", + "description": "The unit of randomization for the layer", + "example": "user" }, - "variations": { - "type": "array", - "description": "An array of possible variations for the flag. The variation values must be unique. If omitted, two boolean variations of true and false will be used.", - "items": { - "$ref": "#/components/schemas/Variation" + "environments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LayerConfigurationRep" }, - "example": [ - { - "value": true - }, - { - "value": false - } - ] + "description": "The layer configurations for each requested environment" + } + } + }, + "LayerReservationRep": { + "type": "object", + "required": [ + "experimentKey", + "flagKey", + "reservationPercent" + ], + "properties": { + "experimentKey": { + "type": "string", + "description": "The key of the experiment", + "example": "checkout-flow-experiment" }, - "temporary": { - "type": "boolean", - "description": "Whether the flag is a temporary flag. Defaults to true.", - "example": false + "flagKey": { + "type": "string", + "description": "The key of the flag", + "example": "checkout-flow-flag" }, - "tags": { + "reservationPercent": { + "type": "integer", + "description": "The percentage of traffic reserved for the experiment", + "example": 20 + } + } + }, + "LayerSnapshotRep": { + "type": "object", + "required": [ + "key", + "name", + "reservationPercent", + "otherReservationPercent" + ], + "properties": { + "key": { + "type": "string", + "description": "Key of the layer the experiment was part of", + "example": "checkout-flow" + }, + "name": { + "type": "string", + "description": "Layer name at the time this experiment iteration was stopped", + "example": "Checkout Flow" + }, + "reservationPercent": { + "type": "integer", + "description": "Percent of layer traffic that was reserved in the layer for this experiment iteration", + "example": 10 + }, + "otherReservationPercent": { + "type": "integer", + "description": "Percent of layer traffic that was reserved for other experiments in the same environment, when this experiment iteration was stopped", + "example": 70 + } + } + }, + "LegacyExperimentRep": { + "type": "object", + "properties": { + "metricKey": { + "type": "string", + "example": "my-metric" + }, + "_metric": { + "$ref": "#/components/schemas/MetricListingRep" + }, + "environments": { "type": "array", - "description": "Tags for the feature flag. Defaults to an empty array.", "items": { "type": "string" }, "example": [ - "example-tag" + "production", + "test", + "my-environment" ] }, - "customProperties": { - "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.", - "example": "{ \"jira.issues\": {\"name\": \"Jira issues\", \"value\": [\"is-123\", \"is-456\"]} }", - "$ref": "#/components/schemas/CustomProperties" + "_environmentSettings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ExperimentEnvironmentSettingRep" + } + } + } + }, + "Link": { + "type": "object", + "properties": { + "href": { + "type": "string" }, - "defaults": { - "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.", - "example": "{\"onVariation\":0, \"offVariation\":1}", - "$ref": "#/components/schemas/Defaults" + "type": { + "type": "string" + } + } + }, + "MaintainerRep": { + "type": "object", + "properties": { + "member": { + "description": "Details on the member who maintains this resource", + "$ref": "#/components/schemas/MemberSummary" }, - "purpose": { + "team": { + "description": "Details on the team that maintains this resource", + "$ref": "#/components/schemas/MemberTeamSummaryRep" + } + } + }, + "MaintainerTeam": { + "type": "object", + "required": [ + "key", + "name" + ], + "properties": { + "key": { "type": "string", - "description": "Purpose of the flag", - "example": "migration", - "enum": [ - "migration" - ] - }, - "migrationSettings": { - "description": "Settings relevant to flags where purpose is migration", - "$ref": "#/components/schemas/MigrationSettingsPost" + "description": "The key of the maintainer team", + "example": "team-key-123abc" }, - "maintainerId": { + "name": { "type": "string", - "description": "The ID of the member who maintains this feature flag", - "example": "12ab3c45de678910fgh12345" + "description": "A human-friendly name for the maintainer team", + "example": "Example team" }, - "maintainerTeamKey": { - "type": "string", - "description": "The key of the team that maintains this feature flag", - "example": "team-1" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/teams", + "type": "application/json" + }, + "roles": { + "href": "/api/v2/teams/example-team/roles", + "type": "application/json" + }, + "self": { + "href": "/api/v2/teams/example-team", + "type": "application/json" + } + } } } }, - "FeatureFlagConfig": { + "Member": { "type": "object", "required": [ - "on", - "archived", - "salt", - "sel", - "lastModified", - "version", - "_site", - "_environmentName", - "trackEvents", - "trackEventsFallthrough" + "_links", + "_id", + "role", + "email", + "_pendingInvite", + "_verified", + "customRoles", + "mfa", + "_lastSeen", + "creationDate" ], "properties": { - "on": { - "type": "boolean", - "description": "Whether the flag is on" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "archived": { + "_id": { + "type": "string", + "description": "The member's ID", + "example": "507f1f77bcf86cd799439011" + }, + "firstName": { + "type": "string", + "description": "The member's first name", + "example": "Ariel" + }, + "lastName": { + "type": "string", + "description": "The member's last name", + "example": "Flores" + }, + "role": { + "type": "string", + "description": "The member's built-in role. If the member has no custom roles, this role will be in effect.", + "example": "reader" + }, + "email": { + "type": "string", + "description": "The member's email address", + "example": "ariel@acme.com" + }, + "_pendingInvite": { "type": "boolean", - "description": "Boolean indicating if the feature flag is archived" + "description": "Whether the member has a pending invitation", + "example": false }, - "salt": { - "type": "string" + "_verified": { + "type": "boolean", + "description": "Whether the member's email address has been verified", + "example": true }, - "sel": { - "type": "string" + "_pendingEmail": { + "type": "string", + "description": "The member's email address before it has been verified, for accounts where email verification is required" }, - "lastModified": { - "description": "Timestamp of when the flag configuration was most recently modified", - "$ref": "#/components/schemas/UnixMillis" + "customRoles": { + "type": "array", + "description": "The set of custom roles (as keys) assigned to the member", + "items": { + "type": "string" + }, + "example": [ + "devOps", + "backend-devs" + ] }, - "version": { - "type": "integer", - "description": "Version of the feature flag" + "mfa": { + "type": "string", + "description": "Whether multi-factor authentication is enabled for this member" }, - "targets": { + "excludedDashboards": { "type": "array", - "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.", + "description": "Default dashboards that the member has chosen to ignore", "items": { - "$ref": "#/components/schemas/Target" + "type": "string" } }, - "contextTargets": { + "_lastSeen": { + "description": "The member's last session date (as Unix milliseconds since epoch)", + "example": "1608260796147", + "$ref": "#/components/schemas/UnixMillis" + }, + "_lastSeenMetadata": { + "description": "Additional metadata associated with the member's last session, for example, whether a token was used", + "$ref": "#/components/schemas/LastSeenMetadata" + }, + "_integrationMetadata": { + "description": "Details on the member account in an external source, if this member is provisioned externally", + "$ref": "#/components/schemas/IntegrationMetadata" + }, + "teams": { "type": "array", - "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.", + "description": "Details on the teams this member is assigned to", "items": { - "$ref": "#/components/schemas/Target" + "$ref": "#/components/schemas/MemberTeamSummaryRep" } }, - "rules": { + "permissionGrants": { "type": "array", - "description": "An array of the rules for how to serve a variation to specific targets based on their attributes", + "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.", "items": { - "$ref": "#/components/schemas/Rule" + "$ref": "#/components/schemas/MemberPermissionGrantSummaryRep" } }, - "fallthrough": { - "description": "Details on the variation or rollout to serve as part of the flag's default rule", - "$ref": "#/components/schemas/VariationOrRolloutRep" - }, - "offVariation": { - "type": "integer", - "description": "The ID of the variation to serve when the flag is off" + "creationDate": { + "description": "Timestamp of when the member was created", + "example": "1628001602644", + "$ref": "#/components/schemas/UnixMillis" }, - "prerequisites": { + "oauthProviders": { "type": "array", - "description": "An array of the prerequisite flags and their variations that are required before this flag takes effect", + "description": "A list of OAuth providers", "items": { - "$ref": "#/components/schemas/Prerequisite" + "$ref": "#/components/schemas/OAuthProviderKind" } }, - "_site": { - "description": "Details on how to access the flag configuration in the LaunchDarkly UI", - "$ref": "#/components/schemas/Link" + "version": { + "type": "integer", + "description": "Version of the current configuration", + "example": 1 }, - "_access": { - "description": "Details on the allowed and denied actions for this flag", - "$ref": "#/components/schemas/Access" + "roleAttributes": { + "description": "The role attributes for the member", + "$ref": "#/components/schemas/RoleAttributeMap" + } + } + }, + "MemberDataRep": { + "type": "object", + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } }, - "_environmentName": { + "_id": { "type": "string", - "description": "The environment name" + "description": "The member ID", + "example": "507f1f77bcf86cd799439011" }, - "trackEvents": { - "type": "boolean", - "description": "Whether LaunchDarkly tracks events for the feature flag, for all rules" + "email": { + "type": "string", + "description": "The member email", + "example": "ariel@acme.com" }, - "trackEventsFallthrough": { - "type": "boolean", - "description": "Whether LaunchDarkly tracks events for the feature flag, for the default rule" + "firstName": { + "type": "string", + "description": "The member first name", + "example": "Ariel" }, - "_debugEventsUntilDate": { - "$ref": "#/components/schemas/UnixMillis" + "lastName": { + "type": "string", + "description": "The member last name", + "example": "Flores" + } + } + }, + "MemberImportItem": { + "type": "object", + "required": [ + "status", + "value" + ], + "properties": { + "message": { + "type": "string", + "description": "An error message, including CSV line number, if the status is error" }, - "_summary": { - "description": "A summary of the prerequisites and variations for this flag", - "$ref": "#/components/schemas/FlagSummary" + "status": { + "type": "string", + "description": "Whether this member can be successfully imported (success) or not (error). Even if the status is success, members are only added to a team on a 201 response.", + "example": "error" + }, + "value": { + "type": "string", + "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.", + "example": "new-team-member@acme.com" + } + } + }, + "MemberPermissionGrantSummaryRep": { + "type": "object", + "required": [ + "resource" + ], + "properties": { + "actionSet": { + "type": "string", + "description": "The name of the group of related actions to allow. A permission grant may have either an actionSet or a list of actions but not both at the same time." }, - "evaluation": { - "description": "Evaluation information for the flag", - "$ref": "#/components/schemas/FlagConfigEvaluation" + "actions": { + "type": "array", + "description": "A list of actions to allow. A permission grant may have either an actionSet or a list of actions but not both at the same time.", + "items": { + "type": "string" + }, + "example": [ + "maintainTeam" + ] }, - "migrationSettings": { - "description": "Migration-related settings for the flag configuration", - "$ref": "#/components/schemas/FlagConfigMigrationSettingsRep" + "resource": { + "type": "string", + "description": "The resource for which the actions are allowed", + "example": "team/qa-team" } } }, - "FeatureFlagScheduledChange": { + "MemberSummary": { "type": "object", "required": [ + "_links", "_id", - "_creationDate", - "_maintainerId", - "_version", - "executionDate", - "instructions" + "role", + "email" ], "properties": { - "_id": { - "description": "The ID of this scheduled change", - "example": "12ab3c45de678910abc12345", - "$ref": "#/components/schemas/FeatureWorkflowId" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/members/569f183514f4432160000007", + "type": "application/json" + } + } }, - "_creationDate": { - "description": "Timestamp of when the scheduled change was created", - "example": "1654123897062", - "$ref": "#/components/schemas/UnixMillis" + "_id": { + "type": "string", + "description": "The member's ID", + "example": "569f183514f4432160000007" }, - "_maintainerId": { + "firstName": { "type": "string", - "description": "The ID of the scheduled change maintainer", - "example": "12ab3c45de678910abc12345" + "description": "The member's first name", + "example": "Ariel" }, - "_version": { - "type": "integer", - "description": "Version of the scheduled change", - "example": 1 + "lastName": { + "type": "string", + "description": "The member's last name", + "example": "Flores" }, - "executionDate": { - "description": "When the scheduled changes should be executed", - "example": "1636558831870", - "$ref": "#/components/schemas/UnixMillis" + "role": { + "type": "string", + "description": "The member's built-in role. If the member has no custom roles, this role will be in effect.", + "example": "admin" }, - "instructions": { - "description": "The actions to perform on the execution date for these scheduled changes", - "example": "[ { \"kind\": \"turnFlagOn\" }]", - "$ref": "#/components/schemas/Instructions" + "email": { + "type": "string", + "description": "The member's email address", + "example": "ariel@acme.com" + } + } + }, + "MemberTeamSummaryRep": { + "type": "object", + "required": [ + "customRoleKeys", + "key", + "name" + ], + "properties": { + "customRoleKeys": { + "type": "array", + "description": "A list of keys of the custom roles this team has access to", + "items": { + "type": "string" + }, + "example": [ + "access-to-test-projects" + ] }, - "conflicts": { - "description": "Details on any conflicting scheduled changes" + "key": { + "type": "string", + "description": "The team key", + "example": "team-key-123abc" }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" + } + }, + "name": { + "type": "string", + "description": "The team name", + "example": "QA Team" + } + } + }, + "MemberTeamsPostInput": { + "type": "object", + "required": [ + "teamKeys" + ], + "properties": { + "teamKeys": { + "type": "array", + "description": "List of team keys", + "items": { + "type": "string" }, - "description": "The location and content type of related resources" + "example": [ + "team1", + "team2" + ] } } }, - "FeatureFlagScheduledChanges": { + "Members": { "type": "object", "required": [ - "items" + "items", + "_links" ], "properties": { "items": { "type": "array", - "description": "Array of scheduled changes", + "description": "An array of members", "items": { - "$ref": "#/components/schemas/FeatureFlagScheduledChange" + "$ref": "#/components/schemas/Member" } }, "_links": { @@ -29367,113 +39206,84 @@ "$ref": "#/components/schemas/Link" }, "description": "The location and content type of related resources" + }, + "totalCount": { + "type": "integer", + "description": "The number of members returned" } } }, - "FeatureFlagStatus": { + "MethodNotAllowedErrorRep": { "type": "object", "required": [ - "name" + "code", + "message" ], "properties": { - "name": { + "code": { "type": "string", - "description": "Status of the flag", - "example": "inactive" + "description": "Specific error code encountered", + "example": "method_not_allowed" }, - "lastRequested": { + "message": { "type": "string", - "format": "date-time", - "description": "Timestamp of last time flag was requested", - "example": "2020-02-05T18:17:01.514Z" - }, - "default": { - "description": "Default value seen from code" + "description": "Description of the error", + "example": "Method not allowed" } } }, - "FeatureFlagStatusAcrossEnvironments": { + "MetricCollectionRep": { "type": "object", - "required": [ - "environments", - "key", - "_links" - ], "properties": { - "environments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FeatureFlagStatus" - }, - "description": "Flag status for environment.", - "example": { - "production": { - "lastRequested": "2020-02-05T18:17:01.514Z", - "name": "inactive" - } + "items": { + "type": "array", + "description": "An array of metrics", + "items": { + "$ref": "#/components/schemas/MetricListingRep" } }, - "key": { - "type": "string", - "description": "feature flag key", - "example": "flag-key-123abc" - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, + "description": "The location and content type of related resources", "example": { - "parent": { - "href": "/api/v2/flag-status", - "type": "application/json" - }, "self": { - "href": "/api/v2/flag-status/my-project/my-flag", + "href": "/api/v2/metrics/my-project?limit=20", "type": "application/json" } } + }, + "totalCount": { + "type": "integer" } } }, - "FeatureFlagStatuses": { + "MetricEventDefaultRep": { "type": "object", - "required": [ - "_links" - ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "example": { - "self": { - "href": "/api/v2/flag-statuses/my-project/my-environment", - "type": "application/json" - } - } + "disabled": { + "type": "boolean", + "description": "Whether to disable defaulting missing unit events when calculating results. Defaults to false" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlagStatusRep" - } + "value": { + "type": "number", + "description": "The default value applied to missing unit events. Only available when disabled is false. Defaults to 0" } } }, - "FeatureFlags": { + "MetricGroupCollectionRep": { "type": "object", "required": [ - "items", - "_links" + "items" ], "properties": { "items": { "type": "array", - "description": "An array of feature flags", + "description": "An array of metric groups", "items": { - "$ref": "#/components/schemas/FeatureFlag" + "$ref": "#/components/schemas/MetricGroupRep" } }, "_links": { @@ -29483,307 +39293,411 @@ }, "description": "The location and content type of related resources", "example": { + "parent": { + "href": "/api/v2/projects/my-project", + "type": "application/json" + }, "self": { - "href": "/api/v2/flags/default", + "href": "/api/v2/projects/my-project/metric-groups", "type": "application/json" } } }, "totalCount": { - "type": "integer", - "description": "The total number of flags", - "example": 1 - }, - "totalCountWithDifferences": { - "type": "integer", - "description": "The number of flags that have differences between environments. Only shown when query parameter compare is true.", - "example": 0 + "type": "integer" } } }, - "FeatureWorkflowId": { - "type": "string" - }, - "FileRep": { + "MetricGroupPost": { "type": "object", + "required": [ + "key", + "name", + "kind", + "maintainerId", + "tags", + "metrics" + ], "properties": { - "filename": { + "key": { "type": "string", - "description": "The imported file name, including the extension", - "example": "bigsegimport.csv" + "description": "A unique key to reference the metric group", + "example": "metric-group-key-123abc" }, - "status": { + "name": { "type": "string", - "description": "The imported file status", - "example": "complete" + "description": "A human-friendly name for the metric group", + "example": "My metric group" + }, + "kind": { + "type": "string", + "description": "The type of the metric group", + "example": "funnel", + "enum": [ + "funnel" + ] + }, + "description": { + "type": "string", + "description": "Description of the metric group", + "example": "Description of the metric group" + }, + "maintainerId": { + "type": "string", + "description": "The ID of the member who maintains this metric group", + "example": "569fdeadbeef1644facecafe" + }, + "tags": { + "type": "array", + "description": "Tags for the metric group", + "items": { + "type": "string" + }, + "example": [ + "ops" + ] + }, + "metrics": { + "type": "array", + "description": "An ordered list of the metrics in this metric group", + "items": { + "$ref": "#/components/schemas/MetricInMetricGroupInput" + } } } }, - "FlagConfigApprovalRequestResponse": { + "MetricGroupRep": { "type": "object", "required": [ "_id", - "_version", - "creationDate", - "serviceKind", - "reviewStatus", - "allReviews", - "notifyMemberIds", - "status", - "instructions", - "conflicts", - "_links" + "key", + "name", + "kind", + "_links", + "tags", + "_creationDate", + "_lastModified", + "maintainer", + "metrics", + "_version" ], "properties": { "_id": { "type": "string", - "description": "The ID of this approval request", - "example": "12ab3c45de678910abc12345" - }, - "_version": { - "type": "integer", - "description": "Version of the approval request", - "example": 1 - }, - "creationDate": { - "description": "Timestamp of when the approval request was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "serviceKind": { - "description": "The approval service for this request. May be LaunchDarkly or an external approval service, such as ServiceNow or JIRA.", - "example": "launchdarkly", - "$ref": "#/components/schemas/ApprovalRequestServiceKind" + "description": "The ID of this metric group", + "example": "bc3e5be1-02d2-40c7-9926-26d0aacd7aab" }, - "requestorId": { + "key": { "type": "string", - "description": "The ID of the member who requested the approval", - "example": "12ab3c45de678910abc12345" + "description": "A unique key to reference the metric group", + "example": "metric-group-key-123abc" }, - "description": { + "name": { "type": "string", - "description": "A human-friendly name for the approval request", - "example": "example: request approval from someone" + "description": "A human-friendly name for the metric group", + "example": "My metric group" }, - "reviewStatus": { + "kind": { "type": "string", - "description": "Current status of the review of this approval request", - "example": "pending", + "description": "The type of the metric group", + "example": "funnel", "enum": [ - "approved", - "declined", - "pending" + "funnel", + "standard" ] }, - "allReviews": { - "type": "array", - "description": "An array of individual reviews of this approval request", - "items": { - "$ref": "#/components/schemas/ReviewResponse" + "description": { + "type": "string", + "description": "Description of the metric group", + "example": "Description of the metric group" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/projects/my-project", + "type": "application/json" + }, + "self": { + "href": "/api/v2/projects/my-project/metric-groups/my-metric-group", + "type": "application/json" + } } }, - "notifyMemberIds": { + "_access": { + "description": "Details on the allowed and denied actions for this metric group", + "$ref": "#/components/schemas/Access" + }, + "tags": { "type": "array", - "description": "An array of member IDs. These members are notified to review the approval request.", + "description": "Tags for the metric group", "items": { "type": "string" }, "example": [ - "1234a56b7c89d012345e678f" + "ops" ] }, - "appliedDate": { - "description": "Timestamp of when the approval request was applied", - "example": "1654104600000", + "_creationDate": { + "description": "Timestamp of when the metric group was created", + "example": "1628192791148", "$ref": "#/components/schemas/UnixMillis" }, - "appliedByMemberId": { - "type": "string", - "description": "The member ID of the member who applied the approval request", - "example": "1234a56b7c89d012345e678f" - }, - "appliedByServiceTokenId": { - "type": "string", - "description": "The service token ID of the service token which applied the approval request", - "example": "1234a56b7c89d012345e678f" - }, - "status": { - "type": "string", - "description": "Current status of the approval request", - "example": "pending", - "enum": [ - "pending", - "completed", - "failed", - "scheduled" - ] + "_lastModified": { + "description": "Timestamp of when the metric group was last modified", + "example": "1628192791148", + "$ref": "#/components/schemas/UnixMillis" }, - "instructions": { - "description": "List of instructions in semantic patch format to be applied to the feature flag", - "example": "[{\"kind\": \"turnFlagOn\"}]", - "$ref": "#/components/schemas/Instructions" + "maintainer": { + "description": "The maintainer of this metric", + "$ref": "#/components/schemas/MaintainerRep" }, - "conflicts": { + "metrics": { "type": "array", - "description": "Details on any conflicting approval requests", + "description": "An ordered list of the metrics in this metric group", "items": { - "$ref": "#/components/schemas/Conflict" + "$ref": "#/components/schemas/MetricInGroupRep" } }, - "_links": { - "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" - }, - "executionDate": { - "description": "Timestamp for when instructions will be executed", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "operatingOnId": { - "type": "string", - "description": "ID of scheduled change to edit or delete", - "example": "12ab3c45de678910abc12345" + "_version": { + "type": "integer", + "description": "The version of this metric group", + "example": 1 }, - "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", - "$ref": "#/components/schemas/IntegrationMetadata" + "experiments": { + "description": "Experiments that use this metric group. Only included if specified in the expand query parameter in a getMetricGroup request.", + "$ref": "#/components/schemas/DependentExperimentListRep" }, - "source": { - "description": "Details about the source feature flag, if copied", - "$ref": "#/components/schemas/CopiedFromEnv" + "experimentCount": { + "type": "integer", + "description": "The number of experiments using this metric group", + "example": 0 + } + } + }, + "MetricGroupResultsRep": { + "type": "object", + "required": [ + "_links", + "metrics" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "customWorkflowMetadata": { - "description": "Details about the custom workflow, if this approval request is part of a custom workflow", - "$ref": "#/components/schemas/CustomWorkflowMeta" + "metrics": { + "type": "array", + "description": "An ordered list of the metrics in this metric group, and each of their results", + "items": { + "$ref": "#/components/schemas/MetricInGroupResultsRep" + } } } }, - "FlagConfigApprovalRequestsResponse": { + "MetricInGroupRep": { "type": "object", "required": [ - "items", + "key", + "name", + "kind", "_links" ], "properties": { - "items": { - "type": "array", - "description": "An array of approval requests", - "items": { - "$ref": "#/components/schemas/FlagConfigApprovalRequestResponse" - } + "key": { + "type": "string", + "description": "The metric key", + "example": "metric-key-123abc" + }, + "_versionId": { + "type": "string", + "description": "The version ID of the metric", + "example": "version-id-123abc" + }, + "name": { + "type": "string", + "description": "The metric name", + "example": "Example metric" + }, + "kind": { + "type": "string", + "description": "The kind of event the metric tracks", + "example": "custom", + "enum": [ + "pageview", + "click", + "custom" + ] + }, + "isNumeric": { + "type": "boolean", + "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", + "example": true + }, + "unitAggregationType": { + "type": "string", + "description": "The type of unit aggregation to use for the metric", + "example": "sum", + "enum": [ + "sum", + "average" + ] }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" - } - } - }, - "FlagConfigEvaluation": { - "type": "object", - "properties": { - "contextKinds": { + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/metrics/my-project/my-metric", + "type": "application/json" + } + } + }, + "nameInGroup": { + "type": "string", + "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 funnel.", + "example": "Step 1" + }, + "randomizationUnits": { "type": "array", + "description": "The randomization units for the metric", "items": { "type": "string" - } + }, + "example": [ + "user" + ] } } }, - "FlagConfigMigrationSettingsRep": { + "MetricInGroupResultsRep": { "type": "object", + "required": [ + "metric", + "results" + ], "properties": { - "checkRatio": { - "type": "integer" + "metric": { + "description": "Metric metadata", + "$ref": "#/components/schemas/MetricInGroupRep" + }, + "results": { + "description": "The results of this metric", + "$ref": "#/components/schemas/ExperimentBayesianResultsRep" } } }, - "FlagCopyConfigEnvironment": { + "MetricInMetricGroupInput": { "type": "object", "required": [ - "key" + "key", + "nameInGroup" ], "properties": { "key": { "type": "string", - "description": "The environment key" + "description": "The metric key", + "example": "metric-key-123abc" }, - "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." + "nameInGroup": { + "type": "string", + "description": "Name of the metric when used within the associated metric group. Can be different from the original name of the metric", + "example": "Step 1" } } }, - "FlagCopyConfigPost": { + "MetricInput": { "type": "object", "required": [ - "source", - "target" + "key" ], "properties": { - "source": { - "description": "The source environment", - "example": "{\"key\": \"source-env-key-123abc\", \"currentVersion\": 1}", - "$ref": "#/components/schemas/FlagCopyConfigEnvironment" - }, - "target": { - "description": "The target environment", - "example": "{\"key\": \"target-env-key-123abc\", \"currentVersion\": 1}", - "$ref": "#/components/schemas/FlagCopyConfigEnvironment" - }, - "comment": { + "key": { "type": "string", - "description": "Optional comment" + "description": "The metric key", + "example": "metric-key-123abc" }, - "includedActions": { - "type": "array", - "description": "Optional list of the flag changes to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If you include neither, then all flag changes will be copied.", - "items": { - "type": "string", - "enum": [ - "updateOn", - "updateRules", - "updateFallthrough", - "updateOffVariation", - "updatePrerequisites", - "updateTargets", - "updateFlagConfigMigrationSettings" - ] - }, - "example": [ - "updateOn" - ] + "isGroup": { + "type": "boolean", + "description": "Whether this is a metric group (true) or a metric (false). Defaults to false", + "example": true }, - "excludedActions": { - "type": "array", - "description": "Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If you include neither, then all flag changes will be copied.", - "items": { - "type": "string", - "enum": [ - "updateOn", - "updateRules", - "updateFallthrough", - "updateOffVariation", - "updatePrerequisites", - "updateTargets", - "updateFlagConfigMigrationSettings" - ] - }, - "example": [ - "updateOn" - ] + "primary": { + "type": "boolean", + "description": "Deprecated, use primarySingleMetricKey and primaryFunnelKey. Whether this is a primary metric (true) or a secondary metric (false)", + "example": true, + "deprecated": true } } }, - "FlagFollowersByProjEnvGetRep": { + "MetricListingRep": { "type": "object", "required": [ - "_links" + "_id", + "_versionId", + "key", + "name", + "kind", + "_links", + "tags", + "_creationDate" ], "properties": { + "experimentCount": { + "type": "integer", + "description": "The number of experiments using this metric", + "example": 0 + }, + "metricGroupCount": { + "type": "integer", + "description": "The number of metric groups using this metric", + "example": 0 + }, + "_id": { + "type": "string", + "description": "The ID of this metric", + "example": "5902deadbeef667524a01290" + }, + "_versionId": { + "type": "string", + "description": "The version ID of the metric", + "example": "version-id-123abc" + }, + "key": { + "type": "string", + "description": "A unique key to reference the metric", + "example": "metric-key-123abc" + }, + "name": { + "type": "string", + "description": "A human-friendly name for the metric", + "example": "My metric" + }, + "kind": { + "type": "string", + "description": "The kind of event the metric tracks", + "example": "custom", + "enum": [ + "pageview", + "click", + "custom" + ] + }, + "_attachedFlagCount": { + "type": "integer", + "description": "The number of feature flags currently attached to this metric", + "example": 0 + }, "_links": { "type": "object", "additionalProperties": { @@ -29791,263 +39705,504 @@ }, "description": "The location and content type of related resources", "example": { + "parent": { + "href": "/api/v2/metrics/my-project", + "type": "application/json" + }, "self": { - "href": "/api/v2/projects/my-project/flags/my-flay/environments/my-environment/followers", + "href": "/api/v2/metrics/my-project/my-metric", "type": "application/json" } } }, - "items": { + "_site": { + "description": "Details on how to access the metric in the LaunchDarkly UI", + "example": "{\"href\":\"/experiments/metrics/my-metric/edit\",\"type\":\"text/html\"}", + "$ref": "#/components/schemas/Link" + }, + "_access": { + "description": "Details on the allowed and denied actions for this metric", + "$ref": "#/components/schemas/Access" + }, + "tags": { "type": "array", - "description": "An array of flags and their followers", + "description": "Tags for the metric", "items": { - "$ref": "#/components/schemas/followersPerFlag" - } - } - } - }, - "FlagFollowersGetRep": { - "type": "object", - "required": [ - "_links", - "items" - ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "type": "string" }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/projects/my-project/flags/my-flay/environments/my-environment/followers", - "type": "application/json" - } - } + "example": [] }, - "items": { + "_creationDate": { + "description": "Timestamp of when the metric was created", + "example": "1628192791148", + "$ref": "#/components/schemas/UnixMillis" + }, + "lastModified": { + "$ref": "#/components/schemas/Modification" + }, + "maintainerId": { + "type": "string", + "description": "The ID of the member who maintains this metric", + "example": "569fdeadbeef1644facecafe" + }, + "_maintainer": { + "description": "Details on the member who maintains this metric", + "example": "{\"_links\":{\"self\":{\"href\":\"/api/v2/members/569fdeadbeef1644facecafe\",\"type\":\"application/json\"}},\"_id\":\"569fdeadbeef1644facecafe\",\"firstName\":\"Ariel\",\"lastName\":\"Flores\",\"role\":\"owner\",\"email\":\"ariel@acme.com\"}", + "$ref": "#/components/schemas/MemberSummary" + }, + "description": { + "type": "string", + "description": "Description of the metric" + }, + "isNumeric": { + "type": "boolean", + "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", + "example": true + }, + "successCriteria": { + "type": "string", + "description": "For custom metrics, the success criteria", + "enum": [ + "HigherThanBaseline", + "LowerThanBaseline" + ] + }, + "unit": { + "type": "string", + "description": "For numeric custom metrics, the unit of measure" + }, + "eventKey": { + "type": "string", + "description": "For custom metrics, the event key to use in your code" + }, + "randomizationUnits": { "type": "array", - "description": "An array of members who are following this flag", + "description": "An array of randomization units allowed for this metric", "items": { - "$ref": "#/components/schemas/FollowFlagMember" - } - } - } - }, - "FlagInput": { - "type": "object", - "required": [ - "ruleId", - "flagConfigVersion" - ], - "properties": { - "ruleId": { + "type": "string" + }, + "example": [ + "user" + ] + }, + "unitAggregationType": { "type": "string", - "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.", - "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" + "description": "The method by which multiple unit event values are aggregated", + "example": "average", + "enum": [ + "average", + "sum" + ] }, - "flagConfigVersion": { + "analysisType": { + "type": "string", + "description": "The method for analyzing metric events", + "example": "mean", + "enum": [ + "mean", + "percentile" + ] + }, + "percentileValue": { "type": "integer", - "description": "The flag version", - "example": 12 + "description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysisType is percentile.", + "example": 95 }, - "notInExperimentVariationId": { - "type": "string", - "description": "The ID of the variation to route traffic not part of the experiment analysis to. Defaults to variation ID of baseline treatment, if set.", - "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" + "eventDefault": { + "$ref": "#/components/schemas/MetricEventDefaultRep" } } }, - "FlagLinkCollectionRep": { + "MetricPost": { "type": "object", "required": [ - "items", - "_links" + "key", + "kind" ], "properties": { - "items": { + "key": { + "type": "string", + "description": "A unique key to reference the metric", + "example": "metric-key-123abc" + }, + "name": { + "type": "string", + "description": "A human-friendly name for the metric", + "example": "Example metric" + }, + "description": { + "type": "string", + "description": "Description of the metric", + "example": "optional description" + }, + "kind": { + "type": "string", + "description": "The kind of event your metric will track", + "example": "custom", + "enum": [ + "pageview", + "click", + "custom" + ] + }, + "selector": { + "type": "string", + "description": "One or more CSS selectors. Required for click metrics only.", + "example": ".dropdown-toggle" + }, + "urls": { "type": "array", - "description": "An array of flag links", + "description": "One or more target URLs. Required for click and pageview metrics only.", "items": { - "$ref": "#/components/schemas/FlagLinkRep" - } + "$ref": "#/components/schemas/UrlPost" + }, + "example": "invalid example" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "isActive": { + "type": "boolean", + "description": "Whether the metric is active. Set to true to record click or pageview metrics. Not applicable for custom metrics.", + "example": true + }, + "isNumeric": { + "type": "boolean", + "description": "Whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false). Required for custom metrics only.", + "example": false + }, + "unit": { + "type": "string", + "description": "The unit of measure. Applicable for numeric custom metrics only.", + "example": "orders" + }, + "eventKey": { + "type": "string", + "description": "The event key to use in your code. Required for custom conversion/binary and custom numeric metrics only.", + "example": "sales generated" + }, + "successCriteria": { + "type": "string", + "description": "Success criteria. Required for custom numeric metrics, optional for custom conversion metrics.", + "example": "HigherThanBaseline", + "enum": [ + "HigherThanBaseline", + "LowerThanBaseline" + ] + }, + "tags": { + "type": "array", + "description": "Tags for the metric", + "items": { + "type": "string" }, - "description": "The location and content type of related resources" - } - } - }, - "FlagLinkMember": { - "type": "object", - "required": [ - "_links", - "_id" - ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } + "example": [ + "example-tag" + ] }, - "_id": { - "type": "string" + "randomizationUnits": { + "type": "array", + "description": "An array of randomization units allowed for this metric", + "items": { + "type": "string" + }, + "example": [ + "user" + ] }, - "firstName": { - "type": "string" + "unitAggregationType": { + "type": "string", + "description": "The method by which multiple unit event values are aggregated", + "example": "average", + "enum": [ + "average", + "sum" + ] }, - "lastName": { - "type": "string" + "analysisType": { + "type": "string", + "description": "The method for analyzing metric events", + "example": "mean" + }, + "percentileValue": { + "type": "integer", + "description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysisType is percentile.", + "example": 95 + }, + "eventDefault": { + "$ref": "#/components/schemas/MetricEventDefaultRep" } } }, - "FlagLinkRep": { + "MetricRep": { "type": "object", "required": [ - "_links", "_id", - "_deepLink", - "_timestamp", - "_createdAt" + "_versionId", + "key", + "name", + "kind", + "_links", + "tags", + "_creationDate" ], "properties": { + "experimentCount": { + "type": "integer", + "description": "The number of experiments using this metric", + "example": 0 + }, + "metricGroupCount": { + "type": "integer", + "description": "The number of metric groups using this metric", + "example": 0 + }, + "_id": { + "type": "string", + "description": "The ID of this metric", + "example": "5902deadbeef667524a01290" + }, + "_versionId": { + "type": "string", + "description": "The version ID of the metric", + "example": "version-id-123abc" + }, + "key": { + "type": "string", + "description": "A unique key to reference the metric", + "example": "metric-key-123abc" + }, + "name": { + "type": "string", + "description": "A human-friendly name for the metric", + "example": "My metric" + }, + "kind": { + "type": "string", + "description": "The kind of event the metric tracks", + "example": "custom", + "enum": [ + "pageview", + "click", + "custom" + ] + }, + "_attachedFlagCount": { + "type": "integer", + "description": "The number of feature flags currently attached to this metric", + "example": 0 + }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/metrics/my-project", + "type": "application/json" + }, + "self": { + "href": "/api/v2/metrics/my-project/my-metric", + "type": "application/json" + } + } }, - "_key": { - "type": "string", - "description": "The flag link key", - "example": "flag-link-key-123abc" + "_site": { + "description": "Details on how to access the metric in the LaunchDarkly UI", + "example": "{\"href\":\"/experiments/metrics/my-metric/edit\",\"type\":\"text/html\"}", + "$ref": "#/components/schemas/Link" }, - "_integrationKey": { - "type": "string", - "description": "The integration key for an integration whose manifest.json includes the flagLink capability, if this is a flag link for an existing integration" + "_access": { + "description": "Details on the allowed and denied actions for this metric", + "$ref": "#/components/schemas/Access" }, - "_id": { + "tags": { + "type": "array", + "description": "Tags for the metric", + "items": { + "type": "string" + }, + "example": [] + }, + "_creationDate": { + "description": "Timestamp of when the metric was created", + "example": "1628192791148", + "$ref": "#/components/schemas/UnixMillis" + }, + "lastModified": { + "$ref": "#/components/schemas/Modification" + }, + "maintainerId": { "type": "string", - "description": "The ID of this flag link", - "example": "1234a56b7c89d012345e678f" + "description": "The ID of the member who maintains this metric", + "example": "569fdeadbeef1644facecafe" }, - "_deepLink": { + "_maintainer": { + "description": "Details on the member who maintains this metric", + "example": "{\"_links\":{\"self\":{\"href\":\"/api/v2/members/569fdeadbeef1644facecafe\",\"type\":\"application/json\"}},\"_id\":\"569fdeadbeef1644facecafe\",\"firstName\":\"Ariel\",\"lastName\":\"Flores\",\"role\":\"owner\",\"email\":\"ariel@acme.com\"}", + "$ref": "#/components/schemas/MemberSummary" + }, + "description": { "type": "string", - "description": "The URL for the external resource the flag is linked to", - "example": "https://example.com/archives/123123123" + "description": "Description of the metric" }, - "_timestamp": { - "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.", - "example": "{\"milliseconds\": 1655342199935, \"seconds\": 1655342199, \"rfc3339\": \"2022-06-16T01:16:39Z\", \"simple\": \"2022-06-16 01:16:39\"}", - "$ref": "#/components/schemas/TimestampRep" + "isNumeric": { + "type": "boolean", + "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", + "example": true }, - "title": { + "successCriteria": { "type": "string", - "description": "The title of the flag link", - "example": "Example link title" + "description": "For custom metrics, the success criteria", + "enum": [ + "HigherThanBaseline", + "LowerThanBaseline" + ] }, - "description": { + "unit": { "type": "string", - "description": "The description of the flag link", - "example": "Example link description" + "description": "For numeric custom metrics, the unit of measure" }, - "_metadata": { - "type": "object", - "additionalProperties": { + "eventKey": { + "type": "string", + "description": "For custom metrics, the event key to use in your code" + }, + "randomizationUnits": { + "type": "array", + "description": "An array of randomization units allowed for this metric", + "items": { "type": "string" }, - "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 manifest.json file under flagLink." - }, - "_createdAt": { - "description": "Timestamp of when the flag link was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "example": [ + "user" + ] }, - "_member": { - "description": "Details on the member associated with this flag link", - "$ref": "#/components/schemas/FlagLinkMember" - } - } - }, - "FlagListingRep": { - "type": "object", - "required": [ - "name", - "key" - ], - "properties": { - "name": { + "unitAggregationType": { "type": "string", - "description": "The flag name", - "example": "Example flag" + "description": "The method by which multiple unit event values are aggregated", + "example": "average", + "enum": [ + "average", + "sum" + ] }, - "key": { + "analysisType": { "type": "string", - "description": "The flag key", - "example": "flag-key-123abc" + "description": "The method for analyzing metric events", + "example": "mean", + "enum": [ + "mean", + "percentile" + ] }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "percentileValue": { + "type": "integer", + "description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysisType is percentile.", + "example": 95 + }, + "eventDefault": { + "$ref": "#/components/schemas/MetricEventDefaultRep" + }, + "experiments": { + "description": "Experiments that use this metric, including those using a metric group that contains this metric", + "$ref": "#/components/schemas/DependentExperimentListRep" + }, + "metricGroups": { + "type": "array", + "description": "Metric groups that use this metric", + "items": { + "$ref": "#/components/schemas/DependentMetricGroupRep" } }, - "_site": { - "$ref": "#/components/schemas/Link" + "isActive": { + "type": "boolean", + "description": "Whether the metric is active", + "example": true + }, + "_attachedFeatures": { + "type": "array", + "description": "Details on the flags attached to this metric", + "items": { + "$ref": "#/components/schemas/FlagListingRep" + } + }, + "_version": { + "type": "integer", + "description": "Version of the metric", + "example": 1 + }, + "selector": { + "type": "string", + "description": "For click metrics, the CSS selectors" + }, + "urls": { + "description": "For click and pageview metrics, the target URLs", + "$ref": "#/components/schemas/UrlMatchers" } } }, - "FlagMigrationSettingsRep": { + "MetricSeen": { "type": "object", "properties": { - "contextKind": { - "type": "string", - "description": "The context kind targeted by this migration flag. Only applicable for six-stage migrations.", - "example": "device" + "ever": { + "type": "boolean", + "description": "Whether the metric has received an event for this iteration", + "example": true }, - "stageCount": { + "timestamp": { "type": "integer", - "description": "The number of stages for this migration flag", - "example": 6 + "format": "int64", + "description": "Timestamp of when the metric most recently received an event for this iteration", + "example": 1657129307 } } }, - "FlagRep": { + "MetricV2Rep": { "type": "object", "required": [ + "key", + "name", + "kind", "_links" ], "properties": { - "targetingRule": { + "key": { "type": "string", - "description": "The targeting rule", - "example": "fallthrough" + "description": "The metric key", + "example": "metric-key-123abc" }, - "targetingRuleDescription": { + "_versionId": { "type": "string", - "description": "The rule description", - "example": "Customers who live in Canada" + "description": "The version ID of the metric", + "example": "version-id-123abc" }, - "targetingRuleClauses": { - "type": "array", - "description": "An array of clauses used for individual targeting based on attributes", - "items": {} + "name": { + "type": "string", + "description": "The metric name", + "example": "Example metric" }, - "flagConfigVersion": { - "type": "integer", - "description": "The flag version", - "example": 12 + "kind": { + "type": "string", + "description": "The kind of event the metric tracks", + "example": "custom", + "enum": [ + "pageview", + "click", + "custom" + ] }, - "notInExperimentVariationId": { + "isNumeric": { + "type": "boolean", + "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", + "example": true + }, + "unitAggregationType": { "type": "string", - "description": "The ID of the variation to route traffic not part of the experiment analysis to", - "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" + "description": "The type of unit aggregation to use for the metric", + "example": "sum", + "enum": [ + "sum", + "average" + ] }, "_links": { "type": "object", @@ -30057,273 +40212,116 @@ "description": "The location and content type of related resources", "example": { "self": { - "href": "/api/v2/flags/my-project/my-flag", + "href": "/api/v2/metrics/my-project/my-metric", "type": "application/json" } } } } }, - "FlagScheduledChangesInput": { - "type": "object", - "required": [ - "instructions" - ], - "properties": { - "comment": { - "type": "string", - "description": "Optional comment describing the update to the scheduled changes", - "example": "optional comment" - }, - "instructions": { - "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require a value field in the array element.", - "example": "[ { \"kind\": \"replaceScheduledChangesInstructions\", \"value\": [ { \"kind\": \"turnFlagOff\" } ] } ]", - "$ref": "#/components/schemas/Instructions" - } - } - }, - "FlagStatusRep": { - "type": "object", - "required": [ - "_links" - ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "example": { - "parent": { - "href": "/api/v2/flags/my-project/my-flag", - "type": "application/json" - }, - "self": { - "href": "/api/v2/flag-statuses/my-project/my-flag", - "type": "application/json" - } - } - }, - "name": { - "type": "string", - "description": "Status of the flag", - "example": "inactive" - }, - "lastRequested": { - "type": "string", - "format": "date-time", - "description": "Timestamp of last time flag was requested", - "example": "2020-02-05T18:17:01.514Z" - }, - "default": { - "description": "Default value seen from code" - } + "MetricsInput": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetricInput" } }, - "FlagSummary": { - "type": "object", - "required": [ - "variations", - "prerequisites" - ], - "properties": { - "variations": { - "description": "A summary of the variations for this flag", - "$ref": "#/components/schemas/AllVariationsSummary" - }, - "prerequisites": { - "type": "integer", - "description": "The number of prerequisites for this flag" - } - } + "MigrationFlagStageCount": { + "type": "integer" }, - "FlagTriggerInput": { + "MigrationSafetyIssueRep": { "type": "object", "properties": { - "comment": { + "causingRuleId": { "type": "string", - "description": "Optional comment describing the update", - "example": "optional comment" + "description": "The ID of the rule which caused this issue" }, - "instructions": { + "affectedRuleIds": { "type": "array", - "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"trigger_action\"}.", + "description": "A list of the IDs of the rules which are affected by this issue. fallthrough is a sentinel value for the default rule.", "items": { - "$ref": "#/components/schemas/Instruction" - }, - "example": [ - { - "kind": "disableTrigger" - } - ] - } - } - }, - "FlagsInput": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlagInput" - } - }, - "FollowFlagMember": { - "type": "object", - "required": [ - "_links", - "_id", - "role", - "email" - ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/members/569f183514f4432160000007", - "type": "application/json" - } + "type": "string" } }, - "_id": { - "type": "string", - "description": "The member's ID", - "example": "569f183514f4432160000007" - }, - "firstName": { - "type": "string", - "description": "The member's first name", - "example": "Ariel" - }, - "lastName": { - "type": "string", - "description": "The member's last name", - "example": "Flores" - }, - "role": { + "issue": { "type": "string", - "description": "The member's built-in role. If the member has no custom roles, this role will be in effect.", - "example": "admin" + "description": "A description of the issue that causingRuleId has caused for affectedRuleIds." }, - "email": { - "type": "string", - "description": "The member's email address", - "example": "ariel@acme.com" + "oldSystemAffected": { + "type": "boolean", + "description": "Whether the changes caused by causingRuleId bring inconsistency to the old system" } } }, - "ForbiddenErrorRep": { + "MigrationSettingsPost": { "type": "object", "required": [ - "code", - "message" + "stageCount" ], "properties": { - "code": { + "contextKind": { "type": "string", - "description": "Specific error code encountered", - "example": "forbidden" + "description": "Context kind for a migration with 6 stages, where data is being moved" }, - "message": { - "type": "string", - "description": "Description of the error", - "example": "Forbidden. Access to the requested resource was denied." + "stageCount": { + "enum": [ + "2", + "4", + "6" + ], + "$ref": "#/components/schemas/MigrationFlagStageCount" } } }, - "FormVariableConfig": { + "Modification": { "type": "object", - "additionalProperties": {} + "properties": { + "date": { + "type": "string", + "format": "date-time", + "example": "2021-08-05T19:46:31.148082Z" + } + } }, - "HunkRep": { + "MultiEnvironmentDependentFlag": { "type": "object", "required": [ - "startingLineNumber" + "key", + "environments" ], "properties": { - "startingLineNumber": { - "type": "integer", - "description": "Line number of beginning of code reference hunk", - "example": 45 - }, - "lines": { - "type": "string", - "description": "Contextual lines of code that include the referenced feature flag", - "example": "var enableFeature = 'enable-feature';" - }, - "projKey": { + "name": { "type": "string", - "description": "The project key", - "example": "default" + "description": "The flag name", + "example": "Example dependent flag" }, - "flagKey": { + "key": { "type": "string", - "description": "The feature flag key", - "example": "enable-feature" + "description": "The flag key", + "example": "dependent-flag-key-123abc" }, - "aliases": { + "environments": { "type": "array", - "description": "An array of flag key aliases", + "description": "A list of environments in which the dependent flag appears", "items": { - "type": "string" - }, - "example": [ - "enableFeature", - "EnableFeature" - ] + "$ref": "#/components/schemas/DependentFlagEnvironment" + } } } }, - "Import": { + "MultiEnvironmentDependentFlags": { "type": "object", "required": [ - "id", - "segmentKey", - "creationTime", - "mode", - "status", - "_links" + "items", + "_links", + "_site" ], "properties": { - "id": { - "type": "string", - "description": "The import ID", - "example": "1234a567-bcd8-9123-4567-abcd1234567f" - }, - "segmentKey": { - "type": "string", - "description": "The segment key", - "example": "example-big-segment" - }, - "creationTime": { - "description": "Timestamp of when this import was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "mode": { - "type": "string", - "description": "The import mode used, either merge or replace", - "example": "replace" - }, - "status": { - "type": "string", - "description": "The import status", - "example": "complete" - }, - "files": { + "items": { "type": "array", - "description": "The imported files and their status", + "description": "An array of dependent flags with their environment information", "items": { - "$ref": "#/components/schemas/FileRep" - }, - "example": [ - { - "filename": "bigsegimport.csv", - "status": "complete" - } - ] + "$ref": "#/components/schemas/MultiEnvironmentDependentFlag" + } }, "_links": { "type": "object", @@ -30331,637 +40329,568 @@ "$ref": "#/components/schemas/Link" }, "description": "The location and content type of related resources" + }, + "_site": { + "description": "Details on how to access the prerequisite flag in the LaunchDarkly UI", + "example": "{ \"href\": \"/example-project/~/features/example-prereq-flag\", \"type\": \"text/html\" }", + "$ref": "#/components/schemas/Link" } } }, - "InitiatorRep": { + "NamingConvention": { "type": "object", "properties": { - "name": { + "case": { "type": "string", - "description": "The name of the member who initiated the export", - "example": "Bob Loblaw" + "description": "The casing convention to enforce for new flag keys in this project", + "example": "kebabCase", + "enum": [ + "none", + "camelCase", + "upperCamelCase", + "snakeCase", + "kebabCase" + ] }, - "email": { + "prefix": { "type": "string", - "description": "The email address of the member who initiated the export", - "example": "ariel@acme.com" + "description": "The prefix to enforce for new flag keys in this project", + "example": "enable-" } } }, - "Instruction": { - "type": "object", - "additionalProperties": {} - }, - "Instructions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Instruction" - } - }, - "Integration": { + "NewMemberForm": { "type": "object", + "required": [ + "email" + ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "email": { + "type": "string", + "description": "The member's email", + "example": "sandy@acme.com" }, - "_id": { + "password": { "type": "string", - "description": "The ID for this integration audit log subscription", - "example": "1234a56b7c89d012345e678f" + "description": "The member's password", + "example": "***" }, - "kind": { + "firstName": { "type": "string", - "description": "The type of integration", - "example": "datadog" + "description": "The member's first name", + "example": "Ariel" }, - "name": { + "lastName": { "type": "string", - "description": "A human-friendly name for the integration", - "example": "Example Datadog integration" + "description": "The member's last name", + "example": "Flores" }, - "config": { - "type": "object", - "additionalProperties": {}, - "description": "Details on configuration for an integration of this type. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration." + "role": { + "type": "string", + "description": "The member's built-in role", + "example": "reader", + "enum": [ + "reader", + "writer", + "admin", + "no_access" + ] }, - "statements": { + "customRoles": { "type": "array", - "description": "Represents a Custom role policy, defining a resource kinds filter the integration audit log subscription responds to.", + "description": "An array of the member's custom roles", "items": { - "$ref": "#/components/schemas/Statement" - } - }, - "on": { - "type": "boolean", - "description": "Whether the integration is currently active", - "example": true + "type": "string" + }, + "example": [ + "customRole1", + "customRole2" + ] }, - "tags": { + "teamKeys": { "type": "array", - "description": "An array of tags for this integration", + "description": "An array of the member's teams", "items": { "type": "string" }, "example": [ - "testing" + "team-1", + "team-2" ] }, - "_access": { - "description": "Details on the allowed and denied actions for this subscription", - "$ref": "#/components/schemas/Access" - }, - "_status": { - "description": "Details on the most recent successes and errors for this integration", - "$ref": "#/components/schemas/IntegrationSubscriptionStatusRep" - }, - "url": { - "type": "string", - "description": "Slack webhook receiver URL. Only used for legacy Slack webhook integrations." - }, - "apiKey": { - "type": "string", - "description": "Datadog API key. Only used for legacy Datadog webhook integrations." + "roleAttributes": { + "description": "An object of role attributes for the member", + "example": "{\"developerProjectKey\": [\"default\"]}", + "$ref": "#/components/schemas/RoleAttributeMap" } } }, - "IntegrationDeliveryConfiguration": { + "NewMemberFormListPost": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NewMemberForm" + } + }, + "NotFoundErrorRep": { "type": "object", "required": [ - "_links", - "_id", - "integrationKey", - "projectKey", - "environmentKey", - "config", - "on", - "tags", - "name", - "version" + "code", + "message" ], "properties": { - "_links": { - "description": "The location and content type of related resources", - "$ref": "#/components/schemas/IntegrationDeliveryConfigurationLinks" - }, - "_id": { - "type": "string", - "description": "The integration ID", - "example": "12ab3c4d5ef1a2345bcde67f" - }, - "integrationKey": { - "type": "string", - "description": "The integration key", - "example": "example-integration-key" - }, - "projectKey": { - "type": "string", - "description": "The project key", - "example": "default" - }, - "environmentKey": { + "code": { "type": "string", - "description": "The environment key", - "example": "development" - }, - "config": { - "description": "The delivery configuration for the given integration provider. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.", - "$ref": "#/components/schemas/FormVariableConfig" - }, - "on": { - "type": "boolean", - "description": "Whether the configuration is turned on", - "example": true - }, - "tags": { - "type": "array", - "description": "List of tags for this configuration", - "items": { - "type": "string" - }, - "example": [] + "description": "Specific error code encountered", + "example": "not_found" }, - "name": { + "message": { "type": "string", - "description": "Name of the configuration", - "example": "Development environment configuration" - }, - "version": { - "type": "integer", - "description": "Version of the current configuration", - "example": 1 - }, - "_access": { - "description": "Details on the allowed and denied actions for this configuration", - "$ref": "#/components/schemas/Access" + "description": "Description of the error", + "example": "Invalid resource identifier" } } }, - "IntegrationDeliveryConfigurationCollection": { + "OAuthProviderKind": { + "type": "string" + }, + "ObjectId": { + "type": "string" + }, + "Operator": { + "type": "string" + }, + "OptionsArray": { "type": "object", - "required": [ - "_links", - "items" - ], "properties": { - "_links": { - "description": "The location and content type of related resources", - "$ref": "#/components/schemas/IntegrationDeliveryConfigurationCollectionLinks" + "label": { + "type": "string" }, - "items": { - "type": "array", - "description": "An array of integration delivery configurations", - "items": { - "$ref": "#/components/schemas/IntegrationDeliveryConfiguration" - } + "value": { + "type": "string" } } }, - "IntegrationDeliveryConfigurationCollectionLinks": { + "ParameterDefault": { "type": "object", - "required": [ - "self" - ], "properties": { - "self": { - "$ref": "#/components/schemas/Link" + "value": { + "description": "The default value for the given parameter" }, - "parent": { - "$ref": "#/components/schemas/Link" + "booleanVariationValue": { + "type": "boolean", + "description": "Variation value for boolean flags. Not applicable for non-boolean flags." + }, + "ruleClause": { + "description": "Metadata related to add rule instructions", + "$ref": "#/components/schemas/RuleClause" } } }, - "IntegrationDeliveryConfigurationLinks": { + "ParameterRep": { "type": "object", - "required": [ - "self", - "parent", - "project", - "environment" - ], "properties": { - "self": { - "$ref": "#/components/schemas/Link" - }, - "parent": { - "$ref": "#/components/schemas/Link" - }, - "project": { - "$ref": "#/components/schemas/Link" + "variationId": { + "type": "string" }, - "environment": { - "$ref": "#/components/schemas/Link" + "flagKey": { + "type": "string" } } }, - "IntegrationDeliveryConfigurationPost": { + "ParentResourceRep": { "type": "object", - "required": [ - "config" - ], "properties": { - "on": { - "type": "boolean", - "description": "Whether the integration configuration is active. Default value is false.", - "example": false - }, - "config": { - "description": "The global integration settings, as specified by the formVariables in the manifest.json for this integration.", - "example": "{\"required\": \"example value for required formVariables property for sample-integration\", \"optional\": \"example value for optional formVariables property for sample-integration\"}", - "$ref": "#/components/schemas/FormVariableConfig" - }, - "tags": { - "type": "array", - "description": "Tags to associate with the integration", - "items": { - "type": "string" - }, - "example": [ - "example-tag" - ] + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } }, "name": { "type": "string", - "description": "Name to identify the integration", - "example": "Sample integration" + "description": "The name of the parent resource" + }, + "resource": { + "type": "string", + "description": "The parent's resource specifier" } } }, - "IntegrationDeliveryConfigurationResponse": { + "PatchFailedErrorRep": { "type": "object", + "required": [ + "code", + "message" + ], "properties": { - "statusCode": { - "type": "integer", - "description": "The status code returned by the validation", - "example": 200 - }, - "error": { - "type": "string" - }, - "timestamp": { - "description": "Timestamp of when the validation was performed", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "code": { + "type": "string", + "description": "Specific error code encountered", + "example": "patch_failed" }, - "responseBody": { + "message": { "type": "string", - "description": "JSON response to the validation request" + "description": "Description of the error", + "example": "Unprocessable entity. Could not apply patch." } } }, - "IntegrationMetadata": { + "PatchOperation": { "type": "object", "required": [ - "externalId", - "externalStatus", - "externalUrl", - "lastChecked" + "op", + "path" ], "properties": { - "externalId": { - "type": "string" - }, - "externalStatus": { - "$ref": "#/components/schemas/IntegrationStatus" + "op": { + "type": "string", + "description": "The type of operation to perform", + "example": "replace" }, - "externalUrl": { - "type": "string" + "path": { + "type": "string", + "description": "A JSON Pointer string specifying the part of the document to operate on", + "example": "/exampleField" }, - "lastChecked": { - "$ref": "#/components/schemas/UnixMillis" + "value": { + "description": "A JSON value used in \"add\", \"replace\", and \"test\" operations", + "example": "new example value" } } }, - "IntegrationStatus": { + "PatchWithComment": { "type": "object", "required": [ - "display", - "value" + "patch" ], "properties": { - "display": { - "type": "string" + "patch": { + "description": "A JSON patch representation of the change to make", + "$ref": "#/components/schemas/JSONPatch" }, - "value": { - "type": "string" + "comment": { + "type": "string", + "description": "Optional comment" } } }, - "IntegrationStatusRep": { + "Phase": { "type": "object", + "required": [ + "id", + "audiences", + "name" + ], "properties": { - "statusCode": { - "type": "integer" + "id": { + "type": "string", + "description": "The phase ID", + "example": "1234a56b7c89d012345e678f" }, - "responseBody": { - "type": "string" + "audiences": { + "description": "An ordered list of the audiences for this release phase. Each audience corresponds to a LaunchDarkly environment.", + "$ref": "#/components/schemas/Audiences" }, - "timestamp": { - "$ref": "#/components/schemas/UnixMillis" + "name": { + "type": "string", + "description": "The release phase name", + "example": "Phase 1 - Testing" + }, + "configuration": { + "description": "The configuration for the phase's rollout.", + "$ref": "#/components/schemas/PhaseConfiguration" } } }, - "IntegrationSubscriptionStatusRep": { + "PhaseConfiguration": { + "type": "object", + "properties": {} + }, + "PhaseInfo": { "type": "object", + "required": [ + "_id", + "name", + "releaseCount" + ], "properties": { - "successCount": { - "type": "integer" - }, - "lastSuccess": { - "$ref": "#/components/schemas/UnixMillis" - }, - "lastError": { - "$ref": "#/components/schemas/UnixMillis" + "_id": { + "type": "string", + "description": "The phase ID", + "example": "1234a56b7c89d012345e678f" }, - "errorCount": { - "type": "integer" + "name": { + "type": "string", + "description": "The release phase name", + "example": "Phase 1 - Testing" }, - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IntegrationStatusRep" - } + "releaseCount": { + "type": "integer", + "description": "The number of active releases in this phase", + "example": 2 } } }, - "Integrations": { + "PhaseStatus": { + "type": "string" + }, + "PostFlagScheduledChangesInput": { "type": "object", + "required": [ + "executionDate", + "instructions" + ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } + "comment": { + "type": "string", + "description": "Optional comment describing the scheduled changes", + "example": "optional comment" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Integration" - } + "executionDate": { + "description": "When the scheduled changes should be executed", + "example": "1636558831870", + "$ref": "#/components/schemas/UnixMillis" }, - "key": { - "type": "string" + "instructions": { + "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 {\"kind\": \"scheduled_action\"}. Supported scheduled actions are turnFlagOn and turnFlagOff.", + "example": "[ { \"kind\": \"turnFlagOn\" }]", + "$ref": "#/components/schemas/Instructions" } } }, - "InvalidRequestErrorRep": { + "Prerequisite": { "type": "object", "required": [ - "code", - "message" + "key", + "variation" ], "properties": { - "code": { - "type": "string", - "description": "Specific error code encountered", - "example": "invalid_request" + "key": { + "type": "string" }, - "message": { - "type": "string", - "description": "Description of the error", - "example": "Invalid request body" + "variation": { + "type": "integer" } } }, - "IterationInput": { + "Project": { "type": "object", "required": [ - "hypothesis", - "metrics", - "treatments", - "flags" + "_links", + "_id", + "key", + "includeInSnippetByDefault", + "name", + "tags" ], "properties": { - "hypothesis": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "environments": { + "href": "/api/v2/projects/my-project/environments", + "type": "application/json" + }, + "self": { + "href": "/api/v2/projects/my-project", + "type": "application/json" + } + } + }, + "_id": { "type": "string", - "description": "The expected outcome of this experiment", - "example": "Example hypothesis, the new button placement will increase conversion" + "description": "The ID of this project", + "example": "57be1db38b75bf0772d11383" }, - "canReshuffleTraffic": { + "key": { + "type": "string", + "description": "The key of this project", + "example": "project-key-123abc" + }, + "includeInSnippetByDefault": { "type": "boolean", - "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.", + "description": "Whether or not flags created in this project are made available to the client-side JavaScript SDK by default", "example": true }, - "metrics": { - "description": "Details on the metrics for this experiment", - "$ref": "#/components/schemas/MetricsInput" - }, - "primarySingleMetricKey": { - "type": "string", - "description": "The key of the primary metric for this experiment. Either primarySingleMetricKey or primaryFunnelKey must be present.", - "example": "metric-key-123abc" + "defaultClientSideAvailability": { + "description": "Describes which client-side SDKs can use new flags by default", + "$ref": "#/components/schemas/ClientSideAvailability" }, - "primaryFunnelKey": { + "name": { "type": "string", - "description": "The key of the primary funnel group for this experiment. Either primarySingleMetricKey or primaryFunnelKey must be present.", - "example": "metric-group-key-123abc" + "description": "A human-friendly name for the project", + "example": "My Project" }, - "treatments": { - "description": "Details on the variations you are testing in the experiment. You establish these variations in feature flags, and then reuse them in experiments.", - "$ref": "#/components/schemas/TreatmentsInput" + "_access": { + "description": "Details on the allowed and denied actions for this project", + "$ref": "#/components/schemas/Access" }, - "flags": { - "description": "Details on the feature flag and targeting rules for this iteration", - "$ref": "#/components/schemas/FlagsInput" + "tags": { + "type": "array", + "description": "A list of tags for the project", + "items": { + "type": "string" + }, + "example": [ + "ops" + ] }, - "randomizationUnit": { + "defaultReleasePipelineKey": { "type": "string", - "description": "The unit of randomization for this iteration. Defaults to user.", - "example": "user" + "description": "The key of the default release pipeline for this project" + }, + "environments": { + "description": "A paginated list of environments for the project. By default this field is omitted unless expanded by the client.", + "$ref": "#/components/schemas/Environments" } } }, - "IterationRep": { + "ProjectPost": { "type": "object", "required": [ - "hypothesis", - "status", - "createdAt" + "name", + "key" ], "properties": { - "_id": { - "type": "string", - "description": "The iteration ID", - "example": "12ab3c45de678910fgh12345" - }, - "hypothesis": { - "type": "string", - "description": "The expected outcome of this experiment", - "example": "The new button placement will increase conversion" - }, - "status": { - "type": "string", - "description": "The status of the iteration: not_started, running, stopped", - "example": "running" - }, - "createdAt": { - "description": "Timestamp of when the iteration was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "startedAt": { - "description": "Timestamp of when the iteration started", - "example": "1655314200000", - "$ref": "#/components/schemas/UnixMillis" - }, - "endedAt": { - "description": "Timestamp of when the iteration ended", - "example": "1656610200000", - "$ref": "#/components/schemas/UnixMillis" - }, - "winningTreatmentId": { + "name": { "type": "string", - "description": "The ID of the treatment chosen when the experiment stopped", - "example": "122c9f3e-da26-4321-ba68-e0fc02eced58" + "description": "A human-friendly name for the project.", + "example": "My Project" }, - "winningReason": { + "key": { "type": "string", - "description": "The reason you stopped the experiment", - "example": "We ran this iteration for two weeks and the winning variation was clear" + "description": "A unique key used to reference the project in your code.", + "example": "project-key-123abc" }, - "canReshuffleTraffic": { + "includeInSnippetByDefault": { "type": "boolean", - "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).", + "description": "Whether or not flags created in this project are made available to the client-side JavaScript SDK by default.", "example": true }, - "flags": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlagRep" - }, - "description": "Details on the flag used in this experiment" - }, - "primaryMetric": { - "description": "Deprecated, use primarySingleMetric and primaryFunnel instead. Details on the primary metric for this experiment.", - "deprecated": true, - "$ref": "#/components/schemas/DependentMetricOrMetricGroupRep" - }, - "primarySingleMetric": { - "description": "Details on the primary metric for this experiment", - "$ref": "#/components/schemas/MetricV2Rep" - }, - "primaryFunnel": { - "description": "Details on the primary funnel group for this experiment", - "$ref": "#/components/schemas/DependentMetricGroupRepWithMetrics" - }, - "randomizationUnit": { - "type": "string", - "description": "The unit of randomization for this iteration", - "example": "user" - }, - "treatments": { - "type": "array", - "description": "Details on the variations you are testing in the experiment", - "items": { - "$ref": "#/components/schemas/TreatmentRep" - } + "defaultClientSideAvailability": { + "description": "Controls which client-side SDKs can use new flags by default.", + "$ref": "#/components/schemas/DefaultClientSideAvailabilityPost" }, - "secondaryMetrics": { + "tags": { "type": "array", - "description": "Deprecated, use metrics instead. Details on the secondary metrics for this experiment.", + "description": "Tags for the project", "items": { - "$ref": "#/components/schemas/MetricV2Rep" + "type": "string" }, - "deprecated": true + "example": [ + "ops" + ] }, - "metrics": { + "environments": { "type": "array", - "description": "Details on the metrics for this experiment", + "description": "Creates the provided environments for this project. If omitted default environments will be created instead.", "items": { - "$ref": "#/components/schemas/DependentMetricOrMetricGroupRep" + "$ref": "#/components/schemas/EnvironmentPost" } + }, + "namingConvention": { + "description": "The flag key convention for this project", + "$ref": "#/components/schemas/NamingConvention" } } }, - "JSONPatch": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PatchOperation" - } - }, - "LastSeenMetadata": { + "ProjectRep": { "type": "object", + "required": [ + "_links", + "_id", + "key", + "includeInSnippetByDefault", + "name", + "tags", + "environments" + ], "properties": { - "tokenId": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "environments": { + "href": "/api/v2/projects/my-project/environments", + "type": "application/json" + }, + "self": { + "href": "/api/v2/projects/my-project", + "type": "application/json" + } + } + }, + "_id": { "type": "string", - "description": "The ID of the token used in the member's last session", - "example": "5b52207f8ca8e631d31fdb2b" - } - } - }, - "LegacyExperimentRep": { - "type": "object", - "properties": { - "metricKey": { + "description": "The ID of this project", + "example": "57be1db38b75bf0772d11383" + }, + "key": { "type": "string", - "example": "my-metric" + "description": "The key of this project", + "example": "project-key-123abc" }, - "_metric": { - "$ref": "#/components/schemas/MetricListingRep" + "includeInSnippetByDefault": { + "type": "boolean", + "description": "Whether or not flags created in this project are made available to the client-side JavaScript SDK by default", + "example": true }, - "environments": { + "defaultClientSideAvailability": { + "description": "Describes which client-side SDKs can use new flags by default", + "$ref": "#/components/schemas/ClientSideAvailability" + }, + "name": { + "type": "string", + "description": "A human-friendly name for the project", + "example": "My Project" + }, + "_access": { + "description": "Details on the allowed and denied actions for this project", + "$ref": "#/components/schemas/Access" + }, + "tags": { "type": "array", + "description": "A list of tags for the project", "items": { "type": "string" }, "example": [ - "production", - "test", - "my-environment" + "ops" ] }, - "_environmentSettings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ExperimentEnvironmentSettingRep" - } - } - } - }, - "Link": { - "type": "object", - "properties": { - "href": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "MaintainerRep": { - "type": "object", - "properties": { - "member": { - "description": "Details on the member who maintains this resource", - "$ref": "#/components/schemas/MemberSummary" + "defaultReleasePipelineKey": { + "type": "string", + "description": "The key of the default release pipeline for this project" }, - "team": { - "description": "Details on the team that maintains this resource", - "$ref": "#/components/schemas/MemberTeamSummaryRep" + "environments": { + "type": "array", + "description": "A list of environments for the project", + "items": { + "$ref": "#/components/schemas/Environment" + } } } }, - "MaintainerTeam": { + "ProjectSummary": { "type": "object", "required": [ + "_id", + "_links", "key", "name" ], "properties": { - "key": { - "type": "string", - "description": "The key of the maintainer team", - "example": "team-key-123abc" - }, - "name": { + "_id": { "type": "string", - "description": "A human-friendly name for the maintainer team", - "example": "Example team" + "description": "The ID of this project", + "example": "57be1db38b75bf0772d11383" }, "_links": { "type": "object", @@ -30970,35 +40899,33 @@ }, "description": "The location and content type of related resources", "example": { - "parent": { - "href": "/api/v2/teams", - "type": "application/json" - }, - "roles": { - "href": "/api/v2/teams/example-team/roles", + "environments": { + "href": "/api/v2/projects/example-project/environments", "type": "application/json" }, "self": { - "href": "/api/v2/teams/example-team", + "href": "/api/v2/projects/example-project", "type": "application/json" } } + }, + "key": { + "type": "string", + "description": "The project key", + "example": "project-key-123abc" + }, + "name": { + "type": "string", + "description": "The project name", + "example": "Example project" } } }, - "Member": { + "Projects": { "type": "object", "required": [ "_links", - "_id", - "role", - "email", - "_pendingInvite", - "_verified", - "customRoles", - "mfa", - "_lastSeen", - "creationDate" + "items" ], "properties": { "_links": { @@ -31006,198 +40933,338 @@ "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" + "description": "A link to this resource.", + "example": { + "self": { + "href": "/api/v2/projects", + "type": "application/json" + } + } }, - "_id": { - "type": "string", - "description": "The member's ID", - "example": "507f1f77bcf86cd799439011" + "items": { + "type": "array", + "description": "List of projects.", + "items": { + "$ref": "#/components/schemas/Project" + } }, - "firstName": { + "totalCount": { + "type": "integer" + } + } + }, + "RandomizationSettingsPut": { + "type": "object", + "required": [ + "randomizationUnits" + ], + "properties": { + "randomizationUnits": { + "type": "array", + "description": "An array of randomization units allowed for this project.", + "items": { + "$ref": "#/components/schemas/RandomizationUnitInput" + } + } + } + }, + "RandomizationSettingsRep": { + "type": "object", + "properties": { + "_projectId": { "type": "string", - "description": "The member's first name", - "example": "Ariel" + "description": "The project ID", + "example": "12345abcde67890fghij" }, - "lastName": { + "_projectKey": { "type": "string", - "description": "The member's last name", - "example": "Flores" + "description": "The project key", + "example": "project-key-123abc" }, - "role": { - "type": "string", - "description": "The member's built-in role. If the member has no custom roles, this role will be in effect.", - "example": "reader" + "randomizationUnits": { + "type": "array", + "description": "An array of the randomization units in this project", + "items": { + "$ref": "#/components/schemas/RandomizationUnitRep" + } }, - "email": { - "type": "string", - "description": "The member's email address", - "example": "ariel@acme.com" + "_creationDate": { + "description": "Timestamp of when the experiment was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" }, - "_pendingInvite": { - "type": "boolean", - "description": "Whether the member has a pending invitation", - "example": false + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + } + } + }, + "RandomizationUnitInput": { + "type": "object", + "required": [ + "randomizationUnit", + "standardRandomizationUnit" + ], + "properties": { + "randomizationUnit": { + "type": "string", + "description": "The unit of randomization. Must match the key of an existing context kind in this project.", + "example": "user" }, - "_verified": { + "default": { "type": "boolean", - "description": "Whether the member's email address has been verified", + "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.", "example": true }, - "_pendingEmail": { + "standardRandomizationUnit": { "type": "string", - "description": "The member's email address before it has been verified, for accounts where email verification is required" - }, - "customRoles": { - "type": "array", - "description": "The set of custom roles (as keys) assigned to the member", - "items": { - "type": "string" - }, - "example": [ - "devOps", - "backend-devs" + "description": "One of LaunchDarkly's fixed set of standard randomization units.", + "enum": [ + "guest", + "guestTime", + "organization", + "request", + "user", + "userTime" ] + } + } + }, + "RandomizationUnitRep": { + "type": "object", + "properties": { + "randomizationUnit": { + "type": "string", + "description": "The unit of randomization. Defaults to user.", + "example": "user" + }, + "standardRandomizationUnit": { + "type": "string", + "description": "One of LaunchDarkly's fixed set of standard randomization units.", + "example": "user" + }, + "default": { + "type": "boolean", + "description": "Whether this randomization unit is the default for experiments", + "example": true }, - "mfa": { - "type": "string", - "description": "Whether multi-factor authentication is enabled for this member" + "_hidden": { + "type": "boolean" }, - "excludedDashboards": { - "type": "array", - "description": "Default dashboards that the member has chosen to ignore", - "items": { - "type": "string" - } + "_displayName": { + "type": "string", + "description": "The display name for the randomization unit, displayed in the LaunchDarkly user interface.", + "example": "User" + } + } + }, + "RateLimitedErrorRep": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "description": "Specific error code encountered", + "example": "rate_limited" }, - "_lastSeen": { - "description": "The member's last session date (as Unix milliseconds since epoch)", - "example": "1608260796147", + "message": { + "type": "string", + "description": "Description of the error", + "example": "You've exceeded the API rate limit. Try again later." + } + } + }, + "RecentTriggerBody": { + "type": "object", + "properties": { + "timestamp": { + "description": "Timestamp of the incoming trigger webhook", + "example": "1654104600000", "$ref": "#/components/schemas/UnixMillis" }, - "_lastSeenMetadata": { - "description": "Additional metadata associated with the member's last session, for example, whether a token was used", - "$ref": "#/components/schemas/LastSeenMetadata" - }, - "_integrationMetadata": { - "description": "Details on the member account in an external source, if this member is provisioned externally", - "$ref": "#/components/schemas/IntegrationMetadata" + "jsonBody": { + "type": "object", + "additionalProperties": {}, + "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." + } + } + }, + "ReferenceRep": { + "type": "object", + "required": [ + "path", + "hunks" + ], + "properties": { + "path": { + "type": "string", + "description": "File path of the reference", + "example": "/main/index.js" }, - "teams": { - "type": "array", - "description": "Details on the teams this member is assigned to", - "items": { - "$ref": "#/components/schemas/MemberTeamSummaryRep" - } + "hint": { + "type": "string", + "description": "Programming language used in the file", + "example": "javascript" }, - "permissionGrants": { + "hunks": { "type": "array", - "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.", "items": { - "$ref": "#/components/schemas/MemberPermissionGrantSummaryRep" + "$ref": "#/components/schemas/HunkRep" } + } + } + }, + "RelatedExperimentRep": { + "type": "object", + "properties": { + "key": { + "type": "string" }, - "creationDate": { - "description": "Timestamp of when the member was created", - "example": "1628001602644", - "$ref": "#/components/schemas/UnixMillis" + "name": { + "type": "string" }, - "oauthProviders": { - "type": "array", - "description": "A list of OAuth providers", - "items": { - "$ref": "#/components/schemas/OAuthProviderKind" - } + "environment": { + "type": "string" } } }, - "MemberDataRep": { + "RelativeDifferenceRep": { "type": "object", "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } + "upper": { + "type": "number", + "description": "An upper bound of the relative difference between the treatment and the fromTreatmentId", + "example": 0.42655970355712425 }, - "_id": { - "type": "string", - "description": "The member ID", - "example": "507f1f77bcf86cd799439011" + "lower": { + "type": "number", + "description": "A lower bound of the relative difference between the treatment and the fromTreatmentId", + "example": -0.13708601934659803 }, - "email": { + "fromTreatmentId": { "type": "string", - "description": "The member email", - "example": "ariel@acme.com" + "description": "The treatment ID of the treatment against which the relative difference is calculated", + "example": "92b8354e-360e-4d67-8f13-fa6a46ca8077" }, - "firstName": { - "type": "string", - "description": "The member first name", - "example": "Ariel" + "variance": { + "type": "number", + "description": "Variance of the relative difference", + "example": 4.23 }, - "lastName": { - "type": "string", - "description": "The member last name", - "example": "Flores" + "varianceReduction": { + "type": "number", + "description": "The reduction in variance resulting from CUPED", + "example": 0.1 } } }, - "MemberImportItem": { + "RelayAutoConfigCollectionRep": { "type": "object", "required": [ - "status", - "value" + "items" ], "properties": { - "message": { - "type": "string", - "description": "An error message, including CSV line number, if the status is error" - }, - "status": { + "items": { + "type": "array", + "description": "An array of Relay Proxy configurations", + "items": { + "$ref": "#/components/schemas/RelayAutoConfigRep" + } + } + } + }, + "RelayAutoConfigPost": { + "type": "object", + "required": [ + "name", + "policy" + ], + "properties": { + "name": { "type": "string", - "description": "Whether this member can be successfully imported (success) or not (error). Even if the status is success, members are only added to a team on a 201 response.", - "example": "error" + "description": "A human-friendly name for the Relay Proxy configuration" }, - "value": { - "type": "string", - "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.", - "example": "new-team-member@acme.com" + "policy": { + "type": "array", + "description": "A description of what environments and projects the Relay Proxy should include or exclude. To learn more, read [Write an inline policy](https://docs.launchdarkly.com/sdk/relay-proxy/automatic-configuration#write-an-inline-policy).", + "items": { + "$ref": "#/components/schemas/Statement" + } } } }, - "MemberPermissionGrantSummaryRep": { + "RelayAutoConfigRep": { "type": "object", "required": [ - "resource" + "_id", + "name", + "policy", + "fullKey", + "displayKey", + "creationDate", + "lastModified" ], "properties": { - "actionSet": { + "_id": { + "description": "The ID of the Relay Proxy configuration", + "example": "12ab3c45de678910abc12345", + "$ref": "#/components/schemas/ObjectId" + }, + "_creator": { + "description": "Details on the member who created this Relay Proxy configuration", + "$ref": "#/components/schemas/MemberSummary" + }, + "_access": { + "description": "Details on the allowed and denied actions for this Relay Proxy configuration", + "$ref": "#/components/schemas/Access" + }, + "name": { "type": "string", - "description": "The name of the group of related actions to allow. A permission grant may have either an actionSet or a list of actions but not both at the same time." + "description": "A human-friendly name for the Relay Proxy configuration", + "example": "Relay Proxy Demo Config" }, - "actions": { + "policy": { "type": "array", - "description": "A list of actions to allow. A permission grant may have either an actionSet or a list of actions but not both at the same time.", + "description": "A description of what environments and projects the Relay Proxy should include or exclude", "items": { - "type": "string" - }, - "example": [ - "maintainTeam" - ] + "$ref": "#/components/schemas/Statement" + } }, - "resource": { + "fullKey": { "type": "string", - "description": "The resource for which the actions are allowed", - "example": "team/qa-team" + "description": "The Relay Proxy configuration key" + }, + "displayKey": { + "type": "string", + "description": "The last few characters of the Relay Proxy configuration key, displayed in the LaunchDarkly UI", + "example": "7f30" + }, + "creationDate": { + "description": "Timestamp of when the Relay Proxy configuration was created", + "example": "1628001602644", + "$ref": "#/components/schemas/UnixMillis" + }, + "lastModified": { + "description": "Timestamp of when the Relay Proxy configuration was most recently modified", + "example": "1628001602644", + "$ref": "#/components/schemas/UnixMillis" } } }, - "MemberSummary": { + "Release": { "type": "object", "required": [ - "_links", - "_id", - "role", - "email" + "name", + "releasePipelineKey", + "releasePipelineDescription", + "phases", + "_version" ], "properties": { "_links": { @@ -31205,1208 +41272,1425 @@ "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/members/569f183514f4432160000007", - "type": "application/json" - } - } + "description": "The location and content type of related resources" }, - "_id": { + "name": { "type": "string", - "description": "The member's ID", - "example": "569f183514f4432160000007" + "description": "The release pipeline name", + "example": "Example release pipeline" }, - "firstName": { + "releasePipelineKey": { "type": "string", - "description": "The member's first name", - "example": "Ariel" + "description": "The release pipeline key", + "example": "example-release-pipeline" }, - "lastName": { + "releasePipelineDescription": { "type": "string", - "description": "The member's last name", - "example": "Flores" + "description": "The release pipeline description", + "example": "Our release pipeline for typical testing and deployment" }, - "role": { - "type": "string", - "description": "The member's built-in role. If the member has no custom roles, this role will be in effect.", - "example": "admin" + "phases": { + "type": "array", + "description": "An ordered list of the release pipeline phases", + "items": { + "$ref": "#/components/schemas/ReleasePhase" + } }, - "email": { + "_version": { + "type": "integer", + "description": "The release version", + "example": 1 + }, + "_releaseVariationId": { "type": "string", - "description": "The member's email address", - "example": "ariel@acme.com" + "description": "The chosen release variation ID to use across all phases of a release" + }, + "_canceledAt": { + "description": "Timestamp of when the release was canceled", + "example": "1684262711507", + "$ref": "#/components/schemas/UnixMillis" } } }, - "MemberTeamSummaryRep": { + "ReleaseAudience": { "type": "object", "required": [ - "customRoleKeys", - "key", + "_id", "name" ], "properties": { - "customRoleKeys": { - "type": "array", - "description": "A list of keys of the custom roles this team has access to", - "items": { - "type": "string" - }, - "example": [ - "access-to-test-projects" - ] - }, - "key": { + "_id": { "type": "string", - "description": "The team key", - "example": "team-key-123abc" + "description": "The audience ID", + "example": "1234a56b7c89d012345e678g" }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" - } + }, + "description": "The location and content type of related resources" + }, + "environment": { + "description": "Details about the environment. If the environment is deleted, this field will be omitted.", + "$ref": "#/components/schemas/EnvironmentSummary" }, "name": { "type": "string", - "description": "The team name", - "example": "QA Team" - } - } - }, - "MemberTeamsPostInput": { - "type": "object", - "required": [ - "teamKeys" - ], - "properties": { - "teamKeys": { + "description": "The release phase name", + "example": "Phase 1 - Testing" + }, + "configuration": { + "description": "The audience configuration", + "$ref": "#/components/schemas/AudienceConfiguration" + }, + "segmentKeys": { "type": "array", - "description": "List of team keys", + "description": "A list of segment keys", "items": { "type": "string" }, "example": [ - "team1", - "team2" + "segment-key-123abc" ] + }, + "status": { + "description": "The audience status", + "example": "active", + "$ref": "#/components/schemas/AudienceStatus" + }, + "_ruleIds": { + "type": "array", + "description": "The rules IDs added or updated by this audience", + "items": { + "type": "string" + } } } }, - "Members": { + "ReleaseGuardianConfiguration": { "type": "object", "required": [ - "items", - "_links" + "monitoringWindowMilliseconds", + "rolloutWeight", + "rollbackOnRegression" ], "properties": { - "items": { - "type": "array", - "description": "An array of members", - "items": { - "$ref": "#/components/schemas/Member" - } - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "monitoringWindowMilliseconds": { + "type": "integer", + "format": "int64", + "description": "The monitoring window in milliseconds", + "example": 60000 }, - "totalCount": { + "rolloutWeight": { "type": "integer", - "description": "The number of members returned" + "description": "The rollout weight percentage", + "example": 50 + }, + "rollbackOnRegression": { + "type": "boolean", + "description": "Whether or not to roll back on regression", + "example": true + }, + "randomizationUnit": { + "type": "string", + "description": "The randomization unit for the measured rollout", + "example": "user" } } }, - "MethodNotAllowedErrorRep": { + "ReleaseGuardianConfigurationInput": { "type": "object", - "required": [ - "code", - "message" - ], "properties": { - "code": { - "type": "string", - "description": "Specific error code encountered", - "example": "method_not_allowed" + "monitoringWindowMilliseconds": { + "type": "integer", + "format": "int64", + "description": "The monitoring window in milliseconds", + "example": 60000 }, - "message": { + "rolloutWeight": { + "type": "integer", + "description": "The rollout weight", + "example": 50 + }, + "rollbackOnRegression": { + "type": "boolean", + "description": "Whether or not to rollback on regression", + "example": true + }, + "randomizationUnit": { "type": "string", - "description": "Description of the error", - "example": "Method not allowed" + "description": "The randomization unit for the measured rollout", + "example": "user" } } }, - "MetricCollectionRep": { + "ReleasePhase": { "type": "object", + "required": [ + "_id", + "_name", + "complete", + "_creationDate", + "_audiences" + ], "properties": { - "items": { + "_id": { + "type": "string", + "description": "The phase ID", + "example": "1234a56b7c89d012345e678f" + }, + "_name": { + "type": "string", + "description": "The release phase name", + "example": "Phase 1 - Testing" + }, + "complete": { + "type": "boolean", + "description": "Whether this phase is complete", + "example": true + }, + "_creationDate": { + "description": "Timestamp of when the release phase was created", + "example": "1684262711507", + "$ref": "#/components/schemas/UnixMillis" + }, + "_completionDate": { + "description": "Timestamp of when the release phase was completed", + "example": "1684262711509", + "$ref": "#/components/schemas/UnixMillis" + }, + "_completedBy": { + "description": "Details about how this phase was marked as complete", + "$ref": "#/components/schemas/CompletedBy" + }, + "_audiences": { "type": "array", - "description": "An array of metrics", + "description": "A logical grouping of one or more environments that share attributes for rolling out changes", "items": { - "$ref": "#/components/schemas/MetricListingRep" + "$ref": "#/components/schemas/ReleaseAudience" } }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/metrics/my-project?limit=20", - "type": "application/json" - } - } + "status": { + "description": "Status of the phase", + "example": "Started", + "enum": [ + "NotStarted", + "ReadyToStart", + "Started", + "Paused", + "Complete" + ], + "$ref": "#/components/schemas/PhaseStatus" + }, + "started": { + "type": "boolean", + "description": "Whether or not this phase has started" + }, + "_startedDate": { + "description": "Timestamp of when the release phase was started", + "$ref": "#/components/schemas/UnixMillis" + }, + "configuration": { + "description": "The phase configuration", + "$ref": "#/components/schemas/PhaseConfiguration" } } }, - "MetricEventDefaultRep": { + "ReleasePipeline": { "type": "object", + "required": [ + "createdAt", + "key", + "name", + "phases" + ], "properties": { - "disabled": { + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Timestamp of when the release pipeline was created", + "example": "1684262711507" + }, + "description": { + "type": "string", + "description": "The release pipeline description", + "example": "Standard pipeline to roll out to production" + }, + "key": { + "type": "string", + "description": "The release pipeline key", + "example": "standard-pipeline" + }, + "name": { + "type": "string", + "description": "The release pipeline name", + "example": "Standard Pipeline" + }, + "phases": { + "type": "array", + "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.", + "items": { + "$ref": "#/components/schemas/Phase" + } + }, + "tags": { + "type": "array", + "description": "A list of the release pipeline's tags", + "items": { + "type": "string" + }, + "example": [ + "example-tag" + ] + }, + "_version": { + "type": "integer", + "description": "The release pipeline version", + "example": 1 + }, + "_access": { + "description": "Details on the allowed and denied actions for this release pipeline", + "$ref": "#/components/schemas/Access" + }, + "isProjectDefault": { "type": "boolean", - "description": "Whether to disable defaulting missing unit events when calculating results. Defaults to false" + "description": "Whether this release pipeline is the default pipeline for the project" }, - "value": { - "type": "number", - "description": "The default value applied to missing unit events. Only available when disabled is false. Defaults to 0" + "_isLegacy": { + "type": "boolean", + "description": "Whether this release pipeline is a legacy pipeline", + "example": true } } }, - "MetricGroupCollectionRep": { + "ReleasePipelineCollection": { "type": "object", "required": [ - "items" + "items", + "totalCount" ], "properties": { "items": { "type": "array", - "description": "An array of metric groups", + "description": "An array of release pipelines", "items": { - "$ref": "#/components/schemas/MetricGroupRep" + "$ref": "#/components/schemas/ReleasePipeline" } }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/projects/my-project", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/my-project/metric-groups", - "type": "application/json" - } - } + "totalCount": { + "type": "integer", + "description": "Total number of release pipelines", + "example": 1 } } }, - "MetricGroupPost": { + "ReleaseProgression": { "type": "object", "required": [ - "key", - "name", - "kind", - "maintainerId", - "tags", - "metrics" + "_createdAt", + "flagKey", + "_links" ], "properties": { - "key": { - "type": "string", - "description": "A unique key to reference the metric group", - "example": "metric-group-key-123abc" - }, - "name": { - "type": "string", - "description": "A human-friendly name for the metric group", - "example": "My metric group" + "_createdAt": { + "description": "Timestamp of when the release was created", + "example": "1684262711507", + "$ref": "#/components/schemas/UnixMillis" }, - "kind": { - "type": "string", - "description": "The type of the metric group", - "example": "funnel", - "enum": [ - "funnel" - ] + "_completedAt": { + "description": "Timestamp of when the release was completed", + "example": "1684262711509", + "$ref": "#/components/schemas/UnixMillis" }, - "description": { + "flagKey": { "type": "string", - "description": "Description of the metric group", - "example": "Description of the metric group" + "description": "The flag key", + "example": "flag-key-123abc" }, - "maintainerId": { + "activePhaseId": { "type": "string", - "description": "The ID of the member who maintains this metric group", - "example": "569fdeadbeef1644facecafe" + "description": "The ID of the currently active release phase", + "example": "1234a56b7c89d012345e678f" }, - "tags": { - "type": "array", - "description": "Tags for the metric group", - "items": { - "type": "string" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" }, - "example": [ - "ops" - ] - }, - "metrics": { - "type": "array", - "description": "An ordered list of the metrics in this metric group", - "items": { - "$ref": "#/components/schemas/MetricInMetricGroupInput" - } + "description": "The location and content type of related resources" } } }, - "MetricGroupRep": { + "ReleaseProgressionCollection": { "type": "object", "required": [ - "_id", - "key", - "name", - "kind", - "_links", - "tags", - "_creationDate", - "_lastModified", - "maintainer", - "metrics", - "_version" + "activeCount", + "completedCount", + "items", + "phases", + "totalCount", + "_links" ], "properties": { - "_id": { - "type": "string", - "description": "The ID of this metric group", - "example": "bc3e5be1-02d2-40c7-9926-26d0aacd7aab" + "activeCount": { + "type": "integer", + "description": "The number of active releases", + "example": 3 }, - "key": { - "type": "string", - "description": "A unique key to reference the metric group", - "example": "metric-group-key-123abc" + "completedCount": { + "type": "integer", + "description": "The number of completed releases", + "example": 1 }, - "name": { - "type": "string", - "description": "A human-friendly name for the metric group", - "example": "My metric group" + "items": { + "type": "array", + "description": "A list of details for each release, across all flags, for this release pipeline", + "items": { + "$ref": "#/components/schemas/ReleaseProgression" + } }, - "kind": { - "type": "string", - "description": "The type of the metric group", - "example": "funnel", - "enum": [ - "funnel", - "standard" - ] + "phases": { + "type": "array", + "description": "A list of details for each phase, across all releases, for this release pipeline", + "items": { + "$ref": "#/components/schemas/PhaseInfo" + } }, - "description": { - "type": "string", - "description": "Description of the metric group", - "example": "Description of the metric group" + "totalCount": { + "type": "integer", + "description": "The total number of releases for this release pipeline", + "example": 8 }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/projects/my-project", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/my-project/metric-groups/my-metric-group", - "type": "application/json" - } - } + "description": "The location and content type of related resources" + } + } + }, + "ReleaseStrategy": { + "type": "string" + }, + "ReleaserAudienceConfigInput": { + "type": "object", + "properties": { + "audienceId": { + "type": "string", + "description": "UUID of the audience." }, - "_access": { - "description": "Details on the allowed and denied actions for this metric group", - "$ref": "#/components/schemas/Access" + "releaseGuardianConfiguration": { + "description": "Optional configuration details for the specified audience. Will default to the release pipeline's audience configuration if omitted.", + "$ref": "#/components/schemas/ReleaseGuardianConfigurationInput" }, - "tags": { + "notifyMemberIds": { "type": "array", - "description": "Tags for the metric group", + "description": "An array of member IDs. These members are notified to review the approval request.", "items": { "type": "string" }, "example": [ - "ops" + "1234a56b7c89d012345e678f" ] }, - "_creationDate": { - "description": "Timestamp of when the metric group was created", - "example": "1628192791148", - "$ref": "#/components/schemas/UnixMillis" - }, - "_lastModified": { - "description": "Timestamp of when the metric group was last modified", - "example": "1628192791148", - "$ref": "#/components/schemas/UnixMillis" - }, - "maintainer": { - "description": "The maintainer of this metric", - "$ref": "#/components/schemas/MaintainerRep" - }, - "metrics": { + "notifyTeamKeys": { "type": "array", - "description": "An ordered list of the metrics in this metric group", + "description": "An array of team keys. The members of these teams are notified to review the approval request.", "items": { - "$ref": "#/components/schemas/MetricInGroupRep" - } - }, - "_version": { - "type": "integer", - "description": "The version of this metric group", - "example": 1 - }, - "experiments": { - "description": "Experiments that use this metric group. Only included if specified in the expand query parameter in a getMetricGroup request.", - "$ref": "#/components/schemas/DependentExperimentListRep" - }, - "experimentCount": { - "type": "integer", - "description": "The number of experiments using this metric group", - "example": 0 + "type": "string" + }, + "example": [ + "example-reviewer-team" + ] } } }, - "MetricGroupResultsRep": { + "RepositoryCollectionRep": { "type": "object", "required": [ "_links", - "metrics" + "items" ], "properties": { "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + } }, - "metrics": { + "items": { "type": "array", - "description": "An ordered list of the metrics in this metric group, and each of their results", + "description": "An array of repositories", "items": { - "$ref": "#/components/schemas/MetricInGroupResultsRep" + "$ref": "#/components/schemas/RepositoryRep" } } } }, - "MetricInGroupRep": { + "RepositoryRep": { "type": "object", "required": [ - "key", "name", - "kind", + "type", + "defaultBranch", + "enabled", + "version", "_links" ], "properties": { - "key": { + "name": { "type": "string", - "description": "The metric key", - "example": "metric-key-123abc" + "description": "The repository name", + "example": "LaunchDarkly-Docs" }, - "_versionId": { + "sourceLink": { "type": "string", - "description": "The version ID of the metric", - "example": "version-id-123abc" + "description": "A URL to access the repository", + "example": "https://github.com/launchdarkly/LaunchDarkly-Docs" }, - "name": { + "commitUrlTemplate": { "type": "string", - "description": "The metric name", - "example": "Example metric" + "description": "A template for constructing a valid URL to view the commit", + "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/commit/${sha}" }, - "kind": { + "hunkUrlTemplate": { "type": "string", - "description": "The kind of event the metric tracks", - "example": "custom", + "description": "A template for constructing a valid URL to view the hunk", + "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/blob/${sha}/${filePath}#L${lineNumber}" + }, + "type": { + "type": "string", + "description": "The type of repository", + "example": "github", "enum": [ - "pageview", - "click", - "custom" + "bitbucket", + "custom", + "github", + "gitlab" ] }, - "isNumeric": { + "defaultBranch": { + "type": "string", + "description": "The repository's default branch", + "example": "main" + }, + "enabled": { "type": "boolean", - "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", + "description": "Whether or not a repository is enabled for code reference scanning", "example": true }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/metrics/my-project/my-metric", - "type": "application/json" - } - } - }, - "nameInGroup": { - "type": "string", - "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 funnel.", - "example": "Step 1" + "version": { + "type": "integer", + "description": "The version of the repository's saved information", + "example": 3 }, - "randomizationUnits": { + "branches": { "type": "array", - "description": "The randomization units for the metric", + "description": "An array of the repository's branches that have been scanned for code references", "items": { - "type": "string" - }, - "example": [ - "user" - ] + "$ref": "#/components/schemas/BranchRep" + } + }, + "_links": { + "type": "object", + "additionalProperties": {} + }, + "_access": { + "$ref": "#/components/schemas/Access" } } }, - "MetricInGroupResultsRep": { + "ResourceAccess": { "type": "object", - "required": [ - "metric", - "results" - ], "properties": { - "metric": { - "description": "Metric metadata", - "$ref": "#/components/schemas/MetricInGroupRep" + "action": { + "$ref": "#/components/schemas/ActionIdentifier" }, - "results": { - "description": "The results of this metric", - "$ref": "#/components/schemas/ExperimentBayesianResultsRep" + "resource": { + "type": "string" } } }, - "MetricInMetricGroupInput": { + "ResourceCategory": { + "type": "string" + }, + "ResourceIDResponse": { "type": "object", - "required": [ - "key", - "nameInGroup" - ], "properties": { - "key": { - "type": "string", - "description": "The metric key", - "example": "metric-key-123abc" + "kind": { + "type": "string" }, - "nameInGroup": { - "type": "string", - "description": "Name of the metric when used within the associated metric group. Can be different from the original name of the metric", - "example": "Step 1" + "projectKey": { + "type": "string" + }, + "environmentKey": { + "type": "string" + }, + "flagKey": { + "type": "string" + }, + "key": { + "type": "string" } } }, - "MetricInput": { + "ResourceId": { "type": "object", - "required": [ - "key" - ], "properties": { + "environmentKey": { + "type": "string", + "description": "The environment key", + "example": "environment-key-123abc" + }, + "flagKey": { + "type": "string", + "description": "Deprecated, use key instead", + "deprecated": true + }, "key": { "type": "string", - "description": "The metric key", - "example": "metric-key-123abc" + "description": "The key of the flag or segment", + "example": "segment-key-123abc" }, - "isGroup": { - "type": "boolean", - "description": "Whether this is a metric group (true) or a metric (false). Defaults to false", - "example": true + "kind": { + "description": "The type of resource, flag or segment", + "example": "segment", + "$ref": "#/components/schemas/ResourceKind" }, - "primary": { - "type": "boolean", - "description": "Deprecated, use primarySingleMetricKey and primaryFunnelKey. Whether this is a primary metric (true) or a secondary metric (false)", - "example": true, - "deprecated": true + "projectKey": { + "type": "string", + "description": "The project key", + "example": "project-key-123abc" } } }, - "MetricListingRep": { + "ResourceKind": { + "type": "string" + }, + "ReviewOutput": { "type": "object", "required": [ "_id", - "_versionId", - "key", - "name", - "kind", - "_links", - "tags", - "_creationDate" + "kind" ], "properties": { - "experimentCount": { - "type": "integer", - "description": "The number of experiments using this metric", - "example": 0 - }, - "metricGroupCount": { - "type": "integer", - "description": "The number of metric groups using this metric", - "example": 0 - }, "_id": { - "type": "string", - "description": "The ID of this metric", - "example": "5902deadbeef667524a01290" - }, - "_versionId": { - "type": "string", - "description": "The version ID of the metric", - "example": "version-id-123abc" - }, - "key": { - "type": "string", - "description": "A unique key to reference the metric", - "example": "metric-key-123abc" - }, - "name": { - "type": "string", - "description": "A human-friendly name for the metric", - "example": "My metric" + "type": "string" }, "kind": { - "type": "string", - "description": "The kind of event the metric tracks", - "example": "custom", - "enum": [ - "pageview", - "click", - "custom" - ] - }, - "_attachedFlagCount": { - "type": "integer", - "description": "The number of feature flags currently attached to this metric", - "example": 0 - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/metrics/my-project", - "type": "application/json" - }, - "self": { - "href": "/api/v2/metrics/my-project/my-metric", - "type": "application/json" - } - } - }, - "_site": { - "description": "Details on how to access the metric in the LaunchDarkly UI", - "example": "{\"href\":\"/experiments/metrics/my-metric/edit\",\"type\":\"text/html\"}", - "$ref": "#/components/schemas/Link" - }, - "_access": { - "description": "Details on the allowed and denied actions for this metric", - "$ref": "#/components/schemas/Access" - }, - "tags": { - "type": "array", - "description": "Tags for the metric", - "items": { - "type": "string" - }, - "example": [] + "type": "string" }, - "_creationDate": { - "description": "Timestamp of when the metric was created", - "example": "1628192791148", + "creationDate": { "$ref": "#/components/schemas/UnixMillis" }, - "lastModified": { - "$ref": "#/components/schemas/Modification" - }, - "maintainerId": { - "type": "string", - "description": "The ID of the member who maintains this metric", - "example": "569fdeadbeef1644facecafe" + "comment": { + "type": "string" }, - "_maintainer": { - "description": "Details on the member who maintains this metric", - "example": "{\"_links\":{\"self\":{\"href\":\"/api/v2/members/569fdeadbeef1644facecafe\",\"type\":\"application/json\"}},\"_id\":\"569fdeadbeef1644facecafe\",\"firstName\":\"Ariel\",\"lastName\":\"Flores\",\"role\":\"owner\",\"email\":\"ariel@acme.com\"}", - "$ref": "#/components/schemas/MemberSummary" + "memberId": { + "type": "string" }, - "description": { + "serviceTokenId": { + "type": "string" + } + } + }, + "ReviewResponse": { + "type": "object", + "required": [ + "_id", + "kind" + ], + "properties": { + "_id": { "type": "string", - "description": "Description of the metric" - }, - "isNumeric": { - "type": "boolean", - "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", - "example": true + "description": "The approval request ID", + "example": "12ab3c45de678910abc12345" }, - "successCriteria": { + "kind": { "type": "string", - "description": "For custom metrics, the success criteria", + "description": "The type of review action to take", + "example": "approve", "enum": [ - "HigherThanBaseline", - "LowerThanBaseline" + "approve", + "decline", + "comment" ] }, - "unit": { + "creationDate": { + "description": "Timestamp of when the request was created", + "example": "1653606981113", + "$ref": "#/components/schemas/UnixMillis" + }, + "comment": { "type": "string", - "description": "For numeric custom metrics, the unit of measure" + "description": "A comment describing the approval response", + "example": "Approved!" }, - "eventKey": { + "memberId": { "type": "string", - "description": "For custom metrics, the event key to use in your code" + "description": "ID of account member that reviewed request", + "example": "12ab3c45de678910abc12345" }, - "randomizationUnits": { + "serviceTokenId": { + "type": "string", + "description": "ID of account service token that reviewed request", + "example": "12ab3c45de678910abc12345" + } + } + }, + "RoleAttributeMap": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/RoleAttributeValues" + } + }, + "RoleAttributeValues": { + "type": "array", + "items": { + "type": "string" + } + }, + "RoleType": { + "type": "string" + }, + "Rollout": { + "type": "object", + "required": [ + "variations" + ], + "properties": { + "variations": { "type": "array", - "description": "An array of randomization units allowed for this metric", "items": { - "type": "string" - }, - "example": [ - "user" - ] + "$ref": "#/components/schemas/WeightedVariation" + } }, - "unitAggregationType": { - "type": "string", - "description": "The method by which multiple unit event values are aggregated", - "example": "average", - "enum": [ - "average", - "sum" - ] + "experimentAllocation": { + "$ref": "#/components/schemas/ExperimentAllocationRep" }, - "analysisType": { - "type": "string", - "description": "The method for analyzing metric events", - "example": "mean", - "enum": [ - "mean", - "percentile" - ] + "seed": { + "type": "integer" }, - "percentileValue": { - "type": "integer", - "description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysisType is percentile.", - "example": 95 + "bucketBy": { + "type": "string" }, - "eventDefault": { - "$ref": "#/components/schemas/MetricEventDefaultRep" + "contextKind": { + "type": "string" } } }, - "MetricPost": { + "RootResponse": { "type": "object", "required": [ - "key", - "kind" + "links" ], "properties": { - "key": { - "type": "string", - "description": "A unique key to reference the metric", - "example": "metric-key-123abc" - }, - "name": { - "type": "string", - "description": "A human-friendly name for the metric", - "example": "Example metric" - }, - "description": { + "links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } + } + } + }, + "Rule": { + "type": "object", + "required": [ + "clauses", + "trackEvents" + ], + "properties": { + "_id": { "type": "string", - "description": "Description of the metric", - "example": "optional description" + "description": "The flag rule ID" }, - "kind": { - "type": "string", - "description": "The kind of event your metric will track", - "example": "custom", - "enum": [ - "pageview", - "click", - "custom" - ] + "variation": { + "type": "integer", + "description": "The index of the variation, from the array of variations for this flag" }, - "selector": { - "type": "string", - "description": "One or more CSS selectors. Required for click metrics only.", - "example": ".dropdown-toggle" + "rollout": { + "description": "Details on the percentage rollout, if it exists", + "$ref": "#/components/schemas/Rollout" }, - "urls": { + "clauses": { "type": "array", - "description": "One or more target URLs. Required for click and pageview metrics only.", + "description": "An array of clauses used for individual targeting based on attributes", "items": { - "$ref": "#/components/schemas/UrlPost" - }, - "example": "invalid example" - }, - "isActive": { - "type": "boolean", - "description": "Whether the metric is active. Set to true to record click or pageview metrics. Not applicable for custom metrics.", - "example": true + "$ref": "#/components/schemas/Clause" + } }, - "isNumeric": { + "trackEvents": { "type": "boolean", - "description": "Whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false). Required for custom metrics only.", - "example": false + "description": "Whether LaunchDarkly tracks events for this rule" }, - "unit": { + "description": { "type": "string", - "description": "The unit of measure. Applicable for numeric custom metrics only.", - "example": "orders" + "description": "The rule description" }, - "eventKey": { + "ref": { + "type": "string" + } + } + }, + "RuleClause": { + "type": "object", + "properties": { + "attribute": { "type": "string", - "description": "The event key to use in your code. Required for custom conversion/binary and custom numeric metrics only.", - "example": "sales generated" + "description": "The attribute the rule applies to, for example, last name or email address" }, - "successCriteria": { + "op": { "type": "string", - "description": "Success criteria. Required for custom numeric metrics, optional for custom conversion metrics.", - "example": "HigherThanBaseline", + "description": "The operator to apply to the given attribute", "enum": [ - "HigherThanBaseline", - "LowerThanBaseline" + "in", + "endsWith", + "startsWith", + "matches", + "contains", + "lessThan", + "lessThanOrEqual", + "greaterThan", + "greaterThanOrEqual", + "before", + "after", + "segmentMatch", + "semVerEqual", + "semVerLessThan", + "semVerGreaterThan" ] }, - "tags": { + "negate": { + "type": "boolean", + "description": "Whether the operator should be negated" + } + } + }, + "ScheduleKind": { + "type": "string" + }, + "SdkListRep": { + "type": "object", + "required": [ + "_links", + "sdks" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" + }, + "sdks": { "type": "array", - "description": "Tags for the metric", + "description": "The list of SDK names", "items": { "type": "string" }, "example": [ - "example-tag" + "Android", + "Java", + "Node.js" ] + } + } + }, + "SdkVersionListRep": { + "type": "object", + "required": [ + "_links", + "sdkVersions" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" }, - "randomizationUnits": { + "sdkVersions": { "type": "array", - "description": "An array of randomization units allowed for this metric", + "description": "The list of SDK names and versions", "items": { - "type": "string" + "$ref": "#/components/schemas/SdkVersionRep" }, "example": [ - "user" + { + "sdk": "Android", + "version": "3.1.2" + }, + { + "sdk": "Android", + "version": "3.1.5" + }, + { + "sdk": "C", + "version": "2.4.6" + } ] - }, - "unitAggregationType": { + } + } + }, + "SdkVersionRep": { + "type": "object", + "required": [ + "sdk", + "version" + ], + "properties": { + "sdk": { "type": "string", - "description": "The method by which multiple unit event values are aggregated", - "example": "average", - "enum": [ - "average", - "sum" - ] + "description": "The SDK name, or \"Unknown\"" }, - "analysisType": { + "version": { "type": "string", - "description": "The method for analyzing metric events", - "example": "mean" - }, - "percentileValue": { - "type": "integer", - "description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysisType is percentile.", - "example": 95 - }, - "eventDefault": { - "$ref": "#/components/schemas/MetricEventDefaultRep" + "description": "The version number, or \"Unknown\"" } } }, - "MetricRep": { + "SegmentBody": { "type": "object", "required": [ - "_id", - "_versionId", - "key", "name", - "kind", - "_links", - "tags", - "_creationDate" + "key" ], "properties": { - "experimentCount": { - "type": "integer", - "description": "The number of experiments using this metric", - "example": 0 - }, - "metricGroupCount": { - "type": "integer", - "description": "The number of metric groups using this metric", - "example": 0 - }, - "_id": { - "type": "string", - "description": "The ID of this metric", - "example": "5902deadbeef667524a01290" - }, - "_versionId": { + "name": { "type": "string", - "description": "The version ID of the metric", - "example": "version-id-123abc" + "description": "A human-friendly name for the segment", + "example": "Example segment" }, "key": { "type": "string", - "description": "A unique key to reference the metric", - "example": "metric-key-123abc" + "description": "A unique key used to reference the segment", + "example": "segment-key-123abc" }, - "name": { + "description": { "type": "string", - "description": "A human-friendly name for the metric", - "example": "My metric" + "description": "A description of the segment's purpose", + "example": "Bundle our sample customers together" }, - "kind": { - "type": "string", - "description": "The kind of event the metric tracks", - "example": "custom", - "enum": [ - "pageview", - "click", - "custom" + "tags": { + "type": "array", + "description": "Tags for the segment", + "items": { + "type": "string" + }, + "example": [ + "testing" ] }, - "_attachedFlagCount": { - "type": "integer", - "description": "The number of feature flags currently attached to this metric", - "example": 0 + "unbounded": { + "type": "boolean", + "description": "Whether to create a standard segment (false) or a big segment (true). 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.", + "example": false }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/metrics/my-project", - "type": "application/json" - }, - "self": { - "href": "/api/v2/metrics/my-project/my-metric", - "type": "application/json" - } - } + "unboundedContextKind": { + "type": "string", + "description": "For big segments, the targeted context kind.", + "example": "device" + } + } + }, + "SegmentId": { + "type": "string" + }, + "SegmentMetadata": { + "type": "object", + "properties": { + "envId": { + "type": "string" }, - "_site": { - "description": "Details on how to access the metric in the LaunchDarkly UI", - "example": "{\"href\":\"/experiments/metrics/my-metric/edit\",\"type\":\"text/html\"}", - "$ref": "#/components/schemas/Link" + "segmentId": { + "$ref": "#/components/schemas/SegmentId" }, - "_access": { - "description": "Details on the allowed and denied actions for this metric", - "$ref": "#/components/schemas/Access" + "version": { + "type": "integer" }, - "tags": { - "type": "array", - "description": "Tags for the metric", - "items": { - "type": "string" - }, - "example": [] + "includedCount": { + "type": "integer" }, - "_creationDate": { - "description": "Timestamp of when the metric was created", - "example": "1628192791148", - "$ref": "#/components/schemas/UnixMillis" + "excludedCount": { + "type": "integer" }, "lastModified": { - "$ref": "#/components/schemas/Modification" + "$ref": "#/components/schemas/UnixMillis" }, - "maintainerId": { - "type": "string", - "description": "The ID of the member who maintains this metric", - "example": "569fdeadbeef1644facecafe" + "deleted": { + "type": "boolean" + } + } + }, + "SegmentTarget": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "string" + } }, - "_maintainer": { - "description": "Details on the member who maintains this metric", - "example": "{\"_links\":{\"self\":{\"href\":\"/api/v2/members/569fdeadbeef1644facecafe\",\"type\":\"application/json\"}},\"_id\":\"569fdeadbeef1644facecafe\",\"firstName\":\"Ariel\",\"lastName\":\"Flores\",\"role\":\"owner\",\"email\":\"ariel@acme.com\"}", - "$ref": "#/components/schemas/MemberSummary" + "contextKind": { + "type": "string" + } + } + }, + "SegmentUserList": { + "type": "object", + "properties": { + "add": { + "type": "array", + "items": { + "type": "string" + } }, - "description": { - "type": "string", - "description": "Description of the metric" + "remove": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "SegmentUserState": { + "type": "object", + "properties": { + "included": { + "$ref": "#/components/schemas/SegmentUserList" }, - "isNumeric": { - "type": "boolean", - "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", - "example": true + "excluded": { + "$ref": "#/components/schemas/SegmentUserList" + } + } + }, + "Series": { + "type": "object", + "required": [ + "time", + "value" + ], + "properties": { + "time": { + "type": "integer", + "format": "int64", + "description": "The timestamp", + "example": 1676332800000 }, - "successCriteria": { - "type": "string", - "description": "For custom metrics, the success criteria", - "enum": [ - "HigherThanBaseline", - "LowerThanBaseline" - ] + "value": { + "type": "number", + "description": "The value for the given timestamp", + "example": 92 + } + } + }, + "SeriesIntervalsRep": { + "type": "object", + "required": [ + "series", + "_links" + ], + "properties": { + "series": { + "type": "array", + "description": "An array of timestamps and values for a given meter", + "items": { + "$ref": "#/components/schemas/Series" + } }, - "unit": { - "type": "string", - "description": "For numeric custom metrics, the unit of measure" + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" + } + } + }, + "SeriesListRep": { + "type": "object", + "required": [ + "_links", + "metadata", + "series" + ], + "properties": { + "_links": { + "type": "object", + "additionalProperties": {}, + "description": "The location and content type of related resources" }, - "eventKey": { - "type": "string", - "description": "For custom metrics, the event key to use in your code" + "metadata": { + "type": "array", + "description": "Metadata about each series", + "items": { + "$ref": "#/components/schemas/SeriesMetadataRep" + } }, - "randomizationUnits": { + "series": { "type": "array", - "description": "An array of randomization units allowed for this metric", + "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 metadata.", "items": { - "type": "string" + "$ref": "#/components/schemas/SeriesTimeSliceRep" }, "example": [ - "user" + { + "0": 11, + "1": 15, + "time": 1677888000000 + } ] + } + } + }, + "SeriesMetadataRep": { + "type": "object", + "additionalProperties": {} + }, + "SeriesTimeSliceRep": { + "type": "object", + "additionalProperties": { + "type": "integer" + } + }, + "SimpleHoldoutRep": { + "type": "object", + "properties": { + "_id": { + "type": "string" }, - "unitAggregationType": { - "type": "string", - "description": "The method by which multiple unit event values are aggregated", - "example": "average", - "enum": [ - "average", - "sum" - ] + "key": { + "type": "string" }, - "analysisType": { - "type": "string", - "description": "The method for analyzing metric events", - "example": "mean", - "enum": [ - "mean", - "percentile" - ] + "name": { + "type": "string" }, - "percentileValue": { - "type": "integer", - "description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysisType is percentile.", - "example": 95 + "status": { + "type": "string" }, - "eventDefault": { - "$ref": "#/components/schemas/MetricEventDefaultRep" + "createdAt": { + "$ref": "#/components/schemas/UnixMillis" }, - "experiments": { - "description": "Experiments that use this metric, including those using a metric group that contains this metric", - "$ref": "#/components/schemas/DependentExperimentListRep" + "updatedAt": { + "$ref": "#/components/schemas/UnixMillis" }, - "metricGroups": { + "experiments": { "type": "array", - "description": "Metric groups that use this metric", "items": { - "$ref": "#/components/schemas/DependentMetricGroupRep" + "$ref": "#/components/schemas/RelatedExperimentRep" } + } + } + }, + "SlicedResultsRep": { + "type": "object", + "properties": { + "attribute": { + "type": "string", + "description": "An attribute that results are sliced by", + "example": "country" }, - "isActive": { - "type": "boolean", - "description": "Whether the metric is active", - "example": true + "attributeValue": { + "type": "string", + "description": "Attribute Value for 'attribute'", + "example": "Canada" }, - "_attachedFeatures": { + "treatmentResults": { "type": "array", - "description": "Details on the flags attached to this metric", + "description": "A list of the results for each treatment", "items": { - "$ref": "#/components/schemas/FlagListingRep" + "$ref": "#/components/schemas/TreatmentResultRep" } - }, - "_version": { - "type": "integer", - "description": "Version of the metric", - "example": 1 - }, - "selector": { + } + } + }, + "SourceEnv": { + "type": "object", + "properties": { + "key": { "type": "string", - "description": "For click metrics, the CSS selectors" + "description": "The key of the source environment to clone from" }, - "urls": { - "description": "For click and pageview metrics, the target URLs", - "$ref": "#/components/schemas/UrlMatchers" + "version": { + "type": "integer", + "description": "(Optional) The version number of the source environment to clone from. Used for optimistic locking" } } }, - "MetricSeen": { + "StageInput": { "type": "object", "properties": { - "ever": { + "name": { + "type": "string", + "description": "The stage name", + "example": "10% rollout on day 1" + }, + "executeConditionsInSequence": { "type": "boolean", - "description": "Whether the metric has received an event for this iteration", + "description": "Whether to execute the conditions in sequence for the given stage", "example": true }, - "timestamp": { - "type": "integer", - "format": "int64", - "description": "Timestamp of when the metric most recently received an event for this iteration", - "example": 1657129307 + "conditions": { + "type": "array", + "description": "An array of conditions for the stage", + "items": { + "$ref": "#/components/schemas/ConditionInput" + }, + "example": [ + { + "kind": "schedule", + "scheduleKind": "relative", + "waitDuration": 2, + "waitDurationUnit": "calendarDay" + } + ] + }, + "action": { + "description": "An instructions field containing an array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag.", + "example": "{\"instructions\": [{ \"kind\": \"turnFlagOn\"}]}", + "$ref": "#/components/schemas/ActionInput" } } }, - "MetricV2Rep": { + "StageOutput": { "type": "object", "required": [ - "key", - "name", - "kind", - "_links" + "_id", + "conditions", + "action", + "_execution" ], "properties": { - "key": { - "type": "string", - "description": "The metric key", - "example": "metric-key-123abc" - }, - "_versionId": { + "_id": { "type": "string", - "description": "The version ID of the metric", - "example": "version-id-123abc" + "description": "The ID of this stage", + "example": "12ab3c45de678910abc12345" }, "name": { "type": "string", - "description": "The metric name", - "example": "Example metric" + "description": "The stage name", + "example": "10% rollout on day 1" }, - "kind": { - "type": "string", - "description": "The kind of event the metric tracks", - "example": "custom", - "enum": [ - "pageview", - "click", - "custom" + "conditions": { + "type": "array", + "description": "An array of conditions for the stage", + "items": { + "$ref": "#/components/schemas/ConditionOutput" + }, + "example": [ + { + "_execution": { + "status": "completed" + }, + "id": "12ab3c45de678910abc12345", + "kind": "schedule", + "scheduleKind": "relative", + "waitDuration": 2, + "waitDurationUnit": "calendarDay" + } ] }, - "isNumeric": { - "type": "boolean", - "description": "For custom metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).", - "example": true + "action": { + "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.", + "example": "{ \"kind\": \"patch\", \"instructions\": [{ \"kind\": \"turnFlagOn\"}] }", + "$ref": "#/components/schemas/ActionOutput" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/metrics/my-project/my-metric", - "type": "application/json" - } - } + "_execution": { + "description": "Details on the execution of this stage", + "example": "{ \"status\": \"completed\" }", + "$ref": "#/components/schemas/ExecutionOutput" } } }, - "MetricsInput": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MetricInput" - } - }, - "MigrationFlagStageCount": { - "type": "integer" - }, - "MigrationSafetyIssueRep": { + "Statement": { "type": "object", + "required": [ + "effect" + ], "properties": { - "causingRuleId": { - "type": "string", - "description": "The ID of the rule which caused this issue" + "resources": { + "type": "array", + "description": "Resource specifier strings", + "items": { + "type": "string" + }, + "example": [ + "proj/*:env/*;qa_*:/flag/*" + ] }, - "affectedRuleIds": { + "notResources": { "type": "array", - "description": "A list of the IDs of the rules which are affected by this issue. fallthrough is a sentinel value for the default rule.", + "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.", "items": { "type": "string" } }, - "issue": { - "type": "string", - "description": "A description of the issue that causingRuleId has caused for affectedRuleIds." + "actions": { + "type": "array", + "description": "Actions to perform on a resource", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "example": [ + "*" + ] }, - "oldSystemAffected": { - "type": "boolean", - "description": "Whether the changes caused by causingRuleId bring inconsistency to the old system" + "notActions": { + "type": "array", + "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + } + }, + "effect": { + "type": "string", + "description": "Whether this statement should allow or deny actions on the resources.", + "example": "allow", + "enum": [ + "allow", + "deny" + ] } } }, - "MigrationSettingsPost": { + "StatementPost": { "type": "object", "required": [ - "stageCount" + "effect" ], "properties": { - "contextKind": { - "type": "string", - "description": "Context kind for a migration with 6 stages, where data is being moved" + "resources": { + "type": "array", + "description": "Resource specifier strings", + "items": { + "type": "string" + }, + "example": [ + "proj/*:env/*:flag/*;testing-tag" + ] }, - "stageCount": { + "notResources": { + "type": "array", + "description": "Targeted resources are the resources NOT in this list. The resources field must be empty to use this field.", + "items": { + "type": "string" + } + }, + "actions": { + "type": "array", + "description": "Actions to perform on a resource", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "example": [ + "*" + ] + }, + "notActions": { + "type": "array", + "description": "Targeted actions are the actions NOT in this list. The actions field must be empty to use this field.", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + } + }, + "effect": { + "type": "string", + "description": "Whether this statement should allow or deny actions on the resources.", + "example": "allow", "enum": [ - "2", - "4", - "6" - ], - "$ref": "#/components/schemas/MigrationFlagStageCount" + "allow", + "deny" + ] } } }, - "Modification": { - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date-time", - "example": "2021-08-05T19:46:31.148082Z" - } + "StatementPostList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatementPost" } }, - "MultiEnvironmentDependentFlag": { + "StatisticCollectionRep": { "type": "object", "required": [ - "key", - "environments" + "flags", + "_links" ], "properties": { - "name": { - "type": "string", - "description": "The flag name", - "example": "Example dependent flag" - }, - "key": { - "type": "string", - "description": "The flag key", - "example": "dependent-flag-key-123abc" + "flags": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatisticRep" + } + }, + "description": "A map of flag keys to a list of code reference statistics for each code repository in which the flag key appears" }, - "environments": { - "type": "array", - "description": "A list of environments in which the dependent flag appears", - "items": { - "$ref": "#/components/schemas/DependentFlagEnvironment" - } + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" } } }, - "MultiEnvironmentDependentFlags": { + "StatisticRep": { "type": "object", "required": [ - "items", - "_links", - "_site" + "name", + "type", + "sourceLink", + "defaultBranch", + "enabled", + "version", + "hunkCount", + "fileCount", + "_links" ], "properties": { - "items": { - "type": "array", - "description": "An array of dependent flags with their environment information", - "items": { - "$ref": "#/components/schemas/MultiEnvironmentDependentFlag" - } + "name": { + "type": "string", + "description": "The repository name", + "example": "LaunchDarkly-Docs" + }, + "type": { + "type": "string", + "description": "The type of repository", + "example": "github", + "enum": [ + "bitbucket", + "custom", + "github", + "gitlab" + ] + }, + "sourceLink": { + "type": "string", + "description": "A URL to access the repository", + "example": "https://github.com/launchdarkly/LaunchDarkly-Docs" + }, + "defaultBranch": { + "type": "string", + "description": "The repository's default branch", + "example": "main" + }, + "enabled": { + "type": "boolean", + "description": "Whether or not a repository is enabled for code reference scanning", + "example": true + }, + "version": { + "type": "integer", + "description": "The version of the repository's saved information", + "example": 3 + }, + "hunkCount": { + "type": "integer", + "description": "The number of code reference hunks in which the flag appears in this repository" + }, + "fileCount": { + "type": "integer", + "description": "The number of files in which the flag appears in this repository" }, "_links": { "type": "object", @@ -32415,81 +42699,37 @@ }, "description": "The location and content type of related resources" }, - "_site": { - "description": "Details on how to access the prerequisite flag in the LaunchDarkly UI", - "example": "{ \"href\": \"/example-project/~/features/example-prereq-flag\", \"type\": \"text/html\" }", - "$ref": "#/components/schemas/Link" + "latestCommitTime": { + "description": "The timestamp of the latest commit in the repository including the flag", + "example": "1636558831870", + "$ref": "#/components/schemas/UnixMillis" } } }, - "NewMemberForm": { + "StatisticsRoot": { "type": "object", - "required": [ - "email" - ], "properties": { - "email": { - "type": "string", - "description": "The member's email", - "example": "sandy@acme.com" - }, - "password": { - "type": "string", - "description": "The member's password", - "example": "***" - }, - "firstName": { - "type": "string", - "description": "The member's first name", - "example": "Ariel" - }, - "lastName": { - "type": "string", - "description": "The member's last name", - "example": "Flores" - }, - "role": { - "type": "string", - "description": "The member's built-in role", - "example": "reader", - "enum": [ - "reader", - "writer", - "admin", - "no_access" - ] - }, - "customRoles": { + "projects": { "type": "array", - "description": "An array of the member's custom roles", + "description": "The location and content type of all projects that have code references", "items": { - "type": "string" + "$ref": "#/components/schemas/Link" }, "example": [ - "customRole1", - "customRole2" + { + "href": "/api/v2/code-refs/statistics/example-project-with-code-refs", + "type": "application/json" + } ] }, - "teamKeys": { - "type": "array", - "description": "An array of the member's teams", - "items": { - "type": "string" - }, - "example": [ - "team-1", - "team-2" - ] + "self": { + "description": "The location and content type for accessing this resource", + "example": "{\"href\": \"/api/v2/code-refs/statistics\", \"type\": \"application/json\"}", + "$ref": "#/components/schemas/Link" } } }, - "NewMemberFormListPost": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NewMemberForm" - } - }, - "NotFoundErrorRep": { + "StatusConflictErrorRep": { "type": "object", "required": [ "code", @@ -32499,71 +42739,33 @@ "code": { "type": "string", "description": "Specific error code encountered", - "example": "not_found" + "example": "optimistic_locking_error" }, "message": { "type": "string", "description": "Description of the error", - "example": "Invalid resource identifier" - } - } - }, - "OAuthProviderKind": { - "type": "string" - }, - "ObjectId": { - "type": "string" - }, - "Operator": { - "type": "string" - }, - "ParameterDefault": { - "type": "object", - "properties": { - "value": { - "description": "The default value for the given parameter" - }, - "booleanVariationValue": { - "type": "boolean", - "description": "Variation value for boolean flags. Not applicable for non-boolean flags." - }, - "ruleClause": { - "description": "Metadata related to add rule instructions", - "$ref": "#/components/schemas/RuleClause" + "example": "Conflict. Optimistic lock error. Try again later." } } }, - "ParameterRep": { + "StatusResponse": { "type": "object", "properties": { - "variationId": { + "integrationId": { "type": "string" }, - "flagKey": { + "message": { "type": "string" - } - } - }, - "ParentResourceRep": { - "type": "object", - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } }, - "name": { - "type": "string", - "description": "The name of the parent resource" + "statusCode": { + "type": "integer" }, - "resource": { - "type": "string", - "description": "The parent's resource specifier" + "timestamp": { + "$ref": "#/components/schemas/UnixMillis" } } }, - "PatchFailedErrorRep": { + "StatusServiceUnavailable": { "type": "object", "required": [ "code", @@ -32573,129 +42775,125 @@ "code": { "type": "string", "description": "Specific error code encountered", - "example": "patch_failed" + "example": "service_unavailable" }, "message": { "type": "string", "description": "Description of the error", - "example": "Unprocessable entity. Could not apply patch." + "example": "Requested service unavailable" } } }, - "PatchOperation": { + "StoreIntegrationError": { "type": "object", - "required": [ - "op", - "path", - "value" - ], "properties": { - "op": { - "type": "string", - "description": "The type of operation to perform", - "example": "replace" + "statusCode": { + "type": "integer" }, - "path": { - "type": "string", - "description": "A JSON Pointer string specifying the part of the document to operate on", - "example": "/exampleField" + "message": { + "type": "string" }, - "value": { - "description": "A JSON value used in \"add\", \"replace\", and \"test\" operations", - "example": "new example value" + "timestamp": { + "$ref": "#/components/schemas/UnixMillis" } } }, - "PatchWithComment": { + "SubjectDataRep": { "type": "object", - "required": [ - "patch" - ], "properties": { - "patch": { - "description": "A JSON patch representation of the change to make", - "$ref": "#/components/schemas/JSONPatch" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } }, - "comment": { + "name": { "type": "string", - "description": "Optional comment" + "description": "The subject's name" + }, + "avatarUrl": { + "type": "string", + "description": "The subject's avatar" } } }, - "Phase": { + "Target": { "type": "object", "required": [ - "id", - "audiences", - "name" + "values", + "variation" ], "properties": { - "id": { - "type": "string", - "description": "The phase ID", - "example": "1234a56b7c89d012345e678f" + "values": { + "type": "array", + "description": "A list of the keys for targets that will receive this variation because of individual targeting", + "items": { + "type": "string" + } }, - "audiences": { - "description": "An ordered list of the audiences for this release phase. Each audience corresponds to a LaunchDarkly environment.", - "$ref": "#/components/schemas/Audiences" + "variation": { + "type": "integer", + "description": "The index, from the array of variations for this flag, of the variation to serve this list of targets" }, - "name": { + "contextKind": { "type": "string", - "description": "The release phase name", - "example": "Phase 1 - Testing" + "description": "The context kind of the individual target" } } }, - "PostFlagScheduledChangesInput": { + "TargetResourceRep": { "type": "object", - "required": [ - "executionDate", - "instructions" - ], "properties": { - "comment": { - "type": "string", - "description": "Optional comment describing the scheduled changes", - "example": "optional comment" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } }, - "executionDate": { - "description": "When the scheduled changes should be executed", - "example": "1636558831870", - "$ref": "#/components/schemas/UnixMillis" + "name": { + "type": "string", + "description": "The name of the resource", + "example": "Example flag name" }, - "instructions": { - "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 {\"kind\": \"scheduled_action\"}. Supported scheduled actions are turnFlagOn and turnFlagOff.", - "example": "[ { \"kind\": \"turnFlagOn\" }]", - "$ref": "#/components/schemas/Instructions" + "resources": { + "type": "array", + "description": "The resource specifier", + "items": { + "type": "string" + }, + "example": [ + "proj/example-project:env/production:flag/example-flag" + ] } } }, - "Prerequisite": { + "Team": { "type": "object", - "required": [ - "key", - "variation" - ], "properties": { + "description": { + "type": "string", + "description": "A description of the team", + "example": "Description for this team." + }, "key": { - "type": "string" + "type": "string", + "description": "The team key", + "example": "team-key-123abc" + }, + "name": { + "type": "string", + "description": "A human-friendly name for the team", + "example": "Example team" + }, + "_access": { + "description": "Details on the allowed and denied actions for this team", + "$ref": "#/components/schemas/Access" + }, + "_creationDate": { + "description": "Timestamp of when the team was created", + "example": "1648671956143", + "$ref": "#/components/schemas/UnixMillis" }, - "variation": { - "type": "integer" - } - } - }, - "Project": { - "type": "object", - "required": [ - "_links", - "_id", - "key", - "includeInSnippetByDefault", - "name", - "tags" - ], - "properties": { "_links": { "type": "object", "additionalProperties": { @@ -32703,121 +42901,224 @@ }, "description": "The location and content type of related resources", "example": { - "environments": { - "href": "/api/v2/projects/my-project/environments", + "parent": { + "href": "/api/v2/teams", + "type": "application/json" + }, + "roles": { + "href": "/api/v2/teams/example-team/roles", "type": "application/json" }, "self": { - "href": "/api/v2/projects/my-project", + "href": "/api/v2/teams/example-team", "type": "application/json" } } }, - "_id": { - "type": "string", - "description": "The ID of this project", - "example": "57be1db38b75bf0772d11383" + "_lastModified": { + "description": "Timestamp of when the team was most recently updated", + "example": "1648672446072", + "$ref": "#/components/schemas/UnixMillis" }, - "key": { - "type": "string", - "description": "The key of this project", - "example": "project-key-123abc" + "_version": { + "type": "integer", + "description": "The team version", + "example": 3 }, - "includeInSnippetByDefault": { + "_idpSynced": { "type": "boolean", - "description": "Whether or not flags created in this project are made available to the client-side JavaScript SDK by default", + "description": "Whether the team has been synced with an external identity provider (IdP). Team sync is available to customers on an Enterprise plan.", "example": true }, - "defaultClientSideAvailability": { - "description": "Describes which client-side SDKs can use new flags by default", - "$ref": "#/components/schemas/ClientSideAvailability" + "roleAttributes": { + "description": "A map of role attributes for the team", + "example": "{\"developerProjectKey\": [\"default\"]}", + "$ref": "#/components/schemas/RoleAttributeMap" + }, + "roles": { + "description": "Paginated list of the custom roles assigned to this team. Only included if specified in the expand query parameter.", + "$ref": "#/components/schemas/TeamCustomRoles" + }, + "members": { + "description": "Details on the total count of members that belong to the team. Only included if specified in the expand query parameter.", + "$ref": "#/components/schemas/TeamMembers" + }, + "projects": { + "description": "Paginated list of the projects that the team has any write access to. Only included if specified in the expand query parameter.", + "$ref": "#/components/schemas/TeamProjects" + }, + "maintainers": { + "description": "Paginated list of the maintainers assigned to this team. Only included if specified in the expand query parameter.", + "$ref": "#/components/schemas/TeamMaintainers" + } + } + }, + "TeamCustomRole": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The key of the custom role", + "example": "role-key-123abc" }, "name": { "type": "string", - "description": "A human-friendly name for the project", - "example": "My Project" + "description": "The name of the custom role", + "example": "Example role" }, - "_access": { - "description": "Details on the allowed and denied actions for this project", - "$ref": "#/components/schemas/Access" + "projects": { + "description": "Details on the projects where team members have write privileges on at least one resource type (e.g. flags)", + "$ref": "#/components/schemas/TeamProjects" }, - "tags": { + "appliedOn": { + "description": "Timestamp of when the custom role was assigned to this team", + "example": "1648672018410", + "$ref": "#/components/schemas/UnixMillis" + } + } + }, + "TeamCustomRoles": { + "type": "object", + "properties": { + "totalCount": { + "type": "integer", + "description": "The number of custom roles assigned to this team", + "example": 1 + }, + "items": { "type": "array", - "description": "A list of tags for the project", + "description": "An array of the custom roles that have been assigned to this team", "items": { - "type": "string" + "$ref": "#/components/schemas/TeamCustomRole" + } + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/teams/example-team/roles?limit=25", + "type": "application/json" + } + } + } + } + }, + "TeamImportsRep": { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "An array of details about the members requested to be added to this team", + "items": { + "$ref": "#/components/schemas/MemberImportItem" + } + } + } + }, + "TeamMaintainers": { + "type": "object", + "properties": { + "totalCount": { + "type": "integer", + "description": "The number of maintainers of the team", + "example": 1 + }, + "items": { + "type": "array", + "description": "Details on the members that have been assigned as maintainers of the team", + "items": { + "$ref": "#/components/schemas/MemberSummary" }, "example": [ - "ops" + { + "_id": "569f183514f4432160000007", + "_links": { + "self": { + "href": "/api/v2/members/569f183514f4432160000007", + "type": "application/json" + } + }, + "email": "ariel@acme.com", + "firstName": "Ariel", + "lastName": "Flores", + "role": "reader" + } ] }, - "defaultReleasePipelineKey": { - "type": "string", - "description": "The key of the default release pipeline for this project" - }, - "environments": { - "description": "A paginated list of environments for the project. By default this field is omitted unless expanded by the client.", - "$ref": "#/components/schemas/Environments" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/teams/example-team/maintainers?limit=5", + "type": "application/json" + } + } } } }, - "ProjectPost": { + "TeamMembers": { "type": "object", - "required": [ - "name", - "key" - ], "properties": { - "name": { - "type": "string", - "description": "A human-friendly name for the project.", - "example": "My Project" - }, - "key": { - "type": "string", - "description": "A unique key used to reference the project in your code.", - "example": "project-key-123abc" - }, - "includeInSnippetByDefault": { - "type": "boolean", - "description": "Whether or not flags created in this project are made available to the client-side JavaScript SDK by default.", - "example": true - }, - "defaultClientSideAvailability": { - "description": "Controls which client-side SDKs can use new flags by default.", - "$ref": "#/components/schemas/DefaultClientSideAvailabilityPost" + "totalCount": { + "type": "integer", + "description": "The total count of members that belong to the team", + "example": 15 + } + } + }, + "TeamProjects": { + "type": "object", + "properties": { + "totalCount": { + "type": "integer", + "example": 1 }, - "tags": { + "items": { "type": "array", - "description": "Tags for the project", + "description": "Details on each project where team members have write privileges on at least one resource type (e.g. flags)", "items": { - "type": "string" + "$ref": "#/components/schemas/ProjectSummary" }, "example": [ - "ops" + { + "_links": { + "environments": { + "href": "/api/v2/projects/example-project/environments", + "type": "application/json" + }, + "self": { + "href": "/api/v2/projects/example-project", + "type": "application/json" + } + }, + "key": "project-key-123abc", + "name": "Example project" + } ] - }, - "environments": { - "type": "array", - "description": "Creates the provided environments for this project. If omitted default environments will be created instead.", - "items": { - "$ref": "#/components/schemas/EnvironmentPost" - } } } }, - "ProjectRep": { + "Teams": { "type": "object", "required": [ - "_links", - "_id", - "key", - "includeInSnippetByDefault", - "name", - "tags", - "environments" + "items" ], "properties": { + "items": { + "type": "array", + "description": "An array of teams", + "items": { + "$ref": "#/components/schemas/Team" + } + }, "_links": { "type": "object", "additionalProperties": { @@ -32825,80 +43126,117 @@ }, "description": "The location and content type of related resources", "example": { - "environments": { - "href": "/api/v2/projects/my-project/environments", - "type": "application/json" - }, "self": { - "href": "/api/v2/projects/my-project", + "href": "/api/v2/teams?expand=maintainers%2Cmembers%2Croles%2Cprojects&limit=20", "type": "application/json" } } }, + "totalCount": { + "type": "integer", + "description": "The number of teams", + "example": 1 + } + } + }, + "TimestampRep": { + "type": "object", + "properties": { + "milliseconds": { + "$ref": "#/components/schemas/UnixMillis" + }, + "seconds": { + "type": "integer", + "format": "int64" + }, + "rfc3339": { + "type": "string" + }, + "simple": { + "type": "string" + } + } + }, + "Token": { + "type": "object", + "required": [ + "_id", + "ownerId", + "memberId", + "creationDate", + "lastModified", + "_links" + ], + "properties": { "_id": { - "type": "string", - "description": "The ID of this project", - "example": "57be1db38b75bf0772d11383" + "description": "The ID of the access token", + "example": "61095542756dba551110ae21", + "$ref": "#/components/schemas/ObjectId" }, - "key": { - "type": "string", - "description": "The key of this project", - "example": "project-key-123abc" + "ownerId": { + "description": "The ID of the owner of the account for the access token", + "example": "569f514156e003339cfd3917", + "$ref": "#/components/schemas/ObjectId" }, - "includeInSnippetByDefault": { - "type": "boolean", - "description": "Whether or not flags created in this project are made available to the client-side JavaScript SDK by default", - "example": true + "memberId": { + "description": "The ID of the member who created the access token", + "example": "569f514183f2164430000002", + "$ref": "#/components/schemas/ObjectId" }, - "defaultClientSideAvailability": { - "description": "Describes which client-side SDKs can use new flags by default", - "$ref": "#/components/schemas/ClientSideAvailability" + "_member": { + "description": "Details on the member who created the access token", + "$ref": "#/components/schemas/MemberSummary" }, "name": { "type": "string", - "description": "A human-friendly name for the project", - "example": "My Project" + "description": "A human-friendly name for the access token", + "example": "Example reader token" }, - "_access": { - "description": "Details on the allowed and denied actions for this project", - "$ref": "#/components/schemas/Access" + "description": { + "type": "string", + "description": "A description for the access token", + "example": "A reader token used in testing and examples" }, - "tags": { + "creationDate": { + "description": "Timestamp of when the access token was created", + "example": "1628001602644", + "$ref": "#/components/schemas/UnixMillis" + }, + "lastModified": { + "description": "Timestamp of the last modification of the access token", + "example": "1628001602644", + "$ref": "#/components/schemas/UnixMillis" + }, + "customRoleIds": { "type": "array", - "description": "A list of tags for the project", + "description": "A list of custom role IDs to use as access limits for the access token", "items": { - "type": "string" + "$ref": "#/components/schemas/ObjectId" }, - "example": [ - "ops" - ] - }, - "defaultReleasePipelineKey": { - "type": "string", - "description": "The key of the default release pipeline for this project" + "example": [] }, - "environments": { + "inlineRole": { "type": "array", - "description": "A list of environments for the project", + "description": "An array of policy statements, with three attributes: effect, resources, actions. May be used in place of a built-in or custom role.", "items": { - "$ref": "#/components/schemas/Environment" - } - } - } - }, - "ProjectSummary": { - "type": "object", - "required": [ - "_id", - "_links", - "key", - "name" - ], - "properties": { - "_id": { + "$ref": "#/components/schemas/Statement" + }, + "example": [] + }, + "role": { "type": "string", - "description": "The ID of this project", - "example": "57be1db38b75bf0772d11383" + "description": "Built-in role for the token", + "example": "reader" + }, + "token": { + "type": "string", + "description": "The token value. When creating or resetting, contains the entire token value. Otherwise, contains the last four characters.", + "example": "1234" + }, + "serviceToken": { + "type": "boolean", + "description": "Whether this is a service token or a personal token", + "example": false }, "_links": { "type": "object", @@ -32907,170 +43245,374 @@ }, "description": "The location and content type of related resources", "example": { - "environments": { - "href": "/api/v2/projects/example-project/environments", + "parent": { + "href": "/api/v2/tokens", "type": "application/json" }, "self": { - "href": "/api/v2/projects/example-project", + "href": "/api/v2/tokens/61095542756dba551110ae21", "type": "application/json" } } }, - "key": { - "type": "string", - "description": "The project key", - "example": "project-key-123abc" + "defaultApiVersion": { + "type": "integer", + "description": "The default API version for this token", + "example": 20220603 }, - "name": { - "type": "string", - "description": "The project name", - "example": "Example project" + "lastUsed": { + "description": "Timestamp of when the access token was last used", + "example": "0", + "$ref": "#/components/schemas/UnixMillis" } } }, - "Projects": { + "TokenSummary": { "type": "object", - "required": [ - "_links", - "items" - ], "properties": { "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" - }, - "description": "A link to this resource.", - "example": { - "self": { - "href": "/api/v2/projects", - "type": "application/json" - } } }, + "_id": { + "type": "string" + }, + "name": { + "type": "string", + "description": "The name of the token", + "example": "DevOps token" + }, + "ending": { + "type": "string", + "description": "The last few characters of the token", + "example": "2345" + }, + "serviceToken": { + "type": "boolean", + "description": "Whether this is a service token", + "example": false + } + } + }, + "Tokens": { + "type": "object", + "properties": { "items": { "type": "array", - "description": "List of projects.", + "description": "An array of access tokens", "items": { - "$ref": "#/components/schemas/Project" + "$ref": "#/components/schemas/Token" + } + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" } }, "totalCount": { - "type": "integer" + "type": "integer", + "description": "The number of access tokens returned" } } }, - "RandomizationSettingsPut": { + "TreatmentInput": { "type": "object", "required": [ - "randomizationUnits" + "name", + "baseline", + "allocationPercent", + "parameters" ], "properties": { - "randomizationUnits": { + "name": { + "type": "string", + "description": "The treatment name", + "example": "Treatment 1" + }, + "baseline": { + "type": "boolean", + "description": "Whether this treatment is the baseline to compare other treatments against", + "example": true + }, + "allocationPercent": { + "type": "string", + "description": "The percentage of traffic allocated to this treatment during the iteration", + "example": "10" + }, + "parameters": { "type": "array", - "description": "An array of randomization units allowed for this project.", + "description": "Details on the flag and variation to use for this treatment", "items": { - "$ref": "#/components/schemas/RandomizationUnitInput" + "$ref": "#/components/schemas/TreatmentParameterInput" } } } }, - "RandomizationSettingsRep": { + "TreatmentParameterInput": { "type": "object", + "required": [ + "flagKey", + "variationId" + ], "properties": { - "_projectId": { + "flagKey": { "type": "string", - "description": "The project ID", - "example": "12345abcde67890fghij" + "description": "The flag key", + "example": "example-flag-for-experiment" }, - "_projectKey": { + "variationId": { "type": "string", - "description": "The project key", - "example": "project-key-123abc" - }, - "randomizationUnits": { - "type": "array", - "description": "An array of the randomization units in this project", - "items": { - "$ref": "#/components/schemas/RandomizationUnitRep" - } - }, - "_creationDate": { - "description": "Timestamp of when the experiment was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "description": "The ID of the flag variation", + "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" } } }, - "RandomizationUnitInput": { + "TreatmentRep": { "type": "object", "required": [ - "randomizationUnit", - "default", - "standardRandomizationUnit" + "name", + "allocationPercent" ], "properties": { - "randomizationUnit": { + "_id": { "type": "string", - "description": "The unit of randomization. Must match the key of an existing context kind in this project.", - "example": "user" + "description": "The treatment ID. This is the variation ID from the flag.", + "example": "122c9f3e-da26-4321-ba68-e0fc02eced58" }, - "default": { + "name": { + "type": "string", + "description": "The treatment name. This is the variation name from the flag.", + "example": "Treatment 1" + }, + "allocationPercent": { + "type": "string", + "description": "The percentage of traffic allocated to this treatment during the iteration", + "example": "10" + }, + "baseline": { "type": "boolean", - "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.", + "description": "Whether this treatment is the baseline to compare other treatments against", "example": true }, - "standardRandomizationUnit": { + "parameters": { + "type": "array", + "description": "Details on the flag and variation used for this treatment", + "items": { + "$ref": "#/components/schemas/ParameterRep" + } + } + } + }, + "TreatmentResultRep": { + "type": "object", + "properties": { + "treatmentId": { "type": "string", - "description": "One of LaunchDarkly's fixed set of standard randomization units.", + "description": "The ID of the treatment", + "example": "92b8354e-360e-4d67-8f13-fa6a46ca8077" + }, + "treatmentName": { + "type": "string", + "description": "The name of the treatment", + "example": "variation 25% off" + }, + "mean": { + "type": "number", + "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.", + "example": 0.5432525951557093 + }, + "dataMean": { + "type": "number", + "description": "The mean of the data, with no priors effecting the result.", + "example": 2.464845 + }, + "dataStdDev": { + "type": "number", + "description": "The standard deviation of the data, with no priors effecting the result.", + "example": 1e-7 + }, + "credibleInterval": { + "description": "The range of the metric's values that you should have 90% confidence in.", + "example": "{\"lower\": 0.4060771673663068, \"upper\": 0.6713222134386467}", + "$ref": "#/components/schemas/CredibleIntervalRep" + }, + "pBest": { + "type": "number", + "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", + "example": 0.6083 + }, + "relativeDifferences": { + "type": "array", + "description": "Estimates of the relative difference between this treatment's mean and the mean of each other treatment", + "items": { + "$ref": "#/components/schemas/RelativeDifferenceRep" + }, + "example": [ + { + "fromTreatmentId": "92b8354e-360e-4d67-8f13-fa6a46ca8077", + "lower": -0.13708601934659803, + "upper": 0.42655970355712425 + } + ] + }, + "units": { + "type": "integer", + "format": "int64", + "description": "The number of units exposed to this treatment that have event values, including those that are configured to default to 0", + "example": 76 + }, + "traffic": { + "type": "integer", + "format": "int64", + "description": "The number of units exposed to this treatment.", + "example": 332 + }, + "eventValuesSum": { + "type": "number", + "description": "The sum of the event values for the units exposed to this treatment.", + "example": 6234 + }, + "distribution": { + "description": "The posterior distribution of the mean of the metric in this variation.", + "$ref": "#/components/schemas/Distribution" + }, + "correlation": { + "type": "number", + "description": "The outcome-covariate correlation" + }, + "standardDeviationRatio": { + "type": "number", + "description": "The ratio of the outcome SD to covariate SD" + }, + "covariateImbalance": { + "type": "number", + "description": "The imbalance between the covariate mean for the arm and the covariate mean for the experiment" + }, + "varianceReduction": { + "type": "number", + "description": "The reduction in variance resulting from CUPED", + "example": 0.1 + }, + "model": { + "type": "string", + "description": "The model used to calculate the results. Parameters specific to this model will be defined under the field under the same name", + "example": "bayesianNormal", "enum": [ - "guest", - "guestTime", - "organization", - "request", - "user", - "userTime" + "bayesianNormal", + "bayesianBeta" ] + }, + "bayesianNormal": { + "description": "The statistical parameters relevant to the Bayesian Normal model", + "$ref": "#/components/schemas/BayesianNormalStatsRep" + }, + "bayesianBeta": { + "description": "The statistical parameters relevant to the Bayesian Beta-Binomial model", + "$ref": "#/components/schemas/BayesianBetaBinomialStatsRep" } } }, - "RandomizationUnitRep": { + "TreatmentsInput": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TreatmentInput" + } + }, + "TriggerWorkflowCollectionRep": { "type": "object", "properties": { - "randomizationUnit": { - "type": "string", - "description": "The unit of randomization. Defaults to user.", - "example": "user" + "items": { + "type": "array", + "description": "An array of flag triggers", + "items": { + "$ref": "#/components/schemas/TriggerWorkflowRep" + } }, - "standardRandomizationUnit": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + } + } + }, + "TriggerWorkflowRep": { + "type": "object", + "properties": { + "_id": { + "description": "The ID of this flag trigger", + "example": "12ab3c45de678910abc12345", + "$ref": "#/components/schemas/FeatureWorkflowId" + }, + "_version": { + "type": "integer", + "description": "The flag trigger version", + "example": 1 + }, + "_creationDate": { + "description": "Timestamp of when the flag trigger was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "_maintainerId": { "type": "string", - "description": "One of LaunchDarkly's fixed set of standard randomization units.", - "example": "user" + "description": "The ID of the flag trigger maintainer", + "example": "12ab3c45de678910abc12345" }, - "default": { + "_maintainer": { + "description": "Details on the member who maintains this flag trigger", + "$ref": "#/components/schemas/MemberSummary" + }, + "enabled": { "type": "boolean", - "description": "Whether this randomization unit is the default for experiments", + "description": "Whether the flag trigger is currently enabled", "example": true }, - "_hidden": { - "type": "boolean" + "_integrationKey": { + "type": "string", + "description": "The unique identifier of the integration for your trigger", + "example": "generic-trigger" }, - "_displayName": { + "instructions": { + "description": "Details on the action to perform when triggering", + "example": "[ { \"kind\": \"turnFlagOn\" }]", + "$ref": "#/components/schemas/Instructions" + }, + "_lastTriggeredAt": { + "description": "Timestamp of when the trigger was most recently executed", + "example": "1654114600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "_recentTriggerBodies": { + "type": "array", + "description": "Details on recent flag trigger requests.", + "items": { + "$ref": "#/components/schemas/RecentTriggerBody" + } + }, + "_triggerCount": { + "type": "integer", + "description": "Number of times the trigger has been executed", + "example": 3 + }, + "triggerURL": { "type": "string", - "description": "The display name for the randomization unit, displayed in the LaunchDarkly user interface.", - "example": "User" + "description": "The unguessable URL for this flag trigger" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" } } }, - "RateLimitedErrorRep": { + "UnauthorizedErrorRep": { "type": "object", "required": [ "code", @@ -33080,176 +43622,312 @@ "code": { "type": "string", "description": "Specific error code encountered", - "example": "rate_limited" + "example": "unauthorized" }, "message": { "type": "string", "description": "Description of the error", - "example": "You've exceeded the API rate limit. Try again later." + "example": "Invalid access token" } } }, - "RecentTriggerBody": { + "UnixMillis": { + "type": "integer", + "format": "int64" + }, + "UpdatePhaseStatusInput": { "type": "object", "properties": { - "timestamp": { - "description": "Timestamp of the incoming trigger webhook", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "status": { + "description": "Status of the phase", + "example": "Started", + "enum": [ + "NotStarted", + "ReadyToStart", + "Started", + "Paused", + "Complete" + ], + "$ref": "#/components/schemas/PhaseStatus" }, - "jsonBody": { - "type": "object", - "additionalProperties": {}, - "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." + "audiences": { + "type": "array", + "description": "Extra configuration for audiences required upon phase initialization.", + "items": { + "$ref": "#/components/schemas/ReleaserAudienceConfigInput" + } } } }, - "ReferenceRep": { + "UpdateReleasePipelineInput": { "type": "object", "required": [ - "path", - "hunks" + "name", + "phases" ], "properties": { - "path": { + "description": { "type": "string", - "description": "File path of the reference", - "example": "/main/index.js" + "description": "The release pipeline description", + "example": "Standard pipeline to roll out to production" }, - "hint": { + "name": { "type": "string", - "description": "Programming language used in the file", - "example": "javascript" + "description": "The name of the release pipeline", + "example": "Standard Pipeline" }, - "hunks": { + "phases": { "type": "array", + "description": "A logical grouping of one or more environments that share attributes for rolling out changes", "items": { - "$ref": "#/components/schemas/HunkRep" + "$ref": "#/components/schemas/CreatePhaseInput" } + }, + "tags": { + "type": "array", + "description": "A list of tags for this release pipeline", + "items": { + "type": "string" + }, + "example": [ + "example-tag" + ] } } }, - "RelativeDifferenceRep": { + "UpsertContextKindPayload": { "type": "object", + "required": [ + "name" + ], "properties": { - "upper": { - "type": "number", - "description": "An upper bound of the relative difference between the treatment and the fromTreatmentId", - "example": 0.42655970355712425 - }, - "lower": { - "type": "number", - "description": "A lower bound of the relative difference between the treatment and the fromTreatmentId", - "example": -0.13708601934659803 + "name": { + "type": "string", + "description": "The context kind name", + "example": "organization" }, - "fromTreatmentId": { + "description": { "type": "string", - "description": "The treatment ID of the treatment against which the relative difference is calculated", - "example": "92b8354e-360e-4d67-8f13-fa6a46ca8077" + "description": "The context kind description", + "example": "An example context kind for organizations" + }, + "hideInTargeting": { + "type": "boolean", + "description": "Alias for archived.", + "example": false + }, + "archived": { + "type": "boolean", + "description": "Whether the context kind is archived. Archived context kinds are unavailable for targeting.", + "example": false + }, + "version": { + "type": "integer", + "description": "The context kind version. If not specified when the context kind is created, defaults to 1.", + "example": 1 } } }, - "RelayAutoConfigCollectionRep": { + "UpsertFlagDefaultsPayload": { "type": "object", "required": [ - "items" + "tags", + "temporary", + "booleanDefaults", + "defaultClientSideAvailability" ], "properties": { - "items": { + "tags": { "type": "array", - "description": "An array of Relay Proxy configurations", + "description": "A list of default tags for each flag", "items": { - "$ref": "#/components/schemas/RelayAutoConfigRep" - } + "type": "string" + }, + "example": [ + "tag-1", + "tag-2" + ] + }, + "temporary": { + "type": "boolean", + "description": "Whether the flag should be temporary by default", + "example": true + }, + "booleanDefaults": { + "$ref": "#/components/schemas/BooleanFlagDefaults" + }, + "defaultClientSideAvailability": { + "description": "Which client-side SDK types can use this flag by default.", + "$ref": "#/components/schemas/DefaultClientSideAvailability" } } }, - "RelayAutoConfigPost": { + "UpsertResponseRep": { "type": "object", - "required": [ - "name", - "policy" - ], "properties": { - "name": { + "status": { "type": "string", - "description": "A human-friendly name for the Relay Proxy configuration" + "description": "The status of the create or update operation", + "example": "success" }, - "policy": { - "type": "array", - "description": "A description of what environments and projects the Relay Proxy should include or exclude. To learn more, read [Write an inline policy](https://docs.launchdarkly.com/sdk/relay-proxy/automatic-configuration#write-an-inline-policy).", - "items": { - "$ref": "#/components/schemas/Statement" - } + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" } } }, - "RelayAutoConfigRep": { + "UrlMatcher": { + "type": "object", + "additionalProperties": {} + }, + "UrlMatchers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UrlMatcher" + } + }, + "UrlPost": { "type": "object", - "required": [ - "_id", - "name", - "policy", - "fullKey", - "displayKey", - "creationDate", - "lastModified" - ], "properties": { - "_id": { - "description": "The ID of the Relay Proxy configuration", - "example": "12ab3c45de678910abc12345", - "$ref": "#/components/schemas/ObjectId" + "kind": { + "type": "string", + "enum": [ + "exact", + "canonical", + "substring", + "regex" + ] }, - "_creator": { - "description": "Details on the member who created this Relay Proxy configuration", - "$ref": "#/components/schemas/MemberSummary" + "url": { + "type": "string" }, - "_access": { - "description": "Details on the allowed and denied actions for this Relay Proxy configuration", - "$ref": "#/components/schemas/Access" + "substring": { + "type": "string" }, - "name": { + "pattern": { + "type": "string" + } + } + }, + "User": { + "type": "object", + "properties": { + "key": { "type": "string", - "description": "A human-friendly name for the Relay Proxy configuration", - "example": "Relay Proxy Demo Config" + "description": "The user key. This is the only mandatory user attribute.", + "example": "user-key-123abc" }, - "policy": { - "type": "array", - "description": "A description of what environments and projects the Relay Proxy should include or exclude", - "items": { - "$ref": "#/components/schemas/Statement" - } + "secondary": { + "type": "string", + "description": "If provided, used with the user key to generate a variation in percentage rollouts", + "example": "2398127" }, - "fullKey": { + "ip": { "type": "string", - "description": "The Relay Proxy configuration key" + "description": "The user's IP address", + "example": "10.10.10.10" }, - "displayKey": { + "country": { "type": "string", - "description": "The last few characters of the Relay Proxy configuration key, displayed in the LaunchDarkly UI", - "example": "7f30" + "description": "The user's country", + "example": "United States" }, - "creationDate": { - "description": "Timestamp of when the Relay Proxy configuration was created", - "example": "1628001602644", - "$ref": "#/components/schemas/UnixMillis" + "email": { + "type": "string", + "description": "The user's email", + "example": "sandy@example.com" }, - "lastModified": { - "description": "Timestamp of when the Relay Proxy configuration was most recently modified", - "example": "1628001602644", - "$ref": "#/components/schemas/UnixMillis" + "firstName": { + "type": "string", + "description": "The user's first name", + "example": "Sandy" + }, + "lastName": { + "type": "string", + "description": "The user's last name", + "example": "Smith" + }, + "avatar": { + "type": "string", + "description": "An absolute URL to an avatar image.", + "example": "http://example.com/avatar.png" + }, + "name": { + "type": "string", + "description": "The user's full name", + "example": "Sandy Smith" + }, + "anonymous": { + "type": "boolean", + "description": "Whether the user is anonymous. If true, this user does not appear on the Contexts list in the LaunchDarkly user interface.", + "example": false + }, + "custom": { + "type": "object", + "additionalProperties": {}, + "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." + }, + "privateAttrs": { + "type": "array", + "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.", + "items": { + "type": "string" + } } } }, - "Release": { + "UserAttributeNamesRep": { + "type": "object", + "properties": { + "private": { + "type": "array", + "description": "private attributes", + "items": { + "type": "string" + }, + "example": [ + "SSN", + "credit_card_number" + ] + }, + "custom": { + "type": "array", + "description": "custom attributes", + "items": { + "type": "string" + }, + "example": [ + "Age", + "FavoriteFood", + "FavoriteColor" + ] + }, + "standard": { + "type": "array", + "description": "standard attributes", + "items": { + "type": "string" + }, + "example": [ + "key", + "ip", + "firstName", + "lastName", + "country", + "anonymous" + ] + } + } + }, + "UserFlagSetting": { "type": "object", "required": [ - "name", - "releasePipelineKey", - "releasePipelineDescription", - "phases", - "_version" + "_links", + "_value", + "setting" ], "properties": { "_links": { @@ -33257,2658 +43935,3507 @@ "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" - }, - "name": { - "type": "string", - "description": "The release pipeline name", - "example": "Example release pipeline" - }, - "releasePipelineKey": { - "type": "string", - "description": "The release pipeline key", - "example": "example-release-pipeline" + "description": "The location and content type of related resources.", + "example": { + "sort.order": { + "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order", + "type": "application/json" + } + } }, - "releasePipelineDescription": { - "type": "string", - "description": "The release pipeline description", - "example": "Our release pipeline for typical testing and deployment" + "_value": { + "description": "The value of the flag variation that the user receives. If there is no defined default rule, this is null.", + "example": "true" }, - "phases": { - "type": "array", - "description": "An ordered list of the release pipeline phases", - "items": { - "$ref": "#/components/schemas/ReleasePhase" - } + "setting": { + "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.", + "example": "null" }, - "_version": { - "type": "integer", - "description": "The release version", - "example": 1 + "reason": { + "description": "Contains information about why that variation was selected.", + "example": "{\"kind\": \"RULE_MATCH\"}", + "$ref": "#/components/schemas/EvaluationReason" } } }, - "ReleaseAudience": { + "UserFlagSettings": { "type": "object", "required": [ - "environment", - "name" + "items", + "_links" ], "properties": { - "environment": { - "description": "Details about the environment", - "$ref": "#/components/schemas/EnvironmentSummary" + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/UserFlagSetting" + }, + "description": "An array of flag settings for the user", + "example": { + "alternate.page": { + "_links": { + "self": { + "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/alternate.page", + "type": "application/json" + } + }, + "_value": false, + "setting": null + }, + "sort.order": { + "_links": { + "self": { + "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order", + "type": "application/json" + } + }, + "_value": true, + "setting": null + } + } }, - "name": { - "type": "string", - "description": "The release phase name", - "example": "Phase 1 - Testing" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "self": { + "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags", + "type": "application/json" + } + } } } }, - "ReleasePhase": { + "UserRecord": { "type": "object", - "required": [ - "_id", - "_name", - "complete", - "_creationDate", - "_audiences" - ], "properties": { - "_id": { - "type": "string", - "description": "The phase ID", - "example": "1234a56b7c89d012345e678f" - }, - "_name": { + "lastPing": { "type": "string", - "description": "The release phase name", - "example": "Phase 1 - Testing" + "format": "date-time", + "description": "Timestamp of the last time this user was seen", + "example": "2022-06-28T23:21:29.176609596Z" }, - "complete": { - "type": "boolean", - "description": "Whether this phase is complete", - "example": true + "environmentId": { + "description": "The environment ID", + "example": "1234a56b7c89d012345e678f", + "$ref": "#/components/schemas/ObjectId" }, - "_creationDate": { - "description": "Timestamp of when the release phase was created", - "example": "1684262711507", - "$ref": "#/components/schemas/UnixMillis" + "ownerId": { + "description": "The ID of the member who is the owner for this account", + "example": "12ab3c45de678910abc12345", + "$ref": "#/components/schemas/ObjectId" }, - "_completionDate": { - "description": "Timestamp of when the release phase was completed", - "example": "1684262711509", - "$ref": "#/components/schemas/UnixMillis" + "user": { + "description": "Details on the user", + "$ref": "#/components/schemas/User" }, - "_completedBy": { - "description": "Details about how this phase was marked as complete", - "$ref": "#/components/schemas/CompletedBy" + "sortValue": { + "description": "If this record is returned as part of a list, the value used to sort the list. This is only included when the sort query parameter is specified. It is a time, in Unix milliseconds, if the sort is by lastSeen. It is a user key if the sort is by userKey.", + "example": "user-key-123abc" }, - "_audiences": { - "type": "array", - "description": "A logical grouping of one or more environments that share attributes for rolling out changes", - "items": { - "$ref": "#/components/schemas/ReleaseAudience" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "/api/v2/users/my-project/my-environment", + "type": "application/json" + }, + "self": { + "href": "/api/v2/users/my-project/my-environment/my-user", + "type": "application/json" + }, + "settings": { + "href": "/api/v2/users/my-project/my-environment/my-user/flags", + "type": "text/html" + }, + "site": { + "href": "/my-project/my-environment/users/my-user", + "type": "text/html" + } } + }, + "_access": { + "description": "Details on the allowed and denied actions for this user", + "$ref": "#/components/schemas/Access" } } }, - "ReleasePipeline": { + "UserSegment": { "type": "object", "required": [ - "createdAt", - "key", "name", - "phases" + "tags", + "creationDate", + "lastModifiedDate", + "key", + "_links", + "rules", + "version", + "deleted", + "generation" ], "properties": { - "createdAt": { + "name": { "type": "string", - "format": "date-time", - "description": "Timestamp of when the release pipeline was created", - "example": "1684262711507" + "description": "A human-friendly name for the segment.", + "example": "Example segment" }, "description": { "type": "string", - "description": "The release pipeline description", - "example": "Standard pipeline to roll out to production" + "description": "A description of the segment's purpose. Defaults to null and is omitted in the response if not provided.", + "example": "Bundle our sample customers together" }, - "key": { - "type": "string", - "description": "The release pipeline key", - "example": "standard-pipeline" + "tags": { + "type": "array", + "description": "Tags for the segment. Defaults to an empty array.", + "items": { + "type": "string" + }, + "example": [ + "testing" + ] }, - "name": { + "creationDate": { + "description": "Timestamp of when the segment was created", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "lastModifiedDate": { + "description": "Timestamp of when the segment was last modified", + "example": "1654104600000", + "$ref": "#/components/schemas/UnixMillis" + }, + "key": { "type": "string", - "description": "The release pipeline name", - "example": "Standard Pipeline" + "description": "A unique key used to reference the segment", + "example": "segment-key-123abc" }, - "phases": { + "included": { "type": "array", - "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.", + "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.", "items": { - "$ref": "#/components/schemas/Phase" - } + "type": "string" + }, + "example": [ + "user-key-123abc" + ] }, - "tags": { + "excluded": { "type": "array", - "description": "A list of the release pipeline's tags", + "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.", "items": { "type": "string" }, "example": [ - "example-tag" + "user-key-123abc" ] }, - "_version": { - "type": "integer", - "description": "The release pipeline version", - "example": 1 + "includedContexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTarget" + } }, - "_access": { - "description": "Details on the allowed and denied actions for this release pipeline", - "$ref": "#/components/schemas/Access" - } - } - }, - "ReleasePipelineCollection": { - "type": "object", - "required": [ - "items", - "totalCount" - ], - "properties": { - "items": { + "excludedContexts": { "type": "array", - "description": "An array of release pipelines", "items": { - "$ref": "#/components/schemas/ReleasePipeline" + "$ref": "#/components/schemas/SegmentTarget" } }, - "totalCount": { - "type": "integer", - "description": "Total number of release pipelines", - "example": 1 - } - } - }, - "RepositoryCollectionRep": { - "type": "object", - "required": [ - "_links", - "items" - ], - "properties": { "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" - } + }, + "description": "The location and content type of related resources" }, - "items": { + "rules": { "type": "array", - "description": "An array of repositories", + "description": "An array of the targeting rules for this segment.", "items": { - "$ref": "#/components/schemas/RepositoryRep" - } - } - } - }, - "RepositoryRep": { - "type": "object", - "required": [ - "name", - "type", - "defaultBranch", - "enabled", - "version", - "_links" - ], - "properties": { - "name": { - "type": "string", - "description": "The repository name", - "example": "LaunchDarkly-Docs" - }, - "sourceLink": { - "type": "string", - "description": "A URL to access the repository", - "example": "https://github.com/launchdarkly/LaunchDarkly-Docs" - }, - "commitUrlTemplate": { - "type": "string", - "description": "A template for constructing a valid URL to view the commit", - "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/commit/${sha}" - }, - "hunkUrlTemplate": { - "type": "string", - "description": "A template for constructing a valid URL to view the hunk", - "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/blob/${sha}/${filePath}#L${lineNumber}" - }, - "type": { - "type": "string", - "description": "The type of repository", - "example": "github", - "enum": [ - "bitbucket", - "custom", - "github", - "gitlab" + "$ref": "#/components/schemas/UserSegmentRule" + }, + "example": [ + { + "_id": "1234a56b7c89d012345e678f", + "clauses": [ + { + "_id": "12ab3c45de678910fab12345", + "attribute": "email", + "negate": false, + "op": "endsWith", + "values": [ + ".edu" + ] + } + ] + } ] }, - "defaultBranch": { - "type": "string", - "description": "The repository's default branch", - "example": "main" - }, - "enabled": { - "type": "boolean", - "description": "Whether or not a repository is enabled for code reference scanning", - "example": true - }, "version": { "type": "integer", - "description": "The version of the repository's saved information", - "example": 3 - }, - "branches": { - "type": "array", - "description": "An array of the repository's branches that have been scanned for code references", - "items": { - "$ref": "#/components/schemas/BranchRep" - } + "description": "Version of the segment", + "example": 1 }, - "_links": { - "type": "object", - "additionalProperties": {} + "deleted": { + "type": "boolean", + "description": "Whether the segment has been deleted", + "example": false }, "_access": { "$ref": "#/components/schemas/Access" - } - } - }, - "ResourceAccess": { - "type": "object", - "properties": { - "action": { - "$ref": "#/components/schemas/ActionIdentifier" }, - "resource": { - "type": "string" - } - } - }, - "ResourceIDResponse": { - "type": "object", - "properties": { - "kind": { - "type": "string" + "_flags": { + "type": "array", + "description": "A list of flags targeting this segment. Only included when getting a single segment, using the getSegment endpoint.", + "items": { + "$ref": "#/components/schemas/FlagListingRep" + } }, - "projectKey": { - "type": "string" + "unbounded": { + "type": "boolean", + "description": "Whether this is a standard segment (false) or a big segment (true). 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.", + "example": false }, - "environmentKey": { - "type": "string" + "unboundedContextKind": { + "type": "string", + "description": "For big segments, the targeted context kind." }, - "flagKey": { - "type": "string" + "generation": { + "type": "integer", + "description": "For big segments, how many times this segment has been created." }, - "key": { - "type": "string" - } - } - }, - "ResourceId": { - "type": "object", - "properties": { - "environmentKey": { - "type": "string", - "description": "The environment key", - "example": "environment-key-123abc" + "_unboundedMetadata": { + "description": "Details on the external data store backing this segment. Only applies to big segments.", + "$ref": "#/components/schemas/SegmentMetadata" }, - "flagKey": { + "_external": { "type": "string", - "description": "Deprecated, use key instead", - "deprecated": true + "description": "The external data store backing this segment. Only applies to synced segments.", + "example": "amplitude" }, - "key": { + "_externalLink": { "type": "string", - "description": "The key of the flag or segment", - "example": "segment-key-123abc" - }, - "kind": { - "description": "The type of resource, flag or segment", - "example": "segment", - "$ref": "#/components/schemas/ResourceKind" + "description": "The URL for the external data store backing this segment. Only applies to synced segments.", + "example": "https://analytics.amplitude.com/org/1234/cohort/123abc" }, - "projectKey": { - "type": "string", - "description": "The project key", - "example": "project-key-123abc" + "_importInProgress": { + "type": "boolean", + "description": "Whether an import is currently in progress for the specified segment. Only applies to big segments.", + "example": false } } }, - "ResourceKind": { - "type": "string" - }, - "ReviewOutput": { + "UserSegmentRule": { "type": "object", "required": [ - "_id", - "kind" + "clauses" ], "properties": { "_id": { "type": "string" }, - "kind": { - "type": "string" + "clauses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Clause" + } }, - "creationDate": { - "$ref": "#/components/schemas/UnixMillis" + "weight": { + "type": "integer" }, - "comment": { + "rolloutContextKind": { "type": "string" }, - "memberId": { + "bucketBy": { "type": "string" }, - "serviceTokenId": { + "description": { "type": "string" } } }, - "ReviewResponse": { - "type": "object", - "required": [ - "_id", - "kind" - ], - "properties": { - "_id": { - "type": "string", - "description": "The approval request ID", - "example": "12ab3c45de678910abc12345" - }, - "kind": { - "type": "string", - "description": "The type of review action to take", - "example": "approve", - "enum": [ - "approve", - "decline", - "comment" - ] - }, - "creationDate": { - "description": "Timestamp of when the request was created", - "example": "1653606981113", - "$ref": "#/components/schemas/UnixMillis" - }, - "comment": { - "type": "string", - "description": "A comment describing the approval response", - "example": "Approved!" - }, - "memberId": { - "type": "string", - "description": "ID of account member that reviewed request", - "example": "12ab3c45de678910abc12345" - }, - "serviceTokenId": { - "type": "string", - "description": "ID of account service token that reviewed request", - "example": "12ab3c45de678910abc12345" - } - } - }, - "RoleType": { - "type": "string" - }, - "Rollout": { + "UserSegments": { "type": "object", "required": [ - "variations" + "items", + "_links" ], "properties": { - "variations": { + "items": { "type": "array", + "description": "An array of segments", "items": { - "$ref": "#/components/schemas/WeightedVariation" + "$ref": "#/components/schemas/UserSegment" } }, - "experimentAllocation": { - "$ref": "#/components/schemas/ExperimentAllocationRep" - }, - "seed": { - "type": "integer" - }, - "bucketBy": { - "type": "string" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "contextKind": { - "type": "string" + "totalCount": { + "type": "integer", + "description": "The total number of segments" } } }, - "RootResponse": { + "Users": { "type": "object", "required": [ - "links" + "totalCount", + "items" ], "properties": { - "links": { + "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources", + "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" + } } - } - } - }, - "Rule": { - "type": "object", - "required": [ - "clauses", - "trackEvents" - ], - "properties": { - "_id": { - "type": "string", - "description": "The flag rule ID" }, - "variation": { + "totalCount": { "type": "integer", - "description": "The index of the variation, from the array of variations for this flag" - }, - "rollout": { - "description": "Details on the percentage rollout, if it exists", - "$ref": "#/components/schemas/Rollout" + "description": "The total number of users in the environment", + "example": 245 }, - "clauses": { + "items": { "type": "array", - "description": "An array of clauses used for individual targeting based on attributes", + "description": "Details on the users", "items": { - "$ref": "#/components/schemas/Clause" + "$ref": "#/components/schemas/UserRecord" } - }, - "trackEvents": { - "type": "boolean", - "description": "Whether LaunchDarkly tracks events for this rule" - }, - "description": { - "type": "string", - "description": "The rule description" - }, - "ref": { - "type": "string" } } }, - "RuleClause": { - "type": "object", - "properties": { - "attribute": { - "type": "string", - "description": "The attribute the rule applies to, for example, last name or email address" - }, - "op": { - "type": "string", - "description": "The operator to apply to the given attribute", - "enum": [ - "in", - "endsWith", - "startsWith", - "matches", - "contains", - "lessThan", - "lessThanOrEqual", - "greaterThan", - "greaterThanOrEqual", - "before", - "after", - "segmentMatch", - "semVerEqual", - "semVerLessThan", - "semVerGreaterThan" - ] - }, - "negate": { - "type": "boolean", - "description": "Whether the operator should be negated" - } - } - }, - "ScheduleKind": { - "type": "string" - }, - "SdkListRep": { - "type": "object", - "required": [ - "_links", - "sdks" - ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" - }, - "sdks": { - "type": "array", - "description": "The list of SDK names", - "items": { - "type": "string" - }, - "example": [ - "Android", - "Java", - "Node.js" - ] - } - } - }, - "SdkVersionListRep": { + "UsersRep": { "type": "object", "required": [ - "_links", - "sdkVersions" + "totalCount", + "items" ], "properties": { "_links": { "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" - }, - "sdkVersions": { - "type": "array", - "description": "The list of SDK names and versions", - "items": { - "$ref": "#/components/schemas/SdkVersionRep" + "additionalProperties": { + "$ref": "#/components/schemas/Link" }, - "example": [ - { - "sdk": "Android", - "version": "3.1.2" - }, - { - "sdk": "Android", - "version": "3.1.5" + "description": "The location and content type of related resources", + "example": { + "next": { + "href": "/api/v2/users/my-project/my-environment?after=1647993600000&limit=20&searchAfter=my-user", + "type": "application/json" }, - { - "sdk": "C", - "version": "2.4.6" + "self": { + "href": "/api/v2/users/my-project/my-environment?after=1647993600000&limit=20", + "type": "application/json" } - ] + } + }, + "totalCount": { + "type": "integer", + "description": "The total number of users in the environment", + "example": 245 + }, + "items": { + "type": "array", + "description": "Details on the users", + "items": { + "$ref": "#/components/schemas/UserRecord" + } } } }, - "SdkVersionRep": { + "ValuePut": { "type": "object", - "required": [ - "sdk", - "version" - ], "properties": { - "sdk": { - "type": "string", - "description": "The SDK name, or \"Unknown\"" + "setting": { + "description": "The variation value to set for the context. Must match the flag's variation type.", + "example": "existing_variation_value_to_use" }, - "version": { + "comment": { "type": "string", - "description": "The version number, or \"Unknown\"" + "description": "Optional comment describing the change", + "example": "make sure this context experiences a specific variation" } } }, - "SegmentBody": { + "Variation": { "type": "object", "required": [ - "name", - "key" + "value" ], "properties": { - "name": { + "_id": { "type": "string", - "description": "A human-friendly name for the segment", - "example": "Example segment" + "description": "The ID of the variation. Leave empty when you are creating a flag." }, - "key": { - "type": "string", - "description": "A unique key used to reference the segment", - "example": "segment-key-123abc" + "value": { + "description": "The value of the variation. For boolean flags, this must be true or false. For multivariate flags, this may be a string, number, or JSON object." }, "description": { "type": "string", - "description": "A description of the segment's purpose", - "example": "Bundle our sample customers together" - }, - "tags": { - "type": "array", - "description": "Tags for the segment", - "items": { - "type": "string" - }, - "example": [ - "testing" - ] - }, - "unbounded": { - "type": "boolean", - "description": "Whether to create a standard segment (false) or a big segment (true). 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.", - "example": false + "description": "Description of the variation. Defaults to an empty string, but is omitted from the response if not set." }, - "unboundedContextKind": { + "name": { "type": "string", - "description": "For big segments, the targeted context kind.", - "example": "device" + "description": "A human-friendly name for the variation. Defaults to an empty string, but is omitted from the response if not set." } } }, - "SegmentId": { - "type": "string" - }, - "SegmentMetadata": { + "VariationOrRolloutRep": { "type": "object", "properties": { - "envId": { - "type": "string" + "variation": { + "type": "integer", + "description": "The index of the variation, from the array of variations for this flag" }, - "segmentId": { - "$ref": "#/components/schemas/SegmentId" + "rollout": { + "description": "Details on the percentage rollout, if it exists", + "$ref": "#/components/schemas/Rollout" + } + } + }, + "VariationSummary": { + "type": "object", + "required": [ + "rules", + "nullRules", + "targets", + "contextTargets" + ], + "properties": { + "rules": { + "type": "integer" }, - "version": { + "nullRules": { "type": "integer" }, - "includedCount": { + "targets": { "type": "integer" }, - "excludedCount": { + "contextTargets": { "type": "integer" }, - "lastModified": { - "$ref": "#/components/schemas/UnixMillis" + "isFallthrough": { + "type": "boolean" }, - "deleted": { + "isOff": { "type": "boolean" + }, + "rollout": { + "type": "integer" + }, + "bucketBy": { + "type": "string" } } }, - "SegmentTarget": { + "VersionsRep": { "type": "object", + "required": [ + "validVersions", + "latestVersion", + "currentVersion" + ], "properties": { - "values": { + "validVersions": { "type": "array", + "description": "A list of all valid API versions. To learn more about our versioning, read [Versioning](https://apidocs.launchdarkly.com/#section/Overview/Versioning).", "items": { - "type": "string" + "$ref": "#/components/schemas/DateVersion" } }, - "contextKind": { - "type": "string" + "latestVersion": { + "description": "The most recently released version of the API", + "example": "20220603", + "$ref": "#/components/schemas/DateVersion" + }, + "currentVersion": { + "description": "The version of the API currently in use. Typically this is the API version specified for your access token. If you add the LD-API-Version: beta header to your request, this will be equal to the latestVersion.", + "example": "20220603", + "$ref": "#/components/schemas/DateVersion" + }, + "beta": { + "type": "boolean", + "description": "Whether the version of the API currently is use is a beta version. This is always true if you add the LD-API-Version: beta header to your request.", + "example": false } } }, - "SegmentUserList": { + "Webhook": { "type": "object", + "required": [ + "_links", + "_id", + "url", + "on", + "tags" + ], "properties": { - "add": { + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" + }, + "_id": { + "type": "string", + "description": "The ID of this webhook", + "example": "57be1db38b75bf0772d11384" + }, + "name": { + "type": "string", + "description": "A human-readable name for this webhook", + "example": "Example hook" + }, + "url": { + "type": "string", + "description": "The URL to which LaunchDarkly sends an HTTP POST payload for this webhook", + "example": "http://www.example.com" + }, + "secret": { + "type": "string", + "description": "The secret for this webhook", + "example": "frobozz" + }, + "statements": { "type": "array", + "description": "Represents a Custom role policy, defining a resource kinds filter the webhook responds to.", "items": { - "type": "string" + "$ref": "#/components/schemas/Statement" } }, - "remove": { + "on": { + "type": "boolean", + "description": "Whether or not this webhook is enabled", + "example": true + }, + "tags": { "type": "array", + "description": "List of tags for this webhook", "items": { "type": "string" - } + }, + "example": [ + "examples" + ] + }, + "_access": { + "description": "Details on the allowed and denied actions for this webhook", + "$ref": "#/components/schemas/Access" } } }, - "SegmentUserState": { + "Webhooks": { "type": "object", + "required": [ + "_links", + "items" + ], "properties": { - "included": { - "$ref": "#/components/schemas/SegmentUserList" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" }, - "excluded": { - "$ref": "#/components/schemas/SegmentUserList" + "items": { + "type": "array", + "description": "An array of webhooks", + "items": { + "$ref": "#/components/schemas/Webhook" + } } } }, - "Series": { + "WeightedVariation": { "type": "object", "required": [ - "time", - "value" + "variation", + "weight" ], "properties": { - "time": { - "type": "integer", - "format": "int64", - "description": "The timestamp", - "example": 1676332800000 + "variation": { + "type": "integer" }, - "value": { - "type": "number", - "description": "The value for the given timestamp", - "example": 92 + "weight": { + "type": "integer" + }, + "_untracked": { + "type": "boolean" } } }, - "SeriesIntervalsRep": { + "WorkflowTemplateMetadata": { "type": "object", - "required": [ - "series", - "_links" - ], "properties": { - "series": { + "parameters": { "type": "array", - "description": "An array of timestamps and values for a given meter", "items": { - "$ref": "#/components/schemas/Series" + "$ref": "#/components/schemas/WorkflowTemplateParameter" } - }, - "_links": { - "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" } } }, - "SeriesListRep": { + "WorkflowTemplateOutput": { "type": "object", "required": [ - "_links", - "metadata", - "series" + "_id", + "_key", + "_creationDate", + "_ownerId", + "_maintainerId", + "_links" ], "properties": { + "_id": { + "type": "string" + }, + "_key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "_creationDate": { + "$ref": "#/components/schemas/UnixMillis" + }, + "_ownerId": { + "type": "string" + }, + "_maintainerId": { + "type": "string" + }, "_links": { "type": "object", - "additionalProperties": {}, - "description": "The location and content type of related resources" - }, - "metadata": { - "type": "array", - "description": "Metadata about each series", - "items": { - "$ref": "#/components/schemas/SeriesMetadataRep" + "additionalProperties": { + "$ref": "#/components/schemas/Link" } }, - "series": { + "description": { + "type": "string" + }, + "stages": { "type": "array", - "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 metadata.", "items": { - "$ref": "#/components/schemas/SeriesTimeSliceRep" - }, - "example": [ - { - "0": 11, - "1": 15, - "time": 1677888000000 - } - ] + "$ref": "#/components/schemas/StageOutput" + } } } }, - "SeriesMetadataRep": { - "type": "object", - "additionalProperties": {} - }, - "SeriesTimeSliceRep": { - "type": "object", - "additionalProperties": { - "type": "integer" - } - }, - "SlicedResultsRep": { + "WorkflowTemplateParameter": { "type": "object", "properties": { - "attribute": { - "type": "string", - "description": "An attribute that results are sliced by", - "example": "country" + "_id": { + "description": "The ID of the condition or instruction referenced by this parameter", + "$ref": "#/components/schemas/ObjectId" }, - "attributeValue": { + "path": { "type": "string", - "description": "Attribute Value for 'attribute'", - "example": "Canada" + "description": "The path of the property to parameterize, relative to its parent condition or instruction" }, - "treatmentResults": { - "type": "array", - "description": "A list of the results for each treatment", - "items": { - "$ref": "#/components/schemas/TreatmentResultRep" - } + "default": { + "description": "The default value of the parameter and other relevant metadata", + "$ref": "#/components/schemas/ParameterDefault" + }, + "valid": { + "type": "boolean", + "description": "Whether the default value is valid for the target flag and environment" } } }, - "SourceEnv": { + "WorkflowTemplatesListingOutputRep": { "type": "object", + "required": [ + "items" + ], "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" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowTemplateOutput" + } } } }, - "StageInput": { + "createCopyFlagConfigApprovalRequestRequest": { "type": "object", + "required": [ + "description", + "source" + ], "properties": { - "name": { + "comment": { "type": "string", - "description": "The stage name", - "example": "10% rollout on day 1" + "description": "Optional comment describing the approval request", + "example": "optional comment" }, - "executeConditionsInSequence": { - "type": "boolean", - "description": "Whether to execute the conditions in sequence for the given stage", - "example": true + "description": { + "type": "string", + "description": "A brief description of your changes", + "example": "copy flag settings to another environment" }, - "conditions": { + "notifyMemberIds": { "type": "array", - "description": "An array of conditions for the stage", + "description": "An array of member IDs. These members are notified to review the approval request.", "items": { - "$ref": "#/components/schemas/ConditionInput" + "type": "string" }, "example": [ - { - "kind": "schedule", - "scheduleKind": "relative", - "waitDuration": 2, - "waitDurationUnit": "calendarDay" - } + "1234a56b7c89d012345e678f" ] }, - "action": { - "description": "An instructions field containing an array of instructions for the stage. Each object in the array uses the semantic patch format for updating a feature flag.", - "example": "{\"instructions\": [{ \"kind\": \"turnFlagOn\"}]}", - "$ref": "#/components/schemas/ActionInput" - } - } - }, - "StageOutput": { - "type": "object", - "required": [ - "_id", - "conditions", - "action", - "_execution" - ], - "properties": { - "_id": { - "type": "string", - "description": "The ID of this stage", - "example": "12ab3c45de678910abc12345" + "notifyTeamKeys": { + "type": "array", + "description": "An array of team keys. The members of these teams are notified to review the approval request.", + "items": { + "type": "string" + }, + "example": [ + "example-reviewer-team" + ] }, - "name": { - "type": "string", - "description": "The stage name", - "example": "10% rollout on day 1" + "source": { + "description": "The flag to copy", + "$ref": "#/components/schemas/sourceFlag" }, - "conditions": { + "includedActions": { "type": "array", - "description": "An array of conditions for the stage", + "description": "Optional list of the flag changes to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If neither are included, then all flag changes will be copied.", "items": { - "$ref": "#/components/schemas/ConditionOutput" + "type": "string", + "enum": [ + "updateOn", + "updateFallthrough", + "updateOffVariation", + "updateRules", + "updateTargets", + "updatePrerequisites" + ] }, "example": [ - { - "_execution": { - "status": "completed" - }, - "id": "12ab3c45de678910abc12345", - "kind": "schedule", - "scheduleKind": "relative", - "waitDuration": 2, - "waitDurationUnit": "calendarDay" - } + "updateOn" + ] + }, + "excludedActions": { + "type": "array", + "description": "Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If neither are included, then all flag changes will be copied.", + "items": { + "type": "string", + "enum": [ + "updateOn", + "updateFallthrough", + "updateOffVariation", + "updateRules", + "updateTargets", + "updatePrerequisites" + ] + }, + "example": [ + "updateOn" ] - }, - "action": { - "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.", - "example": "{ \"kind\": \"patch\", \"instructions\": [{ \"kind\": \"turnFlagOn\"}] }", - "$ref": "#/components/schemas/ActionOutput" - }, - "_execution": { - "description": "Details on the execution of this stage", - "example": "{ \"status\": \"completed\" }", - "$ref": "#/components/schemas/ExecutionOutput" } } }, - "Statement": { + "createFlagConfigApprovalRequestRequest": { "type": "object", "required": [ - "effect" + "description", + "instructions" ], "properties": { - "resources": { + "comment": { + "type": "string", + "description": "Optional comment describing the approval request", + "example": "optional comment" + }, + "description": { + "type": "string", + "description": "A brief description of the changes you're requesting", + "example": "Requesting to update targeting" + }, + "instructions": { + "description": "List of instructions in semantic patch format to be applied to the feature flag. Review the [Update feature flag](/tag/Feature-flags) documentation for details on available instructions.", + "example": "[{\"kind\": \"addTargets\", \"values\": [ \"context-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]", + "$ref": "#/components/schemas/Instructions" + }, + "notifyMemberIds": { "type": "array", - "description": "Resource specifier strings", + "description": "An array of member IDs. These members are notified to review the approval request.", "items": { "type": "string" }, "example": [ - "proj/*:env/*;qa_*:/flag/*" + "1234a56b7c89d012345e678f" ] }, - "notResources": { + "notifyTeamKeys": { "type": "array", - "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.", + "description": "An array of team keys. The members of these teams are notified to review the approval request.", "items": { "type": "string" - } - }, - "actions": { - "type": "array", - "description": "Actions to perform on a resource", - "items": { - "$ref": "#/components/schemas/ActionSpecifier" }, "example": [ - "*" + "example-reviewer-team" ] }, - "notActions": { - "type": "array", - "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", - "items": { - "$ref": "#/components/schemas/ActionSpecifier" - } + "executionDate": { + "description": "Timestamp for when instructions will be executed", + "example": "1653926400000", + "$ref": "#/components/schemas/UnixMillis" }, - "effect": { + "operatingOnId": { "type": "string", - "description": "Whether this statement should allow or deny actions on the resources.", - "example": "allow", - "enum": [ - "allow", - "deny" - ] + "description": "The ID of a scheduled change. Include this if your instructions include editing or deleting a scheduled change.", + "example": "6297ed79dee7dc14e1f9a80c" + }, + "integrationConfig": { + "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 manifest.json for that integration, at https://github.com/launchdarkly/integration-framework.", + "$ref": "#/components/schemas/FormVariableConfig" } } }, - "StatementPost": { + "customProperty": { "type": "object", "required": [ - "effect" + "name", + "value" ], "properties": { - "resources": { - "type": "array", - "description": "Resource specifier strings", - "items": { - "type": "string" - }, - "example": [ - "proj/*:env/*:flag/*;testing-tag" - ] + "name": { + "type": "string", + "description": "The name of the custom property of this type.", + "example": "Jira issues" }, - "notResources": { + "value": { "type": "array", - "description": "Targeted resources are the resources NOT in this list. The resources field must be empty to use this field.", + "description": "An array of values for the custom property data to associate with this flag.", "items": { "type": "string" - } - }, - "actions": { - "type": "array", - "description": "Actions to perform on a resource", - "items": { - "$ref": "#/components/schemas/ActionSpecifier" }, "example": [ - "*" - ] - }, - "notActions": { - "type": "array", - "description": "Targeted actions are the actions NOT in this list. The actions field must be empty to use this field.", - "items": { - "$ref": "#/components/schemas/ActionSpecifier" - } - }, - "effect": { - "type": "string", - "description": "Whether this statement should allow or deny actions on the resources.", - "example": "allow", - "enum": [ - "allow", - "deny" + "is-123", + "is-456" ] } } }, - "StatementPostList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StatementPost" - } - }, - "StatisticCollectionRep": { + "flagDefaultsRep": { "type": "object", - "required": [ - "flags", - "_links" - ], "properties": { - "flags": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StatisticRep" - } - }, - "description": "A map of flag keys to a list of code reference statistics for each code repository in which the flag key appears" - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, "description": "The location and content type of related resources" + }, + "key": { + "type": "string", + "description": "A unique key for the flag default" + }, + "tags": { + "type": "array", + "description": "A list of default tags for each flag", + "items": { + "type": "string" + }, + "example": [ + "tag-1", + "tag-2" + ] + }, + "temporary": { + "type": "boolean", + "description": "Whether the flag should be temporary by default", + "example": true + }, + "defaultClientSideAvailability": { + "description": "Which client-side SDK types can use this flag by default. Set usingMobileKey to make the flag available for mobile SDKs. Set usingEnvironmentId to make the flag available for client-side SDKs.", + "example": "{\"usingMobileKey\": true, \"usingEnvironmentId\": false}", + "$ref": "#/components/schemas/ClientSideAvailability" + }, + "booleanDefaults": { + "description": "Defaults for boolean flags within this project", + "$ref": "#/components/schemas/BooleanDefaults" } } }, - "StatisticRep": { + "flagLinkPost": { "type": "object", - "required": [ - "name", - "type", - "sourceLink", - "defaultBranch", - "enabled", - "version", - "hunkCount", - "fileCount", - "_links" - ], "properties": { - "name": { + "key": { "type": "string", - "description": "The repository name", - "example": "LaunchDarkly-Docs" + "description": "The flag link key", + "example": "flag-link-key-123abc" }, - "type": { + "integrationKey": { "type": "string", - "description": "The type of repository", - "example": "github", - "enum": [ - "bitbucket", - "custom", - "github", - "gitlab" - ] + "description": "The integration key for an integration whose manifest.json includes the flagLink capability, if this is a flag link for an existing integration. Do not include for URL flag links." }, - "sourceLink": { - "type": "string", - "description": "A URL to access the repository", - "example": "https://github.com/launchdarkly/LaunchDarkly-Docs" + "timestamp": { + "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.", + "$ref": "#/components/schemas/UnixMillis" }, - "defaultBranch": { + "deepLink": { "type": "string", - "description": "The repository's default branch", - "example": "main" - }, - "enabled": { - "type": "boolean", - "description": "Whether or not a repository is enabled for code reference scanning", - "example": true - }, - "version": { - "type": "integer", - "description": "The version of the repository's saved information", - "example": 3 + "description": "The URL for the external resource you are linking the flag to", + "example": "https://example.com/archives/123123123" }, - "hunkCount": { - "type": "integer", - "description": "The number of code reference hunks in which the flag appears in this repository" + "title": { + "type": "string", + "description": "The title of the flag link", + "example": "Example link title" }, - "fileCount": { - "type": "integer", - "description": "The number of files in which the flag appears in this repository" + "description": { + "type": "string", + "description": "The description of the flag link", + "example": "Example link description" }, - "_links": { + "metadata": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/Link" + "type": "string" }, - "description": "The location and content type of related resources" + "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 manifest.json file under flagLink." } } }, - "StatisticsRoot": { + "flagSempatch": { + "type": "object", + "required": [ + "instructions" + ], + "properties": { + "instructions": { + "description": "Semantic patch instructions. The same ones that are valid for flags are valid here.", + "$ref": "#/components/schemas/Instructions" + }, + "comment": { + "type": "string" + } + } + }, + "followersPerFlag": { "type": "object", "properties": { - "projects": { + "flagKey": { + "type": "string", + "description": "The flag key", + "example": "example-flag-key" + }, + "followers": { "type": "array", - "description": "The location and content type of all projects that have code references", + "description": "A list of members who are following this flag", "items": { - "$ref": "#/components/schemas/Link" - }, - "example": [ - { - "href": "/api/v2/code-refs/statistics/example-project-with-code-refs", - "type": "application/json" - } - ] - }, - "self": { - "description": "The location and content type for accessing this resource", - "example": "{\"href\": \"/api/v2/code-refs/statistics\", \"type\": \"application/json\"}", - "$ref": "#/components/schemas/Link" + "$ref": "#/components/schemas/FollowFlagMember" + } } } }, - "StatusConflictErrorRep": { + "instructionUserRequest": { "type": "object", "required": [ - "code", - "message" + "kind", + "flagKey", + "variationId" ], "properties": { - "code": { + "kind": { "type": "string", - "description": "Specific error code encountered", - "example": "optimistic_locking_error" + "description": "The type of change to make to the removal date for this user from individual targeting for this flag.", + "example": "addExpireUserTargetDate", + "enum": [ + "addExpireUserTargetDate", + "updateExpireUserTargetDate", + "removeExpireUserTargetDate" + ] }, - "message": { + "flagKey": { "type": "string", - "description": "Description of the error", - "example": "Conflict. Optimistic lock error. Try again later." + "description": "The flag key", + "example": "sample-flag-key" + }, + "variationId": { + "type": "string", + "description": "ID of a variation on the flag", + "example": "ce12d345-a1b2-4fb5-a123-ab123d4d5f5d" + }, + "value": { + "type": "integer", + "description": "The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag. Required if kind is addExpireUserTargetDate or updateExpireUserTargetDate.", + "example": 1653469200000 + }, + "version": { + "type": "integer", + "description": "The version of the expiring user target to update. Optional and only used if kind is updateExpireUserTargetDate. If included, update will fail if version doesn't match current version of the expiring user target.", + "example": 1 } } }, - "StatusServiceUnavailable": { + "ipList": { "type": "object", "required": [ - "code", - "message" + "addresses", + "outboundAddresses" ], "properties": { - "code": { - "type": "string", - "description": "Specific error code encountered", - "example": "service_unavailable" + "addresses": { + "type": "array", + "description": "A list of the IP addresses LaunchDarkly's service uses", + "items": { + "type": "string" + }, + "example": [ + "104.156.80.0/20", + "151.101.0.0/16" + ] }, - "message": { - "type": "string", - "description": "Description of the error", - "example": "Requested service unavailable" + "outboundAddresses": { + "type": "array", + "description": "A list of the IP addresses outgoing webhook notifications use", + "items": { + "type": "string" + }, + "example": [ + "52.21.152.96/32" + ] } } }, - "StoreIntegrationError": { + "membersPatchInput": { "type": "object", + "required": [ + "instructions" + ], "properties": { - "statusCode": { - "type": "integer" - }, - "message": { - "type": "string" + "comment": { + "type": "string", + "description": "Optional comment describing the update", + "example": "Optional comment about the update" }, - "timestamp": { - "$ref": "#/components/schemas/UnixMillis" + "instructions": { + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require additional parameters as part of this object.", + "example": "[ { \"kind\": \"replaceMemberRoles\", \"value\": \"reader\" } ]", + "$ref": "#/components/schemas/Instructions" } } }, - "SubjectDataRep": { + "oauthClientPost": { "type": "object", "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - }, "name": { "type": "string", - "description": "The subject's name" + "description": "The name of your new LaunchDarkly OAuth 2.0 client." }, - "avatarUrl": { + "redirectUri": { "type": "string", - "description": "The subject's avatar" + "description": "The redirect URI for your new OAuth 2.0 application. This should be an absolute URL conforming with the standard HTTPS protocol." + }, + "description": { + "type": "string", + "description": "Description of your OAuth 2.0 client." } } }, - "TagCollection": { + "patchFlagsRequest": { "type": "object", "required": [ - "items", - "_links" + "instructions" ], "properties": { - "items": { + "comment": { + "type": "string", + "description": "Optional comment describing the change", + "example": "optional comment" + }, + "instructions": { "type": "array", - "description": "List of tags", + "description": "The instructions to perform when updating", "items": { - "type": "string" + "$ref": "#/components/schemas/Instruction" }, "example": [ - "ops", - "pro" + { + "kind": "addExpireUserTargetDate", + "userKey": "sandy", + "value": 1686412800000, + "variationId": "ce12d345-a1b2-4fb5-a123-ab123d4d5f5d" + } ] - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - }, - "totalCount": { - "type": "integer", - "description": "The total number of tags", - "example": 103 } } }, - "Target": { + "patchSegmentExpiringTargetInputRep": { "type": "object", "required": [ - "values", - "variation" + "instructions" ], "properties": { - "values": { - "type": "array", - "description": "A list of the keys for targets that will receive this variation because of individual targeting", - "items": { - "type": "string" - } - }, - "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": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } - }, - "name": { + "comment": { "type": "string", - "description": "The name of the resource", - "example": "Example flag name" + "description": "Optional description of changes", + "example": "optional comment" }, - "resources": { + "instructions": { "type": "array", - "description": "The resource specifier", + "description": "Semantic patch instructions for the desired changes to the resource", "items": { - "type": "string" + "$ref": "#/components/schemas/patchSegmentExpiringTargetInstruction" }, "example": [ - "proj/example-project:env/production:flag/example-flag" + { + "contextKey": "user@email.com", + "contextKind": "user", + "kind": "updateExpiringTarget", + "targetType": "included", + "value": 1587582000000, + "version": 0 + } ] } } }, - "Team": { + "patchSegmentExpiringTargetInstruction": { "type": "object", + "required": [ + "kind", + "contextKey", + "contextKind", + "targetType" + ], "properties": { - "description": { - "type": "string", - "description": "A description of the team", - "example": "Description for this team." - }, - "key": { + "kind": { "type": "string", - "description": "The team key", - "example": "team-key-123abc" + "description": "The type of change to make to the context's removal date from this segment", + "example": "addExpiringTarget", + "enum": [ + "addExpiringTarget", + "updateExpiringTarget", + "removeExpiringTarget" + ] }, - "name": { + "contextKey": { "type": "string", - "description": "A human-friendly name for the team", - "example": "Example team" - }, - "_access": { - "description": "Details on the allowed and denied actions for this team", - "$ref": "#/components/schemas/Access" - }, - "_creationDate": { - "description": "Timestamp of when the team was created", - "example": "1648671956143", - "$ref": "#/components/schemas/UnixMillis" + "description": "A unique key used to represent the context" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/teams", - "type": "application/json" - }, - "roles": { - "href": "/api/v2/teams/example-team/roles", - "type": "application/json" - }, - "self": { - "href": "/api/v2/teams/example-team", - "type": "application/json" - } - } + "contextKind": { + "type": "string", + "description": "The kind of context", + "example": "user" }, - "_lastModified": { - "description": "Timestamp of when the team was most recently updated", - "example": "1648672446072", - "$ref": "#/components/schemas/UnixMillis" + "targetType": { + "type": "string", + "description": "The segment's target type", + "enum": [ + "included", + "excluded" + ] }, - "_version": { + "value": { "type": "integer", - "description": "The team version", - "example": 3 - }, - "_idpSynced": { - "type": "boolean", - "description": "Whether the team has been synced with an external identity provider (IdP). Team sync is available to customers on an Enterprise plan.", - "example": true - }, - "roles": { - "description": "Paginated list of the custom roles assigned to this team. Only included if specified in the expand query parameter.", - "$ref": "#/components/schemas/TeamCustomRoles" - }, - "members": { - "description": "Details on the total count of members that belong to the team. Only included if specified in the expand query parameter.", - "$ref": "#/components/schemas/TeamMembers" - }, - "projects": { - "description": "Paginated list of the projects that the team has any write access to. Only included if specified in the expand query parameter.", - "$ref": "#/components/schemas/TeamProjects" + "format": "int64", + "description": "The time, in Unix milliseconds, when the context should be removed from this segment. Required if kind is addExpiringTarget or updateExpiringTarget.", + "example": 1653469200000 }, - "maintainers": { - "description": "Paginated list of the maintainers assigned to this team. Only included if specified in the expand query parameter.", - "$ref": "#/components/schemas/TeamMaintainers" + "version": { + "type": "integer", + "description": "The version of the expiring target to update. Optional and only used if kind is updateExpiringTarget. If included, update will fail if version doesn't match current version of the expiring target.", + "example": 1 } } }, - "TeamCustomRole": { + "patchSegmentInstruction": { "type": "object", + "required": [ + "kind", + "userKey", + "targetType" + ], "properties": { - "key": { + "kind": { "type": "string", - "description": "The key of the custom role", - "example": "role-key-123abc" + "description": "The type of change to make to the user's removal date from this segment", + "example": "addExpireUserTargetDate", + "enum": [ + "addExpireUserTargetDate", + "updateExpireUserTargetDate", + "removeExpireUserTargetDate" + ] }, - "name": { + "userKey": { "type": "string", - "description": "The name of the custom role", - "example": "Example role" + "description": "A unique key used to represent the user" }, - "projects": { - "description": "Details on the projects where team members have write privileges on at least one resource type (e.g. flags)", - "$ref": "#/components/schemas/TeamProjects" + "targetType": { + "type": "string", + "description": "The segment's target type", + "enum": [ + "included", + "excluded" + ] }, - "appliedOn": { - "description": "Timestamp of when the custom role was assigned to this team", - "example": "1648672018410", - "$ref": "#/components/schemas/UnixMillis" + "value": { + "type": "integer", + "description": "The time, in Unix milliseconds, when the user should be removed from this segment. Required if kind is addExpireUserTargetDate or updateExpireUserTargetDate.", + "example": 1653469200000 + }, + "version": { + "type": "integer", + "description": "The version of the segment to update. Required if kind is updateExpireUserTargetDate.", + "example": 1 } } }, - "TeamCustomRoles": { + "patchSegmentRequest": { "type": "object", + "required": [ + "instructions" + ], "properties": { - "totalCount": { - "type": "integer", - "description": "The number of custom roles assigned to this team", - "example": 1 + "comment": { + "type": "string", + "description": "Optional description of changes", + "example": "optional comment" }, - "items": { + "instructions": { "type": "array", - "description": "An array of the custom roles that have been assigned to this team", + "description": "Semantic patch instructions for the desired changes to the resource", "items": { - "$ref": "#/components/schemas/TeamCustomRole" - } - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "$ref": "#/components/schemas/patchSegmentInstruction" }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/teams/example-team/roles?limit=25", - "type": "application/json" + "example": [ + { + "contextKey": "contextKey", + "contextKind": "user", + "kind": "updateExpiringTarget", + "targetType": "included", + "value": 1587582000000, + "version": 0 } - } + ] } } }, - "TeamImportsRep": { + "patchUsersRequest": { "type": "object", + "required": [ + "instructions" + ], "properties": { - "items": { + "comment": { + "type": "string", + "description": "Optional comment describing the change", + "example": "optional comment" + }, + "instructions": { "type": "array", - "description": "An array of details about the members requested to be added to this team", + "description": "The instructions to perform when updating", "items": { - "$ref": "#/components/schemas/MemberImportItem" + "$ref": "#/components/schemas/instructionUserRequest" } } } }, - "TeamMaintainers": { + "permissionGrantInput": { "type": "object", "properties": { - "totalCount": { - "type": "integer", - "description": "The number of maintainers of the team", - "example": 1 + "actionSet": { + "type": "string", + "description": "A group of related actions to allow. Specify either actionSet or actions. Use maintainTeam to add team maintainers.", + "example": "maintainTeam", + "enum": [ + "maintainTeam" + ] }, - "items": { + "actions": { "type": "array", - "description": "Details on the members that have been assigned as maintainers of the team", + "description": "A list of actions to allow. Specify either actionSet or actions. To learn more, read [Role actions](https://docs.launchdarkly.com/home/account/role-actions).", "items": { - "$ref": "#/components/schemas/MemberSummary" + "type": "string" }, "example": [ - { - "_id": "569f183514f4432160000007", - "_links": { - "self": { - "href": "/api/v2/members/569f183514f4432160000007", - "type": "application/json" - } - }, - "email": "ariel@acme.com", - "firstName": "Ariel", - "lastName": "Flores", - "role": "reader" - } + "updateTeamMembers" ] }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/teams/example-team/maintainers?limit=5", - "type": "application/json" - } - } - } - } - }, - "TeamMembers": { - "type": "object", - "properties": { - "totalCount": { - "type": "integer", - "description": "The total count of members that belong to the team", - "example": 15 - } - } - }, - "TeamProjects": { - "type": "object", - "properties": { - "totalCount": { - "type": "integer", - "example": 1 - }, - "items": { + "memberIDs": { "type": "array", - "description": "Details on each project where team members have write privileges on at least one resource type (e.g. flags)", + "description": "A list of member IDs who receive the permission grant.", "items": { - "$ref": "#/components/schemas/ProjectSummary" + "type": "string" }, "example": [ - { - "_links": { - "environments": { - "href": "/api/v2/projects/example-project/environments", - "type": "application/json" - }, - "self": { - "href": "/api/v2/projects/example-project", - "type": "application/json" - } - }, - "key": "project-key-123abc", - "name": "Example project" - } + "12ab3c45de678910fgh12345" ] } } }, - "Teams": { + "postApprovalRequestApplyRequest": { "type": "object", "properties": { - "items": { - "type": "array", - "description": "An array of teams", - "items": { - "$ref": "#/components/schemas/Team" - } - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/teams?expand=maintainers%2Cmembers%2Croles%2Cprojects&limit=20", - "type": "application/json" - } - } - }, - "totalCount": { - "type": "integer", - "description": "The number of teams", - "example": 1 + "comment": { + "type": "string", + "description": "Optional comment about the approval request", + "example": "Looks good, thanks for updating" } } }, - "TimestampRep": { + "postApprovalRequestReviewRequest": { "type": "object", "properties": { - "milliseconds": { - "$ref": "#/components/schemas/UnixMillis" - }, - "seconds": { - "type": "integer", - "format": "int64" - }, - "rfc3339": { - "type": "string" + "kind": { + "type": "string", + "description": "The type of review for this approval request", + "example": "approve", + "enum": [ + "approve", + "comment", + "decline" + ] }, - "simple": { - "type": "string" + "comment": { + "type": "string", + "description": "Optional comment about the approval request", + "example": "Looks good, thanks for updating" } } }, - "Token": { + "putBranch": { "type": "object", "required": [ - "_id", - "ownerId", - "memberId", - "creationDate", - "lastModified", - "_links" + "name", + "head", + "syncTime" ], "properties": { - "_id": { - "description": "The ID of the access token", - "example": "61095542756dba551110ae21", - "$ref": "#/components/schemas/ObjectId" - }, - "ownerId": { - "description": "The ID of the owner of the account for the access token", - "example": "569f514156e003339cfd3917", - "$ref": "#/components/schemas/ObjectId" - }, - "memberId": { - "description": "The ID of the member who created the access token", - "example": "569f514183f2164430000002", - "$ref": "#/components/schemas/ObjectId" - }, - "_member": { - "description": "Details on the member who created the access token", - "$ref": "#/components/schemas/MemberSummary" - }, "name": { "type": "string", - "description": "A human-friendly name for the access token", - "example": "Example reader token" + "description": "The branch name", + "example": "main" }, - "description": { + "head": { "type": "string", - "description": "A description for the access token", - "example": "A reader token used in testing and examples" + "description": "An ID representing the branch HEAD. For example, a commit SHA.", + "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" }, - "creationDate": { - "description": "Timestamp of when the access token was created", - "example": "1628001602644", - "$ref": "#/components/schemas/UnixMillis" + "updateSequenceId": { + "type": "integer", + "format": "int64", + "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.", + "example": 25 }, - "lastModified": { - "description": "Timestamp of the last modification of the access token", - "example": "1628001602644", + "syncTime": { + "description": "A timestamp indicating when the branch was last synced", + "example": "1636558831870", "$ref": "#/components/schemas/UnixMillis" }, - "customRoleIds": { - "type": "array", - "description": "A list of custom role IDs to use as access limits for the access token", - "items": { - "$ref": "#/components/schemas/ObjectId" - }, - "example": [] - }, - "inlineRole": { + "references": { "type": "array", - "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": "An array of flag references found on the branch", "items": { - "$ref": "#/components/schemas/Statement" - }, - "example": [] - }, - "role": { - "type": "string", - "description": "Built-in role for the token", - "example": "reader" - }, - "token": { - "type": "string", - "description": "The token value. When creating or resetting, contains the entire token value. Otherwise, contains the last four characters.", - "example": "1234" - }, - "serviceToken": { - "type": "boolean", - "description": "Whether this is a service token or a personal token", - "example": false - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/tokens", - "type": "application/json" - }, - "self": { - "href": "/api/v2/tokens/61095542756dba551110ae21", - "type": "application/json" - } + "$ref": "#/components/schemas/ReferenceRep" } }, - "defaultApiVersion": { - "type": "integer", - "description": "The default API version for this token", - "example": 20220603 - }, - "lastUsed": { - "description": "Timestamp of when the access token was last used", - "example": "0", + "commitTime": { + "description": "A timestamp of the current commit", + "example": "1636558831870", "$ref": "#/components/schemas/UnixMillis" } } }, - "TokenSummary": { + "repositoryPost": { "type": "object", + "required": [ + "name" + ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } + "name": { + "type": "string", + "description": "The repository name", + "example": "LaunchDarkly-Docs" }, - "_id": { - "type": "string" + "sourceLink": { + "type": "string", + "description": "A URL to access the repository", + "example": "https://github.com/launchdarkly/LaunchDarkly-Docs" }, - "name": { + "commitUrlTemplate": { "type": "string", - "description": "The name of the token", - "example": "DevOps token" + "description": "A template for constructing a valid URL to view the commit", + "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/commit/${sha}" }, - "ending": { + "hunkUrlTemplate": { "type": "string", - "description": "The last few characters of the token", - "example": "2345" + "description": "A template for constructing a valid URL to view the hunk", + "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/blob/${sha}/${filePath}#L${lineNumber}" }, - "serviceToken": { - "type": "boolean", - "description": "Whether this is a service token", - "example": false + "type": { + "type": "string", + "description": "The type of repository. If not specified, the default value is custom.", + "example": "github", + "enum": [ + "bitbucket", + "custom", + "github", + "gitlab" + ] + }, + "defaultBranch": { + "type": "string", + "description": "The repository's default branch. If not specified, the default value is main.", + "example": "main" } } }, - "Tokens": { + "sourceFlag": { "type": "object", + "required": [ + "key" + ], "properties": { - "items": { - "type": "array", - "description": "An array of access tokens", - "items": { - "$ref": "#/components/schemas/Token" - } - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - } + "key": { + "type": "string", + "description": "The environment key for the source environment", + "example": "environment-key-123abc" }, - "totalCount": { + "version": { "type": "integer", - "description": "The number of access tokens returned" + "description": "The version of the source flag from which to copy", + "example": 1 } } }, - "TreatmentInput": { + "subscriptionPost": { "type": "object", "required": [ "name", - "baseline", - "allocationPercent", - "parameters" + "config" ], "properties": { "name": { "type": "string", - "description": "The treatment name", - "example": "Treatment 1" + "description": "A human-friendly name for your audit log subscription.", + "example": "Example audit log subscription." }, - "baseline": { - "type": "boolean", - "description": "Whether this treatment is the baseline to compare other treatments against", - "example": true + "statements": { + "description": "The set of resources you wish to subscribe to audit log notifications for.", + "$ref": "#/components/schemas/StatementPostList" }, - "allocationPercent": { - "type": "string", - "description": "The percentage of traffic allocated to this treatment during the iteration", - "example": "10" + "on": { + "type": "boolean", + "description": "Whether or not you want your subscription to actively send events.", + "example": false }, - "parameters": { + "tags": { "type": "array", - "description": "Details on the flag and variation to use for this treatment", + "description": "An array of tags for this subscription.", "items": { - "$ref": "#/components/schemas/TreatmentParameterInput" + "type": "string" + }, + "example": [ + "testing-tag" + ] + }, + "config": { + "type": "object", + "additionalProperties": {}, + "description": "The unique set of fields required to configure an audit log subscription integration of this type. Refer to the formVariables field in the corresponding manifest.json at https://github.com/launchdarkly/integration-framework/tree/main/integrations for a full list of fields for the integration you wish to configure.", + "example": { + "optional": "an optional property", + "required": "the required property", + "url": "https://example.com" } + }, + "url": { + "type": "string", + "description": "Slack webhook receiver URL. Only necessary for legacy Slack webhook integrations." + }, + "apiKey": { + "type": "string", + "description": "Datadog API key. Only necessary for legacy Datadog webhook integrations." } } }, - "TreatmentParameterInput": { + "teamPatchInput": { "type": "object", "required": [ - "flagKey", - "variationId" + "instructions" ], "properties": { - "flagKey": { + "comment": { "type": "string", - "description": "The flag key", - "example": "example-flag-for-experiment" + "description": "Optional comment describing the update", + "example": "Optional comment about the update" }, - "variationId": { - "type": "string", - "description": "The ID of the flag variation", - "example": "e432f62b-55f6-49dd-a02f-eb24acf39d05" + "instructions": { + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require additional parameters as part of this object.", + "example": "[ { \"kind\": \"updateDescription\", \"value\": \"New description for the team\" } ]", + "$ref": "#/components/schemas/Instructions" } } }, - "TreatmentRep": { + "teamPostInput": { "type": "object", "required": [ - "name", - "allocationPercent" + "key", + "name" ], "properties": { - "_id": { - "type": "string", - "description": "The treatment ID. This is the variation ID from the flag.", - "example": "122c9f3e-da26-4321-ba68-e0fc02eced58" + "customRoleKeys": { + "type": "array", + "description": "List of custom role keys the team will access", + "items": { + "type": "string" + }, + "example": [ + "example-role1", + "example-role2" + ] }, - "name": { + "description": { "type": "string", - "description": "The treatment name. This is the variation name from the flag.", - "example": "Treatment 1" + "description": "A description of the team", + "example": "An example team" }, - "allocationPercent": { + "key": { "type": "string", - "description": "The percentage of traffic allocated to this treatment during the iteration", - "example": "10" + "description": "The team key", + "example": "team-key-123abc" }, - "baseline": { - "type": "boolean", - "description": "Whether this treatment is the baseline to compare other treatments against", - "example": true + "memberIDs": { + "type": "array", + "description": "A list of member IDs who belong to the team", + "items": { + "type": "string" + }, + "example": [ + "12ab3c45de678910fgh12345" + ] }, - "parameters": { + "name": { + "type": "string", + "description": "A human-friendly name for the team", + "example": "Example team" + }, + "permissionGrants": { "type": "array", - "description": "Details on the flag and variation used for this treatment", + "description": "A list of permission grants. Permission grants allow access to a specific action, without having to create or update a custom role.", "items": { - "$ref": "#/components/schemas/ParameterRep" + "$ref": "#/components/schemas/permissionGrantInput" } + }, + "roleAttributes": { + "description": "A map of role attributes for the team", + "example": "{\"developerProjectKey\": [\"default\"]}", + "$ref": "#/components/schemas/RoleAttributeMap" } } }, - "TreatmentResultRep": { + "teamsPatchInput": { "type": "object", + "required": [ + "instructions" + ], "properties": { - "treatmentId": { + "comment": { "type": "string", - "description": "The ID of the treatment", - "example": "92b8354e-360e-4d67-8f13-fa6a46ca8077" + "description": "Optional comment describing the update", + "example": "Optional comment about the update" }, - "treatmentName": { + "instructions": { + "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require additional parameters as part of this object.", + "example": "[ { \"kind\": \"updateDescription\", \"value\": \"New description for the team\" } ]", + "$ref": "#/components/schemas/Instructions" + } + } + }, + "triggerPost": { + "type": "object", + "required": [ + "integrationKey" + ], + "properties": { + "comment": { "type": "string", - "description": "The name of the treatment", - "example": "variation 25% off" - }, - "mean": { - "type": "number", - "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.", - "example": 0.5432525951557093 - }, - "credibleInterval": { - "description": "The range of the metric's values that you should have 90% confidence in.", - "example": "{\"lower\": 0.4060771673663068, \"upper\": 0.6713222134386467}", - "$ref": "#/components/schemas/CredibleIntervalRep" - }, - "pBest": { - "type": "number", - "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", - "example": 0.6083 + "description": "Optional comment describing the trigger", + "example": "example comment" }, - "relativeDifferences": { + "instructions": { "type": "array", - "description": "Estimates of the relative difference between this treatment's mean and the mean of each other treatment", + "description": "The action to perform when triggering. This should be an array with a single object that looks like {\"kind\": \"flag_action\"}. Supported flag actions are turnFlagOn and turnFlagOff.", "items": { - "$ref": "#/components/schemas/RelativeDifferenceRep" + "$ref": "#/components/schemas/Instruction" }, "example": [ { - "fromTreatmentId": "92b8354e-360e-4d67-8f13-fa6a46ca8077", - "lower": -0.13708601934659803, - "upper": 0.42655970355712425 + "kind": "turnFlagOn" } ] }, - "units": { - "type": "integer", - "format": "int64", - "description": "The number of units exposed to this treatment that have event values, including those that are configured to default to 0", - "example": 76 - }, - "traffic": { - "type": "integer", - "format": "int64", - "description": "The number of units exposed to this treatment.", - "example": 332 - }, - "distribution": { - "description": "The posterior distribution of the mean of the metric in this variation.", - "$ref": "#/components/schemas/Distribution" + "integrationKey": { + "type": "string", + "description": "The unique identifier of the integration for your trigger. Use generic-trigger for integrations not explicitly supported.", + "example": "generic-trigger" } } }, - "TreatmentsInput": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TreatmentInput" - } - }, - "TriggerWorkflowCollectionRep": { + "upsertPayloadRep": { "type": "object", + "required": [ + "tags", + "temporary", + "booleanDefaults", + "defaultClientSideAvailability" + ], "properties": { - "items": { - "type": "array", - "description": "An array of flag triggers", - "items": { - "$ref": "#/components/schemas/TriggerWorkflowRep" - } - }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, "description": "The location and content type of related resources" + }, + "tags": { + "type": "array", + "description": "A list of default tags for each flag", + "items": { + "type": "string" + }, + "example": [ + "tag-1", + "tag-2" + ] + }, + "temporary": { + "type": "boolean", + "description": "Whether the flag should be temporary by default", + "example": true + }, + "booleanDefaults": { + "$ref": "#/components/schemas/BooleanFlagDefaults" + }, + "defaultClientSideAvailability": { + "description": "Which client-side SDK types can use this flag by default.", + "$ref": "#/components/schemas/DefaultClientSideAvailability" } } }, - "TriggerWorkflowRep": { + "webhookPost": { "type": "object", + "required": [ + "url", + "sign", + "on" + ], "properties": { - "_id": { - "description": "The ID of this flag trigger", - "example": "12ab3c45de678910abc12345", - "$ref": "#/components/schemas/FeatureWorkflowId" - }, - "_version": { - "type": "integer", - "description": "The flag trigger version", - "example": 1 + "name": { + "type": "string", + "description": "A human-readable name for your webhook", + "example": "Example hook" }, - "_creationDate": { - "description": "Timestamp of when the flag trigger was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "url": { + "type": "string", + "description": "The URL of the remote webhook", + "example": "http://www.example.com" }, - "_maintainerId": { + "secret": { "type": "string", - "description": "The ID of the flag trigger maintainer", - "example": "12ab3c45de678910abc12345" + "description": "If sign is true, and the secret attribute is omitted, LaunchDarkly automatically generates a secret for you.", + "example": "frobozz" }, - "_maintainer": { - "description": "Details on the member who maintains this flag trigger", - "$ref": "#/components/schemas/MemberSummary" + "statements": { + "description": "Represents a Custom role policy, defining a resource kinds filter the webhook should respond to.", + "$ref": "#/components/schemas/StatementPostList" }, - "enabled": { + "sign": { "type": "boolean", - "description": "Whether the flag trigger is currently enabled", + "description": "If sign is false, the webhook does not include a signature header, and the secret can be omitted.", "example": true }, - "_integrationKey": { - "type": "string", - "description": "The unique identifier of the integration for your trigger", - "example": "generic-trigger" - }, - "instructions": { - "description": "Details on the action to perform when triggering", - "example": "[ { \"kind\": \"turnFlagOn\" }]", - "$ref": "#/components/schemas/Instructions" - }, - "_lastTriggeredAt": { - "description": "Timestamp of when the trigger was most recently executed", - "example": "1654114600000", - "$ref": "#/components/schemas/UnixMillis" + "on": { + "type": "boolean", + "description": "Whether or not this webhook is enabled.", + "example": true }, - "_recentTriggerBodies": { + "tags": { "type": "array", - "description": "Details on recent flag trigger requests.", + "description": "List of tags for this webhook", "items": { - "$ref": "#/components/schemas/RecentTriggerBody" + "type": "string" + }, + "example": [] + } + } + }, + "TagsCollection": { + "example": { + "_links": { + "key": { + "href": "href", + "type": "type" } }, - "_triggerCount": { - "type": "integer", - "description": "Number of times the trigger has been executed", - "example": 3 + "totalCount": 103, + "items": [ + "ops", + "pro" + ] + }, + "properties": { + "items": { + "description": "List of tags", + "example": [ + "ops", + "pro" + ], + "items": { + "type": "string" + }, + "type": "array" }, - "triggerURL": { - "type": "string", - "description": "The unguessable URL for this flag trigger" + "_links": { + "additionalProperties": { + "$ref": "#/components/schemas/TagsLink" + }, + "type": "object" + }, + "totalCount": { + "description": "The total number of tags", + "example": 103, + "type": "integer" + } + }, + "required": [ + "_links", + "items" + ], + "type": "object" + }, + "CoreLink": { + "example": { + "href": "href", + "type": "type" + }, + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "href", + "type" + ], + "type": "object" + }, + "Error": { + "example": { + "code": "code", + "message": "message" + }, + "properties": { + "message": { + "type": "string" + }, + "code": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + }, + "TagsLink": { + "example": { + "href": "href", + "type": "type" + }, + "properties": { + "href": { + "type": "string" }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "AIConfigs": { + "example": { + "_links": { + "next": { + "href": "href", + "type": "type" + }, + "last": { + "href": "href", + "type": "type" + }, + "prev": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + }, + "first": { + "href": "href", + "type": "type" + } + }, + "totalCount": 7, + "items": [ + { + "createdAt": 5, + "_access": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ], + "denied": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "variations": [ + { + "createdAt": 6, + "_links": { + "parent": { + "href": "href", + "type": "type" + } + }, + "publishedAt": 5, + "name": "name", + "messages": [ + { + "role": "role", + "content": "content" + }, + { + "role": "role", + "content": "content" + } + ], + "model": "{}", + "modelConfigKey": "modelConfigKey", + "version": 1, + "key": "key" + }, + { + "createdAt": 6, + "_links": { + "parent": { + "href": "href", + "type": "type" + } + }, + "publishedAt": 5, + "name": "name", + "messages": [ + { + "role": "role", + "content": "content" + }, + { + "role": "role", + "content": "content" + } + ], + "model": "{}", + "modelConfigKey": "modelConfigKey", + "version": 1, + "key": "key" + } + ], + "name": "name", + "description": "description", + "version": 0, + "key": "key", + "tags": [ + "tags", + "tags" + ], + "updatedAt": 2 + }, + { + "createdAt": 5, + "_access": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ], + "denied": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "variations": [ + { + "createdAt": 6, + "_links": { + "parent": { + "href": "href", + "type": "type" + } + }, + "publishedAt": 5, + "name": "name", + "messages": [ + { + "role": "role", + "content": "content" + }, + { + "role": "role", + "content": "content" + } + ], + "model": "{}", + "modelConfigKey": "modelConfigKey", + "version": 1, + "key": "key" + }, + { + "createdAt": 6, + "_links": { + "parent": { + "href": "href", + "type": "type" + } + }, + "publishedAt": 5, + "name": "name", + "messages": [ + { + "role": "role", + "content": "content" + }, + { + "role": "role", + "content": "content" + } + ], + "model": "{}", + "modelConfigKey": "modelConfigKey", + "version": 1, + "key": "key" + } + ], + "name": "name", + "description": "description", + "version": 0, + "key": "key", + "tags": [ + "tags", + "tags" + ], + "updatedAt": 2 + } + ] + }, + "properties": { "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "$ref": "#/components/schemas/PaginatedLinks" + }, + "items": { + "items": { + "$ref": "#/components/schemas/AIConfig" }, - "description": "The location and content type of related resources" - } - } - }, - "UnauthorizedErrorRep": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "string", - "description": "Specific error code encountered", - "example": "unauthorized" + "type": "array" }, - "message": { - "type": "string", - "description": "Description of the error", - "example": "Invalid access token" + "totalCount": { + "type": "integer" } - } - }, - "UnixMillis": { - "type": "integer", - "format": "int64" - }, - "UpsertContextKindPayload": { - "type": "object", + }, "required": [ - "name" + "items", + "totalCount" ], + "type": "object" + }, + "AIConfig": { + "example": { + "createdAt": 5, + "_access": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ], + "denied": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ] + }, + "_links": { + "parent": { + "href": "href", + "type": "type" + }, + "self": { + "href": "href", + "type": "type" + } + }, + "variations": [ + { + "createdAt": 6, + "_links": { + "parent": { + "href": "href", + "type": "type" + } + }, + "publishedAt": 5, + "name": "name", + "messages": [ + { + "role": "role", + "content": "content" + }, + { + "role": "role", + "content": "content" + } + ], + "model": "{}", + "modelConfigKey": "modelConfigKey", + "version": 1, + "key": "key" + }, + { + "createdAt": 6, + "_links": { + "parent": { + "href": "href", + "type": "type" + } + }, + "publishedAt": 5, + "name": "name", + "messages": [ + { + "role": "role", + "content": "content" + }, + { + "role": "role", + "content": "content" + } + ], + "model": "{}", + "modelConfigKey": "modelConfigKey", + "version": 1, + "key": "key" + } + ], + "name": "name", + "description": "description", + "version": 0, + "key": "key", + "tags": [ + "tags", + "tags" + ], + "updatedAt": 2 + }, "properties": { - "name": { - "type": "string", - "description": "The context kind name", - "example": "organization" + "_access": { + "$ref": "#/components/schemas/AiConfigsAccess" + }, + "_links": { + "$ref": "#/components/schemas/ParentAndSelfLinks" }, "description": { - "type": "string", - "description": "The context kind description", - "example": "An example context kind for organizations" + "type": "string" }, - "hideInTargeting": { - "type": "boolean", - "description": "Alias for archived.", - "example": false + "key": { + "type": "string" }, - "archived": { - "type": "boolean", - "description": "Whether the context kind is archived. Archived context kinds are unavailable for targeting.", - "example": false + "name": { + "type": "string" }, - "version": { - "type": "integer", - "description": "The context kind version. If not specified when the context kind is created, defaults to 1.", - "example": 1 - } - } - }, - "UpsertFlagDefaultsPayload": { - "type": "object", - "required": [ - "tags", - "temporary", - "booleanDefaults", - "defaultClientSideAvailability" - ], - "properties": { "tags": { - "type": "array", - "description": "A list of default tags for each flag", "items": { "type": "string" }, - "example": [ - "tag-1", - "tag-2" - ] + "type": "array" }, - "temporary": { - "type": "boolean", - "description": "Whether the flag should be temporary by default", - "example": true + "version": { + "type": "integer" }, - "booleanDefaults": { - "$ref": "#/components/schemas/BooleanFlagDefaults" + "variations": { + "items": { + "$ref": "#/components/schemas/AIConfigVariation" + }, + "type": "array" }, - "defaultClientSideAvailability": { - "description": "Which client-side SDK types can use this flag by default.", - "$ref": "#/components/schemas/DefaultClientSideAvailability" - } - } - }, - "UpsertResponseRep": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "The status of the create or update operation", - "example": "success" + "createdAt": { + "format": "int64", + "type": "integer" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "updatedAt": { + "format": "int64", + "type": "integer" } - } - }, - "UrlMatcher": { - "type": "object", - "additionalProperties": {} - }, - "UrlMatchers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UrlMatcher" - } + }, + "required": [ + "createdAt", + "description", + "key", + "name", + "tags", + "updatedAt", + "variations", + "version" + ], + "type": "object" }, - "UrlPost": { - "type": "object", + "AIConfigPost": { + "example": { + "name": "name", + "description": "", + "key": "key", + "tags": [ + "tags", + "tags" + ] + }, "properties": { - "kind": { - "type": "string", - "enum": [ - "exact", - "canonical", - "substring", - "regex" - ] - }, - "url": { + "description": { + "default": "", "type": "string" }, - "substring": { + "key": { "type": "string" }, - "pattern": { + "name": { "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" } - } + }, + "required": [ + "key", + "name" + ], + "type": "object" }, - "User": { - "type": "object", + "AIConfigPatch": { + "example": { + "name": "name", + "description": "description", + "tags": [ + "tags", + "tags" + ] + }, "properties": { - "key": { - "type": "string", - "description": "The user key. This is the only mandatory user attribute.", - "example": "user-key-123abc" + "description": { + "type": "string" }, - "secondary": { - "type": "string", - "description": "If provided, used with the user key to generate a variation in percentage rollouts", - "example": "2398127" + "name": { + "type": "string" }, - "ip": { - "type": "string", - "description": "The user's IP address", - "example": "10.10.10.10" + "tags": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AIConfigVariation": { + "example": { + "createdAt": 6, + "_links": { + "parent": { + "href": "href", + "type": "type" + } }, - "country": { - "type": "string", - "description": "The user's country", - "example": "United States" + "publishedAt": 5, + "name": "name", + "messages": [ + { + "role": "role", + "content": "content" + }, + { + "role": "role", + "content": "content" + } + ], + "model": "{}", + "modelConfigKey": "modelConfigKey", + "version": 1, + "key": "key" + }, + "properties": { + "_links": { + "$ref": "#/components/schemas/ParentLink" }, - "email": { - "type": "string", - "description": "The user's email", - "example": "sandy@example.com" + "key": { + "type": "string" }, - "firstName": { - "type": "string", - "description": "The user's first name", - "example": "Sandy" + "messages": { + "items": { + "$ref": "#/components/schemas/Message" + }, + "type": "array" }, - "lastName": { - "type": "string", - "description": "The user's last name", - "example": "Smith" + "model": { + "type": "object" }, - "avatar": { - "type": "string", - "description": "An absolute URL to an avatar image.", - "example": "http://example.com/avatar.png" + "modelConfigKey": { + "type": "string" }, "name": { - "type": "string", - "description": "The user's full name", - "example": "Sandy Smith" + "type": "string" }, - "anonymous": { - "type": "boolean", - "description": "Whether the user is anonymous. If true, this user does not appear on the Contexts list in the LaunchDarkly user interface.", - "example": false + "createdAt": { + "format": "int64", + "type": "integer" }, - "custom": { - "type": "object", - "additionalProperties": {}, - "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." + "version": { + "type": "integer" }, - "privateAttrs": { - "type": "array", - "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.", - "items": { - "type": "string" - } + "publishedAt": { + "format": "int64", + "type": "integer" } - } + }, + "required": [ + "createdAt", + "key", + "messages", + "model", + "name", + "publishedAt", + "version" + ], + "type": "object" }, - "UserAttributeNamesRep": { - "type": "object", + "AIConfigVariationsResponse": { + "example": { + "totalCount": 0, + "items": [ + { + "createdAt": 6, + "_links": { + "parent": { + "href": "href", + "type": "type" + } + }, + "publishedAt": 5, + "name": "name", + "messages": [ + { + "role": "role", + "content": "content" + }, + { + "role": "role", + "content": "content" + } + ], + "model": "{}", + "modelConfigKey": "modelConfigKey", + "version": 1, + "key": "key" + }, + { + "createdAt": 6, + "_links": { + "parent": { + "href": "href", + "type": "type" + } + }, + "publishedAt": 5, + "name": "name", + "messages": [ + { + "role": "role", + "content": "content" + }, + { + "role": "role", + "content": "content" + } + ], + "model": "{}", + "modelConfigKey": "modelConfigKey", + "version": 1, + "key": "key" + } + ] + }, "properties": { - "private": { - "type": "array", - "description": "private attributes", + "items": { "items": { - "type": "string" + "$ref": "#/components/schemas/AIConfigVariation" }, - "example": [ - "SSN", - "credit_card_number" - ] + "type": "array" }, - "custom": { - "type": "array", - "description": "custom attributes", - "items": { - "type": "string" + "totalCount": { + "type": "integer" + } + }, + "required": [ + "items", + "totalCount" + ], + "type": "object" + }, + "AIConfigVariationPost": { + "example": { + "name": "name", + "messages": [ + { + "role": "role", + "content": "content" }, - "example": [ - "Age", - "FavoriteFood", - "FavoriteColor" - ] + { + "role": "role", + "content": "content" + } + ], + "model": "{}", + "modelConfigKey": "modelConfigKey", + "key": "key" + }, + "properties": { + "key": { + "type": "string" }, - "standard": { - "type": "array", - "description": "standard attributes", + "messages": { "items": { - "type": "string" + "$ref": "#/components/schemas/Message" }, - "example": [ - "key", - "ip", - "firstName", - "lastName", - "country", - "anonymous" - ] + "type": "array" + }, + "model": { + "type": "object" + }, + "name": { + "type": "string" + }, + "modelConfigKey": { + "type": "string" } - } - }, - "UserFlagSetting": { - "type": "object", + }, "required": [ - "_links", - "_value", - "setting" + "key", + "messages", + "model", + "name" ], - "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "type": "object" + }, + "AIConfigVariationPatch": { + "example": { + "name": "name", + "messages": [ + { + "role": "role", + "content": "content" }, - "description": "The location and content type of related resources.", - "example": { - "sort.order": { - "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order", - "type": "application/json" - } + { + "role": "role", + "content": "content" } + ], + "model": "{}", + "published": true, + "modelConfigKey": "modelConfigKey" + }, + "properties": { + "messages": { + "items": { + "$ref": "#/components/schemas/Message" + }, + "type": "array" }, - "_value": { - "description": "The value of the flag variation that the user receives. If there is no defined default rule, this is null.", - "example": "true" + "model": { + "type": "object" }, - "setting": { - "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.", - "example": "null" + "modelConfigKey": { + "type": "string" }, - "reason": { - "description": "Contains information about why that variation was selected.", - "example": "{\"kind\": \"RULE_MATCH\"}", - "$ref": "#/components/schemas/EvaluationReason" + "name": { + "type": "string" + }, + "published": { + "type": "boolean" } - } + }, + "type": "object" }, - "UserFlagSettings": { - "type": "object", + "Message": { + "example": { + "role": "role", + "content": "content" + }, + "properties": { + "content": { + "type": "string" + }, + "role": { + "type": "string" + } + }, "required": [ - "items", - "_links" + "content", + "role" ], - "properties": { - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/UserFlagSetting" - }, - "description": "An array of flag settings for the user", - "example": { - "alternate.page": { - "_links": { - "self": { - "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/alternate.page", - "type": "application/json" - } + "type": "object" + }, + "ModelConfig": { + "example": { + "_access": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] }, - "_value": false, - "setting": null + "action": "action" }, - "sort.order": { - "_links": { - "self": { - "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order", - "type": "application/json" - } + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] }, - "_value": true, - "setting": null + "action": "action" } - } - }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "example": { - "self": { - "href": "/api/v2/users/lacuna/production/Abbie_Braun/flags", - "type": "application/json" + ], + "denied": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" } - } - } - } - }, - "UserRecord": { - "type": "object", + ] + }, + "provider": "provider", + "customParams": "{}", + "name": "name", + "icon": "icon", + "global": true, + "id": "id", + "params": "{}", + "version": 0, + "key": "key", + "tags": [ + "tags", + "tags" + ] + }, "properties": { - "lastPing": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the last time this user was seen", - "example": "2022-06-28T23:21:29.176609596Z" + "_access": { + "$ref": "#/components/schemas/AiConfigsAccess" }, - "environmentId": { - "description": "The environment ID", - "example": "1234a56b7c89d012345e678f", - "$ref": "#/components/schemas/ObjectId" + "name": { + "description": "Human readable name of the model", + "type": "string" }, - "ownerId": { - "description": "The ID of the member who is the owner for this account", - "example": "12ab3c45de678910abc12345", - "$ref": "#/components/schemas/ObjectId" + "key": { + "description": "Unique key for the model", + "type": "string" + }, + "id": { + "description": "Identifier for the model, for use with third party providers", + "type": "string" + }, + "icon": { + "description": "Icon for the model", + "type": "string" + }, + "provider": { + "description": "Provider for the model", + "type": "string" }, - "user": { - "description": "Details on the user", - "$ref": "#/components/schemas/User" + "global": { + "description": "Whether the model is global", + "type": "boolean" }, - "sortValue": { - "description": "If this record is returned as part of a list, the value used to sort the list. This is only included when the sort query parameter is specified. It is a time, in Unix milliseconds, if the sort is by lastSeen. It is a user key if the sort is by userKey.", - "example": "user-key-123abc" + "params": { + "type": "object" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "customParams": { + "type": "object" + }, + "tags": { + "items": { + "type": "string" }, - "description": "The location and content type of related resources", - "example": { - "parent": { - "href": "/api/v2/users/my-project/my-environment", - "type": "application/json" - }, - "self": { - "href": "/api/v2/users/my-project/my-environment/my-user", - "type": "application/json" - }, - "settings": { - "href": "/api/v2/users/my-project/my-environment/my-user/flags", - "type": "text/html" - }, - "site": { - "href": "/my-project/my-environment/users/my-user", - "type": "text/html" - } - } + "type": "array" }, - "_access": { - "description": "Details on the allowed and denied actions for this user", - "$ref": "#/components/schemas/Access" + "version": { + "type": "integer" } - } - }, - "UserSegment": { - "type": "object", + }, "required": [ + "global", + "id", + "key", "name", "tags", - "creationDate", - "lastModifiedDate", - "key", - "_links", - "rules", - "version", - "deleted", - "generation" + "version" ], + "type": "object" + }, + "ModelConfigPost": { + "example": { + "provider": "provider", + "customParams": "{}", + "name": "name", + "icon": "icon", + "id": "id", + "params": "{}", + "key": "key", + "tags": [ + "tags", + "tags" + ] + }, "properties": { "name": { - "type": "string", - "description": "A human-friendly name for the segment.", - "example": "Example segment" + "description": "Human readable name of the model", + "type": "string" }, - "description": { - "type": "string", - "description": "A description of the segment's purpose. Defaults to null and is omitted in the response if not provided.", - "example": "Bundle our sample customers together" + "key": { + "description": "Unique key for the model", + "type": "string" + }, + "id": { + "description": "Identifier for the model, for use with third party providers", + "type": "string" + }, + "icon": { + "description": "Icon for the model", + "type": "string" + }, + "provider": { + "description": "Provider for the model", + "type": "string" + }, + "params": { + "type": "object" + }, + "customParams": { + "type": "object" }, "tags": { - "type": "array", - "description": "Tags for the segment. Defaults to an empty array.", "items": { "type": "string" }, - "example": [ - "testing" - ] + "type": "array" + } + }, + "required": [ + "global", + "id", + "key", + "name" + ], + "type": "object" + }, + "Metrics": { + "example": { + "generationCount": 5, + "generationSuccessCount": 5, + "inputTokens": 0, + "generationErrorCount": 2, + "thumbsDown": 9, + "timeToFirstTokenMs": 2, + "outputTokens": 6, + "totalTokens": 1, + "thumbsUp": 7, + "durationMs": 3 + }, + "properties": { + "inputTokens": { + "type": "integer" }, - "creationDate": { - "description": "Timestamp of when the segment was created", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "outputTokens": { + "type": "integer" }, - "lastModifiedDate": { - "description": "Timestamp of when the segment was last modified", - "example": "1654104600000", - "$ref": "#/components/schemas/UnixMillis" + "totalTokens": { + "type": "integer" }, - "key": { - "type": "string", - "description": "A unique key used to reference the segment", - "example": "segment-key-123abc" + "generationCount": { + "deprecated": true, + "description": "Number of attempted generations", + "type": "integer" }, - "included": { - "type": "array", - "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.", - "items": { - "type": "string" - }, - "example": [ - "user-key-123abc" - ] + "generationSuccessCount": { + "description": "Number of successful generations", + "type": "integer" }, - "excluded": { - "type": "array", - "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.", - "items": { - "type": "string" - }, - "example": [ - "user-key-123abc" - ] + "generationErrorCount": { + "description": "Number of generations with errors", + "type": "integer" }, - "includedContexts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SegmentTarget" - } + "thumbsUp": { + "type": "integer" }, - "excludedContexts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SegmentTarget" - } + "thumbsDown": { + "type": "integer" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "durationMs": { + "type": "integer" }, - "rules": { - "type": "array", - "description": "An array of the targeting rules for this segment.", - "items": { - "$ref": "#/components/schemas/UserSegmentRule" - }, - "example": [ - { - "_id": "1234a56b7c89d012345e678f", - "clauses": [ - { - "_id": "12ab3c45de678910fab12345", - "attribute": "email", - "negate": false, - "op": "endsWith", - "values": [ - ".edu" - ] - } - ] - } - ] + "timeToFirstTokenMs": { + "type": "integer" + } + }, + "type": "object" + }, + "MetricByVariation": { + "example": { + "metrics": { + "generationCount": 5, + "generationSuccessCount": 5, + "inputTokens": 0, + "generationErrorCount": 2, + "thumbsDown": 9, + "timeToFirstTokenMs": 2, + "outputTokens": 6, + "totalTokens": 1, + "thumbsUp": 7, + "durationMs": 3 }, - "version": { - "type": "integer", - "description": "Version of the segment", - "example": 1 + "variationKey": "variationKey" + }, + "properties": { + "variationKey": { + "type": "string" }, - "deleted": { - "type": "boolean", - "description": "Whether the segment has been deleted", - "example": false + "metrics": { + "$ref": "#/components/schemas/Metrics" + } + }, + "type": "object" + }, + "MetricsByVariation": { + "items": { + "$ref": "#/components/schemas/MetricByVariation" + }, + "type": "array" + }, + "ParentAndSelfLinks": { + "description": "The location and content type of related resources", + "example": { + "parent": { + "href": "href", + "type": "type" }, - "_access": { - "$ref": "#/components/schemas/Access" + "self": { + "href": "href", + "type": "type" + } + }, + "properties": { + "self": { + "$ref": "#/components/schemas/CoreLink" }, - "_flags": { - "type": "array", - "description": "A list of flags targeting this segment. Only included when getting a single segment, using the getSegment endpoint.", - "items": { - "$ref": "#/components/schemas/FlagListingRep" - } + "parent": { + "$ref": "#/components/schemas/CoreLink" + } + }, + "required": [ + "parent", + "self" + ], + "type": "object" + }, + "ParentLink": { + "example": { + "parent": { + "href": "href", + "type": "type" + } + }, + "properties": { + "parent": { + "$ref": "#/components/schemas/CoreLink" + } + }, + "required": [ + "parent" + ], + "type": "object" + }, + "PaginatedLinks": { + "example": { + "next": { + "href": "href", + "type": "type" }, - "unbounded": { - "type": "boolean", - "description": "Whether this is a standard segment (false) or a big segment (true). 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.", - "example": false + "last": { + "href": "href", + "type": "type" }, - "unboundedContextKind": { - "type": "string", - "description": "For big segments, the targeted context kind." + "prev": { + "href": "href", + "type": "type" }, - "generation": { - "type": "integer", - "description": "For big segments, how many times this segment has been created." + "self": { + "href": "href", + "type": "type" }, - "_unboundedMetadata": { - "description": "Details on the external data store backing this segment. Only applies to big segments.", - "$ref": "#/components/schemas/SegmentMetadata" + "first": { + "href": "href", + "type": "type" + } + }, + "properties": { + "first": { + "$ref": "#/components/schemas/AiConfigsLink" }, - "_external": { - "type": "string", - "description": "The external data store backing this segment. Only applies to synced segments.", - "example": "amplitude" + "last": { + "$ref": "#/components/schemas/AiConfigsLink" }, - "_externalLink": { - "type": "string", - "description": "The URL for the external data store backing this segment. Only applies to synced segments.", - "example": "https://analytics.amplitude.com/org/1234/cohort/123abc" + "next": { + "$ref": "#/components/schemas/AiConfigsLink" }, - "_importInProgress": { - "type": "boolean", - "description": "Whether an import is currently in progress for the specified segment. Only applies to big segments.", - "example": false + "prev": { + "$ref": "#/components/schemas/AiConfigsLink" + }, + "self": { + "$ref": "#/components/schemas/AiConfigsLink" } - } + }, + "required": [ + "self" + ], + "type": "object" }, - "UserSegmentRule": { - "type": "object", + "AccessRep": { + "$ref": "#/components/schemas/AiConfigsAccess" + }, + "AiConfigsAccess": { + "example": { + "allowed": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ], + "denied": [ + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + } + ] + }, + "properties": { + "denied": { + "items": { + "$ref": "#/components/schemas/AiConfigsAccessDenied" + }, + "type": "array" + }, + "allowed": { + "items": { + "$ref": "#/components/schemas/AiConfigsAccessAllowedRep" + }, + "type": "array" + } + }, "required": [ - "clauses" + "allowed", + "denied" ], + "type": "object" + }, + "AiConfigsAccessDenied": { + "example": { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, "properties": { - "_id": { + "action": { "type": "string" }, - "clauses": { - "type": "array", + "reason": { + "$ref": "#/components/schemas/AiConfigsAccessDeniedReason" + } + }, + "required": [ + "action", + "reason" + ], + "type": "object" + }, + "AiConfigsAccessDeniedReason": { + "example": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "properties": { + "resources": { + "description": "Resource specifier strings", + "example": [ + "proj/*:env/*;qa_*:/flag/*" + ], "items": { - "$ref": "#/components/schemas/Clause" - } + "type": "string" + }, + "type": "array" }, - "weight": { - "type": "integer" + "notResources": { + "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.", + "items": { + "type": "string" + }, + "type": "array" }, - "rolloutContextKind": { - "type": "string" + "actions": { + "description": "Actions to perform on a resource", + "example": [ + "*" + ], + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "type": "array" }, - "bucketBy": { + "notActions": { + "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "type": "array" + }, + "effect": { + "description": "Whether this statement should allow or deny actions on the resources.", + "enum": [ + "allow", + "deny" + ], + "example": "allow", "type": "string" }, - "description": { + "role_name": { "type": "string" } - } + }, + "required": [ + "effect" + ], + "type": "object" }, - "UserSegments": { - "type": "object", + "AiConfigsAccessAllowedRep": { + "example": { + "reason": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, + "action": "action" + }, + "properties": { + "action": { + "type": "string" + }, + "reason": { + "$ref": "#/components/schemas/AiConfigsAccessAllowedReason" + } + }, "required": [ - "items", - "_links", - "totalCount" + "action", + "reason" ], + "type": "object" + }, + "AiConfigsAccessAllowedReason": { + "example": { + "role_name": "role_name", + "notActions": [ + null, + null + ], + "notResources": [ + "notResources", + "notResources" + ], + "effect": "allow", + "resources": [ + "proj/*:env/*;qa_*:/flag/*" + ], + "actions": [ + "*" + ] + }, "properties": { - "items": { - "type": "array", - "description": "An array of segments", + "resources": { + "description": "Resource specifier strings", + "example": [ + "proj/*:env/*;qa_*:/flag/*" + ], "items": { - "$ref": "#/components/schemas/UserSegment" - } + "type": "string" + }, + "type": "array" }, - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" + "notResources": { + "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.", + "items": { + "type": "string" }, - "description": "The location and content type of related resources" + "type": "array" }, - "totalCount": { - "type": "integer", - "description": "The total number of segments" + "actions": { + "description": "Actions to perform on a resource", + "example": [ + "*" + ], + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "type": "array" + }, + "notActions": { + "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.", + "items": { + "$ref": "#/components/schemas/ActionSpecifier" + }, + "type": "array" + }, + "effect": { + "description": "Whether this statement should allow or deny actions on the resources.", + "enum": [ + "allow", + "deny" + ], + "example": "allow", + "type": "string" + }, + "role_name": { + "type": "string" } - } + }, + "required": [ + "effect" + ], + "type": "object" }, - "Users": { + "AiConfigsLink": { + "example": { + "href": "href", + "type": "type" + }, + "properties": { + "href": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "DeploymentCollectionRep": { "type": "object", "required": [ "totalCount", "items" ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources", - "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" - } - } - }, "totalCount": { "type": "integer", - "description": "The total number of users in the environment", - "example": 245 + "description": "The total number of deployments", + "example": 25 }, "items": { "type": "array", - "description": "Details on the users", + "description": "A list of deployments", "items": { - "$ref": "#/components/schemas/UserRecord" + "$ref": "#/components/schemas/DeploymentRep" } - } - } - }, - "UsersRep": { - "type": "object", - "required": [ - "totalCount", - "items" - ], - "properties": { + }, "_links": { "type": "object", "additionalProperties": { @@ -35916,563 +47443,598 @@ }, "description": "The location and content type of related resources", "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" - } - } - }, - "totalCount": { - "type": "integer", - "description": "The total number of users in the environment", - "example": 245 - }, - "items": { - "type": "array", - "description": "Details on the users", - "items": { - "$ref": "#/components/schemas/UserRecord" + "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" + } } } } }, - "ValuePut": { - "type": "object", - "properties": { - "setting": { - "description": "The variation value to set for the context. Must match the flag's variation type.", - "example": "existing_variation_value_to_use" - }, - "comment": { - "type": "string", - "description": "Optional comment describing the change", - "example": "make sure this context experiences a specific variation" - } - } + "DeploymentKind": { + "type": "string" }, - "Variation": { + "DeploymentRep": { "type": "object", "required": [ - "value" + "id", + "applicationKey", + "applicationVersion", + "startedAt", + "status", + "kind", + "active", + "archived", + "environmentKey", + "numberOfContributors", + "numberOfPullRequests", + "linesAdded", + "linesDeleted", + "leadTime" ], "properties": { - "_id": { + "id": { "type": "string", - "description": "The ID of the variation. Leave empty when you are creating a flag." - }, - "value": { - "description": "The value of the variation. For boolean flags, this must be true or false. For multivariate flags, this may be a string, number, or JSON object." + "format": "uuid", + "description": "The deployment ID", + "example": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11" }, - "description": { + "applicationKey": { "type": "string", - "description": "Description of the variation. Defaults to an empty string, but is omitted from the response if not set." + "description": "The application key", + "example": "billing-service" }, - "name": { + "applicationVersion": { "type": "string", - "description": "A human-friendly name for the variation. Defaults to an empty string, but is omitted from the response if not set." - } - } - }, - "VariationOrRolloutRep": { - "type": "object", - "properties": { - "variation": { + "description": "The application version", + "example": "a90a8a2" + }, + "startedAt": { + "description": "The time the deployment started", + "example": "1706701522000", + "$ref": "#/components/schemas/UnixMillis" + }, + "endedAt": { + "description": "The time the deployment ended", + "example": "1706712518000", + "$ref": "#/components/schemas/UnixMillis" + }, + "durationMs": { "type": "integer", - "description": "The index of the variation, from the array of variations for this flag" + "format": "int64", + "description": "The duration of the deployment in milliseconds", + "example": 10996000 }, - "rollout": { - "description": "Details on the percentage rollout, if it exists", - "$ref": "#/components/schemas/Rollout" - } - } - }, - "VariationSummary": { - "type": "object", - "required": [ - "rules", - "nullRules", - "targets", - "contextTargets" - ], - "properties": { - "rules": { - "type": "integer" + "status": { + "description": "The status of the deployment", + "example": "finished", + "$ref": "#/components/schemas/DeploymentStatus" }, - "nullRules": { - "type": "integer" + "kind": { + "description": "The kind of deployment", + "example": "redeployment", + "$ref": "#/components/schemas/DeploymentKind" }, - "targets": { - "type": "integer" + "active": { + "type": "boolean", + "description": "Whether the deployment is active", + "example": true }, - "contextTargets": { - "type": "integer" + "metadata": { + "type": "object", + "additionalProperties": {}, + "description": "The metadata associated with the deployment", + "example": { + "buildNumber": "1234" + } }, - "isFallthrough": { - "type": "boolean" + "archived": { + "type": "boolean", + "description": "Whether the deployment is archived", + "example": false }, - "isOff": { - "type": "boolean" + "environmentKey": { + "type": "string", + "description": "The environment key", + "example": "production" }, - "rollout": { - "type": "integer" + "numberOfContributors": { + "type": "integer", + "description": "The number of contributors", + "example": 1 }, - "bucketBy": { - "type": "string" + "numberOfPullRequests": { + "type": "integer", + "description": "The number of pull requests", + "example": 2 + }, + "linesAdded": { + "type": "integer", + "format": "int64", + "description": "The number of lines added", + "example": 100 + }, + "linesDeleted": { + "type": "integer", + "format": "int64", + "description": "The number of lines deleted", + "example": 50 + }, + "leadTime": { + "type": "integer", + "format": "int64", + "description": "The total lead time from first commit to deployment end in milliseconds", + "example": 20237000 + }, + "pullRequests": { + "description": "The pull requests contained in the deployment", + "$ref": "#/components/schemas/PullRequestCollectionRep" + }, + "flagReferences": { + "description": "The flag references contained in the deployment", + "$ref": "#/components/schemas/FlagReferenceCollectionRep" + }, + "leadTimeStages": { + "description": "The lead time stages for the deployment", + "$ref": "#/components/schemas/LeadTimeStagesRep" } } }, - "VersionsRep": { + "DeploymentStatus": { + "type": "string" + }, + "EvaluationsSummary": { "type": "object", - "required": [ - "validVersions", - "latestVersion", - "currentVersion" - ], "properties": { - "validVersions": { + "variations": { "type": "array", - "description": "A list of all valid API versions. To learn more about our versioning, read [Versioning](https://apidocs.launchdarkly.com/#section/Overview/Versioning).", + "description": "A list of variation evaluations", "items": { - "$ref": "#/components/schemas/DateVersion" + "$ref": "#/components/schemas/VariationEvalSummary" } - }, - "latestVersion": { - "description": "The most recently released version of the API", - "example": "20220603", - "$ref": "#/components/schemas/DateVersion" - }, - "currentVersion": { - "description": "The version of the API currently in use. Typically this is the API version specified for your access token. If you add the LD-API-Version: beta header to your request, this will be equal to the latestVersion.", - "example": "20220603", - "$ref": "#/components/schemas/DateVersion" - }, - "beta": { - "type": "boolean", - "description": "Whether the version of the API currently is use is a beta version. This is always true if you add the LD-API-Version: beta header to your request.", - "example": false } } }, - "Webhook": { + "EventType": { + "type": "string" + }, + "FailureReasonRep": { "type": "object", "required": [ - "_links", - "_id", - "url", - "on", - "tags" + "attribute", + "reason" ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" - }, - "_id": { - "type": "string", - "description": "The ID of this webhook", - "example": "57be1db38b75bf0772d11384" - }, - "name": { - "type": "string", - "description": "A human-readable name for this webhook", - "example": "Example hook" - }, - "url": { + "attribute": { "type": "string", - "description": "The URL to which LaunchDarkly sends an HTTP POST payload for this webhook", - "example": "http://www.example.com" + "description": "The attribute that failed validation", + "example": "projectKey" }, - "secret": { + "reason": { "type": "string", - "description": "The secret for this webhook", - "example": "frobozz" - }, - "statements": { - "type": "array", - "description": "Represents a Custom role policy, defining a resource kinds filter the webhook responds to.", - "items": { - "$ref": "#/components/schemas/Statement" - } - }, - "on": { - "type": "boolean", - "description": "Whether or not this webhook is enabled", - "example": true - }, - "tags": { - "type": "array", - "description": "List of tags for this webhook", - "items": { - "type": "string" - }, - "example": [ - "examples" - ] - }, - "_access": { - "description": "Details on the allowed and denied actions for this webhook", - "$ref": "#/components/schemas/Access" + "description": "The reason the attribute failed validation", + "example": "must be present" } } }, - "Webhooks": { + "FlagEventCollectionRep": { "type": "object", "required": [ - "_links", + "totalCount", "items" ], "properties": { + "totalCount": { + "type": "integer", + "description": "The total number of flag events", + "example": 1200 + }, + "items": { + "type": "array", + "description": "A list of flag events", + "items": { + "$ref": "#/components/schemas/FlagEventRep" + } + }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" }, - "description": "The location and content type of related resources" - }, - "items": { - "type": "array", - "description": "An array of webhooks", - "items": { - "$ref": "#/components/schemas/Webhook" + "description": "The location and content type of related resources", + "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" + } } } } }, - "WeightedVariation": { + "FlagEventExperiment": { "type": "object", "required": [ - "variation", - "weight" + "key", + "name", + "iteration" ], "properties": { - "variation": { - "type": "integer" + "key": { + "type": "string", + "description": "The experiment key", + "example": "experiment-1" }, - "weight": { - "type": "integer" + "name": { + "type": "string", + "description": "The experiment name", + "example": "Experiment 1" }, - "_untracked": { - "type": "boolean" + "iteration": { + "description": "The experiment iteration", + "$ref": "#/components/schemas/FlagEventExperimentIteration" + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + }, + "description": "The location and content type of related resources" } } }, - "WorkflowTemplateMetadata": { + "FlagEventExperimentCollection": { "type": "object", + "required": [ + "totalCount", + "items" + ], "properties": { - "parameters": { + "totalCount": { + "type": "integer", + "description": "The total number of experiments", + "example": 1 + }, + "items": { "type": "array", + "description": "A list of experiments", "items": { - "$ref": "#/components/schemas/WorkflowTemplateParameter" + "$ref": "#/components/schemas/FlagEventExperiment" } } } }, - "WorkflowTemplateOutput": { + "FlagEventExperimentIteration": { "type": "object", "required": [ - "_id", - "_key", - "_creationDate", - "_ownerId", - "_maintainerId", - "_links" + "id", + "status", + "startedAt" ], "properties": { - "_id": { - "type": "string" - }, - "_key": { - "type": "string" + "id": { + "type": "string", + "description": "The experiment iteration ID", + "example": "65baa44ecc4b5bce113bb4f7" }, - "name": { - "type": "string" + "status": { + "description": "The experiment iteration status", + "example": "running", + "enum": [ + "running", + "stopped" + ], + "$ref": "#/components/schemas/IterationStatus" }, - "_creationDate": { + "startedAt": { + "description": "Timestamp of when the iteration started", + "example": "1655314200000", "$ref": "#/components/schemas/UnixMillis" }, - "_ownerId": { - "type": "string" - }, - "_maintainerId": { - "type": "string" + "endedAt": { + "description": "Timestamp of when the iteration ended", + "example": "1656610200000", + "$ref": "#/components/schemas/UnixMillis" }, "_links": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Link" - } - }, - "description": { - "type": "string" - }, - "stages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StageOutput" - } + }, + "description": "The location and content type of related resources" } } }, - "WorkflowTemplateParameter": { + "FlagEventImpactRep": { "type": "object", "properties": { - "_id": { - "description": "The ID of the condition or instruction referenced by this parameter", - "$ref": "#/components/schemas/ObjectId" - }, - "path": { + "size": { "type": "string", - "description": "The path of the property to parameterize, relative to its parent condition or instruction" + "description": "The size of the flag event impact. Sizes are defined as: none (0%), small (0-20%), medium (20-80%), large (>80%)", + "example": "medium", + "enum": [ + "none", + "small", + "medium", + "large" + ] }, - "default": { - "description": "The default value of the parameter and other relevant metadata", - "$ref": "#/components/schemas/ParameterDefault" + "percentage": { + "type": "number", + "description": "The percentage of the flag event impact", + "example": 50 }, - "valid": { - "type": "boolean", - "description": "Whether the default value is valid for the target flag and environment" + "reason": { + "description": "The reason for the flag event impact", + "example": "evaluations", + "enum": [ + "evaluations", + "global", + "waiting" + ], + "$ref": "#/components/schemas/ImpactReason" + }, + "evaluationsSummary": { + "description": "A summary of the change in variation evaluations after the flag event", + "$ref": "#/components/schemas/EvaluationsSummary" } } }, - "WorkflowTemplatesListingOutputRep": { + "FlagEventMemberRep": { "type": "object", "required": [ - "items" + "id", + "email", + "firstName", + "lastName" ], "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WorkflowTemplateOutput" - } + "id": { + "type": "string", + "description": "The member ID", + "example": "65baa44ecc4b5bce113bb4f7" + }, + "email": { + "type": "string", + "description": "The member email", + "example": "test@launchdarkly.com" + }, + "firstName": { + "type": "string", + "description": "The member first name" + }, + "lastName": { + "type": "string", + "description": "The member last name" } } }, - "createApprovalRequestRequest": { + "FlagEventRep": { "type": "object", "required": [ - "resourceId", + "id", + "projectId", + "projectKey", + "flagKey", + "eventType", + "eventTime", "description", - "instructions" + "impact" ], "properties": { - "resourceId": { + "id": { "type": "string", - "description": "String representation of a resource" + "format": "uuid", + "description": "The flag event ID", + "example": "e3b2b0e0-9e9b-4c9a-8e9a-0e0e0e0e0e0e" }, - "comment": { + "projectId": { "type": "string", - "description": "Optional comment describing the approval request", - "example": "optional comment" + "description": "The project ID", + "example": "65baa44ecc4b5bce113bb4f7" + }, + "projectKey": { + "type": "string", + "description": "The project key", + "example": "default" + }, + "environmentId": { + "type": "string", + "description": "The environment ID", + "example": "65baa44ecc4b5bce113bb4f7" + }, + "environmentKey": { + "type": "string", + "description": "The environment key", + "example": "production" + }, + "flagKey": { + "type": "string", + "description": "The flag key", + "example": "enable-new-payment-method" + }, + "eventType": { + "description": "The event type", + "example": "enabled_targeting", + "$ref": "#/components/schemas/EventType" + }, + "eventTime": { + "description": "A Unix timestamp in milliseconds", + "example": "1616425200000", + "$ref": "#/components/schemas/UnixMillis" }, "description": { "type": "string", - "description": "A brief description of the changes you're requesting", - "example": "Requesting to update targeting" + "description": "The event description", + "example": "Targeting rule enabled" }, - "instructions": { - "description": "List of instructions in semantic patch format to be applied to the feature flag. Review the [Update feature flag](/tag/Feature-flags) documentation for details on available instructions.", - "example": "[{\"kind\": \"addUserTargets\", \"values\": [ \"user-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]", - "$ref": "#/components/schemas/Instructions" + "auditLogEntryId": { + "type": "string", + "description": "The audit log entry ID", + "example": "e3b2b0e0-9e9b-4c9a-8e9a-0e0e0e0e0e0e" }, - "notifyMemberIds": { - "type": "array", - "description": "An array of member IDs. These members are notified to review the approval request.", - "items": { - "type": "string" - }, - "example": [ - "1234a56b7c89d012345e678f" - ] + "member": { + "description": "The member data", + "$ref": "#/components/schemas/FlagEventMemberRep" }, - "notifyTeamKeys": { + "actions": { "type": "array", - "description": "An array of team keys. The members of these teams are notified to review the approval request.", + "description": "The resource actions", "items": { "type": "string" - }, - "example": [ - "example-reviewer-team" - ] + } }, - "integrationConfig": { - "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 manifest.json for that integration, at https://github.com/launchdarkly/integration-framework.", - "$ref": "#/components/schemas/FormVariableConfig" + "impact": { + "description": "The flag event evaluation impact", + "$ref": "#/components/schemas/FlagEventImpactRep" + }, + "experiments": { + "description": "A list of experiment iterations related to the flag event", + "$ref": "#/components/schemas/FlagEventExperimentCollection" } } }, - "createCopyFlagConfigApprovalRequestRequest": { + "FlagReferenceCollectionRep": { "type": "object", "required": [ - "description", - "source" + "totalCount", + "items" ], "properties": { - "comment": { - "type": "string", - "description": "Optional comment describing the approval request", - "example": "optional comment" - }, - "description": { - "type": "string", - "description": "A brief description of your changes", - "example": "copy flag settings to another environment" - }, - "notifyMemberIds": { - "type": "array", - "description": "An array of member IDs. These members are notified to review the approval request.", - "items": { - "type": "string" - }, - "example": [ - "1234a56b7c89d012345e678f" - ] + "totalCount": { + "type": "integer", + "description": "The total number of flag references", + "example": 25 }, - "notifyTeamKeys": { + "items": { "type": "array", - "description": "An array of team keys. The members of these teams are notified to review the approval request.", + "description": "A list of flag references", "items": { - "type": "string" - }, - "example": [ - "example-reviewer-team" - ] - }, - "source": { - "description": "The flag to copy", - "$ref": "#/components/schemas/sourceFlag" + "$ref": "#/components/schemas/FlagReferenceRep" + } + } + } + }, + "FlagReferenceRep": { + "type": "object", + "required": [ + "projectKey", + "flagKey", + "referencesAdded", + "referencesRemoved" + ], + "properties": { + "projectKey": { + "type": "string", + "description": "The project key", + "example": "default" }, - "includedActions": { - "type": "array", - "description": "Optional list of the flag changes to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If neither are included, then all flag changes will be copied.", - "items": { - "type": "string", - "enum": [ - "updateOn", - "updateFallthrough", - "updateOffVariation", - "updateRules", - "updateTargets", - "updatePrerequisites" - ] - }, - "example": [ - "updateOn" - ] + "flagKey": { + "type": "string", + "description": "The flag key", + "example": "enable-new-payment-structure" }, - "excludedActions": { - "type": "array", - "description": "Optional list of the flag changes NOT to copy from the source environment to the target environment. You may include either includedActions or excludedActions, but not both. If neither are included, then all flag changes will be copied.", - "items": { - "type": "string", - "enum": [ - "updateOn", - "updateFallthrough", - "updateOffVariation", - "updateRules", - "updateTargets", - "updatePrerequisites" - ] - }, - "example": [ - "updateOn" - ] + "referencesAdded": { + "type": "integer", + "description": "The number of references added", + "example": 2 + }, + "referencesRemoved": { + "type": "integer", + "description": "The number of references removed", + "example": 5 } } }, - "createFlagConfigApprovalRequestRequest": { + "ImpactReason": { + "type": "string" + }, + "InsightGroup": { "type": "object", "required": [ - "description", - "instructions" + "key", + "name", + "projectKey", + "environmentKey", + "createdAt" ], "properties": { - "comment": { + "environment": { + "description": "Expanded details about the environment", + "$ref": "#/components/schemas/Environment" + }, + "scores": { + "description": "The scores for the insight group", + "$ref": "#/components/schemas/InsightGroupScores" + }, + "scoreMetadata": { + "description": "Metadata about the insight scores, when expanded", + "$ref": "#/components/schemas/InsightGroupCollectionScoreMetadata" + }, + "key": { "type": "string", - "description": "Optional comment describing the approval request", - "example": "optional comment" + "description": "The insight group key", + "example": "default-production-all-apps" }, - "description": { + "name": { "type": "string", - "description": "A brief description of the changes you're requesting", - "example": "Requesting to update targeting" + "description": "The insight group name", + "example": "Production - All Apps" }, - "instructions": { - "description": "List of instructions in semantic patch format to be applied to the feature flag. Review the [Update feature flag](/tag/Feature-flags) documentation for details on available instructions.", - "example": "[{\"kind\": \"addTargets\", \"values\": [ \"context-key-123abc\"], \"variationId\": \"ce67d625-a8b9-4fb5-a344-ab909d9d4f4d\" }]", - "$ref": "#/components/schemas/Instructions" + "projectKey": { + "type": "string", + "description": "The project key", + "example": "default" }, - "notifyMemberIds": { - "type": "array", - "description": "An array of member IDs. These members are notified to review the approval request.", - "items": { - "type": "string" - }, - "example": [ - "1234a56b7c89d012345e678f" - ] + "environmentKey": { + "type": "string", + "description": "The environment key", + "example": "production" }, - "notifyTeamKeys": { + "applicationKeys": { "type": "array", - "description": "An array of team keys. The members of these teams are notified to review the approval request.", + "description": "The application keys", "items": { "type": "string" }, "example": [ - "example-reviewer-team" + "billing-service", + "inventory-service" ] }, - "executionDate": { - "description": "Timestamp for when instructions will be executed", - "example": "1653926400000", + "createdAt": { + "description": "The time the insight group was created", + "example": "1706701522000", "$ref": "#/components/schemas/UnixMillis" - }, - "operatingOnId": { - "type": "string", - "description": "The ID of a scheduled change. Include this if your instructions include editing or deleting a scheduled change.", - "example": "6297ed79dee7dc14e1f9a80c" - }, - "integrationConfig": { - "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 manifest.json for that integration, at https://github.com/launchdarkly/integration-framework.", - "$ref": "#/components/schemas/FormVariableConfig" } } }, - "customProperty": { + "InsightGroupCollection": { "type": "object", "required": [ - "name", - "value" + "totalCount", + "items" ], "properties": { - "name": { - "type": "string", - "description": "The name of the custom property of this type.", - "example": "Jira issues" + "totalCount": { + "type": "integer", + "description": "The total number of insight groups", + "example": 15 }, - "value": { + "items": { "type": "array", - "description": "An array of values for the custom property data to associate with this flag.", + "description": "A list of insight groups", "items": { - "type": "string" - }, - "example": [ - "is-123", - "is-456" - ] - } - } - }, - "flagDefaultsRep": { - "type": "object", - "properties": { + "$ref": "#/components/schemas/InsightGroup" + } + }, "_links": { "type": "object", "additionalProperties": { @@ -36480,834 +48042,1066 @@ }, "description": "The location and content type of related resources" }, - "key": { - "type": "string", - "description": "A unique key for the flag default" + "metadata": { + "description": "Metadata about the insight groups", + "$ref": "#/components/schemas/InsightGroupCollectionMetadata" }, - "tags": { - "type": "array", - "description": "A list of default tags for each flag", - "items": { - "type": "string" - }, - "example": [ - "tag-1", - "tag-2" - ] + "scoreMetadata": { + "description": "Metadata about the insight scores, when expanded", + "$ref": "#/components/schemas/InsightGroupCollectionScoreMetadata" + } + } + }, + "InsightGroupCollectionMetadata": { + "type": "object", + "required": [ + "countByIndicator" + ], + "properties": { + "countByIndicator": { + "$ref": "#/components/schemas/InsightGroupsCountByIndicator" + } + } + }, + "InsightGroupCollectionScoreMetadata": { + "type": "object", + "required": [ + "period", + "lastPeriod" + ], + "properties": { + "period": { + "description": "The time period for the score calculations", + "$ref": "#/components/schemas/InsightPeriod" }, - "temporary": { - "type": "boolean", - "description": "Whether the flag should be temporary by default", - "example": true + "lastPeriod": { + "description": "The time period for the score calculations in the last period", + "$ref": "#/components/schemas/InsightPeriod" + } + } + }, + "InsightGroupScores": { + "type": "object", + "required": [ + "overall", + "deploymentFrequency", + "deploymentFailureRate", + "leadTime", + "impactSize", + "experimentationCoverage", + "flagHealth", + "velocity", + "risk", + "efficiency" + ], + "properties": { + "overall": { + "description": "The overall score for the insight group", + "$ref": "#/components/schemas/InsightsMetricScore" }, - "defaultClientSideAvailability": { - "description": "Which client-side SDK types can use this flag by default. Set usingMobileKey to make the flag available for mobile SDKs. Set usingEnvironmentId to make the flag available for client-side SDKs.", - "example": "{\"usingMobileKey\": true, \"usingEnvironmentId\": false}", - "$ref": "#/components/schemas/ClientSideAvailability" + "deploymentFrequency": { + "description": "The deployment frequency score for the insight group", + "$ref": "#/components/schemas/InsightsMetricScore" }, - "booleanDefaults": { - "description": "Defaults for boolean flags within this project", - "$ref": "#/components/schemas/BooleanDefaults" + "deploymentFailureRate": { + "description": "The deployment failure rate score for the insight group", + "$ref": "#/components/schemas/InsightsMetricScore" + }, + "leadTime": { + "description": "The lead time score for the insight group", + "$ref": "#/components/schemas/InsightsMetricScore" + }, + "impactSize": { + "description": "The impact size score for the insight group", + "$ref": "#/components/schemas/InsightsMetricScore" + }, + "experimentationCoverage": { + "description": "The Experimentation coverage score for the insight group", + "$ref": "#/components/schemas/InsightsMetricScore" + }, + "flagHealth": { + "description": "The flag health score for the insight group", + "$ref": "#/components/schemas/InsightsMetricScore" + }, + "velocity": { + "description": "The velocity score for the insight group", + "$ref": "#/components/schemas/InsightsMetricScore" + }, + "risk": { + "description": "The risk score for the insight group", + "$ref": "#/components/schemas/InsightsMetricScore" + }, + "efficiency": { + "description": "The efficiency score for the insight group", + "$ref": "#/components/schemas/InsightsMetricScore" + }, + "creationRatio": { + "description": "The creation ratio score for the insight group", + "$ref": "#/components/schemas/InsightsMetricScore" } } }, - "flagLinkPost": { + "InsightGroupsCountByIndicator": { "type": "object", + "required": [ + "excellent", + "good", + "fair", + "needsAttention", + "notCalculated", + "unknown", + "total" + ], "properties": { - "key": { - "type": "string", - "description": "The flag link key", - "example": "flag-link-key-123abc" + "excellent": { + "type": "integer", + "description": "The number of insight groups with an excellent indicator", + "example": 1 }, - "integrationKey": { - "type": "string", - "description": "The integration key for an integration whose manifest.json includes the flagLink capability, if this is a flag link for an existing integration. Do not include for URL flag links." + "good": { + "type": "integer", + "description": "The number of insight groups with a good indicator", + "example": 1 }, - "timestamp": { - "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.", + "fair": { + "type": "integer", + "description": "The number of insight groups with a fair indicator", + "example": 1 + }, + "needsAttention": { + "type": "integer", + "description": "The number of insight groups with a needs attention indicator", + "example": 1 + }, + "notCalculated": { + "type": "integer", + "description": "The number of insight groups with a not calculated indicator", + "example": 1 + }, + "unknown": { + "type": "integer", + "description": "The number of insight groups with an unknown indicator", + "example": 1 + }, + "total": { + "type": "integer", + "description": "The total number of insight groups", + "example": 6 + } + } + }, + "InsightPeriod": { + "type": "object", + "required": [ + "startTime", + "endTime" + ], + "properties": { + "startTime": { + "description": "The start time of the period", + "example": "1706701522000", "$ref": "#/components/schemas/UnixMillis" }, - "deepLink": { - "type": "string", - "description": "The URL for the external resource you are linking the flag to", - "example": "https://example.com/archives/123123123" + "endTime": { + "description": "The end time of the period", + "example": "1706701522000", + "$ref": "#/components/schemas/UnixMillis" + } + } + }, + "InsightScores": { + "type": "object", + "required": [ + "period", + "lastPeriod", + "scores" + ], + "properties": { + "period": { + "description": "The time period for the scores", + "$ref": "#/components/schemas/InsightPeriod" }, - "title": { - "type": "string", - "description": "The title of the flag link", - "example": "Example link title" + "lastPeriod": { + "description": "The time period for the scores in the last period", + "$ref": "#/components/schemas/InsightPeriod" }, - "description": { - "type": "string", - "description": "The description of the flag link", - "example": "Example link description" + "scores": { + "description": "The scores for the insight groups", + "$ref": "#/components/schemas/InsightGroupScores" }, - "metadata": { + "_links": { "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/components/schemas/Link" }, - "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 manifest.json file under flagLink." + "description": "The location and content type of related resources" } } }, - "flagSempatch": { + "InsightsChart": { "type": "object", "required": [ - "instructions" + "metadata", + "series" ], "properties": { - "instructions": { - "description": "Semantic patch instructions. The same ones that are valid for flags are valid here.", - "$ref": "#/components/schemas/Instructions" + "metadata": { + "description": "Metadata for the chart", + "$ref": "#/components/schemas/InsightsChartMetadata" }, - "comment": { - "type": "string" + "series": { + "type": "array", + "description": "Series data for the chart", + "items": { + "$ref": "#/components/schemas/InsightsChartSeries" + } } } }, - "followersPerFlag": { + "InsightsChartBounds": { "type": "object", + "required": [ + "name", + "value" + ], "properties": { - "flagKey": { + "name": { "type": "string", - "description": "The flag key", - "example": "example-flag-key" + "description": "Name of the bound", + "example": "equal" }, - "followers": { - "type": "array", - "description": "A list of members who are following this flag", - "items": { - "$ref": "#/components/schemas/FollowFlagMember" - } + "value": { + "type": "integer", + "format": "int64", + "description": "Value of the bound", + "example": 100 } } }, - "instructionUserRequest": { + "InsightsChartMetadata": { "type": "object", "required": [ - "kind", - "flagKey", - "variationId" + "summary", + "xAxis", + "yAxis" ], "properties": { - "kind": { - "type": "string", - "description": "The type of change to make to the removal date for this user from individual targeting for this flag.", - "example": "addExpireUserTargetDate", - "enum": [ - "addExpireUserTargetDate", - "updateExpireUserTargetDate", - "removeExpireUserTargetDate" - ] + "summary": { + "description": "Metadata values", + "$ref": "#/components/schemas/InsightsChartMetadataCustomValues" }, - "flagKey": { + "name": { "type": "string", - "description": "The flag key", - "example": "sample-flag-key" + "description": "Name of the chart", + "example": "deploymentFrequency" }, - "variationId": { - "type": "string", - "description": "ID of a variation on the flag", - "example": "ce12d345-a1b2-4fb5-a123-ab123d4d5f5d" + "metrics": { + "description": "Metrics for the given chart data, included when expanded", + "$ref": "#/components/schemas/InsightsChartMetrics" }, - "value": { - "type": "integer", - "description": "The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag. Required if kind is addExpireUserTargetDate or updateExpireUserTargetDate.", - "example": 1653469200000 + "xAxis": { + "description": "X-axis metadata", + "example": "timestamp", + "$ref": "#/components/schemas/InsightsChartSeriesMetadataAxis" }, - "version": { - "type": "integer", - "description": "The version of the expiring user target to update. Optional and only used if kind is updateExpireUserTargetDate. If included, update will fail if version doesn't match current version of the expiring user target.", - "example": 1 + "yAxis": { + "description": "Y-axis metadata", + "example": "count", + "$ref": "#/components/schemas/InsightsChartSeriesMetadataAxis" } } }, - "ipList": { + "InsightsChartMetadataCustomValues": { + "type": "object", + "additionalProperties": {} + }, + "InsightsChartMetric": { "type": "object", "required": [ - "addresses", - "outboundAddresses" + "indicator", + "value", + "unit", + "modifier", + "tiers" ], "properties": { - "addresses": { + "indicator": { + "type": "string", + "description": "Metric indicator tier", + "example": "excellent" + }, + "value": { + "type": "number", + "description": "Metric value", + "example": 5 + }, + "unit": { + "type": "string", + "description": "Metric unit", + "example": "count" + }, + "modifier": { + "type": "string", + "description": "Metric modifier", + "example": "per day" + }, + "tiers": { "type": "array", - "description": "A list of the IP addresses LaunchDarkly's service uses", + "description": "Metric indicator tiers", "items": { - "type": "string" - }, - "example": [ - "104.156.80.0/20", - "151.101.0.0/16" - ] + "$ref": "#/components/schemas/InsightsMetricTierDefinition" + } + } + } + }, + "InsightsChartMetrics": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/InsightsChartMetric" + } + }, + "InsightsChartSeries": { + "type": "object", + "required": [ + "metadata", + "data" + ], + "properties": { + "metadata": { + "description": "Metadata for the series", + "$ref": "#/components/schemas/InsightsChartSeriesMetadata" }, - "outboundAddresses": { + "data": { "type": "array", - "description": "A list of the IP addresses outgoing webhook notifications use", + "description": "Data points for the series", "items": { - "type": "string" - }, - "example": [ - "52.21.152.96/32" - ] + "$ref": "#/components/schemas/InsightsChartSeriesDataPoint" + } } } }, - "membersPatchInput": { + "InsightsChartSeriesDataPoint": { "type": "object", "required": [ - "instructions" + "x", + "y" ], "properties": { - "comment": { - "type": "string", - "description": "Optional comment describing the update", - "example": "Optional comment about the update" + "x": { + "type": "integer", + "format": "int64", + "description": "X-axis value", + "example": 1617225600000 }, - "instructions": { - "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require additional parameters as part of this object.", - "example": "[ { \"kind\": \"replaceMemberRoles\", \"value\": \"reader\" } ]", - "$ref": "#/components/schemas/Instructions" + "y": { + "type": "integer", + "format": "int64", + "description": "Y-axis value", + "example": 100 + }, + "values": { + "type": "object", + "additionalProperties": {}, + "description": "Additional values for the data point" } } }, - "oauthClientPost": { + "InsightsChartSeriesMetadata": { "type": "object", + "required": [ + "name" + ], "properties": { "name": { "type": "string", - "description": "The name of your new LaunchDarkly OAuth 2.0 client." + "description": "Name of the series" }, - "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." + "count": { + "type": "integer", + "format": "int64", + "description": "Aggregate count of the series values" }, - "description": { - "type": "string", - "description": "Description of your OAuth 2.0 client." + "bounds": { + "type": "array", + "description": "Bounds for the series data", + "items": { + "$ref": "#/components/schemas/InsightsChartBounds" + } } } }, - "patchFlagsRequest": { + "InsightsChartSeriesMetadataAxis": { "type": "object", "required": [ - "instructions" + "unit" ], "properties": { - "comment": { + "unit": { "type": "string", - "description": "Optional comment describing the change", - "example": "optional comment" + "description": "Unit of the axis", + "example": "count" + } + } + }, + "InsightsMetricIndicatorRange": { + "type": "object", + "required": [ + "min", + "max" + ], + "properties": { + "min": { + "type": "integer", + "description": "The minimum value for the indicator range", + "example": 0 }, - "instructions": { - "type": "array", - "description": "The instructions to perform when updating", - "items": { - "$ref": "#/components/schemas/Instruction" - }, - "example": [ - { - "kind": "addExpireUserTargetDate", - "userKey": "sandy", - "value": 1686412800000, - "variationId": "ce12d345-a1b2-4fb5-a123-ab123d4d5f5d" - } - ] + "max": { + "type": "integer", + "description": "The maximum value for the indicator range", + "example": 100 } } }, - "patchSegmentExpiringTargetInputRep": { + "InsightsMetricScore": { "type": "object", "required": [ - "instructions" + "score", + "indicator", + "indicatorRange" ], "properties": { - "comment": { - "type": "string", - "description": "Optional description of changes", - "example": "optional comment" + "score": { + "type": "integer", + "description": "The score for the metric", + "example": 100 }, - "instructions": { + "aggregateOf": { "type": "array", - "description": "Semantic patch instructions for the desired changes to the resource", + "description": "The keys of the metrics that were aggregated to calculate this score", "items": { - "$ref": "#/components/schemas/patchSegmentExpiringTargetInstruction" + "type": "string" }, "example": [ - { - "contextKey": "user@email.com", - "contextKind": "user", - "kind": "updateExpiringTarget", - "targetType": "included", - "value": 1587582000000, - "version": 0 - } + "deploymentFrequency", + "leadTime" ] + }, + "diffVsLastPeriod": { + "type": "integer" + }, + "indicator": { + "description": "The indicator for the score", + "example": "excellent", + "enum": [ + "excellent", + "good", + "fair", + "needsAttention", + "notCalculated", + "unknown" + ], + "$ref": "#/components/schemas/InsightsMetricScoreIndicator" + }, + "indicatorRange": { + "description": "The indicator range for the score", + "$ref": "#/components/schemas/InsightsMetricIndicatorRange" + }, + "lastPeriod": { + "description": "The score for the metric in the last period", + "$ref": "#/components/schemas/InsightsMetricScore" } } }, - "patchSegmentExpiringTargetInstruction": { + "InsightsMetricScoreIndicator": { + "type": "string" + }, + "InsightsMetricTierDefinition": { "type": "object", "required": [ - "kind", - "contextKey", - "contextKind", - "targetType" + "indicator", + "description" ], "properties": { - "kind": { - "type": "string", - "description": "The type of change to make to the context's removal date from this segment", - "example": "addExpiringTarget", - "enum": [ - "addExpiringTarget", - "updateExpiringTarget", - "removeExpiringTarget" - ] - }, - "contextKey": { + "indicator": { "type": "string", - "description": "A unique key used to represent the context" - }, - "contextKind": { - "type": "string", - "description": "The kind of context", - "example": "user" + "description": "Metric indicator tier", + "example": "excellent" }, - "targetType": { + "description": { "type": "string", - "description": "The segment's target type", - "enum": [ - "included", - "excluded" - ] - }, - "value": { - "type": "integer", - "description": "The time, in Unix milliseconds, when the context should be removed from this segment. Required if kind is addExpiringTarget or updateExpiringTarget.", - "example": 1653469200000 - }, - "version": { - "type": "integer", - "description": "The version of the expiring target to update. Optional and only used if kind is updateExpiringTarget. If included, update will fail if version doesn't match current version of the expiring target.", - "example": 1 + "description": "Metric indicator description", + "example": "at least 1 per day" } } }, - "patchSegmentInstruction": { + "InsightsRepository": { "type": "object", "required": [ - "kind", - "userKey", - "targetType" + "_id", + "version", + "key", + "type", + "url", + "mainBranch" ], "properties": { - "kind": { + "_id": { "type": "string", - "description": "The type of change to make to the user's removal date from this segment", - "example": "addExpireUserTargetDate", - "enum": [ - "addExpireUserTargetDate", - "updateExpireUserTargetDate", - "removeExpireUserTargetDate" - ] + "format": "uuid", + "description": "The repository ID", + "example": "5f9a9b1a-5b9a-4b9a-9a9a-9a9a9a9a9a9a" }, - "userKey": { + "version": { + "type": "integer", + "description": "The repository version", + "example": 1 + }, + "key": { "type": "string", - "description": "A unique key used to represent the user" + "description": "The repository key", + "example": "launchdarkly/LaunchDarkly-Docs" }, - "targetType": { + "type": { "type": "string", - "description": "The segment's target type", - "enum": [ - "included", - "excluded" - ] + "description": "The repository type", + "example": "github" }, - "value": { - "type": "integer", - "description": "The time, in Unix milliseconds, when the user should be removed from this segment. Required if kind is addExpireUserTargetDate or updateExpireUserTargetDate.", - "example": 1653469200000 + "url": { + "type": "string", + "description": "The repository URL", + "example": "https://github.com/launchdarkly/LaunchDarkly-Docs" }, - "version": { - "type": "integer", - "description": "The version of the segment to update. Required if kind is updateExpireUserTargetDate.", - "example": 1 + "mainBranch": { + "type": "string", + "description": "The repository main branch", + "example": "main" + }, + "projects": { + "$ref": "#/components/schemas/ProjectSummaryCollection" } } }, - "patchSegmentRequest": { + "InsightsRepositoryCollection": { "type": "object", "required": [ - "instructions" + "totalCount", + "items" ], "properties": { - "comment": { - "type": "string", - "description": "Optional description of changes", - "example": "optional comment" + "totalCount": { + "type": "integer", + "description": "Total number of repositories", + "example": 1 }, - "instructions": { + "items": { "type": "array", - "description": "Semantic patch instructions for the desired changes to the resource", + "description": "List of repositories", "items": { - "$ref": "#/components/schemas/patchSegmentInstruction" + "$ref": "#/components/schemas/InsightsRepository" + } + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" }, - "example": [ - { - "contextKey": "contextKey", - "contextKind": "user", - "kind": "updateExpiringTarget", - "targetType": "included", - "value": 1587582000000, - "version": 0 - } - ] + "description": "The location and content type of related resources" } } }, - "patchUsersRequest": { + "InsightsRepositoryProject": { "type": "object", "required": [ - "instructions" + "repositoryKey", + "projectKey" ], "properties": { - "comment": { + "repositoryKey": { "type": "string", - "description": "Optional comment describing the change", - "example": "optional comment" + "description": "The repository key", + "example": "launchdarkly/LaunchDarkly-Docs" }, - "instructions": { - "type": "array", - "description": "The instructions to perform when updating", - "items": { - "$ref": "#/components/schemas/instructionUserRequest" - } + "projectKey": { + "type": "string", + "description": "The project key", + "example": "default" } } }, - "permissionGrantInput": { + "InsightsRepositoryProjectCollection": { "type": "object", + "required": [ + "totalCount", + "items" + ], "properties": { - "actionSet": { - "type": "string", - "description": "A group of related actions to allow. Specify either actionSet or actions. Use maintainTeam to add team maintainers.", - "example": "maintainTeam", - "enum": [ - "maintainTeam" - ] + "totalCount": { + "type": "integer", + "description": "Total number of repository project associations", + "example": 1 }, - "actions": { + "items": { "type": "array", - "description": "A list of actions to allow. Specify either actionSet or actions. To learn more, read [Role actions](https://docs.launchdarkly.com/home/account/role-actions).", + "description": "List of repository project associations", "items": { - "type": "string" - }, - "example": [ - "updateTeamMembers" - ] + "$ref": "#/components/schemas/InsightsRepositoryProject" + } }, - "memberIDs": { - "type": "array", - "description": "A list of member IDs who receive the permission grant.", - "items": { - "type": "string" + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" }, - "example": [ - "12ab3c45de678910fgh12345" - ] + "description": "The location and content type of related resources" } } }, - "postApprovalRequestApplyRequest": { + "InsightsRepositoryProjectMappings": { "type": "object", + "required": [ + "mappings" + ], "properties": { - "comment": { - "type": "string", - "description": "Optional comment about the approval request", - "example": "Looks good, thanks for updating" + "mappings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InsightsRepositoryProject" + } } } }, - "postApprovalRequestReviewRequest": { - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The type of review for this approval request", - "example": "approve", - "enum": [ - "approve", - "comment", - "decline" - ] - }, - "comment": { - "type": "string", - "description": "Optional comment about the approval request", - "example": "Looks good, thanks for updating" - } - } + "IterationStatus": { + "type": "string" }, - "putBranch": { + "LeadTimeStagesRep": { "type": "object", "required": [ - "name", - "head", - "syncTime" + "codingDurationMs" ], "properties": { - "name": { - "type": "string", - "description": "The branch name", - "example": "main" - }, - "head": { - "type": "string", - "description": "An ID representing the branch HEAD. For example, a commit SHA.", - "example": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" + "codingDurationMs": { + "type": "integer", + "format": "int64", + "description": "The coding duration in milliseconds", + "example": 1000000 }, - "updateSequenceId": { + "reviewDurationMs": { "type": "integer", "format": "int64", - "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.", - "example": 25 + "description": "The review duration in milliseconds", + "example": 500000 }, - "syncTime": { - "description": "A timestamp indicating when the branch was last synced", - "example": "1636558831870", - "$ref": "#/components/schemas/UnixMillis" + "waitDurationMs": { + "type": "integer", + "format": "int64", + "description": "The wait duration between merge time and deploy start time in milliseconds", + "example": 100000 }, - "references": { - "type": "array", - "description": "An array of flag references found on the branch", - "items": { - "$ref": "#/components/schemas/ReferenceRep" - } + "deployDurationMs": { + "type": "integer", + "format": "int64", + "description": "The deploy duration in milliseconds", + "example": 100000 }, - "commitTime": { - "description": "A timestamp of the current commit", - "example": "1636558831870", - "$ref": "#/components/schemas/UnixMillis" + "totalLeadTimeMs": { + "type": "integer", + "format": "int64", + "description": "The total lead time in milliseconds", + "example": 1600000 } } }, - "repositoryPost": { + "PostDeploymentEventInput": { "type": "object", "required": [ - "name" + "projectKey", + "environmentKey", + "applicationKey", + "version", + "eventType" ], "properties": { - "name": { + "projectKey": { "type": "string", - "description": "The repository name", - "example": "LaunchDarkly-Docs" + "description": "The project key", + "example": "default" }, - "sourceLink": { + "environmentKey": { "type": "string", - "description": "A URL to access the repository", - "example": "https://github.com/launchdarkly/LaunchDarkly-Docs" + "description": "The environment key", + "example": "production" }, - "commitUrlTemplate": { + "applicationKey": { "type": "string", - "description": "A template for constructing a valid URL to view the commit", - "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/commit/${sha}" + "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.

LaunchDarkly automatically creates a new application each time you send a unique application key.", + "example": "billing-service" }, - "hunkUrlTemplate": { + "applicationName": { "type": "string", - "description": "A template for constructing a valid URL to view the hunk", - "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/blob/${sha}/${filePath}#L${lineNumber}" + "description": "The application name. This defines how the application is displayed", + "example": "Billing Service" }, - "type": { + "applicationKind": { "type": "string", - "description": "The type of repository. If not specified, the default value is custom.", - "example": "github", + "description": "The kind of application. Default: server", + "example": "server", "enum": [ - "bitbucket", - "custom", - "github", - "gitlab" + "server", + "browser", + "mobile" ] }, - "defaultBranch": { - "type": "string", - "description": "The repository's default branch. If not specified, the default value is main.", - "example": "main" - } - } - }, - "sourceFlag": { - "type": "object", - "required": [ - "key" - ], - "properties": { - "key": { - "type": "string", - "description": "The environment key for the source environment", - "example": "environment-key-123abc" - }, "version": { - "type": "integer", - "description": "The version of the source flag from which to copy", - "example": 1 - } - } - }, - "subscriptionPost": { - "type": "object", - "required": [ - "name", - "config" - ], - "properties": { - "name": { "type": "string", - "description": "A human-friendly name for your audit log subscription.", - "example": "Example audit log subscription." - }, - "statements": { - "description": "The set of resources you wish to subscribe to audit log notifications for.", - "$ref": "#/components/schemas/StatementPostList" + "description": "The application version. You can set the application version to any string that includes only letters, numbers, periods (.), hyphens (-), or underscores (_).

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.", + "example": "a90a8a2" }, - "on": { - "type": "boolean", - "description": "Whether or not you want your subscription to actively send events.", - "example": false + "versionName": { + "type": "string", + "description": "The version name. This defines how the version is displayed", + "example": "v1.0.0" }, - "tags": { - "type": "array", - "description": "An array of tags for this subscription.", - "items": { - "type": "string" - }, - "example": [ - "testing-tag" + "eventType": { + "type": "string", + "description": "The event type", + "example": "started", + "enum": [ + "started", + "failed", + "finished", + "custom" ] }, - "config": { + "eventTime": { + "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.", + "example": "1706701522000", + "$ref": "#/components/schemas/UnixMillis" + }, + "eventMetadata": { "type": "object", "additionalProperties": {}, - "description": "The unique set of fields required to configure an audit log subscription integration of this type. Refer to the formVariables field in the corresponding manifest.json at https://github.com/launchdarkly/integration-framework/tree/main/integrations for a full list of fields for the integration you wish to configure.", + "description": "A JSON object containing metadata about the event", "example": { - "optional": "an optional property", - "required": "the required property", - "url": "https://example.com" + "buildSystemVersion": "v1.2.3" } }, - "url": { - "type": "string", - "description": "Slack webhook receiver URL. Only necessary for legacy Slack webhook integrations." - }, - "apiKey": { - "type": "string", - "description": "Datadog API key. Only necessary for legacy Datadog webhook integrations." + "deploymentMetadata": { + "type": "object", + "additionalProperties": {}, + "description": "A JSON object containing metadata about the deployment", + "example": { + "buildNumber": "1234" + } } } }, - "teamPatchInput": { + "PostInsightGroupParams": { "type": "object", "required": [ - "instructions" + "name", + "key", + "projectKey", + "environmentKey" ], "properties": { - "comment": { + "name": { "type": "string", - "description": "Optional comment describing the update", - "example": "Optional comment about the update" + "description": "The name of the insight group", + "example": "Production - All Apps" }, - "instructions": { - "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require additional parameters as part of this object.", - "example": "[ { \"kind\": \"updateDescription\", \"value\": \"New description for the team\" } ]", - "$ref": "#/components/schemas/Instructions" - } - } - }, - "teamPostInput": { - "type": "object", - "required": [ - "key", - "name" - ], - "properties": { - "customRoleKeys": { - "type": "array", - "description": "List of custom role keys the team will access", - "items": { - "type": "string" - }, - "example": [ - "example-role1", - "example-role2" - ] + "key": { + "type": "string", + "description": "The key of the insight group", + "example": "default-production-all-apps" }, - "description": { + "projectKey": { "type": "string", - "description": "A description of the team", - "example": "An example team" + "description": "The projectKey to be associated with the insight group", + "example": "default" }, - "key": { + "environmentKey": { "type": "string", - "description": "The team key", - "example": "team-key-123abc" + "description": "The environmentKey to be associated with the insight group", + "example": "production" }, - "memberIDs": { + "applicationKeys": { "type": "array", - "description": "A list of member IDs who belong to the team", + "description": "The application keys to associate with the insight group. If not provided, the insight group will include data from all applications.", "items": { "type": "string" }, "example": [ - "12ab3c45de678910fgh12345" + "billing-service", + "inventory-service" ] - }, - "name": { - "type": "string", - "description": "A human-friendly name for the team", - "example": "Example team" - }, - "permissionGrants": { - "type": "array", - "description": "A list of permission grants. Permission grants allow access to a specific action, without having to create or update a custom role.", - "items": { - "$ref": "#/components/schemas/permissionGrantInput" - } } } }, - "teamsPatchInput": { + "ProjectSummaryCollection": { "type": "object", "required": [ - "instructions" + "totalCount", + "items" ], "properties": { - "comment": { - "type": "string", - "description": "Optional comment describing the update", - "example": "Optional comment about the update" + "totalCount": { + "type": "integer" }, - "instructions": { - "description": "The instructions to perform when updating. This should be an array with objects that look like {\"kind\": \"update_action\"}. Some instructions also require additional parameters as part of this object.", - "example": "[ { \"kind\": \"updateDescription\", \"value\": \"New description for the team\" } ]", - "$ref": "#/components/schemas/Instructions" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectSummary" + } + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" + } } } }, - "triggerPost": { + "PullRequestCollectionRep": { "type": "object", "required": [ - "integrationKey" + "totalCount", + "items" ], "properties": { - "comment": { - "type": "string", - "description": "Optional comment describing the trigger", - "example": "example comment" + "totalCount": { + "type": "integer", + "description": "The total number of pull requests", + "example": 25 }, - "instructions": { + "items": { "type": "array", - "description": "The action to perform when triggering. This should be an array with a single object that looks like {\"kind\": \"flag_action\"}. Supported flag actions are turnFlagOn and turnFlagOff.", + "description": "A list of pull requests", "items": { - "$ref": "#/components/schemas/Instruction" + "$ref": "#/components/schemas/PullRequestRep" + } + }, + "_links": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Link" }, - "example": [ - { - "kind": "turnFlagOn" + "description": "The location and content type of related resources", + "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" } - ] - }, - "integrationKey": { - "type": "string", - "description": "The unique identifier of the integration for your trigger. Use generic-trigger for integrations not explicitly supported.", - "example": "generic-trigger" + } } } }, - "upsertPayloadRep": { + "PullRequestLeadTimeRep": { "type": "object", "required": [ - "tags", - "temporary", - "booleanDefaults", - "defaultClientSideAvailability" + "codingDurationMs" ], "properties": { - "_links": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Link" - }, - "description": "The location and content type of related resources" + "codingDurationMs": { + "type": "integer", + "format": "int64", + "description": "The coding duration in milliseconds", + "example": 1000000 }, - "tags": { - "type": "array", - "description": "A list of default tags for each flag", - "items": { - "type": "string" - }, - "example": [ - "tag-1", - "tag-2" - ] + "reviewDurationMs": { + "type": "integer", + "format": "int64", + "description": "The review duration in milliseconds", + "example": 500000 }, - "temporary": { - "type": "boolean", - "description": "Whether the flag should be temporary by default", - "example": true + "maxWaitDurationMs": { + "type": "integer", + "format": "int64", + "description": "The max wait duration between merge time and deploy start time in milliseconds", + "example": 100000 }, - "booleanDefaults": { - "$ref": "#/components/schemas/BooleanFlagDefaults" + "avgWaitDurationMs": { + "type": "integer", + "format": "int64", + "description": "The average wait duration between merge time and deploy start time in milliseconds", + "example": 100000 }, - "defaultClientSideAvailability": { - "description": "Which client-side SDK types can use this flag by default.", - "$ref": "#/components/schemas/DefaultClientSideAvailability" + "maxDeployDurationMs": { + "type": "integer", + "format": "int64", + "description": "The max deploy duration in milliseconds", + "example": 100000 + }, + "avgDeployDurationMs": { + "type": "integer", + "format": "int64", + "description": "The average deploy duration in milliseconds", + "example": 100000 + }, + "maxTotalLeadTimeMs": { + "type": "integer", + "format": "int64", + "description": "The max total lead time in milliseconds", + "example": 1600000 + }, + "avgTotalLeadTimeMs": { + "type": "integer", + "format": "int64", + "description": "The average total lead time in milliseconds", + "example": 1600000 } } }, - "webhookPost": { + "PullRequestRep": { "type": "object", "required": [ - "url", - "sign", - "on" + "id", + "externalId", + "title", + "status", + "author", + "createTime", + "baseCommitKey", + "headCommitKey", + "filesChanged", + "linesAdded", + "linesDeleted", + "url" ], "properties": { - "name": { + "id": { "type": "string", - "description": "A human-readable name for your webhook", - "example": "Example hook" + "format": "uuid", + "description": "The pull request internal ID", + "example": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11" }, - "url": { + "externalId": { "type": "string", - "description": "The URL of the remote webhook", - "example": "http://www.example.com" + "description": "The pull request number", + "example": "1234" }, - "secret": { + "title": { "type": "string", - "description": "If sign is true, and the secret attribute is omitted, LaunchDarkly automatically generates a secret for you.", - "example": "frobozz" + "description": "The pull request title", + "example": "Enable new payment structure" }, - "statements": { - "description": "Represents a Custom role policy, defining a resource kinds filter the webhook should respond to.", - "$ref": "#/components/schemas/StatementPostList" + "status": { + "type": "string", + "description": "The pull request status", + "example": "merged" }, - "sign": { - "type": "boolean", - "description": "If sign is false, the webhook does not include a signature header, and the secret can be omitted.", - "example": true + "author": { + "type": "string", + "description": "The pull request author", + "example": "jane.doe" }, - "on": { - "type": "boolean", - "description": "Whether or not this webhook is enabled.", - "example": true + "createTime": { + "description": "The pull request create time", + "example": "1706701522000", + "$ref": "#/components/schemas/UnixMillis" }, - "tags": { + "mergeTime": { + "description": "The pull request merge time", + "example": "1706712518000", + "$ref": "#/components/schemas/UnixMillis" + }, + "mergeCommitKey": { + "type": "string", + "description": "The pull request merge commit key", + "example": "a90a8a2" + }, + "baseCommitKey": { + "type": "string", + "description": "The pull request base commit key", + "example": "a90a8a2" + }, + "headCommitKey": { + "type": "string", + "description": "The pull request head commit key", + "example": "a90a8a2" + }, + "filesChanged": { + "type": "integer", + "description": "The number of files changed", + "example": 2 + }, + "linesAdded": { + "type": "integer", + "description": "The number of lines added", + "example": 100 + }, + "linesDeleted": { + "type": "integer", + "description": "The number of lines deleted", + "example": 50 + }, + "url": { + "type": "string", + "description": "The pull request URL", + "example": "https://github.com/launchdarkly/LaunchDarkly-Docs/pull/406" + }, + "deployments": { + "description": "A list of deployments associated with the pull request", + "$ref": "#/components/schemas/DeploymentCollectionRep" + }, + "flagReferences": { + "description": "A list of flag references associated with the pull request", + "$ref": "#/components/schemas/FlagReferenceCollectionRep" + }, + "leadTime": { + "description": "The lead time for the pull request in a given environment", + "$ref": "#/components/schemas/PullRequestLeadTimeRep" + } + } + }, + "ValidationFailedErrorRep": { + "type": "object", + "required": [ + "code", + "message", + "errors" + ], + "properties": { + "code": { + "type": "string", + "description": "Specific error code encountered", + "example": "invalid_request" + }, + "message": { + "type": "string", + "description": "Description of the error", + "example": "validation failed" + }, + "errors": { "type": "array", - "description": "List of tags for this webhook", + "description": "List of validation errors", "items": { - "type": "string" - }, - "example": [] + "$ref": "#/components/schemas/FailureReasonRep" + } + } + } + }, + "VariationEvalSummary": { + "type": "object", + "properties": { + "value": { + "description": "The variation value", + "example": "true" + }, + "before": { + "type": "integer", + "format": "int64", + "description": "The number of evaluations in the ten minutes before the flag event", + "example": 1000 + }, + "after": { + "type": "integer", + "format": "int64", + "description": "The number of evaluations in the ten minutes after the flag event", + "example": 500 } } } @@ -37320,4 +49114,4 @@ } } } -} +} \ No newline at end of file