diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 63b721ab..58226af2 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,3 +1,4 @@
+# Cache bust: force rebuild for Go 1.26.0 compatibility
repos:
- repo: https://github.com/golangci/golangci-lint
rev: v1.63.4
diff --git a/cmd/resources/resource_cmds.go b/cmd/resources/resource_cmds.go
index 859ce0d3..bf491832 100644
--- a/cmd/resources/resource_cmds.go
+++ b/cmd/resources/resource_cmds.go
@@ -46,12 +46,12 @@ 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](https://launchdarkly.com/docs/api#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://launchdarkly.com/docs/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(
+ gen_AiConfigsResourceCmd := 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](https://launchdarkly.com/docs/api#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://launchdarkly.com/docs/home/ai-configs).\n",
+ "ai-configs",
+ "The 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://launchdarkly.com/docs/home/ai-configs).\n",
)
gen_AnnouncementsResourceCmd := NewResourceCmd(
@@ -115,7 +115,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://launchdarkly.com/docs/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://launchdarkly.com/docs/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](https://launchdarkly.com/docs/api/contexts/search-context-instances) 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://launchdarkly.com/docs/sdk/features/app-config).\n\n### Filtering contexts and context instances\n\nWhen you [search for contexts](https://launchdarkly.com/docs/api/contexts/search-contexts) or [context instances](https://launchdarkly.com/docs/api/contexts/search-context-instances), 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](https://launchdarkly.com/docs/api/contexts/search-contexts), 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](https://launchdarkly.com/docs/api/contexts/search-context-instances), 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://launchdarkly.com/docs/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://launchdarkly.com/docs/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](https://launchdarkly.com/docs/api/contexts/search-context-instances) 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://launchdarkly.com/docs/sdk/features/app-config).\n\n### Filtering contexts and context instances\n\nWhen you [search for contexts](https://launchdarkly.com/docs/api/contexts/search-contexts) or [context instances](https://launchdarkly.com/docs/api/contexts/search-context-instances), you can filter the results using fields and operators with the `filter` parameter. Specify `filter` 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 the date field value occurs after the specified 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 field value matches any of the provided values. 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 the date field value occurs 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 the field's list of values contains all of the provided values. 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 only if the field value exactly matches the provided value. 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 based on whether the specified field exists. 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 the field value does not exactly match the provided value. 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 a singular string field value 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\nThe `filter` parameter accepts different field types depending on whether you search for contexts or context instances. Also, you can only filter some fields using certain operators.\n\nWhen you search for [contexts](https://launchdarkly.com/docs/api/contexts/search-contexts), 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 that represents the application where the LaunchDarkly SDK is running. |`equals`, `notEquals`, `anyOf` |\n|`id` |The 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, joined with a `:`. For example, `user:user-key-abc123`. |`equals`, `notEquals`, `anyOf` |\n|`kindKeys` |A list of all kinds and keys found in the context. Join the kind and key with a `:`. 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 escape 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, enclose it in double quotes. |`equals`, `notEquals`, `exists`, `startsWith`, `before`, `after`.|\n\nWhen searching for [context instances](https://launchdarkly.com/docs/api/contexts/search-context-instances), 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` |The 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(
@@ -294,14 +294,6 @@ func AddAllResourceCmds(
"The account members API allows you to invite new members to an account by making a `POST` request to `/api/v2/members`. When you invite a new member to an account, an invitation is sent to the email you provided. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for \"member/\\*\". To learn more, read [LaunchDarkly account members](https://launchdarkly.com/docs/home/account/members).\n\nAny member may request the complete list of account members with a `GET` to `/api/v2/members`.\n\nSeveral of the endpoints in the account members API require a member ID. The member ID is returned as part of the [Invite new members](https://launchdarkly.com/docs/api/account-members/post-members) and [List account members](https://launchdarkly.com/docs/api/account-members/get-members) responses. It is the `_id` field of each element in the `items` array.\n",
)
- gen_MembersBetaResourceCmd := NewResourceCmd(
- rootCmd,
- analyticsTrackerFn,
- markdownRenderer,
- "members-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](https://launchdarkly.com/docs/api#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_MetricGroupsBetaResourceCmd := NewResourceCmd(
rootCmd,
analyticsTrackerFn,
@@ -347,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](https://launchdarkly.com/docs/api#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://launchdarkly.com/docs/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](https://launchdarkly.com/docs/api/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](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag) 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](https://launchdarkly.com/docs/api#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 and automate the release process for feature flags across a series of phases, where each phase consists of one or more environments and audiences. Each phase can use an immediate or guarded rollout to a designated audience, and can require approvals for selected environments. You can use release pipelines to ensure that you correctly roll out a flag in one environment before moving on to the next. To learn more, read [Release pipelines](https://launchdarkly.com/docs/home/releases/release-pipelines).\n\nUse the release pipelines API to view, create, update, and delete release pipelines. You can also use this API to view the progress of all ongoing releases across all flags in a project for a given release pipeline. \n\n### Creating releases and updating release phases\n\nWhen you add a flag to a release pipeline, you create a new \"release\" to automate that flag's progress through phases in the pipeline.\n\nUse the related [releases API](https://launchdarkly.com/docs/api/releases-beta) to create a new release, or to view or update a release for a given flag. For example, you can use the releases API to add a flag to an existing release pipeline, or to start the next phase of a flag's ongoing release.\n",
)
gen_ReleasePoliciesBetaResourceCmd := NewResourceCmd(
@@ -363,7 +355,7 @@ func AddAllResourceCmds(
analyticsTrackerFn,
markdownRenderer,
"releases-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](https://launchdarkly.com/docs/api#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. To learn more, read [Release pipelines](https://launchdarkly.com/docs/home/releases/release-pipelines).\n\nWith the releases API, you can view and update the active releases for a given flag.\n\nWith the related [release pipelines API](https://launchdarkly.com/docs/api/release-pipelines-beta), you can view, create, and delete release pipelines.\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](https://launchdarkly.com/docs/api#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 and automate the release process for feature flags across a series of phases, where each phase consists of one or more environments and audiences. When you add a flag to an existing release pipeline, you create a \"release\" to automate that flag's progress through the pipeline. \n\nUse the releases API to add a flag to an existing release pipeline, or to monitor or update an ongoing release for a flag. Updating an ongoing release generally involves the following steps:\n\n1. Obtain the release phases associated with the release. The `phases` field provides an ordered list of all pipeline phases associated with the flag's release. `phases` is returned in the response when you [Create a new release for a flag](https://launchdarkly.com/docs/api/releases-beta/create-release-for-flag) or [Get the release for a flag](https://launchdarkly.com/docs/api/releases-beta/get-release-by-flag-key).\n\n2. Determine the `_id` of the phase you want to start. Release pipeline phases take place in their configured order, so find the first incomplete, unstarted phase in the `phases` list. For example, in a newly-created release the first phase in the `phases` list has both the `complete` and `started` fields set to `false`.\n\n3. Use the phase `_id` value with the [Update phase status for release](https://launchdarkly.com/docs/api/releases-beta/update-phase-status) endpoint to start the release phase. At a minimum, you must provide `{\"status\": active}` in the request object to start a pipeline phase. If the phase requires approvals or guarded rollouts, provide the additional required information in the `audiences` list.\n\n### Configuring release pipelines\n\nUse the related [release pipelines API](https://launchdarkly.com/docs/api/release-pipelines-beta) to view, create, update, and delete release pipelines, or to view the progress of all ongoing releases across all flags in a project for a given release pipeline. \n",
)
gen_ScheduledChangesResourceCmd := NewResourceCmd(
@@ -371,7 +363,7 @@ func AddAllResourceCmds(
analyticsTrackerFn,
markdownRenderer,
"scheduled-changes",
- "\u003e ### Scheduled flag changes is an Enterprise feature\n\u003e\n\u003e Scheduled flag changes 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\nSchedule the specified flag targeting changes to take effect at the selected time. You may schedule multiple changes for a flag each with a different `ExecutionDate`. To learn more, read [Scheduled flag changes](https://launchdarkly.com/docs/home/releases/scheduled-changes).\n\nSeveral of the endpoints in the scheduled changes API require a scheduled change ID. The scheduled change ID is returned as part of the [Create scheduled changes workflow](https://launchdarkly.com/docs/api/scheduled-changes/post-flag-config-scheduled-changes) and [List scheduled changes](https://launchdarkly.com/docs/api/scheduled-changes/get-flag-config-scheduled-changes) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n",
+ "\u003e ### Scheduled flag changes is an Enterprise feature\n\u003e\n\u003e Scheduled flag changes 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 schedule flag targeting rule changes to take place at a selected time. You may schedule multiple changes for a single flag with each change having a different `ExecutionDate`. To learn more, read [Scheduled flag changes](https://launchdarkly.com/docs/home/releases/scheduled-changes).\n\nSeveral endpoints in the scheduled changes API require an existing scheduled change ID. This ID is returned in the `_id` field from the [Create scheduled changes workflow](https://launchdarkly.com/docs/api/scheduled-changes/post-flag-config-scheduled-changes) response, or in the `_id` field of each element in the `items` array from the [List scheduled changes](https://launchdarkly.com/docs/api/scheduled-changes/get-flag-config-scheduled-changes) response.\n",
)
gen_SegmentsResourceCmd := NewResourceCmd(
@@ -1073,6 +1065,148 @@ func AddAllResourceCmds(
SupportsSemanticPatch: false,
})
+ NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Get MAU clientside usage",
+ Long: "Get a time series of the number of context key usages observed by LaunchDarkly in your account, for the primary context kind only. The counts reflect data reported from client-side SDKs.\u003cbr/\u003e\u003cbr/\u003eFor past months, the primary context kind is fixed and reflects the last known primary kind for that month. For the current month, it may vary as new primary context kinds are observed.\u003cbr/\u003e\u003cbr/\u003eThe supported granularity varies by aggregation type. The maximum time range is 365 days.",
+ Use: "get-mau-clientside-usage",
+ Params: []Param{
+ {
+ Name: "from",
+ In: "query",
+ Description: "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.",
+ Type: "string",
+ },
+ {
+ Name: "to",
+ In: "query",
+ Description: "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.",
+ Type: "string",
+ },
+ {
+ Name: "project-key",
+ In: "query",
+ Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "query",
+ Description: "An environment key to filter results by. If specified, exactly one 'projectKey' must be provided. Can be specified multiple times, one query parameter per environment key.",
+ Type: "string",
+ },
+ {
+ Name: "sdk-name",
+ In: "query",
+ Description: "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.",
+ Type: "string",
+ },
+ {
+ Name: "anonymous",
+ In: "query",
+ Description: "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.\u003cbr/\u003eValid values: 'true', 'false'.",
+ Type: "string",
+ },
+ {
+ Name: "group-by",
+ 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, one query parameter per dimension.\u003cbr/\u003eValid values: 'projectId', 'environmentId', 'sdkName', 'sdkAppId', 'anonymousV2'.",
+ Type: "string",
+ },
+ {
+ Name: "aggregation-type",
+ In: "query",
+ Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.",
+ Type: "string",
+ },
+ {
+ Name: "granularity",
+ In: "query",
+ Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "GET",
+ HasBody: false,
+ IsBeta: true,
+ RequiresBody: false,
+ Path: "/api/v2/usage/clientside-mau",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Get MAU total usage",
+ Long: "Get a time series of the number of context key usages observed by LaunchDarkly in your account, for the primary context kind only.\u003cbr/\u003e\u003cbr/\u003eFor past months, this reflects the context kind that was most recently marked as primary for that month. For the current month, the context kind may vary as new primary kinds are observed.\u003cbr/\u003e\u003cbr/\u003eThe supported granularity varies by aggregation type. The maximum time range is 365 days.",
+ Use: "get-mau-total-usage",
+ Params: []Param{
+ {
+ Name: "from",
+ In: "query",
+ Description: "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.",
+ Type: "string",
+ },
+ {
+ Name: "to",
+ In: "query",
+ Description: "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.",
+ Type: "string",
+ },
+ {
+ Name: "project-key",
+ In: "query",
+ Description: "A project key to filter results by. Can be specified multiple times, one query parameter per project key.",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "query",
+ Description: "An environment key to filter results by. If specified, exactly one 'projectKey' must be provided. Can be specified multiple times, one query parameter per environment key.",
+ Type: "string",
+ },
+ {
+ Name: "sdk-name",
+ In: "query",
+ Description: "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.",
+ Type: "string",
+ },
+ {
+ Name: "sdk-type",
+ In: "query",
+ Description: "An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type.",
+ Type: "string",
+ },
+ {
+ Name: "anonymous",
+ In: "query",
+ Description: "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.\u003cbr/\u003eValid values: 'true', 'false'.",
+ Type: "string",
+ },
+ {
+ Name: "group-by",
+ 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, one query parameter per dimension.\u003cbr/\u003eValid values: 'projectId', 'environmentId', 'sdkName', 'sdkType', 'sdkAppId', 'anonymousV2'.",
+ Type: "string",
+ },
+ {
+ Name: "aggregation-type",
+ In: "query",
+ Description: "Specifies the aggregation method. Defaults to 'month_to_date'.\u003cbr/\u003eValid values: 'month_to_date', 'incremental', 'rolling_30d'.",
+ Type: "string",
+ },
+ {
+ Name: "granularity",
+ In: "query",
+ Description: "Specifies the data granularity. Defaults to 'daily'. Valid values depend on 'aggregationType': **month_to_date** supports 'daily' and 'monthly'; **incremental** and **rolling_30d** support 'daily' only.",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "GET",
+ HasBody: false,
+ IsBeta: true,
+ RequiresBody: false,
+ Path: "/api/v2/usage/total-mau",
+ SupportsSemanticPatch: false,
+ })
+
NewOperationCmd(gen_AccountUsageBetaResourceCmd, client, markdownRenderer, OperationData{
Short: "Get MAU SDKs by type",
Long: "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.\u003cbr/\u003e\u003cbr/\u003eEndpoints 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://launchdarkly.com/docs/home/account/metrics).",
@@ -1575,17 +1709,11 @@ func AddAllResourceCmds(
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "Delete AI Config",
Long: "Delete an existing AI Config.",
Use: "delete-ai-config",
Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -1601,23 +1729,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "DELETE",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, 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: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -1639,16 +1761,42 @@ func AddAllResourceCmds(
},
HTTPMethod: "DELETE",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "Delete AI tool",
Long: "Delete an existing AI tool.",
Use: "delete-ai-tool",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "tool-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "DELETE",
+ HasBody: false,
+ IsBeta: false,
+ RequiresBody: false,
+ Path: "/api/v2/projects/{projectKey}/ai-tools/{toolKey}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Delete agent graph",
+ Long: "Delete an existing agent graph and all of its edges.",
+ Use: "delete-agent-graph",
Params: []Param{
{
Name: "ld-api-version",
@@ -1663,7 +1811,7 @@ func AddAllResourceCmds(
Type: "string",
},
{
- Name: "tool-key",
+ Name: "graph-key",
In: "path",
Description: "",
Type: "string",
@@ -1671,23 +1819,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "DELETE",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
- Path: "/api/v2/projects/{projectKey}/ai-tools/{toolKey}",
+ Path: "/api/v2/projects/{projectKey}/agent-graphs/{graphKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "Delete an AI model config",
Long: "Delete an AI model config.",
Use: "delete-model-config",
Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -1703,23 +1845,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "DELETE",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "Remove AI models from the restricted list",
Long: "Remove AI models, by key, from the restricted list.",
Use: "delete-restricted-models",
Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -1729,23 +1865,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "DELETE",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: true,
Path: "/api/v2/projects/{projectKey}/ai-configs/model-configs/restricted",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, 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",
@@ -1761,23 +1891,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, 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: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -1811,23 +1935,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, 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: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -1861,23 +1979,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics-by-variation",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "Show an AI Config's targeting",
Long: "Retrieves a specific AI Config's targeting by its key",
Use: "get-ai-config-targeting",
Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -1893,23 +2005,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, 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: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -1931,23 +2037,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, 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: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -1981,16 +2081,42 @@ func AddAllResourceCmds(
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "Get AI tool",
Long: "Retrieve a specific AI tool by its key.",
Use: "get-ai-tool",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "tool-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "GET",
+ HasBody: false,
+ IsBeta: false,
+ RequiresBody: false,
+ Path: "/api/v2/projects/{projectKey}/ai-tools/{toolKey}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Get agent graph",
+ Long: "Retrieve a specific agent graph by its key, including its edges.",
+ Use: "get-agent-graph",
Params: []Param{
{
Name: "ld-api-version",
@@ -2005,7 +2131,7 @@ func AddAllResourceCmds(
Type: "string",
},
{
- Name: "tool-key",
+ Name: "graph-key",
In: "path",
Description: "",
Type: "string",
@@ -2013,23 +2139,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
- Path: "/api/v2/projects/{projectKey}/ai-tools/{toolKey}",
+ Path: "/api/v2/projects/{projectKey}/agent-graphs/{graphKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "Get AI model config",
Long: "Get an AI model config by key.",
Use: "get-model-config",
Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -2045,23 +2165,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "List AI tool versions",
Long: "Get a list of all versions of an AI tool in the given project.",
Use: "list-ai-tool-versions",
Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -2095,23 +2209,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-tools/{toolKey}/versions",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "List AI tools",
Long: "Get a list of all AI tools in the given project.",
Use: "list-ai-tools",
Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -2145,16 +2253,16 @@ func AddAllResourceCmds(
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-tools",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "List AI model configs",
- Long: "Get all AI model configs for a project.",
- Use: "list-model-configs",
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "List agent graphs",
+ Long: "Get a list of all agent graphs in the given project. Returns metadata only, without edge data.",
+ Use: "list-agent-graphs",
Params: []Param{
{
Name: "ld-api-version",
@@ -2162,6 +2270,38 @@ func AddAllResourceCmds(
Description: "Version of the endpoint.",
Type: "string",
},
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "limit",
+ In: "query",
+ Description: "The number of AI Configs to return.",
+ 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",
+ },
+ },
+ HTTPMethod: "GET",
+ HasBody: false,
+ IsBeta: false,
+ RequiresBody: false,
+ Path: "/api/v2/projects/{projectKey}/agent-graphs",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "List AI model configs",
+ Long: "Get all AI model configs for a project.",
+ Use: "list-model-configs",
+ Params: []Param{
{
Name: "project-key",
In: "path",
@@ -2177,23 +2317,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/model-configs",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, 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: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -2209,23 +2343,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "PATCH",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "Update AI Config targeting",
Long: "Perform a partial update to an AI Config's targeting. The request body must be a valid semantic patch.\n\n### Using semantic patches on an AI Config\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](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating an AI Config's targeting takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): 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 AI Configs.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eworking with targeting and variations\u003c/strong\u003e for AI Configs\u003c/summary\u003e\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 AI Config.\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 \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addClauses\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauses\": [{\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"USA\", \"Canada\"]\n }]\n }]\n}\n```\n\n#### addRule\n\nAdds a new targeting rule to the AI Config. 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 rule.\n- Either\n- `variationId`: ID of a variation.\n\nor\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 AI Config 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.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"addTargets\",\n \"values\": [\"context-key-123abc\", \"context-key-456def\"],\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\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 AI Config.\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\"environmentKey\": \"environment-key-123abc\",\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#### 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.\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#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\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.\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 variation.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"removeTargets\",\n \"values\": [\"context-key-123abc\", \"context-key-456def\"],\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\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.\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\"environmentKey\": \"environment-key-123abc\",\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 on the AI Config.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all rules.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"reorderRules\",\n \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n}]\n}\n```\n\n#### replaceRules\n\nRemoves all targeting rules for the AI Config 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 }\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#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule.\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 AI Config.\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\"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ]\n}\n```\n\n#### updateFallthroughVariationOrRollout\n\nUpdates the default or \"fallthrough\" rule for the AI Config, which the AI Config 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.\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\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"updateFallthroughVariationOrRollout\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\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\": \"updateFallthroughVariationOrRollout\",\n \"rolloutContextKind\": \"user\",\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#### updateOffVariation\n\nUpdates the default off variation to `variationId`. The AI Config serves the default off variation when the AI Config's targeting is **Off**.\n\n##### Parameters\n\n- `variationId`: ID of a variation.\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#### updateRuleDescription\n\nUpdates the description of the 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 AI Config.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"updateRuleDescription\",\n \"description\": \"New rule description\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n}]\n}\n```\n\n#### updateRuleTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the AI Config 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 AI Config.\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"updateRuleTrackEvents\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"trackEvents\": true\n}]\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.\n- `variationId`: ID of a variation.\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:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"updateRuleVariationOrRollout\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the AI Config, 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 AI Config, 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\u003c/details\u003e\n",
Use: "update-ai-config-targeting",
Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -2241,23 +2369,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "PATCH",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting",
SupportsSemanticPatch: true,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, 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",
@@ -2279,16 +2401,42 @@ func AddAllResourceCmds(
},
HTTPMethod: "PATCH",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "Update AI tool",
Long: "Edit an existing AI tool.",
Use: "update-ai-tool",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "tool-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "PATCH",
+ HasBody: true,
+ IsBeta: false,
+ RequiresBody: false,
+ Path: "/api/v2/projects/{projectKey}/ai-tools/{toolKey}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Update agent graph",
+ Long: "Edit an existing agent graph.\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\nIf the update includes `rootConfigKey` or `edges`, both must be present and will be treated as full replacements.\n",
+ Use: "update-agent-graph",
Params: []Param{
{
Name: "ld-api-version",
@@ -2303,7 +2451,7 @@ func AddAllResourceCmds(
Type: "string",
},
{
- Name: "tool-key",
+ Name: "graph-key",
In: "path",
Description: "",
Type: "string",
@@ -2311,23 +2459,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "PATCH",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
- Path: "/api/v2/projects/{projectKey}/ai-tools/{toolKey}",
+ Path: "/api/v2/projects/{projectKey}/agent-graphs/{graphKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, 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: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -2337,23 +2479,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "POST",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: true,
Path: "/api/v2/projects/{projectKey}/ai-configs",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, 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: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -2369,16 +2505,36 @@ func AddAllResourceCmds(
},
HTTPMethod: "POST",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: true,
Path: "/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "Create an AI tool",
Long: "Create an AI tool",
Use: "create-ai-tool",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "POST",
+ HasBody: true,
+ IsBeta: false,
+ RequiresBody: true,
+ Path: "/api/v2/projects/{projectKey}/ai-tools",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Create new agent graph",
+ Long: "Create a new agent graph within the given project.",
+ Use: "create-agent-graph",
Params: []Param{
{
Name: "ld-api-version",
@@ -2395,23 +2551,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "POST",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: true,
- Path: "/api/v2/projects/{projectKey}/ai-tools",
+ Path: "/api/v2/projects/{projectKey}/agent-graphs",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, 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: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -2421,23 +2571,17 @@ func AddAllResourceCmds(
},
HTTPMethod: "POST",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: true,
Path: "/api/v2/projects/{projectKey}/ai-configs/model-configs",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_AiConfigsBetaResourceCmd, client, markdownRenderer, OperationData{
+ NewOperationCmd(gen_AiConfigsResourceCmd, client, markdownRenderer, OperationData{
Short: "Add AI models to the restricted list",
- Long: "Add AI models, by key, to the restricted list. Keys are included in the response from the [List AI model configs](https://launchdarkly.com/docs/api/ai-configs-beta/list-model-configs) endpoint.",
+ Long: "Add AI models, by key, to the restricted list. Keys are included in the response from the [List AI model configs](https://launchdarkly.com/docs/api/ai-configs/list-model-configs) endpoint.",
Use: "create-restricted-models",
Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -2447,7 +2591,7 @@ func AddAllResourceCmds(
},
HTTPMethod: "POST",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: true,
Path: "/api/v2/projects/{projectKey}/ai-configs/model-configs/restricted",
SupportsSemanticPatch: false,
@@ -2938,7 +3082,7 @@ func AddAllResourceCmds(
NewOperationCmd(gen_ApprovalRequestsResourceCmd, client, markdownRenderer, OperationData{
Short: "Create approval request",
- Long: "Create an approval request.\n\nThis endpoint requires a list of `instructions`, in semantic patch format, that will be applied when the approval request is approved and applied.\n\n### Flags\n\nIf you are creating an approval request for a flag, you can use the following `instructions`:\n\n- `addVariation`\n- `removeVariation`\n- `updateVariation`\n- `updateDefaultVariation`\n\nFor details on using these instructions, read [Update feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag).\n\nTo create an approval for a flag specific to an environment, use [Create approval request for a flag](https://launchdarkly.com/docs/api/approvals/post-approval-request-for-flag).\n\n### AI Configs\n\nIf you are creating an approval request for an AI Config, you can use the semantic patch instructions listed under [Update AI Config targeting](https://launchdarkly.com/docs/api/ai-configs-beta/patch-ai-config-targeting).\n\n### Segments\n\nIf you are creating an approval request for a segment, you can use the semantic patch instructions listed under [Patch segment](https://launchdarkly.com/docs/api/segments/patch-segment).\n",
+ Long: "Create an approval request.\n\nThis endpoint requires a list of `instructions`, in semantic patch format, that will be applied when the approval request is approved and applied.\n\n### Flags\n\nIf you are creating an approval request for a flag, you can use the following `instructions`:\n\n- `addVariation`\n- `removeVariation`\n- `updateVariation`\n- `updateDefaultVariation`\n\nFor details on using these instructions, read [Update feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag).\n\nTo create an approval for a flag specific to an environment, use [Create approval request for a flag](https://launchdarkly.com/docs/api/approvals/post-approval-request-for-flag).\n\n### AI Configs\n\nIf you are creating an approval request for an AI Config, you can use the semantic patch instructions listed under [Update AI Config targeting](https://launchdarkly.com/docs/api/ai-configs/patch-ai-config-targeting).\n\n### Segments\n\nIf you are creating an approval request for a segment, you can use the semantic patch instructions listed under [Patch segment](https://launchdarkly.com/docs/api/segments/patch-segment).\n",
Use: "create",
Params: []Param{},
HTTPMethod: "POST",
@@ -3175,7 +3319,7 @@ func AddAllResourceCmds(
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. This endpoint works with any approval requests.\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](https://launchdarkly.com/docs/api#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",
+ Long: "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint works with any approval requests.\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](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions 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\n#### updateDescription\n\nUpdates the description (title) of the approval request.\n\n##### Parameters\n\n- `value`: (Required) The new description for the approval request. Must be non-empty and no more than 5000 characters.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Updated approval request title\"\n }]\n}\n```\n",
Use: "update-request",
Params: []Param{
{
@@ -3186,9 +3330,9 @@ func AddAllResourceCmds(
},
},
HTTPMethod: "PATCH",
- HasBody: false,
+ HasBody: true,
IsBeta: true,
- RequiresBody: false,
+ RequiresBody: true,
Path: "/api/v2/approval-requests/{id}",
SupportsSemanticPatch: true,
})
@@ -3221,7 +3365,7 @@ func AddAllResourceCmds(
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. This endpoint requires a feature flag key, and can only be used for updating approval requests for flags.\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](https://launchdarkly.com/docs/api#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",
+ Long: "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint requires a feature flag key, and can only be used for updating approval requests for flags.\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](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions 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\n#### updateDescription\n\nUpdates the description (title) of the approval request.\n\n##### Parameters\n\n- `value`: (Required) The new description for the approval request. Must be non-empty and no more than 5000 characters.\n",
Use: "update-flag-config-request",
Params: []Param{
{
@@ -4419,6 +4563,32 @@ func AddAllResourceCmds(
SupportsSemanticPatch: false,
})
+ NewOperationCmd(gen_DataExportDestinationsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Generate trust policy",
+ Long: "Trust policy to allow Data Export to assume the role and perform operations on AWS resources",
+ Use: "create-generate-trust-policy",
+ Params: []Param{
+ {
+ Name: "proj-key",
+ In: "path",
+ Description: "The project key",
+ Type: "string",
+ },
+ {
+ Name: "env-key",
+ In: "path",
+ Description: "The environment key",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "POST",
+ HasBody: false,
+ IsBeta: false,
+ RequiresBody: false,
+ Path: "/api/v2/destinations/projects/{projKey}/environments/{envKey}/generate-trust-policy",
+ SupportsSemanticPatch: false,
+ })
+
NewOperationCmd(gen_DataExportDestinationsResourceCmd, client, markdownRenderer, OperationData{
Short: "Generate Snowflake destination key pair",
Long: "Generate key pair to allow Data Export to authenticate into a Snowflake warehouse destination",
@@ -4660,7 +4830,7 @@ func AddAllResourceCmds(
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](https://launchdarkly.com/docs/api/experiments/patch-experiment) with the `startIteration` or `stopIteration` instruction. \n\nTo learn more, read [Start experiment iterations](https://launchdarkly.com/docs/home/experimentation/feature#start-experiment-iterations).\n",
+ 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](https://launchdarkly.com/docs/api/experiments/patch-experiment) with the `startIteration` or `stopIteration` instruction. \n\nTo learn more, read [Start experiment iterations](https://launchdarkly.com/docs/home/experimentation/create#start-an-experiment-iteration).\n",
Use: "create-iteration",
Params: []Param{
{
@@ -5599,7 +5769,7 @@ func AddAllResourceCmds(
{
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.",
+ Description: "By default, flags do _not_ include their lists of prerequisites, targets, or rules for each environment. Set 'summary=0' and include the 'env' query parameter to include these fields for each flag returned.",
Type: "boolean",
},
{
@@ -5716,6 +5886,12 @@ func AddAllResourceCmds(
Description: "If true, the patch will be applied even if it causes a pending scheduled change or approval request to fail.",
Type: "boolean",
},
+ {
+ Name: "dry-run",
+ In: "query",
+ Description: "If true, the patch will be validated but not persisted. Returns a preview of the flag after the patch is applied.",
+ Type: "boolean",
+ },
},
HTTPMethod: "PATCH",
HasBody: true,
@@ -7599,6 +7775,19 @@ func AddAllResourceCmds(
SupportsSemanticPatch: false,
})
+ NewOperationCmd(gen_MembersResourceCmd, 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 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](https://launchdarkly.com/docs/api#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 [base role](https://launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](https://launchdarkly.com/docs/home/account/roles).\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembersRoles\",\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 [base role](https://launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](https://launchdarkly.com/docs/home/account/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#### replaceMembersRoleAttributes\n\nReplaces the role attributes of the specified members.\n\n##### Parameters\n\n- `value`: Map of role attribute keys to lists of values.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembersRoleAttributes\",\n \"value\": {\n \"myRoleProjectKey\": [\"mobile\", \"web\"],\n \"myRoleEnvironmentKey\": [\"production\"]\n },\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\",\n \"507f1f77bcf86cd799439011\"\n ]\n }]\n}\n```\n\n\u003c/details\u003e\n",
+ Use: "update-multiple",
+ Params: []Param{},
+ HTTPMethod: "PATCH",
+ HasBody: true,
+ IsBeta: false,
+ RequiresBody: true,
+ Path: "/api/v2/members",
+ SupportsSemanticPatch: true,
+ })
+
NewOperationCmd(gen_MembersResourceCmd, client, markdownRenderer, OperationData{
Short: "Add a member to teams",
Long: "Add one member to one or more teams.",
@@ -7632,19 +7821,6 @@ func AddAllResourceCmds(
SupportsSemanticPatch: false,
})
- 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 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](https://launchdarkly.com/docs/api#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 [base role](https://launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](https://launchdarkly.com/docs/home/account/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 [base role](https://launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](https://launchdarkly.com/docs/home/account/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#### replaceMembersRoleAttributes\n\nReplaces the role attributes of the specified members.\n\n##### Parameters\n\n- `value`: Map of role attribute keys to lists of values.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembersRoleAttributes\",\n \"value\": {\n \"myRoleProjectKey\": [\"mobile\", \"web\"],\n \"myRoleEnvironmentKey\": [\"production\"]\n },\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\",\n \"507f1f77bcf86cd799439011\"\n ]\n }]\n}\n```\n\n\u003c/details\u003e\n",
- Use: "update-multiple",
- Params: []Param{},
- HTTPMethod: "PATCH",
- HasBody: true,
- IsBeta: true,
- RequiresBody: true,
- Path: "/api/v2/members",
- SupportsSemanticPatch: true,
- })
-
NewOperationCmd(gen_MetricGroupsBetaResourceCmd, client, markdownRenderer, OperationData{
Short: "Create metric group",
Long: "Create a new metric group in the specified project",
@@ -7725,7 +7901,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\n### Filtering metric groups\n\nThe `filter` parameter supports the following operators: `contains`, `equals`, `anyOf`.\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| `experimentStatus` | The experiment's status. One of `not_started`, `running`, `stopped`, `started`. | `equals` |\n| `hasConnections` | Whether the metric group has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` |\n| `kind` | The metric group kind. One of `funnel`, `standard`. | `equals` |\n| `maintainerIds` | The metric maintainer IDs. | `anyOf` |\n| `maintainerTeamKey` | The metric maintainer team key. | `equals` |\n| `query` | A \"fuzzy\" search across metric group key and name. Supply a string or list of strings to the operator. | `equals` |\n\n### Sorting metric groups\n\nLaunchDarkly supports the following fields for sorting:\n\n- `name` sorts by metric group name.\n- `createdAt` sorts by the creation date of the metric group.\n- `connectionCount` sorts by the number of connections to experiments the metric group has.\n\nBy default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by metric group name in ascending order, and `?sort=-name` sorts in descending order.\n\n#### Sample query\n\n`filter=experimentStatus equals 'not_started' and query equals 'metric name'`\n",
+ Long: "Get a list of all metric groups for the specified project.\n\n### Expanding the metric groups response\n\nThis endpoint does not support response expansion.\n\nAlthough the API accepts an `expand` query parameter for compatibility reasons, it does not currently modify the response. The parameter is reserved for future use.\n\n### Filtering metric groups\n\nThe `filter` parameter supports the following operators: `contains`, `equals`, `anyOf`.\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| `experimentStatus` | The experiment's status. One of `not_started`, `running`, `stopped`, `started`. | `equals` |\n| `hasConnections` | Whether the metric group has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` |\n| `kind` | The metric group kind. One of `funnel`, `standard`. | `equals` |\n| `maintainerIds` | The metric maintainer IDs. | `anyOf` |\n| `maintainerTeamKey` | The metric maintainer team key. | `equals` |\n| `query` | A \"fuzzy\" search across metric group key and name. Supply a string or list of strings to the operator. | `equals` |\n\n### Sorting metric groups\n\nLaunchDarkly supports the following fields for sorting:\n\n- `name` sorts by metric group name.\n- `createdAt` sorts by the creation date of the metric group.\n- `connectionCount` sorts by the number of connections to experiments the metric group has.\n\nBy default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by metric group name in ascending order, and `?sort=-name` sorts in descending order.\n\n#### Sample query\n\n`filter=experimentStatus equals 'not_started' and query equals 'metric name'`\n",
Use: "list",
Params: []Param{
{
@@ -7749,7 +7925,7 @@ func AddAllResourceCmds(
{
Name: "expand",
In: "query",
- Description: "A comma-separated list of properties that can reveal additional information in the response.",
+ Description: "This parameter is reserved for future use and is not currently supported on this endpoint.",
Type: "string",
},
{
@@ -7845,7 +8021,7 @@ func AddAllResourceCmds(
{
Name: "expand",
In: "query",
- Description: "A comma-separated list of properties that can reveal additional information in the response. Supported fields are 'experiments', 'experimentCount', 'metricGroups', 'metricGroupCount', 'eventSources', 'guardedRollouts', 'guardedRolloutCount', and 'lastUsedInEntity'.",
+ Description: "A comma-separated list of properties that can reveal additional information in the response. Supported fields are 'experiments', 'experimentCount', 'metricGroups', 'metricGroupCount', 'eventSources', 'guardedRollouts', 'guardedRolloutCount', 'lastUsedInExperiment', and 'lastUsedInGuardedRollout'.",
Type: "string",
},
{
@@ -7865,7 +8041,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### Filtering metrics\n\nThe `filter` parameter supports the following operators: `contains`, `equals`, `anyOf`.\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| `eventKind` | The metric event kind. One of `custom`, `pageview`, `click`. | `equals` |\n| `hasConnections` | Whether the metric has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` |\n| `isNumeric` | Whether the metric is numeric. One of `true`, `false`. | `equals` |\n| `maintainerIds` | A comma-separated list of metric maintainer IDs. | `anyOf` |\n| `maintainerTeamKey` | The metric maintainer team key. | `equals` |\n| `query` | A \"fuzzy\" search across metric key and name. Supply a string or list of strings to the operator. | `equals` |\n| `tags` | The metric tags. | `contains` |\n| `unitAggregationType` | The metric's unit aggregation type. One of `sum`, `average`. | `equals` |\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",
+ Long: "Get a list of all metrics for the specified project.\n\n### Filtering metrics\n\nThe `filter` parameter supports the following operators: `contains`, `equals`, `anyOf`.\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| `eventKind` | The metric event kind. One of `custom`, `pageview`, `click`. | `equals` |\n| `hasConnections` | Whether the metric has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` |\n| `isNumeric` | Whether the metric is numeric. One of `true`, `false`. | `equals` |\n| `maintainerIds` | A comma-separated list of metric maintainer IDs. | `anyOf` |\n| `maintainerTeamKey` | The metric maintainer team key. | `equals` |\n| `metricUsedIn` | Filter by where the metric is used. One of `experiments`, `guarded_rollouts`, `any`, `none`. | `equals` |\n| `query` | A \"fuzzy\" search across metric key and name. Supply a string or list of strings to the operator. | `equals` |\n| `tags` | The metric tags. | `contains` |\n| `unitAggregationType` | The metric's unit aggregation type. One of `sum`, `average`. | `equals` |\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{
{
@@ -7901,7 +8077,7 @@ func AddAllResourceCmds(
{
Name: "filter",
In: "query",
- Description: "A comma-separated list of filters. This endpoint accepts filtering by 'query', 'tags', 'eventKind', 'isNumeric', 'unitAggregationType', 'hasConnections', 'maintainerIds', 'maintainerTeamKey' and 'view'. To learn more about the filter syntax, read the 'Filtering metrics' section above.",
+ Description: "A comma-separated list of filters. This endpoint accepts filtering by 'query', 'tags', 'eventKind', 'isNumeric', 'unitAggregationType', 'hasConnections', 'maintainerIds', 'maintainerTeamKey', 'view', 'dataSourceKeys', and 'metricUsedIn'. To learn more about the filter syntax, read the 'Filtering metrics' section above.",
Type: "string",
},
},
@@ -9063,7 +9239,7 @@ func AddAllResourceCmds(
NewOperationCmd(gen_ScheduledChangesResourceCmd, client, markdownRenderer, OperationData{
Short: "Create scheduled changes workflow",
- Long: "Create scheduled changes for a feature flag. The changes you schedule may include any semantic patch instructions available when [updating a feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag#using-semantic-patches-on-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.",
+ Long: "Create scheduled changes for a feature flag. The changes you schedule may include any semantic patch instructions available when [updating a feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag#using-semantic-patches-on-a-feature-flag). If the `ignoreConflicts` 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{
{
@@ -9585,7 +9761,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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api#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://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments).\n\n#### addBigSegmentExcludedTargets\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/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://launchdarkly.com/docs/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://launchdarkly.com/docs/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://launchdarkly.com/docs/api/segments/create-big-segment-import) 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://launchdarkly.com/docs/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://launchdarkly.com/docs/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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api#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, or if the number of operations on targets exceeds the batch limit of 1,500.\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, or if the number of operations on targets exceeds the batch limit of 1,500. 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, or if the number of operations on targets exceeds the batch limit of 1,500.\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, or if the number of operations on targets exceeds the batch limit of 1,500. 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`. Returns an error if the number of operations on targets exceeds the batch limit of 1,500.\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. Returns an error if the number of operations on targets exceeds the batch limit of 1,500.\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`. Returns an error if the number of operations on targets exceeds the batch limit of 1,500.\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. Returns an error if the number of operations on targets exceeds the batch limit of 1,500.\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://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments).\n\n#### addBigSegmentExcludedTargets\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/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://launchdarkly.com/docs/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://launchdarkly.com/docs/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://launchdarkly.com/docs/api/segments/create-big-segment-import) 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://launchdarkly.com/docs/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://launchdarkly.com/docs/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](https://launchdarkly.com/docs/api#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{
{
@@ -9606,6 +9782,12 @@ func AddAllResourceCmds(
Description: "The segment key",
Type: "string",
},
+ {
+ Name: "dry-run",
+ In: "query",
+ Description: "If true, the patch will be validated but not persisted. Returns a preview of the segment after the patch is applied.",
+ Type: "boolean",
+ },
},
HTTPMethod: "PATCH",
HasBody: true,
@@ -9713,7 +9895,7 @@ func AddAllResourceCmds(
{
Name: "kind",
In: "query",
- Description: "Fetch tags associated with the specified resource type. Options are 'flag', 'project', 'environment', 'segment', 'metric', 'aiconfig', and 'view'. Returns all types by default.",
+ Description: "Fetch tags associated with the specified resource type. Options are 'flag', 'project', 'environment', 'segment', 'metric', 'metric-data-source', 'aiconfig', and 'view'. Returns all types by default.",
Type: "array",
},
{
@@ -10272,7 +10454,7 @@ func AddAllResourceCmds(
NewOperationCmd(gen_ViewsBetaResourceCmd, client, markdownRenderer, OperationData{
Short: "Link resource",
- Long: "Link one or multiple resources to a view:\n- Link flags using flag keys\n- Link AI configs using AI config keys\n- Link metrics using metric keys\n- Link segments using segment IDs\n",
+ Long: "Link one or multiple resources to a view by keys, filters, or both:\n- Link flags using flag keys or filters (maintainerId, maintainerTeamKey, tags, state, query)\n- Link AI Configs using AI Config keys\n- Link metrics using metric keys\n- Link segments using segment IDs or filters (tags, query, unbounded)\n\nWhen both keys and filters are provided, resources matching either condition are linked (union).\n",
Use: "link-resource",
Params: []Param{
{
@@ -10310,7 +10492,7 @@ func AddAllResourceCmds(
NewOperationCmd(gen_ViewsBetaResourceCmd, client, markdownRenderer, OperationData{
Short: "Unlink resource",
- Long: "Unlink one or multiple resources from a view:\n- Unlink flags using flag keys\n- Unlink segments using segment IDs\n- Unlink AI configs using AI config keys\n- Unlink metrics using metric keys\n",
+ Long: "Unlink one or multiple resources from a view:\n- Unlink flags using flag keys\n- Unlink segments using segment IDs\n- Unlink AI Configs using AI Config keys\n- Unlink metrics using metric keys\n",
Use: "unlink-resource",
Params: []Param{
{
diff --git a/ld-openapi.json b/ld-openapi.json
index 1a6f3a9e..05577adc 100644
--- a/ld-openapi.json
+++ b/ld-openapi.json
@@ -2,7 +2,7 @@
"openapi": "3.0.3",
"info": {
"title": "LaunchDarkly REST API",
- "description": "This documentation describes LaunchDarkly's REST API. To access the complete OpenAPI spec directly, use [Get OpenAPI spec](https://launchdarkly.com/docs/api/other/get-openapi-spec).\n\nTo learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home).\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://launchdarkly.com/docs/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://launchdarkly.com/docs/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\nDepending on the permissions granted as part of your [role](https://launchdarkly.com/docs/home/account/roles), 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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api/teams/get-team) 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](https://launchdarkly.com/docs/api#updates-using-json-patch) format. Some resources also support the [JSON merge patch](https://launchdarkly.com/docs/api#updates-using-json-merge-patch) format, and some resources support the [semantic patch](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api/environments/delete-environment) 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](https://launchdarkly.com/docs/api#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 and EU environments\n\nIn addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU).\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`.\n\nTo learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal).\n\n### EU environments\n\nThe version of LaunchDarkly that is available in the EU is different from the version of LaunchDarkly available to other regions. If you are based in the EU, you likely use the EU instance of LaunchDarkly. The LaunchDarkly EU instance complies with EU data residency principles, including the protection and confidentiality of EU customer information.\n\nIf you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`.\n\nTo learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu).\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
\n \n | Version | \n Changes | \n End of life (EOL) | \n
\n \n | `20240415` | \n \n - Changed several endpoints from unpaginated to paginated. Use the `limit` and `offset` query parameters to page through the results.
- Changed the [list access tokens](https://launchdarkly.com/docs/api/access-tokens/get-tokens) endpoint:
- Response is now paginated with a default limit of `25`
- Changed the [list account members](https://launchdarkly.com/docs/api/account-members/get-members) endpoint:
- The `accessCheck` filter is no longer available
- Changed the [list custom roles](https://launchdarkly.com/docs/api/custom-roles/get-custom-roles) endpoint:
- Response is now paginated with a default limit of `20`
- Changed the [list feature flags](https://launchdarkly.com/docs/api/feature-flags/get-feature-flags) endpoint:
- Response is now paginated with a default limit of `20`
- The `environments` field is now only returned if the request is filtered by environment, using the `filterEnv` query parameter
- The `followerId`, `hasDataExport`, `status`, `contextKindTargeted`, and `segmentTargeted` filters are no longer available
- The `compare` query parameter is no longer available
- Changed the [list segments](https://launchdarkly.com/docs/api/segments/get-segments) endpoint:
- Response is now paginated with a default limit of `20`
- Changed the [list teams](https://launchdarkly.com/docs/api/teams/get-teams) endpoint:
- The `expand` parameter no longer supports including `projects` or `roles`
- In paginated results, the maximum page size is now 100
- Changed the [get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) endpoint:
- Response is now paginated with a default limit of `20`
- The `_conflicts` field in the response is no longer available
\n | \n Current | \n
\n \n | `20220603` | \n \n - Changed the [list projects](https://launchdarkly.com/docs/api/projects/get-projects) return value:
- Response is now paginated with a default limit of `20`.
- Added support for filter and sort.
- The project `environments` field is now expandable. This field is omitted by default.
- Changed the [get project](https://launchdarkly.com/docs/api/projects/get-project) return value:
- The `environments` field is now expandable. This field is omitted by default.
\n | \n 2025-04-15 | \n
\n \n | `20210729` | \n \n - Changed the [create approval request](https://launchdarkly.com/docs/api/approvals/post-approval-request) return value. It now returns HTTP Status Code `201` instead of `200`.
- Changed the [get user](https://launchdarkly.com/docs/api/users/get-user) return value. It now returns a user record, not a user.
- Added additional optional fields to environment, segments, flags, members, and segments, including the ability to create big segments.
- Added default values for flag variations when new environments are created.
- Added filtering and pagination for getting flags and members, including `limit`, `number`, `filter`, and `sort` query parameters.
- Added endpoints for expiring user targets for flags and segments, scheduled changes, access tokens, Relay Proxy configuration, integrations and subscriptions, and approvals.
\n | \n 2023-06-03 | \n
\n \n | `20191212` | \n \n - [List feature flags](https://launchdarkly.com/docs/api/feature-flags/get-feature-flags) now defaults to sending summaries of feature flag configurations, equivalent to setting the query parameter `summary=true`. Summaries omit flag targeting rules and individual user targets from the payload.
- Added endpoints for flags, flag status, projects, environments, audit logs, members, users, custom roles, segments, usage, streams, events, and data export.
\n | \n 2022-07-29 | \n
\n \n | `20160426` | \n \n - Initial versioning of API. Tokens created before versioning have their version set to this.
\n | \n 2020-12-12 | \n
\n
\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": "This documentation describes LaunchDarkly's REST API. To access the complete OpenAPI spec directly, use [Get OpenAPI spec](https://launchdarkly.com/docs/api/other/get-openapi-spec).\n\nTo learn how to use LaunchDarkly using the user interface (UI) instead, read our [product documentation](https://launchdarkly.com/docs/home).\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://launchdarkly.com/docs/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://launchdarkly.com/docs/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\nDepending on the permissions granted as part of your [role](https://launchdarkly.com/docs/home/account/roles), 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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api/teams/get-team) 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](https://launchdarkly.com/docs/api#updates-using-json-patch) format. Some resources also support the [JSON merge patch](https://launchdarkly.com/docs/api#updates-using-json-merge-patch) format, and some resources support the [semantic patch](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api/environments/delete-environment) 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). Alternatively, you can use the specification to generate client libraries to interact with our REST API in your language of choice. Or, you can refer to our API endpoints' documentation for guidance on how to make requests with a common HTTP library 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](https://launchdarkly.com/docs/api#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 and EU environments\n\nIn addition to the commercial versions, LaunchDarkly offers instances for federal agencies and those based in the European Union (EU).\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`.\n\nTo learn more, read [LaunchDarkly in federal environments](https://launchdarkly.com/docs/home/infrastructure/federal).\n\n### EU environments\n\nThe version of LaunchDarkly that is available in the EU is different from the version of LaunchDarkly available to other regions. If you are based in the EU, you likely use the EU instance of LaunchDarkly. The LaunchDarkly EU instance complies with EU data residency principles, including the protection and confidentiality of EU customer information.\n\nIf you are working in the EU instance of LaunchDarkly, the base URI for each request is `https://app.eu.launchdarkly.com`.\n\nTo learn more, read [LaunchDarkly in the European Union (EU)](https://launchdarkly.com/docs/home/infrastructure/eu).\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\n \n | Version | \n Changes | \n End of life (EOL) | \n
\n \n | `20240415` | \n \n - Changed several endpoints from unpaginated to paginated. Use the `limit` and `offset` query parameters to page through the results.
- Changed the [list access tokens](https://launchdarkly.com/docs/api/access-tokens/get-tokens) endpoint:
- Response is now paginated with a default limit of `25`
- Changed the [list account members](https://launchdarkly.com/docs/api/account-members/get-members) endpoint:
- The `accessCheck` filter is no longer available
- Changed the [list custom roles](https://launchdarkly.com/docs/api/custom-roles/get-custom-roles) endpoint:
- Response is now paginated with a default limit of `20`
- Changed the [list feature flags](https://launchdarkly.com/docs/api/feature-flags/get-feature-flags) endpoint:
- Response is now paginated with a default limit of `20`
- The `environments` field is now only returned if the request is filtered by environment, using the `filterEnv` query parameter
- The `followerId`, `hasDataExport`, `status`, `contextKindTargeted`, and `segmentTargeted` filters are no longer available
- The `compare` query parameter is no longer available
- Changed the [list segments](https://launchdarkly.com/docs/api/segments/get-segments) endpoint:
- Response is now paginated with a default limit of `20`
- Changed the [list teams](https://launchdarkly.com/docs/api/teams/get-teams) endpoint:
- The `expand` parameter no longer supports including `projects` or `roles`
- In paginated results, the maximum page size is now 100
- Changed the [get workflows](https://launchdarkly.com/docs/api/workflows/get-workflows) endpoint:
- Response is now paginated with a default limit of `20`
- The `_conflicts` field in the response is no longer available
\n | \n Current | \n
\n \n | `20220603` | \n \n - Changed the [list projects](https://launchdarkly.com/docs/api/projects/get-projects) return value:
- Response is now paginated with a default limit of `20`.
- Added support for filter and sort.
- The project `environments` field is now expandable. This field is omitted by default.
- Changed the [get project](https://launchdarkly.com/docs/api/projects/get-project) return value:
- The `environments` field is now expandable. This field is omitted by default.
\n | \n 2025-04-15 | \n
\n \n | `20210729` | \n \n - Changed the [create approval request](https://launchdarkly.com/docs/api/approvals/post-approval-request) return value. It now returns HTTP Status Code `201` instead of `200`.
- Changed the [get user](https://launchdarkly.com/docs/api/users/get-user) return value. It now returns a user record, not a user.
- Added additional optional fields to environment, segments, flags, members, and segments, including the ability to create big segments.
- Added default values for flag variations when new environments are created.
- Added filtering and pagination for getting flags and members, including `limit`, `number`, `filter`, and `sort` query parameters.
- Added endpoints for expiring user targets for flags and segments, scheduled changes, access tokens, Relay Proxy configuration, integrations and subscriptions, and approvals.
\n | \n 2023-06-03 | \n
\n \n | `20191212` | \n \n - [List feature flags](https://launchdarkly.com/docs/api/feature-flags/get-feature-flags) now defaults to sending summaries of feature flag configurations, equivalent to setting the query parameter `summary=true`. Summaries omit flag targeting rules and individual user targets from the payload.
- Added endpoints for flags, flag status, projects, environments, audit logs, members, users, custom roles, segments, usage, streams, events, and data export.
\n | \n 2022-07-29 | \n
\n \n | `20160426` | \n \n - Initial versioning of API. Tokens created before versioning have their version set to this.
\n | \n 2020-12-12 | \n
\n
\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",
@@ -41,17 +41,13 @@
"name": "Account members",
"description": "The account members API allows you to invite new members to an account by making a `POST` request to `/api/v2/members`. When you invite a new member to an account, an invitation is sent to the email you provided. Members with Admin or Owner roles may create new members, as well as anyone with a `createMember` permission for \"member/\\*\". To learn more, read [LaunchDarkly account members](https://launchdarkly.com/docs/home/account/members).\n\nAny member may request the complete list of account members with a `GET` to `/api/v2/members`.\n\nSeveral of the endpoints in the account members API require a member ID. The member ID is returned as part of the [Invite new members](https://launchdarkly.com/docs/api/account-members/post-members) and [List account members](https://launchdarkly.com/docs/api/account-members/get-members) responses. It is the `_id` field of each element in the `items` array.\n"
},
- {
- "name": "Account members (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](https://launchdarkly.com/docs/api#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": "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](https://launchdarkly.com/docs/api#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://launchdarkly.com/docs/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](https://launchdarkly.com/docs/api#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://launchdarkly.com/docs/home/ai-configs).\n"
+ "name": "AI Configs",
+ "description": "The 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://launchdarkly.com/docs/home/ai-configs).\n"
},
{
"name": "Announcements",
@@ -83,7 +79,7 @@
},
{
"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://launchdarkly.com/docs/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://launchdarkly.com/docs/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](https://launchdarkly.com/docs/api/contexts/search-context-instances) 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://launchdarkly.com/docs/sdk/features/app-config).\n\n### Filtering contexts and context instances\n\nWhen you [search for contexts](https://launchdarkly.com/docs/api/contexts/search-contexts) or [context instances](https://launchdarkly.com/docs/api/contexts/search-context-instances), 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](https://launchdarkly.com/docs/api/contexts/search-contexts), 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](https://launchdarkly.com/docs/api/contexts/search-context-instances), 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"
+ "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://launchdarkly.com/docs/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://launchdarkly.com/docs/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](https://launchdarkly.com/docs/api/contexts/search-context-instances) 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://launchdarkly.com/docs/sdk/features/app-config).\n\n### Filtering contexts and context instances\n\nWhen you [search for contexts](https://launchdarkly.com/docs/api/contexts/search-contexts) or [context instances](https://launchdarkly.com/docs/api/contexts/search-context-instances), you can filter the results using fields and operators with the `filter` parameter. Specify `filter` 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 the date field value occurs after the specified 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 field value matches any of the provided values. 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 the date field value occurs 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 the field's list of values contains all of the provided values. 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 only if the field value exactly matches the provided value. 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 based on whether the specified field exists. 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 the field value does not exactly match the provided value. 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 a singular string field value 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\nThe `filter` parameter accepts different field types depending on whether you search for contexts or context instances. Also, you can only filter some fields using certain operators.\n\nWhen you search for [contexts](https://launchdarkly.com/docs/api/contexts/search-contexts), the `filter` parameter supports the following fields and operators:\n\n|Field
|Description |Supported operators |\n|---|---|---|\n|`applicationId` |An identifier that represents the application where the LaunchDarkly SDK is running. |`equals`, `notEquals`, `anyOf` |\n|`id` |The 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, joined with a `:`. For example, `user:user-key-abc123`. |`equals`, `notEquals`, `anyOf` |\n|`kindKeys` |A list of all kinds and keys found in the context. Join the kind and key with a `:`. 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 escape 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, enclose it in double quotes. |`equals`, `notEquals`, `exists`, `startsWith`, `before`, `after`.|\n\nWhen searching for [context instances](https://launchdarkly.com/docs/api/contexts/search-context-instances), 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` |The 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",
@@ -195,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](https://launchdarkly.com/docs/api#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://launchdarkly.com/docs/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](https://launchdarkly.com/docs/api/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](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag) 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](https://launchdarkly.com/docs/api#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 and automate the release process for feature flags across a series of phases, where each phase consists of one or more environments and audiences. Each phase can use an immediate or guarded rollout to a designated audience, and can require approvals for selected environments. You can use release pipelines to ensure that you correctly roll out a flag in one environment before moving on to the next. To learn more, read [Release pipelines](https://launchdarkly.com/docs/home/releases/release-pipelines).\n\nUse the release pipelines API to view, create, update, and delete release pipelines. You can also use this API to view the progress of all ongoing releases across all flags in a project for a given release pipeline. \n\n### Creating releases and updating release phases\n\nWhen you add a flag to a release pipeline, you create a new \"release\" to automate that flag's progress through phases in the pipeline.\n\nUse the related [releases API](https://launchdarkly.com/docs/api/releases-beta) to create a new release, or to view or update a release for a given flag. For example, you can use the releases API to add a flag to an existing release pipeline, or to start the next phase of a flag's ongoing release.\n"
},
{
"name": "Release policies (beta)",
@@ -203,11 +199,11 @@
},
{
"name": "Releases (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](https://launchdarkly.com/docs/api#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. To learn more, read [Release pipelines](https://launchdarkly.com/docs/home/releases/release-pipelines).\n\nWith the releases API, you can view and update the active releases for a given flag.\n\nWith the related [release pipelines API](https://launchdarkly.com/docs/api/release-pipelines-beta), you can view, create, and delete release pipelines.\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](https://launchdarkly.com/docs/api#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 and automate the release process for feature flags across a series of phases, where each phase consists of one or more environments and audiences. When you add a flag to an existing release pipeline, you create a \"release\" to automate that flag's progress through the pipeline. \n\nUse the releases API to add a flag to an existing release pipeline, or to monitor or update an ongoing release for a flag. Updating an ongoing release generally involves the following steps:\n\n1. Obtain the release phases associated with the release. The `phases` field provides an ordered list of all pipeline phases associated with the flag's release. `phases` is returned in the response when you [Create a new release for a flag](https://launchdarkly.com/docs/api/releases-beta/create-release-for-flag) or [Get the release for a flag](https://launchdarkly.com/docs/api/releases-beta/get-release-by-flag-key).\n\n2. Determine the `_id` of the phase you want to start. Release pipeline phases take place in their configured order, so find the first incomplete, unstarted phase in the `phases` list. For example, in a newly-created release the first phase in the `phases` list has both the `complete` and `started` fields set to `false`.\n\n3. Use the phase `_id` value with the [Update phase status for release](https://launchdarkly.com/docs/api/releases-beta/update-phase-status) endpoint to start the release phase. At a minimum, you must provide `{\"status\": active}` in the request object to start a pipeline phase. If the phase requires approvals or guarded rollouts, provide the additional required information in the `audiences` list.\n\n### Configuring release pipelines\n\nUse the related [release pipelines API](https://launchdarkly.com/docs/api/release-pipelines-beta) to view, create, update, and delete release pipelines, or to view the progress of all ongoing releases across all flags in a project for a given release pipeline. \n"
},
{
"name": "Scheduled changes",
- "description": "> ### Scheduled flag changes is an Enterprise feature\n>\n> Scheduled flag changes 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\nSchedule the specified flag targeting changes to take effect at the selected time. You may schedule multiple changes for a flag each with a different `ExecutionDate`. To learn more, read [Scheduled flag changes](https://launchdarkly.com/docs/home/releases/scheduled-changes).\n\nSeveral of the endpoints in the scheduled changes API require a scheduled change ID. The scheduled change ID is returned as part of the [Create scheduled changes workflow](https://launchdarkly.com/docs/api/scheduled-changes/post-flag-config-scheduled-changes) and [List scheduled changes](https://launchdarkly.com/docs/api/scheduled-changes/get-flag-config-scheduled-changes) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n"
+ "description": "> ### Scheduled flag changes is an Enterprise feature\n>\n> Scheduled flag changes 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 schedule flag targeting rule changes to take place at a selected time. You may schedule multiple changes for a single flag with each change having a different `ExecutionDate`. To learn more, read [Scheduled flag changes](https://launchdarkly.com/docs/home/releases/scheduled-changes).\n\nSeveral endpoints in the scheduled changes API require an existing scheduled change ID. This ID is returned in the `_id` field from the [Create scheduled changes workflow](https://launchdarkly.com/docs/api/scheduled-changes/post-flag-config-scheduled-changes) response, or in the `_id` field of each element in the `items` array from the [List scheduled changes](https://launchdarkly.com/docs/api/scheduled-changes/get-flag-config-scheduled-changes) response.\n"
},
{
"name": "Segments",
@@ -1623,7 +1619,7 @@
"Approvals"
],
"summary": "Create approval request",
- "description": "Create an approval request.\n\nThis endpoint requires a list of `instructions`, in semantic patch format, that will be applied when the approval request is approved and applied.\n\n### Flags\n\nIf you are creating an approval request for a flag, you can use the following `instructions`:\n\n- `addVariation`\n- `removeVariation`\n- `updateVariation`\n- `updateDefaultVariation`\n\nFor details on using these instructions, read [Update feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag).\n\nTo create an approval for a flag specific to an environment, use [Create approval request for a flag](https://launchdarkly.com/docs/api/approvals/post-approval-request-for-flag).\n\n### AI Configs\n\nIf you are creating an approval request for an AI Config, you can use the semantic patch instructions listed under [Update AI Config targeting](https://launchdarkly.com/docs/api/ai-configs-beta/patch-ai-config-targeting).\n\n### Segments\n\nIf you are creating an approval request for a segment, you can use the semantic patch instructions listed under [Patch segment](https://launchdarkly.com/docs/api/segments/patch-segment).\n",
+ "description": "Create an approval request.\n\nThis endpoint requires a list of `instructions`, in semantic patch format, that will be applied when the approval request is approved and applied.\n\n### Flags\n\nIf you are creating an approval request for a flag, you can use the following `instructions`:\n\n- `addVariation`\n- `removeVariation`\n- `updateVariation`\n- `updateDefaultVariation`\n\nFor details on using these instructions, read [Update feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag).\n\nTo create an approval for a flag specific to an environment, use [Create approval request for a flag](https://launchdarkly.com/docs/api/approvals/post-approval-request-for-flag).\n\n### AI Configs\n\nIf you are creating an approval request for an AI Config, you can use the semantic patch instructions listed under [Update AI Config targeting](https://launchdarkly.com/docs/api/ai-configs/patch-ai-config-targeting).\n\n### Segments\n\nIf you are creating an approval request for a segment, you can use the semantic patch instructions listed under [Patch segment](https://launchdarkly.com/docs/api/segments/patch-segment).\n",
"requestBody": {
"content": {
"application/json": {
@@ -1788,7 +1784,7 @@
"Approvals (beta)"
],
"summary": "Update approval request",
- "description": "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint works with any approval requests.\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](https://launchdarkly.com/docs/api#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",
+ "description": "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint works with any approval requests.\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](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions 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\n#### updateDescription\n\nUpdates the description (title) of the approval request.\n\n##### Parameters\n\n- `value`: (Required) The new description for the approval request. Must be non-empty and no more than 5000 characters.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Updated approval request title\"\n }]\n}\n```\n",
"parameters": [
{
"name": "id",
@@ -1802,6 +1798,24 @@
}
}
],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/approvalRequestPatchInput"
+ },
+ "example": {
+ "instructions": [
+ {
+ "kind": "updateDescription",
+ "value": "New description"
+ }
+ ]
+ }
+ }
+ },
+ "required": true
+ },
"operationId": "patchApprovalRequest"
},
"delete": {
@@ -3735,6 +3749,102 @@
"operationId": "postGenerateWarehouseDestinationKeyPair"
}
},
+ "/api/v2/destinations/projects/{projKey}/environments/{envKey}/generate-trust-policy": {
+ "post": {
+ "responses": {
+ "201": {
+ "description": "Generate trust policy response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GenerateTrustPolicyPostRep"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InvalidRequestErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "409": {
+ "description": "Status conflict",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/StatusConflictErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Data Export destinations"
+ ],
+ "summary": "Generate trust policy",
+ "description": "Trust policy to allow Data Export to assume the role and perform operations on AWS resources",
+ "parameters": [
+ {
+ "name": "projKey",
+ "in": "path",
+ "description": "The project key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The project key"
+ }
+ },
+ {
+ "name": "envKey",
+ "in": "path",
+ "description": "The environment key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The environment key"
+ }
+ }
+ ],
+ "operationId": "postGenerateTrustPolicy"
+ }
+ },
"/api/v2/destinations/{projectKey}/{environmentKey}": {
"post": {
"responses": {
@@ -4996,10 +5106,10 @@
{
"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.",
+ "description": "By default, flags do _not_ include their lists of prerequisites, targets, or rules for each environment. Set `summary=0` and include the `env` query parameter to include these fields for each flag returned.",
"schema": {
"type": "boolean",
- "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."
+ "description": "By default, flags do _not_ include their lists of prerequisites, targets, or rules for each environment. Set `summary=0` and include the `env` query parameter to include these fields for each flag returned."
}
},
{
@@ -5458,6 +5568,15 @@
"type": "boolean",
"description": "If true, the patch will be applied even if it causes a pending scheduled change or approval request to fail."
}
+ },
+ {
+ "name": "dryRun",
+ "in": "query",
+ "description": "If true, the patch will be validated but not persisted. Returns a preview of the flag after the patch is applied.",
+ "schema": {
+ "type": "boolean",
+ "description": "If true, the patch will be validated but not persisted. Returns a preview of the flag after the patch is applied."
+ }
}
],
"requestBody": {
@@ -10086,10 +10205,10 @@
}
},
"tags": [
- "Account members (beta)"
+ "Account members"
],
"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](https://launchdarkly.com/docs/api#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 [base role](https://launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](https://launchdarkly.com/docs/home/account/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 [base role](https://launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](https://launchdarkly.com/docs/home/account/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#### replaceMembersRoleAttributes\n\nReplaces the role attributes of the specified members.\n\n##### Parameters\n\n- `value`: Map of role attribute keys to lists of values.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembersRoleAttributes\",\n \"value\": {\n \"myRoleProjectKey\": [\"mobile\", \"web\"],\n \"myRoleEnvironmentKey\": [\"production\"]\n },\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\",\n \"507f1f77bcf86cd799439011\"\n ]\n }]\n}\n```\n\n \n",
+ "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](https://launchdarkly.com/docs/api#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 [base role](https://launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](https://launchdarkly.com/docs/home/account/roles).\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembersRoles\",\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 [base role](https://launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](https://launchdarkly.com/docs/home/account/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#### replaceMembersRoleAttributes\n\nReplaces the role attributes of the specified members.\n\n##### Parameters\n\n- `value`: Map of role attribute keys to lists of values.\n- `memberIDs`: List of member IDs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceMembersRoleAttributes\",\n \"value\": {\n \"myRoleProjectKey\": [\"mobile\", \"web\"],\n \"myRoleEnvironmentKey\": [\"production\"]\n },\n \"memberIDs\": [\n \"1234a56b7c89d012345e678f\",\n \"507f1f77bcf86cd799439011\"\n ]\n }]\n}\n```\n\n \n",
"requestBody": {
"content": {
"application/json": {
@@ -10530,7 +10649,7 @@
"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`, `equals`, `anyOf`.\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| `eventKind` | The metric event kind. One of `custom`, `pageview`, `click`. | `equals` |\n| `hasConnections` | Whether the metric has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` |\n| `isNumeric` | Whether the metric is numeric. One of `true`, `false`. | `equals` |\n| `maintainerIds` | A comma-separated list of metric maintainer IDs. | `anyOf` |\n| `maintainerTeamKey` | The metric maintainer team key. | `equals` |\n| `query` | A \"fuzzy\" search across metric key and name. Supply a string or list of strings to the operator. | `equals` |\n| `tags` | The metric tags. | `contains` |\n| `unitAggregationType` | The metric's unit aggregation type. One of `sum`, `average`. | `equals` |\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",
+ "description": "Get a list of all metrics for the specified project.\n\n### Filtering metrics\n\nThe `filter` parameter supports the following operators: `contains`, `equals`, `anyOf`.\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| `eventKind` | The metric event kind. One of `custom`, `pageview`, `click`. | `equals` |\n| `hasConnections` | Whether the metric has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` |\n| `isNumeric` | Whether the metric is numeric. One of `true`, `false`. | `equals` |\n| `maintainerIds` | A comma-separated list of metric maintainer IDs. | `anyOf` |\n| `maintainerTeamKey` | The metric maintainer team key. | `equals` |\n| `metricUsedIn` | Filter by where the metric is used. One of `experiments`, `guarded_rollouts`, `any`, `none`. | `equals` |\n| `query` | A \"fuzzy\" search across metric key and name. Supply a string or list of strings to the operator. | `equals` |\n| `tags` | The metric tags. | `contains` |\n| `unitAggregationType` | The metric's unit aggregation type. One of `sum`, `average`. | `equals` |\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",
@@ -10586,11 +10705,11 @@
{
"name": "filter",
"in": "query",
- "description": "A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, `maintainerTeamKey` and `view`. To learn more about the filter syntax, read the 'Filtering metrics' section above.",
+ "description": "A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, `maintainerTeamKey`, `view`, `dataSourceKeys`, and `metricUsedIn`. To learn more about the filter syntax, read the 'Filtering metrics' section above.",
"schema": {
"type": "string",
"format": "string",
- "description": "A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, `maintainerTeamKey` and `view`. To learn more about the filter syntax, read the 'Filtering metrics' section above."
+ "description": "A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, `maintainerTeamKey`, `view`, `dataSourceKeys`, and `metricUsedIn`. To learn more about the filter syntax, read the 'Filtering metrics' section above."
}
}
],
@@ -10791,11 +10910,11 @@
{
"name": "expand",
"in": "query",
- "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are `experiments`, `experimentCount`, `metricGroups`, `metricGroupCount`, `eventSources`, `guardedRollouts`, `guardedRolloutCount`, and `lastUsedInEntity`.",
+ "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are `experiments`, `experimentCount`, `metricGroups`, `metricGroupCount`, `eventSources`, `guardedRollouts`, `guardedRolloutCount`, `lastUsedInExperiment`, and `lastUsedInGuardedRollout`.",
"schema": {
"type": "string",
"format": "string",
- "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are `experiments`, `experimentCount`, `metricGroups`, `metricGroupCount`, `eventSources`, `guardedRollouts`, `guardedRolloutCount`, and `lastUsedInEntity`."
+ "description": "A comma-separated list of properties that can reveal additional information in the response. Supported fields are `experiments`, `experimentCount`, `metricGroups`, `metricGroupCount`, `eventSources`, `guardedRollouts`, `guardedRolloutCount`, `lastUsedInExperiment`, and `lastUsedInGuardedRollout`."
}
},
{
@@ -14286,7 +14405,7 @@
"Experiments"
],
"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](https://launchdarkly.com/docs/api/experiments/patch-experiment) with the `startIteration` or `stopIteration` instruction. \n\nTo learn more, read [Start experiment iterations](https://launchdarkly.com/docs/home/experimentation/feature#start-experiment-iterations).\n",
+ "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](https://launchdarkly.com/docs/api/experiments/patch-experiment) with the `startIteration` or `stopIteration` instruction. \n\nTo learn more, read [Start experiment iterations](https://launchdarkly.com/docs/home/experimentation/create#start-an-experiment-iteration).\n",
"parameters": [
{
"name": "projectKey",
@@ -16242,7 +16361,7 @@
"Approvals (beta)"
],
"summary": "Update flag approval request",
- "description": "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint requires a feature flag key, and can only be used for updating approval requests for flags.\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](https://launchdarkly.com/docs/api#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",
+ "description": "Perform a partial update to an approval request. Updating an approval request uses the semantic patch format. This endpoint requires a feature flag key, and can only be used for updating approval requests for flags.\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](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions 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\n#### updateDescription\n\nUpdates the description (title) of the approval request.\n\n##### Parameters\n\n- `value`: (Required) The new description for the approval request. Must be non-empty and no more than 5000 characters.\n",
"parameters": [
{
"name": "projectKey",
@@ -17127,7 +17246,7 @@
"Scheduled changes"
],
"summary": "Create scheduled changes workflow",
- "description": "Create scheduled changes for a feature flag. The changes you schedule may include any semantic patch instructions available when [updating a feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag#using-semantic-patches-on-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.",
+ "description": "Create scheduled changes for a feature flag. The changes you schedule may include any semantic patch instructions available when [updating a feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag#using-semantic-patches-on-a-feature-flag). If the `ignoreConflicts` 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",
@@ -18787,7 +18906,7 @@
"Metrics (beta)"
],
"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 following operators: `contains`, `equals`, `anyOf`.\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| `experimentStatus` | The experiment's status. One of `not_started`, `running`, `stopped`, `started`. | `equals` |\n| `hasConnections` | Whether the metric group has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` |\n| `kind` | The metric group kind. One of `funnel`, `standard`. | `equals` |\n| `maintainerIds` | The metric maintainer IDs. | `anyOf` |\n| `maintainerTeamKey` | The metric maintainer team key. | `equals` |\n| `query` | A \"fuzzy\" search across metric group key and name. Supply a string or list of strings to the operator. | `equals` |\n\n### Sorting metric groups\n\nLaunchDarkly supports the following fields for sorting:\n\n- `name` sorts by metric group name.\n- `createdAt` sorts by the creation date of the metric group.\n- `connectionCount` sorts by the number of connections to experiments the metric group has.\n\nBy default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by metric group name in ascending order, and `?sort=-name` sorts in descending order.\n\n#### Sample query\n\n`filter=experimentStatus equals 'not_started' and query equals 'metric name'`\n",
+ "description": "Get a list of all metric groups for the specified project.\n\n### Expanding the metric groups response\n\nThis endpoint does not support response expansion.\n\nAlthough the API accepts an `expand` query parameter for compatibility reasons, it does not currently modify the response. The parameter is reserved for future use.\n\n### Filtering metric groups\n\nThe `filter` parameter supports the following operators: `contains`, `equals`, `anyOf`.\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| `experimentStatus` | The experiment's status. One of `not_started`, `running`, `stopped`, `started`. | `equals` |\n| `hasConnections` | Whether the metric group has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` |\n| `kind` | The metric group kind. One of `funnel`, `standard`. | `equals` |\n| `maintainerIds` | The metric maintainer IDs. | `anyOf` |\n| `maintainerTeamKey` | The metric maintainer team key. | `equals` |\n| `query` | A \"fuzzy\" search across metric group key and name. Supply a string or list of strings to the operator. | `equals` |\n\n### Sorting metric groups\n\nLaunchDarkly supports the following fields for sorting:\n\n- `name` sorts by metric group name.\n- `createdAt` sorts by the creation date of the metric group.\n- `connectionCount` sorts by the number of connections to experiments the metric group has.\n\nBy default, the sort is in ascending order. Use `-` to sort in descending order. For example, `?sort=name` sorts the response by metric group name in ascending order, and `?sort=-name` sorts in descending order.\n\n#### Sample query\n\n`filter=experimentStatus equals 'not_started' and query equals 'metric name'`\n",
"parameters": [
{
"name": "projectKey",
@@ -18823,11 +18942,11 @@
{
"name": "expand",
"in": "query",
- "description": "A comma-separated list of properties that can reveal additional information in the response.",
+ "description": "This parameter is reserved for future use and is not currently supported on this endpoint.",
"schema": {
"type": "string",
"format": "string",
- "description": "A comma-separated list of properties that can reveal additional information in the response."
+ "description": "This parameter is reserved for future use and is not currently supported on this endpoint."
}
},
{
@@ -20549,7 +20668,7 @@
"Segments"
],
"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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api#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://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments).\n\n#### addBigSegmentExcludedTargets\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/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://launchdarkly.com/docs/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://launchdarkly.com/docs/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://launchdarkly.com/docs/api/segments/create-big-segment-import) 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://launchdarkly.com/docs/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://launchdarkly.com/docs/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](https://launchdarkly.com/docs/api#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",
+ "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](https://launchdarkly.com/docs/api#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](https://launchdarkly.com/docs/api#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, or if the number of operations on targets exceeds the batch limit of 1,500.\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, or if the number of operations on targets exceeds the batch limit of 1,500. 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, or if the number of operations on targets exceeds the batch limit of 1,500.\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, or if the number of operations on targets exceeds the batch limit of 1,500. 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`. Returns an error if the number of operations on targets exceeds the batch limit of 1,500.\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. Returns an error if the number of operations on targets exceeds the batch limit of 1,500.\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`. Returns an error if the number of operations on targets exceeds the batch limit of 1,500.\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. Returns an error if the number of operations on targets exceeds the batch limit of 1,500.\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://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments).\n\n#### addBigSegmentExcludedTargets\n\nFor use with [larger list-based segments](https://launchdarkly.com/docs/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://launchdarkly.com/docs/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://launchdarkly.com/docs/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://launchdarkly.com/docs/api/segments/create-big-segment-import) 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://launchdarkly.com/docs/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://launchdarkly.com/docs/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](https://launchdarkly.com/docs/api#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": "projectKey",
@@ -20583,6 +20702,15 @@
"format": "string",
"description": "The segment key"
}
+ },
+ {
+ "name": "dryRun",
+ "in": "query",
+ "description": "If true, the patch will be validated but not persisted. Returns a preview of the segment after the patch is applied.",
+ "schema": {
+ "type": "boolean",
+ "description": "If true, the patch will be validated but not persisted. Returns a preview of the segment after the patch is applied."
+ }
}
],
"requestBody": {
@@ -23757,6 +23885,170 @@
"operationId": "getContextsClientsideUsage"
}
},
+ "/api/v2/usage/clientside-mau": {
+ "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"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ },
+ "503": {
+ "description": "Service unavailable",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/StatusServiceUnavailable"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Account usage (beta)"
+ ],
+ "summary": "Get MAU clientside usage",
+ "description": "Get a time series of the number of context key usages observed by LaunchDarkly in your account, for the primary context kind only. The counts reflect data reported from client-side SDKs.
For past months, the primary context kind is fixed and reflects the last known primary kind for that month. For the current month, it may vary as new primary context kinds are observed.
The supported granularity varies by aggregation type. The maximum time range is 365 days.",
+ "parameters": [
+ {
+ "name": "from",
+ "in": "query",
+ "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month."
+ }
+ },
+ {
+ "name": "to",
+ "in": "query",
+ "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time."
+ }
+ },
+ {
+ "name": "projectKey",
+ "in": "query",
+ "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key."
+ }
+ },
+ {
+ "name": "environmentKey",
+ "in": "query",
+ "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key."
+ }
+ },
+ {
+ "name": "sdkName",
+ "in": "query",
+ "description": "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name."
+ }
+ },
+ {
+ "name": "anonymous",
+ "in": "query",
+ "description": "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.
Valid values: `true`, `false`.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.
Valid values: `true`, `false`."
+ }
+ },
+ {
+ "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, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `sdkName`, `sdkAppId`, `anonymousV2`.",
+ "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, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `sdkName`, `sdkAppId`, `anonymousV2`."
+ }
+ },
+ {
+ "name": "aggregationType",
+ "in": "query",
+ "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`, `rolling_30d`.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`, `rolling_30d`."
+ }
+ },
+ {
+ "name": "granularity",
+ "in": "query",
+ "description": "Specifies the data granularity. Defaults to `daily`. Valid values depend on `aggregationType`: **month_to_date** supports `daily` and `monthly`; **incremental** and **rolling_30d** support `daily` only.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Specifies the data granularity. Defaults to `daily`. Valid values depend on `aggregationType`: **month_to_date** supports `daily` and `monthly`; **incremental** and **rolling_30d** support `daily` only."
+ }
+ }
+ ],
+ "operationId": "getMAUClientsideUsage"
+ }
+ },
"/api/v2/usage/data-export-events": {
"get": {
"responses": {
@@ -24632,7 +24924,8 @@
}
}
],
- "operationId": "getMauUsage"
+ "operationId": "getMauUsage",
+ "deprecated": true
}
},
"/api/v2/usage/mau/bycategory": {
@@ -24726,7 +25019,8 @@
}
}
],
- "operationId": "getMauUsageByCategory"
+ "operationId": "getMauUsageByCategory",
+ "deprecated": true
}
},
"/api/v2/usage/mau/sdks": {
@@ -26186,6 +26480,180 @@
"operationId": "getContextsTotalUsage"
}
},
+ "/api/v2/usage/total-mau": {
+ "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"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ },
+ "503": {
+ "description": "Service unavailable",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/StatusServiceUnavailable"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Account usage (beta)"
+ ],
+ "summary": "Get MAU total usage",
+ "description": "Get a time series of the number of context key usages observed by LaunchDarkly in your account, for the primary context kind only.
For past months, this reflects the context kind that was most recently marked as primary for that month. For the current month, the context kind may vary as new primary kinds are observed.
The supported granularity varies by aggregation type. The maximum time range is 365 days.",
+ "parameters": [
+ {
+ "name": "from",
+ "in": "query",
+ "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The series of data returned starts from this timestamp (Unix milliseconds). Defaults to the beginning of the current month."
+ }
+ },
+ {
+ "name": "to",
+ "in": "query",
+ "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The series of data returned ends at this timestamp (Unix milliseconds). Defaults to the current time."
+ }
+ },
+ {
+ "name": "projectKey",
+ "in": "query",
+ "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "A project key to filter results by. Can be specified multiple times, one query parameter per project key."
+ }
+ },
+ {
+ "name": "environmentKey",
+ "in": "query",
+ "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "An environment key to filter results by. If specified, exactly one `projectKey` must be provided. Can be specified multiple times, one query parameter per environment key."
+ }
+ },
+ {
+ "name": "sdkName",
+ "in": "query",
+ "description": "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "An SDK name to filter results by. Can be specified multiple times, one query parameter per SDK name."
+ }
+ },
+ {
+ "name": "sdkType",
+ "in": "query",
+ "description": "An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "An SDK type to filter results by. Can be specified multiple times, one query parameter per SDK type."
+ }
+ },
+ {
+ "name": "anonymous",
+ "in": "query",
+ "description": "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.
Valid values: `true`, `false`.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "An anonymous value to filter results by. Can be specified multiple times, one query parameter per anonymous value.
Valid values: `true`, `false`."
+ }
+ },
+ {
+ "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, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `sdkName`, `sdkType`, `sdkAppId`, `anonymousV2`.",
+ "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, one query parameter per dimension.
Valid values: `projectId`, `environmentId`, `sdkName`, `sdkType`, `sdkAppId`, `anonymousV2`."
+ }
+ },
+ {
+ "name": "aggregationType",
+ "in": "query",
+ "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`, `rolling_30d`.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Specifies the aggregation method. Defaults to `month_to_date`.
Valid values: `month_to_date`, `incremental`, `rolling_30d`."
+ }
+ },
+ {
+ "name": "granularity",
+ "in": "query",
+ "description": "Specifies the data granularity. Defaults to `daily`. Valid values depend on `aggregationType`: **month_to_date** supports `daily` and `monthly`; **incremental** and **rolling_30d** support `daily` only.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Specifies the data granularity. Defaults to `daily`. Valid values depend on `aggregationType`: **month_to_date** supports `daily` and `monthly`; **incremental** and **rolling_30d** support `daily` only."
+ }
+ }
+ ],
+ "operationId": "getMAUTotalUsage"
+ }
+ },
"/api/v2/user-attributes/{projectKey}/{environmentKey}": {
"get": {
"responses": {
@@ -27767,7 +28235,7 @@
"operationId": "getTags",
"parameters": [
{
- "description": "Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `aiconfig`, and `view`. Returns all types by default.",
+ "description": "Fetch tags associated with the specified resource type. Options are `flag`, `project`, `environment`, `segment`, `metric`, `metric-data-source`, `aiconfig`, and `view`. Returns all types by default.",
"explode": true,
"in": "query",
"name": "kind",
@@ -27910,19 +28378,77 @@
"operationId": "getAIConfigTargeting",
"parameters": [
{
- "description": "Version of the endpoint.",
"explode": false,
- "in": "header",
- "name": "LD-API-Version",
+ "in": "path",
+ "name": "projectKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "explode": false,
+ "in": "path",
+ "name": "configKey",
"required": true,
"schema": {
- "enum": [
- "beta"
- ],
"type": "string"
},
"style": "simple"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AIConfigTargeting"
+ }
+ }
+ },
+ "description": "Successful response"
},
+ "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": "Show an AI Config's targeting",
+ "tags": [
+ "AI Configs"
+ ]
+ },
+ "patch": {
+ "description": "Perform a partial update to an AI Config's targeting. The request body must be a valid semantic patch.\n\n### Using semantic patches on an AI Config\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](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating an AI Config's targeting takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): 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 AI Configs.\n\n\nClick to expand instructions for working with targeting and variations for AI Configs
\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 AI Config.\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 \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addClauses\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauses\": [{\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"USA\", \"Canada\"]\n }]\n }]\n}\n```\n\n#### addRule\n\nAdds a new targeting rule to the AI Config. 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 rule.\n- Either\n- `variationId`: ID of a variation.\n\nor\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 AI Config 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.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"addTargets\",\n \"values\": [\"context-key-123abc\", \"context-key-456def\"],\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\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 AI Config.\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\"environmentKey\": \"environment-key-123abc\",\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#### 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.\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#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\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.\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 variation.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"removeTargets\",\n \"values\": [\"context-key-123abc\", \"context-key-456def\"],\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\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.\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\"environmentKey\": \"environment-key-123abc\",\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 on the AI Config.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all rules.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"reorderRules\",\n \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n}]\n}\n```\n\n#### replaceRules\n\nRemoves all targeting rules for the AI Config 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 }\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#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule.\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 AI Config.\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\"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ]\n}\n```\n\n#### updateFallthroughVariationOrRollout\n\nUpdates the default or \"fallthrough\" rule for the AI Config, which the AI Config 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.\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\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"updateFallthroughVariationOrRollout\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\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\": \"updateFallthroughVariationOrRollout\",\n \"rolloutContextKind\": \"user\",\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#### updateOffVariation\n\nUpdates the default off variation to `variationId`. The AI Config serves the default off variation when the AI Config's targeting is **Off**.\n\n##### Parameters\n\n- `variationId`: ID of a variation.\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#### updateRuleDescription\n\nUpdates the description of the 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 AI Config.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"updateRuleDescription\",\n \"description\": \"New rule description\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n}]\n}\n```\n\n#### updateRuleTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the AI Config 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 AI Config.\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"updateRuleTrackEvents\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"trackEvents\": true\n}]\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.\n- `variationId`: ID of a variation.\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:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"updateRuleVariationOrRollout\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the AI Config, 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 AI Config, 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",
+ "operationId": "patchAIConfigTargeting",
+ "parameters": [
{
"explode": false,
"in": "path",
@@ -27944,6 +28470,16 @@
"style": "simple"
}
],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AIConfigTargetingPatch"
+ }
+ }
+ },
+ "description": "AI Config targeting semantic patch instructions"
+ },
"responses": {
"200": {
"content": {
@@ -27953,113 +28489,17 @@
}
}
},
- "description": "Successful response"
- },
- "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": "Show an AI Config's targeting",
- "tags": [
- "AI Configs (beta)"
- ]
- },
- "patch": {
- "description": "Perform a partial update to an AI Config's targeting. The request body must be a valid semantic patch.\n\n### Using semantic patches on an AI Config\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](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating an AI Config's targeting takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): 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 AI Configs.\n\n\nClick to expand instructions for working with targeting and variations for AI Configs
\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 AI Config.\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 \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addClauses\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauses\": [{\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"USA\", \"Canada\"]\n }]\n }]\n}\n```\n\n#### addRule\n\nAdds a new targeting rule to the AI Config. 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 rule.\n- Either\n- `variationId`: ID of a variation.\n\nor\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 AI Config 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.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"addTargets\",\n \"values\": [\"context-key-123abc\", \"context-key-456def\"],\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\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 AI Config.\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\"environmentKey\": \"environment-key-123abc\",\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#### 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.\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#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\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.\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 variation.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"removeTargets\",\n \"values\": [\"context-key-123abc\", \"context-key-456def\"],\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\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.\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\"environmentKey\": \"environment-key-123abc\",\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 on the AI Config.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all rules.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"reorderRules\",\n \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n}]\n}\n```\n\n#### replaceRules\n\nRemoves all targeting rules for the AI Config 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 }\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#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule.\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 AI Config.\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\"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ]\n}\n```\n\n#### updateFallthroughVariationOrRollout\n\nUpdates the default or \"fallthrough\" rule for the AI Config, which the AI Config 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.\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\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"updateFallthroughVariationOrRollout\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\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\": \"updateFallthroughVariationOrRollout\",\n \"rolloutContextKind\": \"user\",\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#### updateOffVariation\n\nUpdates the default off variation to `variationId`. The AI Config serves the default off variation when the AI Config's targeting is **Off**.\n\n##### Parameters\n\n- `variationId`: ID of a variation.\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#### updateRuleDescription\n\nUpdates the description of the 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 AI Config.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"updateRuleDescription\",\n \"description\": \"New rule description\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n}]\n}\n```\n\n#### updateRuleTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the AI Config 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 AI Config.\n- `trackEvents`: Whether or not events are tracked.\n\nHere's an example:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"updateRuleTrackEvents\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"trackEvents\": true\n}]\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.\n- `variationId`: ID of a variation.\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:\n\n```json\n{\n\"environmentKey\": \"environment-key-123abc\",\n\"instructions\": [{\n \"kind\": \"updateRuleVariationOrRollout\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether or not LaunchDarkly tracks events for the AI Config, 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 AI Config, 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",
- "operationId": "patchAIConfigTargeting",
- "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/AIConfigTargetingPatch"
- }
- }
- },
- "description": "AI Config targeting semantic patch instructions"
- },
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/AIConfigTargeting"
- }
- }
- },
- "description": "AI Config targeting updated"
- },
- "400": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Bad request"
+ "description": "AI Config targeting updated"
+ },
+ "400": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Bad request"
},
"403": {
"content": {
@@ -28094,7 +28534,7 @@
},
"summary": "Update AI Config targeting",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
@@ -28103,20 +28543,6 @@
"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,
@@ -28227,27 +28653,13 @@
},
"summary": "List AI Configs",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
},
"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",
@@ -28314,7 +28726,7 @@
},
"summary": "Create new AI Config",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
@@ -28323,20 +28735,6 @@
"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,
@@ -28406,27 +28804,13 @@
},
"summary": "Delete AI Config",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
},
"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",
@@ -28502,27 +28886,13 @@
},
"summary": "Get AI Config",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
},
"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",
@@ -28608,7 +28978,7 @@
},
"summary": "Update AI Config",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
@@ -28617,20 +28987,6 @@
"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",
@@ -28707,7 +29063,7 @@
},
"summary": "Create AI Config variation",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
@@ -28716,20 +29072,6 @@
"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",
@@ -28808,27 +29150,13 @@
},
"summary": "Delete AI Config variation",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
},
"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,
@@ -28917,27 +29245,13 @@
},
"summary": "Get AI Config variation",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
},
"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",
@@ -29033,7 +29347,7 @@
},
"summary": "Update AI Config variation",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
@@ -29042,20 +29356,6 @@
"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",
@@ -29164,7 +29464,7 @@
},
"summary": "Get AI Config metrics",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
@@ -29173,20 +29473,6 @@
"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",
@@ -29295,7 +29581,7 @@
},
"summary": "Get AI Config metrics by variation",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
@@ -29304,20 +29590,6 @@
"description": "Remove AI models, by key, from the restricted list.",
"operationId": "deleteRestrictedModels",
"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,
@@ -29388,27 +29660,13 @@
},
"summary": "Remove AI models from the restricted list",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
},
"post": {
- "description": "Add AI models, by key, to the restricted list. Keys are included in the response from the [List AI model configs](https://launchdarkly.com/docs/api/ai-configs-beta/list-model-configs) endpoint.",
+ "description": "Add AI models, by key, to the restricted list. Keys are included in the response from the [List AI model configs](https://launchdarkly.com/docs/api/ai-configs/list-model-configs) endpoint.",
"operationId": "postRestrictedModels",
"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,
@@ -29486,7 +29744,7 @@
},
"summary": "Add AI models to the restricted list",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
@@ -29495,20 +29753,6 @@
"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,
@@ -29589,27 +29833,13 @@
},
"summary": "List AI model configs",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
},
"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,
@@ -29687,7 +29917,7 @@
},
"summary": "Create an AI model config",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
@@ -29696,20 +29926,6 @@
"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,
@@ -29779,27 +29995,13 @@
},
"summary": "Delete an AI model config",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
},
"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,
@@ -29877,7 +30079,7 @@
},
"summary": "Get AI model config",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
@@ -29886,20 +30088,6 @@
"description": "Get a list of all AI tools in the given project.",
"operationId": "listAITools",
"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",
@@ -29999,27 +30187,13 @@
},
"summary": "List AI tools",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
},
"post": {
"description": "Create an AI tool",
"operationId": "postAITool",
"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",
@@ -30086,7 +30260,7 @@
},
"summary": "Create an AI tool",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
@@ -30095,20 +30269,6 @@
"description": "Get a list of all versions of an AI tool in the given project.",
"operationId": "listAIToolVersions",
"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",
@@ -30207,7 +30367,7 @@
},
"summary": "List AI tool versions",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
@@ -30216,20 +30376,6 @@
"description": "Delete an existing AI tool.",
"operationId": "deleteAITool",
"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",
@@ -30298,27 +30444,13 @@
},
"summary": "Delete AI tool",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
},
"get": {
"description": "Retrieve a specific AI tool by its key.",
"operationId": "getAITool",
"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",
@@ -30394,27 +30526,13 @@
},
"summary": "Get AI tool",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
},
"patch": {
"description": "Edit an existing AI tool.",
"operationId": "patchAITool",
"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",
@@ -30500,39 +30618,41 @@
},
"summary": "Update AI tool",
"tags": [
- "AI Configs (beta)"
+ "AI Configs"
]
}
},
- "/api/v2/announcements": {
+ "/api/v2/projects/{projectKey}/agent-graphs": {
"get": {
- "description": "Get announcements",
- "operationId": "getAnnouncementsPublic",
+ "description": "Get a list of all agent graphs in the given project. Returns metadata only, without edge data.",
+ "operationId": "listAgentGraphs",
"parameters": [
{
- "description": "Filter announcements by status.",
- "example": "active",
- "explode": true,
- "in": "query",
- "name": "status",
- "required": false,
+ "description": "Version of the endpoint.",
+ "explode": false,
+ "in": "header",
+ "name": "LD-API-Version",
+ "required": true,
"schema": {
"enum": [
- "active",
- "inactive",
- "scheduled"
+ "beta"
],
- "type": "string",
- "x-enumNames": [
- "Active",
- "Inactive",
- "Scheduled"
- ]
+ "type": "string"
},
- "style": "form"
+ "style": "simple"
},
{
- "description": "The number of announcements to return.",
+ "explode": false,
+ "in": "path",
+ "name": "projectKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "The number of AI Configs to return.",
"explode": true,
"in": "query",
"name": "limit",
@@ -30559,11 +30679,11 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/getAnnouncementsPublic_200_response"
+ "$ref": "#/components/schemas/AgentGraphs"
}
}
},
- "description": "Announcement response"
+ "description": "Successful response"
},
"400": {
"content": {
@@ -30585,26 +30705,6 @@
},
"description": "Forbidden"
},
- "404": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Not found"
- },
- "429": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Rate limit exceeded"
- },
"500": {
"content": {
"application/json": {
@@ -30616,27 +30716,535 @@
"description": "Internal server error"
}
},
- "summary": "Get announcements",
+ "summary": "List agent graphs",
"tags": [
- "Announcements"
+ "AI Configs"
]
},
"post": {
- "description": "Create an announcement",
- "operationId": "createAnnouncementPublic",
+ "description": "Create a new agent graph within the given project.",
+ "operationId": "postAgentGraph",
+ "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": {
- "$ref": "#/components/requestBodies/CreateAnnouncementBody"
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AgentGraphPost"
+ }
+ }
+ },
+ "description": "Agent graph object to create",
+ "required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AnnouncementResponse"
+ "$ref": "#/components/schemas/AgentGraph"
}
}
},
- "description": "Created announcement"
+ "description": "Agent graph created"
+ },
+ "400": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Bad request"
+ },
+ "403": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Forbidden"
+ },
+ "413": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Payload too large"
+ },
+ "500": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Internal server error"
+ }
+ },
+ "summary": "Create new agent graph",
+ "tags": [
+ "AI Configs"
+ ]
+ }
+ },
+ "/api/v2/projects/{projectKey}/agent-graphs/{graphKey}": {
+ "delete": {
+ "description": "Delete an existing agent graph and all of its edges.",
+ "operationId": "deleteAgentGraph",
+ "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": "graphKey",
+ "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 agent graph",
+ "tags": [
+ "AI Configs"
+ ]
+ },
+ "get": {
+ "description": "Retrieve a specific agent graph by its key, including its edges.",
+ "operationId": "getAgentGraph",
+ "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": "graphKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AgentGraph"
+ }
+ }
+ },
+ "description": "Agent graph 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 agent graph",
+ "tags": [
+ "AI Configs"
+ ]
+ },
+ "patch": {
+ "description": "Edit an existing agent graph.\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\nIf the update includes `rootConfigKey` or `edges`, both must be present and will be treated as full replacements.\n",
+ "operationId": "patchAgentGraph",
+ "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": "graphKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AgentGraphPatch"
+ }
+ }
+ },
+ "description": "Agent graph object to update"
+ },
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AgentGraph"
+ }
+ }
+ },
+ "description": "Agent graph 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 agent graph",
+ "tags": [
+ "AI Configs"
+ ]
+ }
+ },
+ "/api/v2/announcements": {
+ "get": {
+ "description": "Get announcements",
+ "operationId": "getAnnouncementsPublic",
+ "parameters": [
+ {
+ "description": "Filter announcements by status.",
+ "example": "active",
+ "explode": true,
+ "in": "query",
+ "name": "status",
+ "required": false,
+ "schema": {
+ "enum": [
+ "active",
+ "inactive",
+ "scheduled"
+ ],
+ "type": "string",
+ "x-enumNames": [
+ "Active",
+ "Inactive",
+ "Scheduled"
+ ]
+ },
+ "style": "form"
+ },
+ {
+ "description": "The number of announcements 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"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/getAnnouncementsPublic_200_response"
+ }
+ }
+ },
+ "description": "Announcement 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"
+ },
+ "429": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Rate limit exceeded"
+ },
+ "500": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Internal server error"
+ }
+ },
+ "summary": "Get announcements",
+ "tags": [
+ "Announcements"
+ ]
+ },
+ "post": {
+ "description": "Create an announcement",
+ "operationId": "createAnnouncementPublic",
+ "requestBody": {
+ "$ref": "#/components/requestBodies/CreateAnnouncementBody"
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AnnouncementResponse"
+ }
+ }
+ },
+ "description": "Created announcement"
},
"400": {
"content": {
@@ -31673,7 +32281,7 @@
},
"/api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType}": {
"delete": {
- "description": "Unlink one or multiple resources from a view:\n- Unlink flags using flag keys\n- Unlink segments using segment IDs\n- Unlink AI configs using AI config keys\n- Unlink metrics using metric keys\n",
+ "description": "Unlink one or multiple resources from a view:\n- Unlink flags using flag keys\n- Unlink segments using segment IDs\n- Unlink AI Configs using AI Config keys\n- Unlink metrics using metric keys\n",
"operationId": "unlinkResource",
"parameters": [
{
@@ -31799,7 +32407,7 @@
]
},
"post": {
- "description": "Link one or multiple resources to a view:\n- Link flags using flag keys\n- Link AI configs using AI config keys\n- Link metrics using metric keys\n- Link segments using segment IDs\n",
+ "description": "Link one or multiple resources to a view by keys, filters, or both:\n- Link flags using flag keys or filters (maintainerId, maintainerTeamKey, tags, state, query)\n- Link AI Configs using AI Config keys\n- Link metrics using metric keys\n- Link segments using segment IDs or filters (tags, query, unbounded)\n\nWhen both keys and filters are provided, resources matching either condition are linked (union).\n",
"operationId": "linkResource",
"parameters": [
{
@@ -31864,7 +32472,7 @@
}
}
},
- "description": "The resource to link to the view. Flags are identified by key. Segments are identified by segment ID.",
+ "description": "Resources to link to the view. You can provide explicit keys/IDs, filters, or both.\n- Flags: identified by key or filtered by maintainerId, maintainerTeamKey, tags, state, query\n- Segments: identified by segment ID or filtered by tags, query, unbounded\n- AI configs and metrics: identified by key\n",
"required": true
},
"responses": {
@@ -36933,6 +37541,12 @@
},
"serviceToken": {
"type": "boolean"
+ },
+ "scopes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
}
},
@@ -38273,7 +38887,7 @@
}
},
"basePermissions": {
- "description": "Base permissions to use for this role. Defaults to reader. Recommended to set this to no_access in all cases.",
+ "description": "Base permissions to use for this role. Defaults to no_access (older roles defaulted to reader). Recommended to set this to no_access in all cases.",
"example": "reader",
"$ref": "#/components/schemas/RoleType"
},
@@ -38326,7 +38940,7 @@
"$ref": "#/components/schemas/StatementPostList"
},
"basePermissions": {
- "description": "Base permissions to use for this role. Defaults to reader. Recommended to set this to no_access in all cases.",
+ "description": "Base permissions to use for this role. Defaults to no_access (older roles defaulted to reader). Recommended to set this to no_access in all cases.",
"example": "reader",
"enum": [
"reader",
@@ -38790,6 +39404,11 @@
"description": "The guarded rollout flag name ",
"example": "My Flag"
},
+ "flagPurpose": {
+ "type": "string",
+ "description": "The guarded rollout flag purpose",
+ "example": "migration"
+ },
"environmentKey": {
"type": "string",
"description": "The guarded rollout environment key",
@@ -39044,7 +39663,8 @@
"azure-event-hubs",
"snowflake-v2",
"databricks",
- "bigquery"
+ "bigquery",
+ "redshift"
]
},
"version": {
@@ -39086,7 +39706,8 @@
"azure-event-hubs",
"snowflake-v2",
"databricks",
- "bigquery"
+ "bigquery",
+ "redshift"
]
},
"config": {
@@ -39242,6 +39863,9 @@
"description": "Ensures that one end user of the client-side SDK cannot inspect the variations for another end user",
"example": true
},
+ "_access": {
+ "$ref": "#/components/schemas/Access"
+ },
"defaultTrackEvents": {
"type": "boolean",
"description": "Enables tracking detailed information for new flags by default",
@@ -39484,7 +40108,7 @@
},
"values": {
"type": "array",
- "description": "The context attribute / event property values or group member nodes",
+ "description": "The context attribute / event property values or group member nodes. Numeric values must not exceed 14 decimal places.",
"items": {},
"example": [
"JP"
@@ -39928,6 +40552,17 @@
"example": "1654104600000",
"$ref": "#/components/schemas/UnixMillis"
},
+ "tags": {
+ "type": "array",
+ "description": "Tags for the experiment",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "experiment",
+ "feature"
+ ]
+ },
"_links": {
"type": "object",
"additionalProperties": {
@@ -40108,6 +40743,13 @@
"type": "string",
"description": "The ID of the holdout",
"example": "f3b74309-d581-44e1-8a2b-bb2933b4fe40"
+ },
+ "tags": {
+ "type": "array",
+ "description": "Tags for the experiment",
+ "items": {
+ "type": "string"
+ }
}
}
},
@@ -42183,6 +42825,15 @@
"type": "object",
"additionalProperties": {}
},
+ "GenerateTrustPolicyPostRep": {
+ "type": "object",
+ "properties": {
+ "awsTrustPolicy": {
+ "description": "The AWS trust policy",
+ "$ref": "#/components/schemas/TrustPolicyDetails"
+ }
+ }
+ },
"GenerateWarehouseDestinationKeyPairPostRep": {
"type": "object",
"properties": {
@@ -43135,7 +43786,12 @@
"status": {
"type": "string",
"description": "The status of the iteration: not_started, running, stopped",
- "example": "running"
+ "example": "running",
+ "enum": [
+ "not_started",
+ "running",
+ "stopped"
+ ]
},
"createdAt": {
"description": "Timestamp of when the iteration was created",
@@ -43934,6 +44590,9 @@
},
"MetricDataSourceRefRep": {
"type": "object",
+ "required": [
+ "key"
+ ],
"properties": {
"key": {
"type": "string"
@@ -44168,6 +44827,16 @@
"type": "integer",
"description": "The number of experiments using this metric group",
"example": 0
+ },
+ "activeExperimentCount": {
+ "type": "integer",
+ "description": "The number of active experiments using this metric group",
+ "example": 0
+ },
+ "activeGuardedRolloutCount": {
+ "type": "integer",
+ "description": "The number of active guarded rollouts using this metric group",
+ "example": 0
}
}
},
@@ -44307,7 +44976,8 @@
"kind",
"_links",
"tags",
- "_creationDate"
+ "_creationDate",
+ "dataSource"
],
"properties": {
"experimentCount": {
@@ -44497,6 +45167,10 @@
"dataSource": {
"$ref": "#/components/schemas/MetricDataSourceRefRep"
},
+ "lastSeen": {
+ "description": "Timestamp of most recent data for this metric, at one-hour fidelity",
+ "$ref": "#/components/schemas/UnixMillis"
+ },
"archived": {
"type": "boolean",
"description": "Whether the metric version is archived"
@@ -44652,7 +45326,8 @@
"kind",
"_links",
"tags",
- "_creationDate"
+ "_creationDate",
+ "dataSource"
],
"properties": {
"experimentCount": {
@@ -44842,6 +45517,10 @@
"dataSource": {
"$ref": "#/components/schemas/MetricDataSourceRefRep"
},
+ "lastSeen": {
+ "description": "Timestamp of most recent data for this metric, at one-hour fidelity",
+ "$ref": "#/components/schemas/UnixMillis"
+ },
"archived": {
"type": "boolean",
"description": "Whether the metric version is archived"
@@ -45090,7 +45769,8 @@
"camelCase",
"upperCamelCase",
"snakeCase",
- "kebabCase"
+ "kebabCase",
+ "constantCase"
]
},
"prefix": {
@@ -45903,7 +46583,6 @@
"_id",
"name",
"policy",
- "fullKey",
"displayKey",
"creationDate",
"lastModified"
@@ -46704,6 +47383,10 @@
"type": "string",
"description": "The flag rule ID"
},
+ "disabled": {
+ "type": "boolean",
+ "description": "Whether the rule is disabled"
+ },
"variation": {
"type": "integer",
"description": "The index of the variation, from the array of variations for this flag"
@@ -47935,7 +48618,7 @@
"defaultApiVersion": {
"type": "integer",
"description": "The default API version for this token",
- "example": 20220603
+ "example": 20240415
},
"lastUsed": {
"description": "Timestamp of when the access token was last used",
@@ -48180,6 +48863,44 @@
}
}
},
+ "TrustPolicyDetails": {
+ "type": "object",
+ "properties": {
+ "Version": {
+ "type": "string",
+ "description": "The version of the trust policy"
+ },
+ "Statement": {
+ "type": "array",
+ "description": "The statements of the trust policy",
+ "items": {
+ "$ref": "#/components/schemas/TrustPolicyStatement"
+ }
+ }
+ }
+ },
+ "TrustPolicyStatement": {
+ "type": "object",
+ "properties": {
+ "Effect": {
+ "type": "string",
+ "description": "The effect of trust policy statement"
+ },
+ "Action": {
+ "type": "array",
+ "description": "The action of trust policy statement",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Principal": {
+ "description": "The principal of trust policy statement"
+ },
+ "Condition": {
+ "description": "The condition of trust policy statement"
+ }
+ }
+ },
"UnauthorizedErrorRep": {
"type": "object",
"required": [
@@ -49248,6 +49969,24 @@
}
}
},
+ "approvalRequestPatchInput": {
+ "type": "object",
+ "required": [
+ "instructions"
+ ],
+ "properties": {
+ "comment": {
+ "type": "string",
+ "description": "Optional comment describing the update",
+ "example": "Update targeting to serve true to beta testers"
+ },
+ "instructions": {
+ "description": "The instructions to perform when updating",
+ "example": "[ { \"kind\": \"updateDescription\", \"value\": \"New description\" } ]",
+ "$ref": "#/components/schemas/Instructions"
+ }
+ }
+ },
"createCopyFlagConfigApprovalRequestRequest": {
"type": "object",
"required": [
@@ -49606,7 +50345,7 @@
},
"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\" } ]",
+ "example": "[ { \"kind\": \"replaceMembersRoles\", \"value\": \"reader\" } ]",
"$ref": "#/components/schemas/Instructions"
}
}
@@ -50381,11 +51120,42 @@
"totalCount": 2,
"items": [
{
- "mode": "completion",
- "createdAt": 9,
"_maintainer": {
"kind": "kind"
},
+ "_links": {
+ "parent": {
+ "href": "href",
+ "type": "type"
+ },
+ "self": {
+ "href": "href",
+ "type": "type"
+ }
+ },
+ "description": "description",
+ "evaluationMetricKey": "evaluationMetricKey",
+ "version": 0,
+ "tags": [
+ "tags",
+ "tags"
+ ],
+ "dependencies": [
+ {
+ "type": "agent-graph",
+ "key": "key"
+ },
+ {
+ "type": "agent-graph",
+ "key": "key"
+ }
+ ],
+ "mode": "completion",
+ "createdAt": 9,
+ "evaluationMetricKeys": [
+ "evaluationMetricKeys",
+ "evaluationMetricKeys"
+ ],
"_access": {
"allowed": [
{
@@ -50476,16 +51246,6 @@
}
]
},
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
"variations": [
{
"judgeConfiguration": {
@@ -50517,10 +51277,16 @@
"version": 1,
"tools": [
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
},
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
}
@@ -50575,10 +51341,16 @@
"version": 1,
"tools": [
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
},
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
}
@@ -50605,21 +51377,47 @@
}
],
"name": "name",
+ "key": "key",
+ "isInverted": true,
+ "updatedAt": 3
+ },
+ {
+ "_maintainer": {
+ "kind": "kind"
+ },
+ "_links": {
+ "parent": {
+ "href": "href",
+ "type": "type"
+ },
+ "self": {
+ "href": "href",
+ "type": "type"
+ }
+ },
"description": "description",
+ "evaluationMetricKey": "evaluationMetricKey",
"version": 0,
- "key": "key",
"tags": [
"tags",
"tags"
],
- "updatedAt": 3
- },
- {
+ "dependencies": [
+ {
+ "type": "agent-graph",
+ "key": "key"
+ },
+ {
+ "type": "agent-graph",
+ "key": "key"
+ }
+ ],
"mode": "completion",
"createdAt": 9,
- "_maintainer": {
- "kind": "kind"
- },
+ "evaluationMetricKeys": [
+ "evaluationMetricKeys",
+ "evaluationMetricKeys"
+ ],
"_access": {
"allowed": [
{
@@ -50710,16 +51508,6 @@
}
]
},
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
"variations": [
{
"judgeConfiguration": {
@@ -50751,10 +51539,16 @@
"version": 1,
"tools": [
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
},
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
}
@@ -50809,10 +51603,16 @@
"version": 1,
"tools": [
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
},
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
}
@@ -50839,13 +51639,8 @@
}
],
"name": "name",
- "description": "description",
- "version": 0,
"key": "key",
- "tags": [
- "tags",
- "tags"
- ],
+ "isInverted": true,
"updatedAt": 3
}
]
@@ -50872,11 +51667,42 @@
},
"AIConfig": {
"example": {
- "mode": "completion",
- "createdAt": 9,
"_maintainer": {
"kind": "kind"
},
+ "_links": {
+ "parent": {
+ "href": "href",
+ "type": "type"
+ },
+ "self": {
+ "href": "href",
+ "type": "type"
+ }
+ },
+ "description": "description",
+ "evaluationMetricKey": "evaluationMetricKey",
+ "version": 0,
+ "tags": [
+ "tags",
+ "tags"
+ ],
+ "dependencies": [
+ {
+ "type": "agent-graph",
+ "key": "key"
+ },
+ {
+ "type": "agent-graph",
+ "key": "key"
+ }
+ ],
+ "mode": "completion",
+ "createdAt": 9,
+ "evaluationMetricKeys": [
+ "evaluationMetricKeys",
+ "evaluationMetricKeys"
+ ],
"_access": {
"allowed": [
{
@@ -50967,16 +51793,6 @@
}
]
},
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
"variations": [
{
"judgeConfiguration": {
@@ -51008,10 +51824,16 @@
"version": 1,
"tools": [
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
},
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
}
@@ -51066,10 +51888,16 @@
"version": 1,
"tools": [
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
},
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
}
@@ -51096,13 +51924,8 @@
}
],
"name": "name",
- "description": "description",
- "version": 0,
"key": "key",
- "tags": [
- "tags",
- "tags"
- ],
+ "isInverted": true,
"updatedAt": 3
},
"properties": {
@@ -51155,6 +51978,29 @@
"updatedAt": {
"format": "int64",
"type": "integer"
+ },
+ "evaluationMetricKey": {
+ "description": "Evaluation metric key for this AI Config",
+ "type": "string"
+ },
+ "evaluationMetricKeys": {
+ "deprecated": true,
+ "description": "List of evaluation metric keys for this AI Config",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "isInverted": {
+ "description": "Whether the evaluation metric is inverted, meaning a lower value is better if set as true",
+ "type": "boolean"
+ },
+ "dependencies": {
+ "description": "Resources that depend on this AI Config, grouped by type",
+ "items": {
+ "$ref": "#/components/schemas/AIConfigDependency"
+ },
+ "type": "array"
}
},
"required": [
@@ -51172,11 +52018,58 @@
"AIConfigPost": {
"example": {
"mode": "completion",
- "maintainerId": "maintainerId",
- "maintainerTeamKey": "maintainerTeamKey",
+ "defaultVariation": {
+ "judgeConfiguration": {
+ "judges": [
+ {
+ "samplingRate": 0.7061401,
+ "judgeConfigKey": "judgeConfigKey"
+ },
+ {
+ "samplingRate": 0.7061401,
+ "judgeConfigKey": "judgeConfigKey"
+ }
+ ]
+ },
+ "instructions": "instructions",
+ "toolKeys": [
+ "toolKeys",
+ "toolKeys"
+ ],
+ "name": "name",
+ "description": "description",
+ "messages": [
+ {
+ "role": "role",
+ "content": "content"
+ },
+ {
+ "role": "role",
+ "content": "content"
+ }
+ ],
+ "comment": "comment",
+ "model": "{}",
+ "modelConfigKey": "modelConfigKey",
+ "tools": [
+ {
+ "version": 0,
+ "key": "key"
+ },
+ {
+ "version": 0,
+ "key": "key"
+ }
+ ],
+ "key": "key"
+ },
+ "maintainerId": "507f1f77bcf86cd799439011",
+ "maintainerTeamKey": "example-team-key",
"name": "name",
"description": "",
+ "evaluationMetricKey": "evaluationMetricKey",
"key": "key",
+ "isInverted": true,
"tags": [
"tags",
"tags"
@@ -51191,9 +52084,11 @@
"type": "string"
},
"maintainerId": {
+ "example": "507f1f77bcf86cd799439011",
"type": "string"
},
"maintainerTeamKey": {
+ "example": "example-team-key",
"type": "string"
},
"mode": {
@@ -51213,6 +52108,17 @@
"type": "string"
},
"type": "array"
+ },
+ "defaultVariation": {
+ "$ref": "#/components/schemas/AIConfigVariationPost"
+ },
+ "evaluationMetricKey": {
+ "description": "Evaluation metric key for this AI Config",
+ "type": "string"
+ },
+ "isInverted": {
+ "description": "Whether the evaluation metric is inverted, meaning a lower value is better if set as true",
+ "type": "boolean"
}
},
"required": [
@@ -51223,10 +52129,12 @@
},
"AIConfigPatch": {
"example": {
- "maintainerId": "maintainerId",
- "maintainerTeamKey": "maintainerTeamKey",
+ "maintainerId": "507f1f77bcf86cd799439011",
+ "maintainerTeamKey": "example-team-key",
"name": "name",
"description": "description",
+ "evaluationMetricKey": "evaluationMetricKey",
+ "isInverted": true,
"tags": [
"tags",
"tags"
@@ -51237,9 +52145,11 @@
"type": "string"
},
"maintainerId": {
+ "example": "507f1f77bcf86cd799439011",
"type": "string"
},
"maintainerTeamKey": {
+ "example": "example-team-key",
"type": "string"
},
"name": {
@@ -51250,6 +52160,14 @@
"type": "string"
},
"type": "array"
+ },
+ "evaluationMetricKey": {
+ "description": "Evaluation metric key for this AI Config",
+ "type": "string"
+ },
+ "isInverted": {
+ "description": "Whether the evaluation metric is inverted, meaning a lower value is better if set as true",
+ "type": "boolean"
}
},
"type": "object"
@@ -51285,10 +52203,16 @@
"version": 1,
"tools": [
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
},
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
}
@@ -51430,10 +52354,16 @@
"version": 1,
"tools": [
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
},
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
}
@@ -51488,10 +52418,16 @@
"version": 1,
"tools": [
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
},
{
+ "customParameters": {
+ "key": ""
+ },
"version": 2,
"key": "key"
}
@@ -51632,7 +52568,6 @@
},
"required": [
"key",
- "messages",
"name"
],
"type": "object"
@@ -51770,7 +52705,7 @@
},
"properties": {
"judgeConfigKey": {
- "description": "Key of the judge AI config",
+ "description": "Key of the judge AI Config",
"type": "string"
},
"samplingRate": {
@@ -52331,16 +53266,16 @@
],
"_environmentSettings": {
"key": {
- "startDate": 6,
- "stopDate": 7,
+ "startDate": 7,
+ "stopDate": 1,
"enabledPeriods": [
{
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
},
{
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
}
]
}
@@ -52498,10 +53433,12 @@
"disabled": true,
"value": 0
},
- "archivedAt": 1,
+ "archivedAt": 6,
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
+ "lastSeen": 1,
"successCriteria": "HigherThanBaseline",
+ "releasePolicyCount": 0,
"_versionId": "version-id-123abc",
"isNumeric": true,
"eventKey": "Order placed",
@@ -52531,16 +53468,16 @@
],
"_environmentSettings": {
"key": {
- "startDate": 6,
- "stopDate": 7,
+ "startDate": 7,
+ "stopDate": 1,
"enabledPeriods": [
{
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
},
{
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
}
]
}
@@ -52698,10 +53635,12 @@
"disabled": true,
"value": 0
},
- "archivedAt": 1,
+ "archivedAt": 6,
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
+ "lastSeen": 1,
"successCriteria": "HigherThanBaseline",
+ "releasePolicyCount": 0,
"_versionId": "version-id-123abc",
"isNumeric": true,
"eventKey": "Order placed",
@@ -52725,7 +53664,7 @@
]
},
"name": "name",
- "_version": 5,
+ "_version": 9,
"key": "key",
"tags": [
"tags",
@@ -52820,13 +53759,16 @@
},
"Metrics": {
"example": {
+ "judgeRelevance": 0.14894159,
"inputCost": 7.386281948385884,
"outputCost": 1.2315135367772556,
"generationSuccessCount": 5,
"inputTokens": 0,
"generationErrorCount": 2,
"thumbsDown": 9,
+ "judgeToxicity": 0.6846853,
"totalTokens": 1,
+ "judgeAccuracy": 0.10246457,
"generationCount": 5,
"timeToFirstTokenMs": 2,
"outputTokens": 6,
@@ -52885,6 +53827,27 @@
"description": "Cost of output tokens in USD",
"format": "double",
"type": "number"
+ },
+ "judgeAccuracy": {
+ "description": "Average accuracy judge score (0.0-1.0)",
+ "format": "float",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "judgeRelevance": {
+ "description": "Average relevance judge score (0.0-1.0)",
+ "format": "float",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "judgeToxicity": {
+ "description": "Average toxicity judge score (0.0-1.0)",
+ "format": "float",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
}
},
"type": "object"
@@ -52892,13 +53855,16 @@
"MetricByVariation": {
"example": {
"metrics": {
+ "judgeRelevance": 0.14894159,
"inputCost": 7.386281948385884,
"outputCost": 1.2315135367772556,
"generationSuccessCount": 5,
"inputTokens": 0,
"generationErrorCount": 2,
"thumbsDown": 9,
+ "judgeToxicity": 0.6846853,
"totalTokens": 1,
+ "judgeAccuracy": 0.10246457,
"generationCount": 5,
"timeToFirstTokenMs": 2,
"outputTokens": 6,
@@ -53603,6 +54569,7 @@
}
},
"description": "description",
+ "customParameters": "{}",
"version": 0,
"key": "key"
},
@@ -53623,6 +54590,11 @@
"type": "string"
},
"schema": {
+ "description": "JSON Schema defining the tool's parameters for LLM consumption",
+ "type": "object"
+ },
+ "customParameters": {
+ "description": "Custom metadata and configuration for application-level use (not sent to LLM)",
"type": "object"
},
"version": {
@@ -53774,6 +54746,7 @@
}
},
"description": "description",
+ "customParameters": "{}",
"version": 0,
"key": "key"
},
@@ -53873,19 +54846,714 @@
}
]
},
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
+ "_links": {
+ "parent": {
+ "href": "href",
+ "type": "type"
+ },
+ "self": {
+ "href": "href",
+ "type": "type"
+ }
+ },
+ "description": "description",
+ "customParameters": "{}",
+ "version": 0,
+ "key": "key"
+ }
+ ]
+ },
+ "properties": {
+ "_links": {
+ "$ref": "#/components/schemas/PaginatedLinks"
+ },
+ "items": {
+ "items": {
+ "$ref": "#/components/schemas/AITool"
+ },
+ "type": "array"
+ },
+ "totalCount": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "items",
+ "totalCount"
+ ],
+ "type": "object"
+ },
+ "AIToolPost": {
+ "example": {
+ "schema": "{}",
+ "maintainerId": "507f1f77bcf86cd799439011",
+ "maintainerTeamKey": "example-team-key",
+ "description": "description",
+ "customParameters": "{}",
+ "key": "key"
+ },
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "maintainerId": {
+ "example": "507f1f77bcf86cd799439011",
+ "type": "string"
+ },
+ "maintainerTeamKey": {
+ "example": "example-team-key",
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "schema": {
+ "description": "JSON Schema defining the tool's parameters for LLM consumption",
+ "type": "object"
+ },
+ "customParameters": {
+ "description": "Custom metadata and configuration for application-level use (not sent to LLM)",
+ "type": "object"
+ }
+ },
+ "required": [
+ "key",
+ "schema"
+ ],
+ "type": "object"
+ },
+ "AIToolPatch": {
+ "example": {
+ "schema": "{}",
+ "maintainerId": "507f1f77bcf86cd799439011",
+ "maintainerTeamKey": "example-team-key",
+ "description": "description",
+ "customParameters": "{}"
+ },
+ "properties": {
+ "maintainerId": {
+ "example": "507f1f77bcf86cd799439011",
+ "type": "string"
+ },
+ "maintainerTeamKey": {
+ "example": "example-team-key",
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "schema": {
+ "description": "JSON Schema defining the tool's parameters for LLM consumption",
+ "type": "object"
+ },
+ "customParameters": {
+ "description": "Custom metadata and configuration for application-level use (not sent to LLM)",
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "VariationToolPost": {
+ "example": {
+ "version": 0,
+ "key": "key"
+ },
+ "properties": {
+ "key": {
+ "description": "The key of the tool to use.",
+ "type": "string"
+ },
+ "version": {
+ "description": "The version of the tool.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "key",
+ "version"
+ ],
+ "type": "object"
+ },
+ "VariationTool": {
+ "example": {
+ "customParameters": {
+ "key": ""
+ },
+ "version": 2,
+ "key": "key"
+ },
+ "properties": {
+ "key": {
+ "description": "The key of the tool to use.",
+ "type": "string"
+ },
+ "version": {
+ "description": "The version of the tool.",
+ "type": "integer"
+ },
+ "customParameters": {
+ "additionalProperties": true,
+ "description": "Custom metadata and configuration for application-level use",
+ "type": "object"
+ }
+ },
+ "required": [
+ "key",
+ "version"
+ ],
+ "type": "object"
+ },
+ "AgentGraphPost": {
+ "description": "Request body for creating an agent graph",
+ "example": {
+ "maintainerId": "507f1f77bcf86cd799439011",
+ "rootConfigKey": "rootConfigKey",
+ "name": "name",
+ "maintainerTeamKey": "example-team-key",
+ "edges": [
+ {
+ "sourceConfig": "sourceConfig",
+ "targetConfig": "targetConfig",
+ "handoff": "{}",
+ "key": "key"
+ },
+ {
+ "sourceConfig": "sourceConfig",
+ "targetConfig": "targetConfig",
+ "handoff": "{}",
+ "key": "key"
+ }
+ ],
+ "description": "description",
+ "key": "key"
+ },
+ "properties": {
+ "key": {
+ "description": "A unique key for the agent graph",
+ "type": "string"
+ },
+ "name": {
+ "description": "A human-readable name for the agent graph",
+ "type": "string"
+ },
+ "description": {
+ "description": "A description of the agent graph",
+ "type": "string"
+ },
+ "maintainerId": {
+ "description": "The ID of the member who maintains this agent graph",
+ "example": "507f1f77bcf86cd799439011",
+ "type": "string"
+ },
+ "maintainerTeamKey": {
+ "description": "The key of the team that maintains this agent graph",
+ "example": "example-team-key",
+ "type": "string"
+ },
+ "rootConfigKey": {
+ "description": "The AI Config key of the root node. A missing root implies a newly created graph with metadata only.",
+ "type": "string"
+ },
+ "edges": {
+ "description": "The edges in the graph. If edges or rootConfigKey is present, both must be present.",
+ "items": {
+ "$ref": "#/components/schemas/AgentGraphEdgePost"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "key",
+ "name"
+ ],
+ "type": "object"
+ },
+ "AgentGraphEdgePost": {
+ "description": "An edge in an agent graph connecting two AI Configs",
+ "example": {
+ "sourceConfig": "sourceConfig",
+ "targetConfig": "targetConfig",
+ "handoff": "{}",
+ "key": "key"
+ },
+ "properties": {
+ "key": {
+ "description": "A unique key for this edge within the graph",
+ "type": "string"
+ },
+ "sourceConfig": {
+ "description": "The AI Config key that is the source of this edge",
+ "type": "string"
+ },
+ "targetConfig": {
+ "description": "The AI Config key that is the target of this edge",
+ "type": "string"
+ },
+ "handoff": {
+ "description": "The handoff options from the source AI Config to the target AI Config",
+ "type": "object"
+ }
+ },
+ "required": [
+ "key",
+ "sourceConfig",
+ "targetConfig"
+ ],
+ "type": "object"
+ },
+ "AgentGraph": {
+ "description": "An agent graph representing a directed graph of AI Configs",
+ "example": {
+ "createdAt": 0,
+ "_maintainer": {
+ "kind": "kind"
+ },
+ "_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"
+ }
+ ]
+ },
+ "rootConfigKey": "rootConfigKey",
+ "name": "name",
+ "edges": [
+ {
+ "sourceConfig": "sourceConfig",
+ "targetConfig": "targetConfig",
+ "handoff": "{}",
+ "key": "key"
+ },
+ {
+ "sourceConfig": "sourceConfig",
+ "targetConfig": "targetConfig",
+ "handoff": "{}",
+ "key": "key"
+ }
+ ],
+ "description": "description",
+ "key": "key",
+ "updatedAt": 6
+ },
+ "properties": {
+ "_access": {
+ "$ref": "#/components/schemas/AiConfigsAccess"
+ },
+ "key": {
+ "description": "A unique key for the agent graph",
+ "type": "string"
+ },
+ "name": {
+ "description": "A human-readable name for the agent graph",
+ "type": "string"
+ },
+ "description": {
+ "description": "A description of the agent graph",
+ "type": "string"
+ },
+ "_maintainer": {
+ "$ref": "#/components/schemas/AgentGraph__maintainer"
+ },
+ "rootConfigKey": {
+ "description": "The AI Config key of the root node",
+ "type": "string"
+ },
+ "edges": {
+ "description": "The edges in the graph",
+ "items": {
+ "$ref": "#/components/schemas/AgentGraphEdge"
+ },
+ "type": "array"
+ },
+ "createdAt": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "updatedAt": {
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "createdAt",
+ "key",
+ "name",
+ "updatedAt"
+ ],
+ "type": "object"
+ },
+ "AgentGraphEdge": {
+ "description": "An edge in an agent graph connecting two AI Configs",
+ "example": {
+ "sourceConfig": "sourceConfig",
+ "targetConfig": "targetConfig",
+ "handoff": "{}",
+ "key": "key"
+ },
+ "properties": {
+ "key": {
+ "description": "A unique key for this edge within the graph",
+ "type": "string"
+ },
+ "sourceConfig": {
+ "description": "The AI Config key that is the source of this edge",
+ "type": "string"
+ },
+ "targetConfig": {
+ "description": "The AI Config key that is the target of this edge",
+ "type": "string"
+ },
+ "handoff": {
+ "description": "The handoff options from the source AI Config to the target AI Config",
+ "type": "object"
+ }
+ },
+ "required": [
+ "key",
+ "sourceConfig",
+ "targetConfig"
+ ],
+ "type": "object"
+ },
+ "AgentGraphs": {
+ "description": "A collection of agent graphs",
+ "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": 1,
+ "items": [
+ {
+ "createdAt": 0,
+ "_maintainer": {
+ "kind": "kind"
+ },
+ "_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"
+ }
+ ]
+ },
+ "rootConfigKey": "rootConfigKey",
+ "name": "name",
+ "edges": [
+ {
+ "sourceConfig": "sourceConfig",
+ "targetConfig": "targetConfig",
+ "handoff": "{}",
+ "key": "key"
+ },
+ {
+ "sourceConfig": "sourceConfig",
+ "targetConfig": "targetConfig",
+ "handoff": "{}",
+ "key": "key"
+ }
+ ],
+ "description": "description",
+ "key": "key",
+ "updatedAt": 6
+ },
+ {
+ "createdAt": 0,
+ "_maintainer": {
+ "kind": "kind"
+ },
+ "_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"
+ }
+ ]
+ },
+ "rootConfigKey": "rootConfigKey",
+ "name": "name",
+ "edges": [
+ {
+ "sourceConfig": "sourceConfig",
+ "targetConfig": "targetConfig",
+ "handoff": "{}",
+ "key": "key"
},
- "self": {
- "href": "href",
- "type": "type"
+ {
+ "sourceConfig": "sourceConfig",
+ "targetConfig": "targetConfig",
+ "handoff": "{}",
+ "key": "key"
}
- },
+ ],
"description": "description",
- "version": 0,
- "key": "key"
+ "key": "key",
+ "updatedAt": 6
}
]
},
@@ -53895,7 +55563,7 @@
},
"items": {
"items": {
- "$ref": "#/components/schemas/AITool"
+ "$ref": "#/components/schemas/AgentGraph"
},
"type": "array"
},
@@ -53909,99 +55577,84 @@
],
"type": "object"
},
- "AIToolPost": {
+ "AgentGraphPatch": {
+ "description": "Request body for updating an agent graph. If rootConfigKey or edges are present, both must be present.",
"example": {
- "schema": "{}",
- "maintainerId": "maintainerId",
- "maintainerTeamKey": "maintainerTeamKey",
- "description": "description",
- "key": "key"
+ "maintainerId": "507f1f77bcf86cd799439011",
+ "rootConfigKey": "rootConfigKey",
+ "name": "name",
+ "maintainerTeamKey": "example-team-key",
+ "edges": [
+ {
+ "sourceConfig": "sourceConfig",
+ "targetConfig": "targetConfig",
+ "handoff": "{}",
+ "key": "key"
+ },
+ {
+ "sourceConfig": "sourceConfig",
+ "targetConfig": "targetConfig",
+ "handoff": "{}",
+ "key": "key"
+ }
+ ],
+ "description": "description"
},
"properties": {
- "key": {
- "type": "string"
- },
- "maintainerId": {
- "type": "string"
- },
- "maintainerTeamKey": {
+ "name": {
+ "description": "A human-readable name for the agent graph",
"type": "string"
},
"description": {
+ "description": "A description of the agent graph",
"type": "string"
},
- "schema": {
- "type": "object"
- }
- },
- "required": [
- "key",
- "schema"
- ],
- "type": "object"
- },
- "AIToolPatch": {
- "example": {
- "schema": "{}",
- "maintainerId": "maintainerId",
- "maintainerTeamKey": "maintainerTeamKey",
- "description": "description"
- },
- "properties": {
"maintainerId": {
+ "description": "The ID of the member who maintains this agent graph. Pass an empty string to remove maintainer.",
+ "example": "507f1f77bcf86cd799439011",
"type": "string"
},
"maintainerTeamKey": {
+ "description": "The key of the team that maintains this agent graph. Pass an empty string to remove maintainer.",
+ "example": "example-team-key",
"type": "string"
},
- "description": {
+ "rootConfigKey": {
+ "description": "The AI Config key of the root node. If present, edges must also be present.",
"type": "string"
},
- "schema": {
- "type": "object"
+ "edges": {
+ "description": "The edges in the graph. If present, rootConfigKey must also be present. Replaces all existing edges.",
+ "items": {
+ "$ref": "#/components/schemas/AgentGraphEdge"
+ },
+ "type": "array"
}
},
"type": "object"
},
- "VariationToolPost": {
+ "AIConfigDependency": {
+ "description": "A resource that depends on this AI Config",
"example": {
- "version": 0,
+ "type": "agent-graph",
"key": "key"
},
"properties": {
- "key": {
- "description": "The key of the tool to use.",
+ "type": {
+ "description": "The type of the dependent resource",
+ "enum": [
+ "agent-graph"
+ ],
"type": "string"
},
- "version": {
- "description": "The version of the tool.",
- "type": "integer"
- }
- },
- "required": [
- "key",
- "version"
- ],
- "type": "object"
- },
- "VariationTool": {
- "example": {
- "version": 2,
- "key": "key"
- },
- "properties": {
"key": {
- "description": "The key of the tool to use.",
+ "description": "The key of the dependent resource",
"type": "string"
- },
- "version": {
- "description": "The version of the tool.",
- "type": "integer"
}
},
"required": [
"key",
- "version"
+ "type"
],
"type": "object"
},
@@ -54348,16 +56001,16 @@
],
"_environmentSettings": {
"key": {
- "startDate": 6,
- "stopDate": 7,
+ "startDate": 7,
+ "stopDate": 1,
"enabledPeriods": [
{
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
},
{
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
}
]
}
@@ -54515,10 +56168,12 @@
"disabled": true,
"value": 0
},
- "archivedAt": 1,
+ "archivedAt": 6,
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
+ "lastSeen": 1,
"successCriteria": "HigherThanBaseline",
+ "releasePolicyCount": 0,
"_versionId": "version-id-123abc",
"isNumeric": true,
"eventKey": "Order placed",
@@ -54548,16 +56203,16 @@
],
"_environmentSettings": {
"key": {
- "startDate": 6,
- "stopDate": 7,
+ "startDate": 7,
+ "stopDate": 1,
"enabledPeriods": [
{
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
},
{
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
}
]
}
@@ -54715,10 +56370,12 @@
"disabled": true,
"value": 0
},
- "archivedAt": 1,
+ "archivedAt": 6,
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
+ "lastSeen": 1,
"successCriteria": "HigherThanBaseline",
+ "releasePolicyCount": 0,
"_versionId": "version-id-123abc",
"isNumeric": true,
"eventKey": "Order placed",
@@ -54768,16 +56425,16 @@
],
"_environmentSettings": {
"key": {
- "startDate": 6,
- "stopDate": 7,
+ "startDate": 7,
+ "stopDate": 1,
"enabledPeriods": [
{
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
},
{
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
}
]
}
@@ -54935,10 +56592,12 @@
"disabled": true,
"value": 0
},
- "archivedAt": 1,
+ "archivedAt": 6,
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
+ "lastSeen": 1,
"successCriteria": "HigherThanBaseline",
+ "releasePolicyCount": 0,
"_versionId": "version-id-123abc",
"isNumeric": true,
"eventKey": "Order placed",
@@ -55141,10 +56800,12 @@
"disabled": true,
"value": 0
},
- "archivedAt": 1,
+ "archivedAt": 6,
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
+ "lastSeen": 1,
"successCriteria": "HigherThanBaseline",
+ "releasePolicyCount": 0,
"_versionId": "version-id-123abc",
"isNumeric": true,
"eventKey": "Order placed",
@@ -55180,6 +56841,11 @@
"example": 0,
"type": "integer"
},
+ "releasePolicyCount": {
+ "description": "The number of release policies using this metric",
+ "example": 0,
+ "type": "integer"
+ },
"activeExperimentCount": {
"description": "The number of active experiments using this metric",
"example": 2,
@@ -55349,6 +57015,10 @@
"dataSource": {
"$ref": "#/components/schemas/AiConfigsMetricDataSourceRefRep"
},
+ "lastSeen": {
+ "format": "int64",
+ "type": "integer"
+ },
"archived": {
"description": "Whether the metric version is archived",
"type": "boolean"
@@ -55373,6 +57043,7 @@
"_id",
"_links",
"_versionId",
+ "dataSource",
"key",
"kind",
"name",
@@ -55566,20 +57237,23 @@
"type": "string"
}
},
+ "required": [
+ "key"
+ ],
"type": "object"
},
"AiConfigsExperimentEnvironmentSettingRep": {
"example": {
- "startDate": 6,
- "stopDate": 7,
+ "startDate": 7,
+ "stopDate": 1,
"enabledPeriods": [
{
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
},
{
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
}
]
},
@@ -55603,8 +57277,8 @@
},
"AiConfigsExperimentEnabledPeriodRep": {
"example": {
- "startDate": 1,
- "stopDate": 4
+ "startDate": 4,
+ "stopDate": 5
},
"properties": {
"startDate": {
@@ -55655,6 +57329,25 @@
}
]
},
+ "AgentGraph__maintainer": {
+ "example": {
+ "kind": "kind"
+ },
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/MaintainerMember"
+ },
+ {
+ "$ref": "#/components/schemas/AiConfigsMaintainerTeam"
+ }
+ ],
+ "properties": {
+ "kind": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
"AnnouncementResponse": {
"description": "Announcement response",
"example": {
@@ -61519,6 +63212,9 @@
},
{
"$ref": "#/components/schemas/ViewLinkRequestSegmentIdentifiers"
+ },
+ {
+ "$ref": "#/components/schemas/ViewLinkRequestFilter"
}
],
"type": "object"
@@ -65562,21 +67258,32 @@
"type": "object"
},
"ViewLinkRequestKeys": {
+ "additionalProperties": false,
"example": {
+ "filter": "maintainerId:507f1f77bcf86cd799439011,tags:backend+beta",
"keys": [
- "keys",
- "keys"
+ "flag-1",
+ "flag-2"
],
"comment": ""
},
"properties": {
"keys": {
"description": "Keys of the resources (flags, segments, AI configs) to link/unlink",
+ "example": [
+ "flag-1",
+ "flag-2"
+ ],
"items": {
"type": "string"
},
"type": "array"
},
+ "filter": {
+ "description": "Optional filter string to determine which resources should be linked. Resources only need to match either the filter or explicitly-listed keys to be linked (union).\nUses the same syntax as list endpoints: flags use comma-separated field:value filters, segments use queryfilter syntax.\n\nSupported filters by resource type:\n- flags: query, tags, maintainerId, maintainerTeamKey, type, status, state, staleState, sdkAvailability, targeting, hasExperiment, hasDataExport, evaluated, creationDate, contextKindTargeted, contextKindsEvaluated, filterEnv, segmentTargeted, codeReferences.min, codeReferences.max, excludeSettings, releasePipeline, applicationEvaluated, purpose, guardedRollout, view, key, name, archived, followerId\n- segments (queryfilter): query, tags, keys, excludedKeys, unbounded, external, view, type\nSome filters are only available when the corresponding feature is enabled on your account.\n",
+ "example": "maintainerId:507f1f77bcf86cd799439011,tags:backend+beta",
+ "type": "string"
+ },
"comment": {
"default": "",
"description": "Optional comment for the link/unlink operation",
@@ -65606,6 +67313,7 @@
"type": "object"
},
"ViewLinkRequestSegmentIdentifiers": {
+ "additionalProperties": false,
"properties": {
"segmentIdentifiers": {
"description": "Identifiers of the segments to link/unlink (environmentId and segmentKey)",
@@ -65614,6 +67322,15 @@
},
"type": "array"
},
+ "filter": {
+ "description": "Optional filter string to determine which resources should be linked. Resources only need to match either the filter or explicitly-listed keys to be linked (union).\nUses the same queryfilter syntax as the segments list endpoint.\n\nSupported filters for segments: query, tags, keys, excludedKeys, unbounded, external, view, type\n",
+ "example": "tags anyOf [\"backend\"]",
+ "type": "string"
+ },
+ "environmentId": {
+ "description": "Required when using filter for segment resources. Specifies which environment to query for segments matching the filter.\nIgnored when only using explicit segmentIdentifiers (since each identifier contains its own environmentId).\n",
+ "type": "string"
+ },
"comment": {
"default": "",
"description": "Optional comment for the link/unlink operation",
@@ -65626,6 +67343,30 @@
"title": "ViewLinkRequestSegmentIdentifiers",
"type": "object"
},
+ "ViewLinkRequestFilter": {
+ "additionalProperties": false,
+ "properties": {
+ "filter": {
+ "description": "Filter string to match resources for linking. Uses the same syntax as list endpoints: flags use comma-separated field:value filters, segments use queryfilter syntax.\n\nSupported filters by resource type:\n- flags: query, tags, maintainerId, maintainerTeamKey, type, status, state, staleState, sdkAvailability, targeting, hasExperiment, hasDataExport, evaluated, creationDate, contextKindTargeted, contextKindsEvaluated, filterEnv, segmentTargeted, codeReferences.min, codeReferences.max, excludeSettings, releasePipeline, applicationEvaluated, purpose, guardedRollout, view, key, name, archived, followerId\n- segments (queryfilter): query, tags, keys, excludedKeys, unbounded, external, view, type\nSome filters are only available when the corresponding feature is enabled on your account.\n",
+ "example": "maintainerId:507f1f77bcf86cd799439011,tags:backend+beta",
+ "type": "string"
+ },
+ "environmentId": {
+ "description": "Required when using filter for segment resources. Specifies which environment to query for segments matching the filter.\nIgnored for flag resources (flags are global across environments).\n",
+ "type": "string"
+ },
+ "comment": {
+ "default": "",
+ "description": "Optional comment for the link/unlink operation",
+ "type": "string"
+ }
+ },
+ "required": [
+ "filter"
+ ],
+ "title": "ViewLinkRequestFilter",
+ "type": "object"
+ },
"ExpandedLinkedResourcesFlags": {
"example": {
"totalCount": 5,
@@ -66168,12 +67909,52 @@
"environmentKeys": [
"production",
"staging"
+ ],
+ "flagTagKeys": [
+ "frontend",
+ "backend"
+ ],
+ "viewKeys": [
+ "feature-a",
+ "team-a"
+ ]
+ },
+ "progressiveReleaseConfig": {
+ "rolloutContextKindKey": "user",
+ "stages": [
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ }
]
},
- "progressiveReleaseConfig": "{}",
"name": "Production Release",
"guardedReleaseConfig": {
+ "metricKeys": [
+ "http-errors",
+ "latency"
+ ],
+ "rolloutContextKindKey": "user",
+ "metricRegressionThreshold": 0.05,
+ "metricGroupKeys": [
+ "frontend-metrics",
+ "backend-metrics"
+ ],
"minSampleSize": 100,
+ "stages": [
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ }
+ ],
"rollbackOnRegression": true
},
"key": "production-release"
@@ -66189,8 +67970,7 @@
"$ref": "#/components/schemas/GuardedReleaseConfig"
},
"progressiveReleaseConfig": {
- "description": "Configuration for progressive releases",
- "type": "object"
+ "$ref": "#/components/schemas/ProgressiveReleaseConfig"
},
"name": {
"description": "The name of the release policy",
@@ -66218,12 +67998,52 @@
"environmentKeys": [
"production",
"staging"
+ ],
+ "flagTagKeys": [
+ "frontend",
+ "backend"
+ ],
+ "viewKeys": [
+ "feature-a",
+ "team-a"
+ ]
+ },
+ "progressiveReleaseConfig": {
+ "rolloutContextKindKey": "user",
+ "stages": [
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ }
]
},
- "progressiveReleaseConfig": "{}",
"name": "Production Release",
"guardedReleaseConfig": {
+ "metricKeys": [
+ "http-errors",
+ "latency"
+ ],
+ "rolloutContextKindKey": "user",
+ "metricRegressionThreshold": 0.05,
+ "metricGroupKeys": [
+ "frontend-metrics",
+ "backend-metrics"
+ ],
"minSampleSize": 100,
+ "stages": [
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ }
+ ],
"rollbackOnRegression": true
}
},
@@ -66238,8 +68058,7 @@
"$ref": "#/components/schemas/GuardedReleaseConfig"
},
"progressiveReleaseConfig": {
- "description": "Configuration for progressive releases",
- "type": "object"
+ "$ref": "#/components/schemas/ProgressiveReleaseConfig"
},
"name": {
"description": "The name of the release policy",
@@ -66351,14 +68170,54 @@
"environmentKeys": [
"production",
"staging"
+ ],
+ "flagTagKeys": [
+ "frontend",
+ "backend"
+ ],
+ "viewKeys": [
+ "feature-a",
+ "team-a"
+ ]
+ },
+ "progressiveReleaseConfig": {
+ "rolloutContextKindKey": "user",
+ "stages": [
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ }
]
},
- "progressiveReleaseConfig": "{}",
"name": "Production Release",
"rank": 1,
"_id": "550e8400-e29b-41d4-a716-446655440000",
"guardedReleaseConfig": {
+ "metricKeys": [
+ "http-errors",
+ "latency"
+ ],
+ "rolloutContextKindKey": "user",
+ "metricRegressionThreshold": 0.05,
+ "metricGroupKeys": [
+ "frontend-metrics",
+ "backend-metrics"
+ ],
"minSampleSize": 100,
+ "stages": [
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ }
+ ],
"rollbackOnRegression": true
},
"key": "production-release"
@@ -66387,8 +68246,7 @@
"$ref": "#/components/schemas/GuardedReleaseConfig"
},
"progressiveReleaseConfig": {
- "description": "Configuration for progressive releases",
- "type": "object"
+ "$ref": "#/components/schemas/ProgressiveReleaseConfig"
},
"name": {
"description": "The name of the release policy",
@@ -66416,6 +68274,14 @@
"environmentKeys": [
"production",
"staging"
+ ],
+ "flagTagKeys": [
+ "frontend",
+ "backend"
+ ],
+ "viewKeys": [
+ "feature-a",
+ "team-a"
]
},
"properties": {
@@ -66429,6 +68295,17 @@
"type": "string"
},
"type": "array"
+ },
+ "flagTagKeys": {
+ "description": "List of flag tag keys this policy applies to",
+ "example": [
+ "frontend",
+ "backend"
+ ],
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
}
},
"type": "object"
@@ -66436,10 +68313,35 @@
"GuardedReleaseConfig": {
"description": "Configuration for guarded releases",
"example": {
+ "metricKeys": [
+ "http-errors",
+ "latency"
+ ],
+ "rolloutContextKindKey": "user",
+ "metricRegressionThreshold": 0.05,
+ "metricGroupKeys": [
+ "frontend-metrics",
+ "backend-metrics"
+ ],
"minSampleSize": 100,
+ "stages": [
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ }
+ ],
"rollbackOnRegression": true
},
"properties": {
+ "rolloutContextKindKey": {
+ "description": "Context kind key to use as the randomization unit for the rollout",
+ "example": "user",
+ "type": "string"
+ },
"minSampleSize": {
"description": "The minimum number of samples required to make a decision",
"example": 100,
@@ -66449,11 +68351,68 @@
"description": "Whether to roll back on regression",
"example": true,
"type": "boolean"
+ },
+ "metricKeys": {
+ "description": "List of metric keys",
+ "example": [
+ "http-errors",
+ "latency"
+ ],
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "metricGroupKeys": {
+ "description": "List of metric group keys",
+ "example": [
+ "frontend-metrics",
+ "backend-metrics"
+ ],
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "stages": {
+ "description": "List of stages",
+ "items": {
+ "$ref": "#/components/schemas/ReleasePolicyStage"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "ProgressiveReleaseConfig": {
+ "description": "Configuration for progressive releases",
+ "example": {
+ "rolloutContextKindKey": "user",
+ "stages": [
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ }
+ ]
+ },
+ "properties": {
+ "rolloutContextKindKey": {
+ "description": "Context kind key to use as the randomization unit for the rollout",
+ "example": "user",
+ "type": "string"
+ },
+ "stages": {
+ "description": "List of stages",
+ "items": {
+ "$ref": "#/components/schemas/ReleasePolicyStage"
+ },
+ "type": "array"
}
},
- "required": [
- "rollbackOnRegression"
- ],
"type": "object"
},
"ReleasePoliciesResponse": {
@@ -66556,14 +68515,54 @@
"environmentKeys": [
"production",
"staging"
+ ],
+ "flagTagKeys": [
+ "frontend",
+ "backend"
+ ],
+ "viewKeys": [
+ "feature-a",
+ "team-a"
+ ]
+ },
+ "progressiveReleaseConfig": {
+ "rolloutContextKindKey": "user",
+ "stages": [
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ }
]
},
- "progressiveReleaseConfig": "{}",
"name": "Production Release",
"rank": 1,
"_id": "550e8400-e29b-41d4-a716-446655440000",
"guardedReleaseConfig": {
+ "metricKeys": [
+ "http-errors",
+ "latency"
+ ],
+ "rolloutContextKindKey": "user",
+ "metricRegressionThreshold": 0.05,
+ "metricGroupKeys": [
+ "frontend-metrics",
+ "backend-metrics"
+ ],
"minSampleSize": 100,
+ "stages": [
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ }
+ ],
"rollbackOnRegression": true
},
"key": "production-release"
@@ -66664,14 +68663,54 @@
"environmentKeys": [
"production",
"staging"
+ ],
+ "flagTagKeys": [
+ "frontend",
+ "backend"
+ ],
+ "viewKeys": [
+ "feature-a",
+ "team-a"
+ ]
+ },
+ "progressiveReleaseConfig": {
+ "rolloutContextKindKey": "user",
+ "stages": [
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ }
]
},
- "progressiveReleaseConfig": "{}",
"name": "Production Release",
"rank": 1,
"_id": "550e8400-e29b-41d4-a716-446655440000",
"guardedReleaseConfig": {
+ "metricKeys": [
+ "http-errors",
+ "latency"
+ ],
+ "rolloutContextKindKey": "user",
+ "metricRegressionThreshold": 0.05,
+ "metricGroupKeys": [
+ "frontend-metrics",
+ "backend-metrics"
+ ],
"minSampleSize": 100,
+ "stages": [
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ {
+ "allocation": 25000,
+ "durationMillis": 60000
+ }
+ ],
"rollbackOnRegression": true
},
"key": "production-release"
@@ -66706,6 +68745,28 @@
],
"type": "string"
},
+ "ReleasePolicyStage": {
+ "example": {
+ "allocation": 25000,
+ "durationMillis": 60000
+ },
+ "properties": {
+ "allocation": {
+ "example": 25000,
+ "type": "integer"
+ },
+ "durationMillis": {
+ "example": 60000,
+ "format": "int64",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "allocation",
+ "durationMillis"
+ ],
+ "type": "object"
+ },
"ReleasePoliciesAccessRep": {
"allOf": [
{