diff --git a/cmd/resources/resource_cmds.go b/cmd/resources/resource_cmds.go
index abd71aee8..bae1a5bce 100644
--- a/cmd/resources/resource_cmds.go
+++ b/cmd/resources/resource_cmds.go
@@ -142,12 +142,20 @@ func AddAllResourceCmds(
"\u003e ### Data Export is an add-on feature\n\u003e\n\u003e Data Export is available as an add-on for customers on a Foundation or Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nData Export provides a real-time export of raw analytics data, including feature flag requests, analytics events, custom events, and more.\n\nData Export destinations are locations that receive exported data. The Data Export destinations API allows you to configure destinations so that your data can be exported.\n\nSeveral of the endpoints in the Data Export destinations API require a Data Export destination ID. The Data Export destination ID is returned as part of the [Create a Data Export destination](https://launchdarkly.com/docs/api/data-export-destinations/post-destination) and [List destinations](https://launchdarkly.com/docs/api/data-export-destinations/get-destinations) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n\nTo learn more, read [Data Export](https://launchdarkly.com/docs/integrations/data-export).\n",
)
+ gen_EnvironmentReleasePlansBetaResourceCmd := NewResourceCmd(
+ rootCmd,
+ analyticsTrackerFn,
+ markdownRenderer,
+ "environment-release-plans-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\nAn environment release plan is a reusable release configuration for one environment. Each plan has an ordered list of phases that [progressively](https://launchdarkly.com/docs/home/releases/progressive-rollouts) roll out a new flag variation to an audience, and can [guard](https://launchdarkly.com/docs/home/releases/guarded-rollouts) one or more metrics to monitor for regressions. When you start a release in that environment, you can select one of its plans instead of configuring the release from scratch. An environment can also have a default release plan, which is preselected when you start a release.\n\nUse the environment release plans API to create, list, view, update, and delete the release plans in an environment, and to read, set, or clear an environment's default release plan. Environment release plans replace release policies.\n",
+ )
+
gen_EnvironmentReleasesBetaResourceCmd := NewResourceCmd(
rootCmd,
analyticsTrackerFn,
markdownRenderer,
"environment-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\nAn environment release [progressively](https://launchdarkly.com/docs/home/releases/progressive-rollouts#progressive-rollouts) rolls out a new flag variation in one environment. On select plans, you can [guard](https://launchdarkly.com/docs/home/releases/guarded-rollouts) one or more metrics, monitoring them for regressions. Use the environment releases API to list releases, get a release, start a release, or stop an active release.\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\nAn environment release [progressively](https://launchdarkly.com/docs/home/releases/progressive-rollouts) rolls out a new flag variation in one environment. On select plans, you can [guard](https://launchdarkly.com/docs/home/releases/guarded-rollouts) one or more metrics, monitoring them for regressions. Use the environment releases API to list releases, get a release, start a release, or stop an active release.\n",
)
gen_EnvironmentsResourceCmd := NewResourceCmd(
@@ -182,6 +190,14 @@ 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\nFlag links let you view external mentions of flags from other tools and services. Links to external conversations and references to your flags allow you to collaborate more easily and quickly review relevant flag contexts. To learn more, read [Flag links](https://launchdarkly.com/docs/home/flags/links).\n\nYou can create custom flag links by associating an external URL with a feature flag. After you create a flag link, it applies across all your environments. You should use caution when you delete a flag link, because it will be deleted from all your environments.\n\nWith the flag links API, you can view, create, update, and delete links to flags.\n\nSeveral of the endpoints in the flag links API require a flag link ID. The flag link ID is returned as part of the [Create flag link](https://launchdarkly.com/docs/api/flag-links-beta/create-flag-link) and [List flag links](https://launchdarkly.com/docs/api/flag-links-beta/get-flag-links) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n",
)
+ gen_FlagReleasePlansBetaResourceCmd := NewResourceCmd(
+ rootCmd,
+ analyticsTrackerFn,
+ markdownRenderer,
+ "flag-release-plans-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\nA flag release plan is a reusable release configuration for a flag across the environments in a project. It lists the environments to release to, the order to release them in, and how each one releases: either immediately or by running one of that environment's [environment release plans](https://launchdarkly.com/docs/api/environment-release-plans-beta). Each environment also has a trigger that starts its release, such as a manual start or a promotion from the previous environment. A project can have one default flag release plan.\n\nUse the flag release plans API to create, list, view, update, and delete the flag release plans in a project.\n",
+ )
+
gen_FlagTriggersResourceCmd := NewResourceCmd(
rootCmd,
analyticsTrackerFn,
@@ -366,14 +382,6 @@ func AddAllResourceCmds(
"\u003e ### Release pipelines are deprecated\n\u003e\n\u003e Release pipelines and the endpoints in this section are deprecated.\n\n\u003e ### This feature is in beta\n\u003e\n\u003e To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](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 an existing release pipeline, you create a \"release\" to automate that flag's progress through the pipeline's phases. Use the release endpoints in this section 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/release-pipelines-deprecated/create-release-for-flag) or [Get the release for a flag](https://launchdarkly.com/docs/api/release-pipelines-deprecated/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/release-pipelines-deprecated/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",
)
- gen_ReleasePoliciesBetaResourceCmd := NewResourceCmd(
- rootCmd,
- analyticsTrackerFn,
- markdownRenderer,
- "release-policies-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\n\u003e ### This feature is deprecated\n\u003e\n\u003e The release policies API is deprecated and will be removed. Release policies continue to work during the deprecation period. LaunchDarkly will announce the exact dates for end of support and removal of access separately.\n\nRelease policies let you specify your preferred rollout method for a given set of environments.\n",
- )
-
gen_ScheduledChangesResourceCmd := NewResourceCmd(
rootCmd,
analyticsTrackerFn,
@@ -395,7 +403,7 @@ func AddAllResourceCmds(
analyticsTrackerFn,
markdownRenderer,
"segments",
- "\n\u003e ### Synced segments and larger list-based segments are an Enterprise feature\n\u003e\n\u003e This section documents endpoints for rule-based, list-based, and synced segments.\n\u003e\n\u003e A \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n\u003e\n\u003e In the segments API, a big segment is indicated by the `unbounded` field being set to `true`.\n\u003e\n\u003e These segments are available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nSegments are groups of contexts that you can use to manage flag targeting behavior in bulk. LaunchDarkly supports:\n\n* rule-based segments, which let you target groups of contexts individually or by attribute,\n* list-based segments, which let you target individual contexts or uploaded lists of contexts, and\n* synced segments, which let you target groups of contexts backed by an external data store.\n\nTo learn more, read [Segments](https://launchdarkly.com/docs/home/flags/segments).\n\nThe segments API allows you to list, create, modify, and delete segments programmatically.\n\nYou can find other APIs for working with big segments under [Persistent store integrations (beta)](https://launchdarkly.com/docs/api/persistent-store-integrations-beta).\n",
+ "\n\u003e ### Synced segments and larger list-based segments are an Enterprise feature\n\u003e\n\u003e This section documents endpoints for rule-based, list-based, and synced segments.\n\u003e\n\u003e A \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n\u003e\n\u003e In the segments API, a big segment is indicated by the `unbounded` field being set to `true`.\n\u003e\n\u003e These segments are available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nSegments are groups of contexts that you can use to manage flag targeting behavior in bulk. LaunchDarkly supports:\n\n* rule-based segments, which let you target groups of contexts individually or by attribute,\n* list-based segments, which let you target individual contexts or uploaded lists of contexts, and\n* synced segments, which let you target groups of contexts backed by an external data store.\n\nTo learn more, read [Segments](https://launchdarkly.com/docs/home/flags/segments).\n\nThe segments API allows you to list, create, modify, and delete segments programmatically.\n\nYou can also schedule segment changes that take effect at a later time. Scheduled changes use the same semantic patch instructions as updating a segment. You can list, edit, and delete scheduled changes for each segment. Use the `scheduled-changes` endpoints to manage them.\n\nYou can find other APIs for working with big segments under [Persistent store integrations (beta)](https://launchdarkly.com/docs/api/persistent-store-integrations-beta).\n",
)
gen_TagsResourceCmd := NewResourceCmd(
@@ -3322,7 +3330,7 @@ func AddAllResourceCmds(
NewOperationCmd(gen_AgentControlResourceCmd, client, markdownRenderer, OperationData{
Short: "List agent optimizations",
- Long: "Get a list of all agent optimizations in the given project.",
+ Long: "Get a list of all agent optimizations in the given project.\n\n### Filtering optimizations\n\nThe `filter` parameter supports the following fields and operators:\n\n- `query` with the `equals` operator: case-insensitive substring match on the optimization key, label, or AgentControl config key.\n- `aiConfigKey` with the `equals` operator: exact match on the key of the AgentControl config being optimized.\n\nSeparate multiple fields with a comma, for example `filter=aiConfigKey equals \"my-agent\",query equals \"tone\"`.\n",
Use: "list-agent-optimizations",
Params: []Param{
{
@@ -3463,6 +3471,12 @@ func AddAllResourceCmds(
Description: "A filter to apply to the list.",
Type: "string",
},
+ {
+ Name: "sort",
+ In: "query",
+ Description: "A sort to apply to the list of agent skills. Use 'usedIn' to sort by the number of AgentControl configs that use each skill, fewest first, or '-usedIn' for most first. Without a sort, skills are ordered by creation date, newest first.",
+ Type: "string",
+ },
},
HTTPMethod: "GET",
HasBody: false,
@@ -5117,6 +5131,12 @@ func AddAllResourceCmds(
Description: "An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens.",
Type: "string",
},
+ {
+ Name: "rollup",
+ In: "query",
+ Description: "Set to 1 to return rolled-up audit log entries, which group related changes into one entry. By default, entries aren't rolled up.",
+ Type: "integer",
+ },
},
HTTPMethod: "POST",
HasBody: true,
@@ -6203,10 +6223,10 @@ func AddAllResourceCmds(
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_EnvironmentReleasesBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "Get an environment release",
- Long: "Returns an environment release and all its phases in phase-index order.\nThe release ID must belong to the flag and environment in the path.\nReturns `404` for a release that ended more than 90 days ago.\nPass `expand=metrics` to attach each metric's definition to the top-level\n`metrics` array. Analysis settings come from the version pinned when the\nrelease started (`metricVersionId`); name, description, tags, maintainer,\nand archive state reflect the current metric and may change afterwards.\n",
- Use: "get",
+ NewOperationCmd(gen_EnvironmentReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Clear the default release plan",
+ Long: "Clear the environment's default release plan, incrementing the formerly-default plan's version by 1; the environment then has none. Idempotent: returns `204` whether or not a default was set.",
+ Use: "clear-default",
Params: []Param{
{
Name: "ld-api-version",
@@ -6217,46 +6237,28 @@ func AddAllResourceCmds(
{
Name: "project-key",
In: "path",
- Description: "",
- Type: "string",
- },
- {
- Name: "flag-key",
- In: "path",
- Description: "",
+ Description: "The project key",
Type: "string",
},
{
Name: "environment-key",
In: "path",
- Description: "",
- Type: "string",
- },
- {
- Name: "release-id",
- In: "path",
- Description: "",
+ Description: "The environment key",
Type: "string",
},
- {
- Name: "expand",
- In: "query",
- Description: "Optional fields to expand.",
- Type: "array",
- },
},
- HTTPMethod: "GET",
+ HTTPMethod: "DELETE",
HasBody: false,
IsBeta: true,
RequiresBody: false,
- Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases/{releaseId}",
+ Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/default-release-plan",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_EnvironmentReleasesBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "List environment releases",
- Long: "Returns the environment releases for the flag in the environment, newest first.\nEach release includes its phases in phase-index order.\nMetric definitions are not included. To get them, call\n`getEnvironmentRelease` with `expand=metrics`.\nReturns an empty `items` array when the flag has no releases in the environment,\nor when no release matches the `filter`.\nReleases that ended more than 90 days ago are not returned.\n\nResults are paginated. By default, the first 25 releases are returned. Use\n`limit` and `offset` to page through the rest, and `totalCount` to learn how\nmany releases match in total. The `_links` object includes `first`, `prev`,\n`next`, and `last` links where they apply.\n",
- Use: "list",
+ NewOperationCmd(gen_EnvironmentReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Delete a release plan",
+ Long: "Delete a release plan by its key. The plan no longer appears in reads, and its key becomes available for reuse by a new plan. Returns 409 while a flag release plan still uses the release plan; remove it from those flag release plans first.",
+ Use: "delete",
Params: []Param{
{
Name: "ld-api-version",
@@ -6267,58 +6269,34 @@ func AddAllResourceCmds(
{
Name: "project-key",
In: "path",
- Description: "",
- Type: "string",
- },
- {
- Name: "flag-key",
- In: "path",
- Description: "",
+ Description: "The project key",
Type: "string",
},
{
Name: "environment-key",
In: "path",
- Description: "",
- Type: "string",
- },
- {
- Name: "filter",
- In: "query",
- Description: "A queryfilter expression that narrows the list. Supported fields and operators:\n'kind' ('equals') with values 'progressive' or 'guarded'.\n",
+ Description: "The environment key",
Type: "string",
},
{
- Name: "limit",
- In: "query",
- Description: "The number of releases to return. Defaults to 25. Maximum is 100.",
- 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 releases and then returns the next releases in the list, up to the query 'limit'.",
- Type: "integer",
- },
- {
- Name: "-snapshot",
- In: "query",
- Description: "Pins the read to a moment in time (nanoseconds since the Unix epoch) so pages walked in sequence reflect one consistent snapshot. Follow the pagination links rather than constructing this value. Out-of-range values are ignored.",
+ Name: "release-plan-key",
+ In: "path",
+ Description: "The release plan key",
Type: "string",
},
},
- HTTPMethod: "GET",
+ HTTPMethod: "DELETE",
HasBody: false,
IsBeta: true,
RequiresBody: false,
- Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases",
+ Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/release-plans/{releasePlanKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_EnvironmentReleasesBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "Start an environment release",
- Long: "Creates and starts a release on a flag in an environment, either from\ninline configuration or from an environment release plan. A release\nhas one or more phases. Each phase is an audience, targeted by one\nflag rule, and has its own steps: the schedule of allocations at\nwhich that rule serves the target variation. After all of a phase's\nsteps complete, the phase serves the target variation to 100% of its\ncontexts.\n\n**Inline configuration.** Each entry in `phases` must specify exactly\none targeting mode:\n\n- **Existing rule**: set `ruleId`. The rule must be enabled. Only a\n single-phase release can use an existing rule.\n- **New rule**: set `clauses`, with an optional `description`. New\n rules are appended to the end of the flag's rule list. To insert\n them before an existing rule instead, set the top-level\n `beforeRuleId`, which applies to every phase.\n\nEvery phase's rule, including an existing rule passed by `ruleId`,\nmust include\n`{\"contextKind\": \"\u003crandomizationUnit\u003e\", \"attribute\": \"kind\", \"op\": \"in\", \"values\": [\"\u003crandomizationUnit\u003e\"]}`,\nnot negated and with no other values, so the release only reaches\ncontexts of the `randomizationUnit` kind, or multi-contexts\ncontaining the `randomizationUnit` kind. An existing rule needs the\nclause even if its other clauses only match that context kind. A\nphase without it returns `400`.\n\nFor multiple phases, set `phases` with at least two entries. Each phase\ncreates a rule. The first rule is enabled and starts immediately.\nSubsequent rules stay disabled until the release advances to them:\nautomatically when `advancementMode` is `automatic`, or by an explicit\nadvance when it is `manual`. `advancementMode` is required for a\nmulti-phase release.\n\nReleases on the flag's default rule are not supported. A phase that\nomits both targeting modes is rejected.\n\nThe flag must be on in the environment, or the request returns\n`409`. The release only reaches contexts that match a phase's rule.\nOther contexts keep getting the flag's default rule, which may\nalready serve the target variation.\n\nThe release type is inferred from `metrics`: an omitted or empty array\ncreates a progressive release; one or more metrics creates a guarded\nrelease. Metrics must be listed individually; metric groups are not\naccepted.\n\nEvery start runs release health checks, described in\n`ReleaseHealthCheckKind`. A flag that hasn't recently been\nevaluated for contexts of the `randomizationUnit` kind fails\n`flag_evaluations_with_context`, and one with no recent evaluations\nat all also fails `flag_evaluations_any`. Guarded releases also\ncheck that each metric receives events. A failing\ncheck returns `400` with code `health_checks_failed`. To start the\nrelease anyway, list the failing kinds in `bypassHealthChecks`.\n\n**From a release plan.** Set `releasePlanKey` to start from a plan in\nthis environment instead of configuring the release inline; a request\nthat also sets fields the plan supplies is rejected. The plan's current\nversion runs as stored, with metric groups expanded into their members.\nHealth checks run against the plan's randomization unit and metrics.\nReturns `400` if the plan is missing or incomplete, and `422` until\nenvironment release plans are available for the account.\n\nRequires the `updateRules` action on the flag in this environment, plus\n`updateFallthrough` when `cleanupBehavior` is\n`remove_rules_and_update_default_rule`. A release started from a plan\nrequires both. The start is recorded in the flag's audit log as a\ntargeting change that carries `comment`.\n\nIn an environment that requires approvals, this endpoint fails with\n`405`. Tokens granted the `bypassRequiredApproval` action can still\ncall it to start the release directly.\n\nThis operation is not idempotent. Retrying a request that already\nstarted a release returns `409` with code `release_already_active`.\nThe earlier request may have succeeded; call `listEnvironmentReleases`\nto confirm the running release is yours.\n",
- Use: "start",
+ NewOperationCmd(gen_EnvironmentReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Get the default release plan",
+ Long: "Get the environment's default release plan — the plan consumers preselect when starting a release. Returns `204 No Content` when the environment has no default.",
+ Use: "get-default",
Params: []Param{
{
Name: "ld-api-version",
@@ -6329,34 +6307,28 @@ func AddAllResourceCmds(
{
Name: "project-key",
In: "path",
- Description: "",
- Type: "string",
- },
- {
- Name: "flag-key",
- In: "path",
- Description: "",
+ Description: "The project key",
Type: "string",
},
{
Name: "environment-key",
In: "path",
- Description: "",
+ Description: "The environment key",
Type: "string",
},
},
- HTTPMethod: "POST",
- HasBody: true,
+ HTTPMethod: "GET",
+ HasBody: false,
IsBeta: true,
- RequiresBody: true,
- Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases",
+ RequiresBody: false,
+ Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/default-release-plan",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_EnvironmentReleasesBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "Stop an environment release",
- Long: "Stops a release and resolves its phases according to the `resolution`\nyou specify. To learn how each resolution treats completed and pending\nphases, read the `resolution` schema.\n\nRequires the `updateRules` action on the flag in this environment, or\n`updateFallthrough` for a historical release that ran on the default\nrule. The stop is recorded in the flag's audit log as a targeting\nchange that names the resolution and carries `comment`.\n\nIn an environment that requires approvals, this endpoint fails with\n`405`. Tokens granted the `bypassRequiredApproval` action can still\ncall it to stop the release directly.\n\nStopping a release that has already completed or been stopped returns\n`200` and makes no changes. Returns `404` for a release that ended more\nthan 90 days ago.\n",
- Use: "stop",
+ NewOperationCmd(gen_EnvironmentReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Get a release plan",
+ Long: "Get a single release plan by its key.",
+ Use: "get",
Params: []Param{
{
Name: "ld-api-version",
@@ -6367,67 +6339,41 @@ func AddAllResourceCmds(
{
Name: "project-key",
In: "path",
- Description: "",
- Type: "string",
- },
- {
- Name: "flag-key",
- In: "path",
- Description: "",
+ Description: "The project key",
Type: "string",
},
{
Name: "environment-key",
In: "path",
- Description: "",
+ Description: "The environment key",
Type: "string",
},
{
- Name: "release-id",
+ Name: "release-plan-key",
In: "path",
- Description: "",
+ Description: "The release plan key",
Type: "string",
},
},
- HTTPMethod: "PUT",
- HasBody: true,
+ HTTPMethod: "GET",
+ HasBody: false,
IsBeta: true,
- RequiresBody: true,
- Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases/{releaseId}/stop",
+ RequiresBody: false,
+ Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/release-plans/{releasePlanKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{
- Short: "Delete environment",
- Long: "Delete a environment by key.",
- Use: "delete",
+ NewOperationCmd(gen_EnvironmentReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "List release plans",
+ Long: "Get the environment's release plans, ordered by creation time.",
+ Use: "list",
Params: []Param{
{
- Name: "project-key",
- In: "path",
- Description: "The project key",
- Type: "string",
- },
- {
- Name: "environment-key",
- In: "path",
- Description: "The environment key",
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
Type: "string",
},
- },
- HTTPMethod: "DELETE",
- HasBody: false,
- IsBeta: false,
- RequiresBody: false,
- Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}",
- SupportsSemanticPatch: false,
- })
-
- NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{
- Short: "Get environment",
- Long: "\u003e ### Approval settings\n\u003e\n\u003e The `approvalSettings` and `resourceApprovalSettings` keys are only returned when the [approvals](https://launchdarkly.com/docs/home/releases/approvals/) feature is enabled.\n\nGet an environment given a project and key.\n",
- Use: "get",
- Params: []Param{
{
Name: "project-key",
In: "path",
@@ -6440,64 +6386,44 @@ func AddAllResourceCmds(
Description: "The environment key",
Type: "string",
},
- },
- HTTPMethod: "GET",
- HasBody: false,
- IsBeta: false,
- RequiresBody: false,
- Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}",
- SupportsSemanticPatch: false,
- })
-
- NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{
- Short: "List environments",
- Long: "Return a list of environments for the specified project.\n\nBy default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don't exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page.\n\n### Filtering environments\n\nLaunchDarkly supports the following fields for filters:\n- `query` is a string that matches against the environments' names and keys. It is not case sensitive.\n- `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list.\n- `critical` is a boolean filter. `critical:true` returns only environments marked as critical, and `critical:false` returns only non-critical environments.\n\nFor example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive.\n\nThe documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`.\n\n### Sorting environments\n\nLaunchDarkly supports the following fields for sorting:\n\n- `createdOn` sorts by the creation date of the environment.\n- `critical` sorts by whether the environments are marked as critical.\n- `name` sorts by environment name.\n\nFor example, `sort=name` sorts the response by environment name in ascending order.\n",
- Use: "list",
- Params: []Param{
{
- Name: "project-key",
- In: "path",
- Description: "The project key",
+ Name: "filter",
+ In: "query",
+ Description: "A queryfilter expression that narrows the list by text match. Supported field and operators: 'query' ('equals', 'contains'). When present, only release plans whose name or key contains the text, case-insensitively, are returned, and totalCount counts the matches. Surrounding whitespace is ignored, and the text is at most 256 bytes. Omitting the filter lists every release plan in the environment.",
Type: "string",
},
{
Name: "limit",
In: "query",
- Description: "The number of environments to return in the response. Defaults to 20.",
+ Description: "The number of release plans to return. Defaults to 20. Maximum is 100.",
Type: "integer",
},
{
Name: "offset",
In: "query",
- Description: "Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.",
+ Description: "The number of release plans to skip. Used for pagination.",
Type: "integer",
},
- {
- Name: "filter",
- In: "query",
- Description: "A comma-separated list of filters. Each filter is of the form 'field:value'.",
- Type: "string",
- },
- {
- Name: "sort",
- In: "query",
- Description: "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order.",
- Type: "string",
- },
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: false,
+ IsBeta: true,
RequiresBody: false,
- Path: "/api/v2/projects/{projectKey}/environments",
+ Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/release-plans",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{
- Short: "Update environment",
- Long: "\nUpdate an environment. Updating an environment uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).\n\nTo update fields in the environment object that are arrays, set the `path` to the name of the field and then append `/\u003carray index\u003e`. Using `/0` appends to the beginning of the array.\n\n### Approval settings\n\nThis request only returns the `approvalSettings` and `resourceApprovalSettings` if the [approvals](https://launchdarkly.com/docs/home/releases/approvals/) feature is enabled.\n\nOnly the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable.\n\nIf you try to patch the environment by setting both `required` and `requiredApprovalTags`, the request fails and an error appears. You can specify either required approvals for all flags in an environment or those with specific tags, but not both.\n",
- Use: "update",
+ NewOperationCmd(gen_EnvironmentReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Create a release plan",
+ Long: "Create a new release plan for the specified environment.",
+ Use: "create",
Params: []Param{
+ {
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
+ Type: "string",
+ },
{
Name: "project-key",
In: "path",
@@ -6511,39 +6437,57 @@ func AddAllResourceCmds(
Type: "string",
},
},
- HTTPMethod: "PATCH",
+ HTTPMethod: "POST",
HasBody: true,
- IsBeta: false,
+ IsBeta: true,
RequiresBody: true,
- Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}",
+ Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/release-plans",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{
- Short: "Create environment",
- Long: "\u003e ### Approval settings\n\u003e\n\u003e You cannot configure approval settings when you create a new environment. Use [Update environment](https://launchdarkly.com/docs/api/environments/patch-environment) to update approval settings.\n\u003e\n\u003e The `approvalSettings` and `resourceApprovalSettings` keys are only returned when the [approvals](https://launchdarkly.com/docs/home/releases/approvals/) feature is enabled.\n\nCreate a new environment in a specified project with a given name, key, swatch color, and default TTL.\n",
- Use: "create",
+ NewOperationCmd(gen_EnvironmentReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Set the default release plan",
+ Long: "Set the plan with the given key as the environment's default, atomically replacing whatever was default before. Each plan whose default flag changes has its version incremented by 1. Idempotent: setting the current default again changes nothing. Rejects a key that is not an active plan in the environment, or a plan that has no randomization unit.",
+ Use: "set-default",
Params: []Param{
+ {
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
+ Type: "string",
+ },
{
Name: "project-key",
In: "path",
Description: "The project key",
Type: "string",
},
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "The environment key",
+ Type: "string",
+ },
},
- HTTPMethod: "POST",
+ HTTPMethod: "PUT",
HasBody: true,
- IsBeta: false,
+ IsBeta: true,
RequiresBody: true,
- Path: "/api/v2/projects/{projectKey}/environments",
+ Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/default-release-plan",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{
- Short: "Reset environment mobile SDK key",
- Long: "Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.",
- Use: "reset-mobile-key",
+ NewOperationCmd(gen_EnvironmentReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Update a release plan",
+ Long: "Replace a release plan's configuration. This is a full replace, not a merge: the plan's phases, steps, clauses, and metrics become exactly what the request specifies, and anything omitted is removed. The plan's key and environment are immutable, and its version increments by 1 on every successful update. The request's version is an optional optimistic lock: when present it must match the plan's current version, and on mismatch the request is rejected with 409 and no changes are applied, meaning the plan was edited since it was read; get the plan again and retry with its current version. When omitted the update applies unconditionally to the plan currently holding the key. A release already started from the plan is not affected.",
+ Use: "replace",
Params: []Param{
+ {
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
+ Type: "string",
+ },
{
Name: "project-key",
In: "path",
@@ -6556,9 +6500,377 @@ func AddAllResourceCmds(
Description: "The environment key",
Type: "string",
},
- },
- HTTPMethod: "POST",
- HasBody: false,
+ {
+ Name: "release-plan-key",
+ In: "path",
+ Description: "The release plan key",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "PUT",
+ HasBody: true,
+ IsBeta: true,
+ RequiresBody: true,
+ Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/release-plans/{releasePlanKey}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_EnvironmentReleasesBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Get an environment release",
+ Long: "Returns an environment release and all its phases in phase-index order.\nThe release ID must belong to the flag and environment in the path.\nReturns `404` for a release that ended more than 90 days ago.\nPass `expand=metrics` to attach each metric's definition to the top-level\n`metrics` array. Analysis settings come from the version pinned when the\nrelease started (`metricVersionId`); name, description, tags, maintainer,\nand archive state reflect the current metric and may change afterwards.\n",
+ Use: "get",
+ Params: []Param{
+ {
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
+ Type: "string",
+ },
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "flag-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "release-id",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "expand",
+ In: "query",
+ Description: "Optional fields to expand.",
+ Type: "array",
+ },
+ },
+ HTTPMethod: "GET",
+ HasBody: false,
+ IsBeta: true,
+ RequiresBody: false,
+ Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases/{releaseId}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_EnvironmentReleasesBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "List environment releases",
+ Long: "Returns the environment releases for the flag in the environment, newest first.\nEach release includes its phases in phase-index order.\nMetric definitions are not included. To get them, call\n`getEnvironmentRelease` with `expand=metrics`.\nReturns an empty `items` array when the flag has no releases in the environment,\nor when no release matches the `filter`.\nReleases that ended more than 90 days ago are not returned.\n\nResults are paginated. By default, the first 25 releases are returned. Use\n`limit` and `offset` to page through the rest, and `totalCount` to learn how\nmany releases match in total. The `_links` object includes `first`, `prev`,\n`next`, and `last` links where they apply.\n",
+ Use: "list",
+ Params: []Param{
+ {
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
+ Type: "string",
+ },
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "flag-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "filter",
+ In: "query",
+ Description: "A queryfilter expression that narrows the list. Supported fields and operators:\n'kind' ('equals') with values 'progressive' or 'guarded'.\n",
+ Type: "string",
+ },
+ {
+ Name: "limit",
+ In: "query",
+ Description: "The number of releases to return. Defaults to 25. Maximum is 100.",
+ 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 releases and then returns the next releases in the list, up to the query 'limit'.",
+ Type: "integer",
+ },
+ {
+ Name: "-snapshot",
+ In: "query",
+ Description: "Pins the read to a moment in time (nanoseconds since the Unix epoch) so pages walked in sequence reflect one consistent snapshot. Follow the pagination links rather than constructing this value. Out-of-range values are ignored.",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "GET",
+ HasBody: false,
+ IsBeta: true,
+ RequiresBody: false,
+ Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_EnvironmentReleasesBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Start an environment release",
+ Long: "Creates and starts a release on a flag in an environment, either from\ninline configuration or from an environment release plan. A release\nhas one or more phases. Each phase is an audience, targeted by one\nflag rule, and has its own steps: the schedule of allocations at\nwhich that rule serves the target variation. After all of a phase's\nsteps complete, the phase serves the target variation to 100% of its\ncontexts.\n\n**Inline configuration.** Each entry in `phases` must specify exactly\none targeting mode:\n\n- **Existing rule**: set `ruleId`. The rule must be enabled. Only a\n single-phase release can use an existing rule.\n- **New rule**: set `clauses`, with an optional `description`. New\n rules are appended to the end of the flag's rule list. To insert\n them before an existing rule instead, set the top-level\n `beforeRuleId`, which applies to every phase.\n\nEvery phase's rule, including an existing rule passed by `ruleId`,\nmust include\n`{\"contextKind\": \"\u003crandomizationUnit\u003e\", \"attribute\": \"kind\", \"op\": \"in\", \"values\": [\"\u003crandomizationUnit\u003e\"]}`,\nnot negated and with no other values, so the release only reaches\ncontexts of the `randomizationUnit` kind, or multi-contexts\ncontaining the `randomizationUnit` kind. An existing rule needs the\nclause even if its other clauses only match that context kind. A\nphase without it returns `400`.\n\nFor multiple phases, set `phases` with at least two entries. Each phase\ncreates a rule. The first rule is enabled and starts immediately.\nSubsequent rules stay disabled until the release advances to them:\nautomatically when `advancementMode` is `automatic`, or by an explicit\nadvance when it is `manual`. `advancementMode` is required for a\nmulti-phase release.\n\nReleases on the flag's default rule are not supported. A phase that\nomits both targeting modes is rejected.\n\nThe flag must be on in the environment, or the request returns\n`409`. The release only reaches contexts that match a phase's rule.\nOther contexts keep getting the flag's default rule, which may\nalready serve the target variation.\n\nThe release type is inferred from `metrics`: an omitted or empty array\ncreates a progressive release; one or more metrics creates a guarded\nrelease. Metrics must be listed individually; metric groups are not\naccepted.\n\nEvery start runs release health checks, described in\n`ReleaseHealthCheckKind`. A flag that hasn't recently been\nevaluated for contexts of the `randomizationUnit` kind fails\n`flag_evaluations_with_context`, and one with no recent evaluations\nat all also fails `flag_evaluations_any`. Guarded releases also\ncheck that each metric receives events. A failing\ncheck returns `400` with code `health_checks_failed`. To start the\nrelease anyway, list the failing kinds in `bypassHealthChecks`.\n\n**From a release plan.** Set `releasePlanKey` to start from a plan in\nthis environment instead of configuring the release inline; a request\nthat also sets fields the plan supplies is rejected. The plan's current\nversion runs as stored, with metric groups expanded into their members.\nHealth checks run against the plan's randomization unit and metrics.\nReturns `400` if the plan is missing or incomplete, and `422` until\nenvironment release plans are available for the account.\n\nRequires the `updateRules` action on the flag in this environment, plus\n`updateFallthrough` when `cleanupBehavior` is\n`remove_rules_and_update_default_rule`. A release started from a plan\nrequires both. The start is recorded in the flag's audit log as a\ntargeting change that carries `comment`.\n\nIn an environment that requires approvals, this endpoint fails with\n`405`. Tokens granted the `bypassRequiredApproval` action can still\ncall it to start the release directly.\n\nThis operation is not idempotent. Retrying a request that already\nstarted a release returns `409` with code `release_already_active`.\nThe earlier request may have succeeded; call `listEnvironmentReleases`\nto confirm the running release is yours.\n",
+ Use: "start",
+ Params: []Param{
+ {
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
+ Type: "string",
+ },
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "flag-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "POST",
+ HasBody: true,
+ IsBeta: true,
+ RequiresBody: true,
+ Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_EnvironmentReleasesBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Stop an environment release",
+ Long: "Stops a release and resolves its phases according to the `resolution`\nyou specify. To learn how each resolution treats completed and pending\nphases, read the `resolution` schema.\n\nRequires the `updateRules` action on the flag in this environment, or\n`updateFallthrough` for a historical release that ran on the default\nrule. The stop is recorded in the flag's audit log as a targeting\nchange that names the resolution and carries `comment`.\n\nIn an environment that requires approvals, this endpoint fails with\n`405`. Tokens granted the `bypassRequiredApproval` action can still\ncall it to stop the release directly.\n\nStopping a release that has already completed or been stopped returns\n`200` and makes no changes. Returns `404` for a release that ended more\nthan 90 days ago.\n",
+ Use: "stop",
+ Params: []Param{
+ {
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
+ Type: "string",
+ },
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "flag-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "release-id",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "PUT",
+ HasBody: true,
+ IsBeta: true,
+ RequiresBody: true,
+ Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases/{releaseId}/stop",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Delete environment",
+ Long: "Delete a environment by key.",
+ Use: "delete",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "The project key",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "The environment key",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "DELETE",
+ HasBody: false,
+ IsBeta: false,
+ RequiresBody: false,
+ Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Get environment",
+ Long: "\u003e ### Approval settings\n\u003e\n\u003e The `approvalSettings` and `resourceApprovalSettings` keys are only returned when the [approvals](https://launchdarkly.com/docs/home/releases/approvals/) feature is enabled.\n\nGet an environment given a project and key.\n",
+ Use: "get",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "The project key",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "The environment key",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "GET",
+ HasBody: false,
+ IsBeta: false,
+ RequiresBody: false,
+ Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "List environments",
+ Long: "Return a list of environments for the specified project.\n\nBy default, this returns the first 20 environments. Page through this list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the `_links` field that returns. If those links do not appear, the pages they refer to don't exist. For example, the `first` and `prev` links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page.\n\n### Filtering environments\n\nLaunchDarkly supports the following fields for filters:\n- `query` is a string that matches against the environments' names and keys. It is not case sensitive.\n- `tags` is a `+`-separated list of environment tags. It filters the list of environments that have all of the tags in the list.\n- `critical` is a boolean filter. `critical:true` returns only environments marked as critical, and `critical:false` returns only non-critical environments.\n\nFor example, the filter `filter=query:abc,tags:tag-1+tag-2` matches environments with the string `abc` in their name or key and also are tagged with `tag-1` and `tag-2`. The filter is not case-sensitive.\n\nThe documented values for `filter` query parameters are prior to URL encoding. For example, the `+` in `filter=tags:tag-1+tag-2` must be encoded to `%2B`.\n\n### Sorting environments\n\nLaunchDarkly supports the following fields for sorting:\n\n- `createdOn` sorts by the creation date of the environment.\n- `critical` sorts by whether the environments are marked as critical.\n- `name` sorts by environment name.\n\nFor example, `sort=name` sorts the response by environment name in ascending order.\n",
+ Use: "list",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "The project key",
+ Type: "string",
+ },
+ {
+ Name: "limit",
+ In: "query",
+ Description: "The number of environments to return in the response. Defaults to 20.",
+ Type: "integer",
+ },
+ {
+ Name: "offset",
+ In: "query",
+ Description: "Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query 'limit'.",
+ Type: "integer",
+ },
+ {
+ Name: "filter",
+ In: "query",
+ Description: "A comma-separated list of filters. Each filter is of the form 'field:value'.",
+ Type: "string",
+ },
+ {
+ Name: "sort",
+ In: "query",
+ Description: "A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order.",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "GET",
+ HasBody: false,
+ IsBeta: false,
+ RequiresBody: false,
+ Path: "/api/v2/projects/{projectKey}/environments",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Update environment",
+ Long: "\nUpdate an environment. Updating an environment uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).\n\nTo update fields in the environment object that are arrays, set the `path` to the name of the field and then append `/\u003carray index\u003e`. Using `/0` appends to the beginning of the array.\n\n### Approval settings\n\nThis request only returns the `approvalSettings` and `resourceApprovalSettings` if the [approvals](https://launchdarkly.com/docs/home/releases/approvals/) feature is enabled.\n\nOnly the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable.\n\nIf you try to patch the environment by setting both `required` and `requiredApprovalTags`, the request fails and an error appears. You can specify either required approvals for all flags in an environment or those with specific tags, but not both.\n",
+ Use: "update",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "The project key",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "The environment key",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "PATCH",
+ HasBody: true,
+ IsBeta: false,
+ RequiresBody: true,
+ Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Create environment",
+ Long: "\u003e ### Approval settings\n\u003e\n\u003e You cannot configure approval settings when you create a new environment. Use [Update environment](https://launchdarkly.com/docs/api/environments/patch-environment) to update approval settings.\n\u003e\n\u003e The `approvalSettings` and `resourceApprovalSettings` keys are only returned when the [approvals](https://launchdarkly.com/docs/home/releases/approvals/) feature is enabled.\n\nCreate a new environment in a specified project with a given name, key, swatch color, and default TTL.\n",
+ Use: "create",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "The project key",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "POST",
+ HasBody: true,
+ IsBeta: false,
+ RequiresBody: true,
+ Path: "/api/v2/projects/{projectKey}/environments",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_EnvironmentsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Reset environment mobile SDK key",
+ Long: "Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.",
+ Use: "reset-mobile-key",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "The project key",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "The environment key",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "POST",
+ HasBody: false,
IsBeta: false,
RequiresBody: false,
Path: "/api/v2/projects/{projectKey}/environments/{environmentKey}/mobileKey",
@@ -6821,7 +7133,7 @@ func AddAllResourceCmds(
NewOperationCmd(gen_ExperimentsResourceCmd, client, markdownRenderer, OperationData{
Short: "Patch experiment",
- Long: "Update an experiment. Updating an experiment uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating experiments.\n\n#### updateName\n\n\u003e **Deprecated**: `updateName` will be removed in a future version. Use `updateExperimentFields` instead.\n\nUpdates the experiment name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Example updated experiment name\"\n }]\n}\n```\n\n#### updateDescription\n\n\u003e **Deprecated**: `updateDescription` will be removed in a future version. Use `updateExperimentFields` instead.\n\nUpdates the experiment description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Example updated description\"\n }]\n}\n```\n\n#### updateExperimentFields\n\nUpdates one or more fields on an experiment or its current iteration. Each field update specifies an operation (`add`, `update`, or `remove`) and an optional value.\n\nWhich fields are mutable depends on the current iteration status. To discover which fields and operations are allowed, expand `mutableFieldsByStatus` on the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response.\n\n##### Parameters\n\n- `value`: An object mapping field names to field updates. Each field update has the following properties:\n - `operation`: The operation to perform. One of `add`, `update`, or `remove`.\n - `value`: The new value for the field. Required for `add` and `update` operations.\n\nTo find which fields are supported and which operations are allowed for each iteration status, expand `mutableFieldsByStatus` on the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExperimentFields\",\n \"value\": {\n \"name\": {\n \"operation\": \"update\",\n \"value\": \"Updated experiment name\"\n },\n \"tags\": {\n \"operation\": \"add\",\n \"value\": [\"tag1\", \"tag2\"]\n }\n }\n }]\n}\n```\n\n#### saveAndStartNewIteration\n\nStops the current running iteration, creates a new iteration from it, optionally applies field updates, and starts the new iteration. This is a convenience instruction that combines stopping, updating, and starting in a single operation.\n\n##### Parameters\n\n- `changeJustification`: (Optional) The reason for stopping and starting a new iteration.\n- `value`: (Optional) An object mapping field names to field updates, using the same format as `updateExperimentFields`. These updates are applied to the new iteration before it is started.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"saveAndStartNewIteration\",\n \"changeJustification\": \"Adjusting hypothesis based on early results\",\n \"value\": {\n \"hypothesis\": {\n \"operation\": \"update\",\n \"value\": \"Updated hypothesis text\"\n }\n }\n }]\n}\n```\n\n#### startIteration\n\nStarts a new iteration for this experiment. You must [create a new iteration](https://launchdarkly.com/docs/api/experiments/create-iteration) before calling this instruction.\n\nAn iteration may not be started until it meets the following criteria:\n\n* Its associated flag is toggled on and is not archived\n* Its `randomizationUnit` is set\n* At least one of its `treatments` has a non-zero `allocationPercent`\n\n##### Parameters\n\n- `changeJustification`: The reason for starting a new iteration. Required when you call `startIteration` on an already running experiment, otherwise optional.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"startIteration\",\n \"changeJustification\": \"It's time to start a new iteration\"\n }]\n}\n```\n\n#### stopIteration\n\nStops the current iteration for this experiment.\n\n##### Parameters\n\n- `winningTreatmentId`: The ID of the winning treatment. Treatment IDs are returned as part of the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response. They are the `_id` of each element in the `treatments` array.\n- `winningReason`: The reason for the winner\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"stopIteration\",\n \"winningTreatmentId\": \"3a548ec2-72ac-4e59-8518-5c24f5609ccf\",\n \"winningReason\": \"Example reason to stop the iteration\"\n }]\n}\n```\n\n#### archiveExperiment\n\nArchives this experiment. Archived experiments are hidden by default in the LaunchDarkly user interface. You cannot start new iterations for archived experiments.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"archiveExperiment\" }]\n}\n```\n\n#### restoreExperiment\n\nRestores an archived experiment. After restoring an experiment, you can start new iterations for it again.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"restoreExperiment\" }]\n}\n```\n",
+ Long: "Update an experiment. Updating an experiment uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating experiments.\n\n#### updateName\n\n\u003e **Deprecated**: `updateName` will be removed in a future version. Use `updateExperimentFields` instead.\n\nUpdates the experiment name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Example updated experiment name\"\n }]\n}\n```\n\n#### updateDescription\n\n\u003e **Deprecated**: `updateDescription` will be removed in a future version. Use `updateExperimentFields` instead.\n\nUpdates the experiment description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Example updated description\"\n }]\n}\n```\n\n#### updateExperimentFields\n\nUpdates one or more fields on an experiment or its current iteration. Each field update specifies an operation (`add`, `update`, or `remove`) and an optional value.\n\nWhich fields are mutable depends on the current iteration status. To discover which fields and operations are allowed, expand `mutableFieldsByStatus` on the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response.\n\n##### Parameters\n\n- `value`: An object mapping field names to field updates. Each field update has the following properties:\n - `operation`: The operation to perform. One of `add`, `update`, or `remove`.\n - `value`: The new value for the field. Required for `add` and `update` operations.\n\nTo find which fields are supported and which operations are allowed for each iteration status, expand `mutableFieldsByStatus` on the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExperimentFields\",\n \"value\": {\n \"name\": {\n \"operation\": \"update\",\n \"value\": \"Updated experiment name\"\n },\n \"tags\": {\n \"operation\": \"add\",\n \"value\": [\"tag1\", \"tag2\"]\n }\n }\n }]\n}\n```\n\n##### Custom assignment source fields\n\nIf your experiment reads its assignment data from your data warehouse, two additional fields control the assignment source it uses.\n\nUse `assignmentDataSource` to attach an assignment source to an iteration, change which source it points at, or detach it. Its value is an object with the following properties:\n\n- `key`: (Required) The key of the assignment data source.\n- `experimentId`: The experiment identifier in the assignment data source. You can omit this while the experiment is a draft, but you must set it before you start the experiment.\n- `startTime`: (Optional) The start of the assignment data window, in Unix milliseconds.\n- `endTime`: (Optional) The end of the assignment data window, in Unix milliseconds. This must be later than `startTime`.\n\nTo detach the assignment source, send `null` as the value. You can only change this field while the iteration is still a draft.\n\nUse `assignmentDataSourceWindow` to change only the dates on an assignment source that is already attached. Its value is an object with the same `startTime` and `endTime` properties. The iteration must already have an assignment source. This is how you adjust the dates after an iteration has run, because the source itself is fixed at that point.\n\nMulti-armed bandits use flags for assignment, so they support neither field.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExperimentFields\",\n \"value\": {\n \"assignmentDataSource\": {\n \"operation\": \"update\",\n \"value\": {\n \"key\": \"my-assignment-data-source\",\n \"experimentId\": \"experiment-123\",\n \"startTime\": 1690000000000,\n \"endTime\": 1690600000000\n }\n }\n }\n }]\n}\n```\n\n#### saveAndStartNewIteration\n\nStops the current running iteration, creates a new iteration from it, optionally applies field updates, and starts the new iteration. This is a convenience instruction that combines stopping, updating, and starting in a single operation.\n\n##### Parameters\n\n- `changeJustification`: (Optional) The reason for stopping and starting a new iteration.\n- `value`: (Optional) An object mapping field names to field updates, using the same format as `updateExperimentFields`. These updates are applied to the new iteration before it is started.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"saveAndStartNewIteration\",\n \"changeJustification\": \"Adjusting hypothesis based on early results\",\n \"value\": {\n \"hypothesis\": {\n \"operation\": \"update\",\n \"value\": \"Updated hypothesis text\"\n }\n }\n }]\n}\n```\n\n#### startIteration\n\nStarts a new iteration for this experiment. You must [create a new iteration](https://launchdarkly.com/docs/api/experiments/create-iteration) before calling this instruction.\n\nAn iteration may not be started until it meets the following criteria:\n\n* Its associated flag is toggled on and is not archived\n* Its `randomizationUnit` is set\n* At least one of its `treatments` has a non-zero `allocationPercent`\n\n##### Parameters\n\n- `changeJustification`: The reason for starting a new iteration. Required when you call `startIteration` on an already running experiment, otherwise optional.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"startIteration\",\n \"changeJustification\": \"It's time to start a new iteration\"\n }]\n}\n```\n\n#### stopIteration\n\nStops the current iteration for this experiment.\n\n##### Parameters\n\n- `winningTreatmentId`: The ID of the winning treatment. Treatment IDs are returned as part of the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response. They are the `_id` of each element in the `treatments` array.\n- `winningReason`: The reason for the winner\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"stopIteration\",\n \"winningTreatmentId\": \"3a548ec2-72ac-4e59-8518-5c24f5609ccf\",\n \"winningReason\": \"Example reason to stop the iteration\"\n }]\n}\n```\n\n#### archiveExperiment\n\nArchives this experiment. Archived experiments are hidden by default in the LaunchDarkly user interface. You cannot start new iterations for archived experiments.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"archiveExperiment\" }]\n}\n```\n\n#### restoreExperiment\n\nRestores an archived experiment. After restoring an experiment, you can start new iterations for it again.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"restoreExperiment\" }]\n}\n```\n",
Use: "update",
Params: []Param{
{
@@ -7024,133 +7336,293 @@ func AddAllResourceCmds(
Type: "string",
},
{
- Name: "integration-id",
+ Name: "integration-id",
+ In: "path",
+ Description: "The integration ID",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "POST",
+ HasBody: false,
+ IsBeta: true,
+ RequiresBody: false,
+ Path: "/api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}/trigger",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Create flag link",
+ Long: "Create a new flag link. Flag links let you reference external resources and associate them with your flags.",
+ Use: "create",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "The project key",
+ Type: "string",
+ },
+ {
+ Name: "feature-flag-key",
+ In: "path",
+ Description: "The feature flag key",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "POST",
+ HasBody: true,
+ IsBeta: true,
+ RequiresBody: true,
+ Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Delete flag link",
+ Long: "Delete a flag link by ID or key.",
+ Use: "delete",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "The project key",
+ Type: "string",
+ },
+ {
+ Name: "feature-flag-key",
+ In: "path",
+ Description: "The feature flag key",
+ Type: "string",
+ },
+ {
+ Name: "id",
+ In: "path",
+ Description: "The flag link ID or Key",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "DELETE",
+ HasBody: false,
+ IsBeta: true,
+ RequiresBody: false,
+ Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "List flag links",
+ Long: "Get a list of all flag links.",
+ Use: "list",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "The project key",
+ Type: "string",
+ },
+ {
+ Name: "feature-flag-key",
+ In: "path",
+ Description: "The feature flag key",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "GET",
+ HasBody: false,
+ IsBeta: true,
+ RequiresBody: false,
+ Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Update flag link",
+ Long: "Update a flag link. Updating a flag link uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).",
+ Use: "update",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "The project key",
+ Type: "string",
+ },
+ {
+ Name: "feature-flag-key",
+ In: "path",
+ Description: "The feature flag key",
+ Type: "string",
+ },
+ {
+ Name: "id",
+ In: "path",
+ Description: "The flag link ID",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "PATCH",
+ HasBody: true,
+ IsBeta: true,
+ RequiresBody: true,
+ Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_FlagReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Create a flag release plan for a project",
+ Long: "Creates a flag release plan. The key must not be in use by another\nactive plan in the project, or the request is rejected with 409.\nThe request is rejected with 400 when an environment isn't in the\nproject, the maintainer isn't in the account, an environment release\nplan doesn't exist, is incomplete, or is in another environment,\n`default` is set while the project already has a default plan, or the\nproject already has the maximum number of plans. To make a new plan\nthe project's default, create it, then update it with `default` set,\nwhich demotes the current default.\n",
+ Use: "create",
+ Params: []Param{
+ {
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
+ Type: "string",
+ },
+ {
+ Name: "project-key",
In: "path",
- Description: "The integration ID",
+ Description: "",
Type: "string",
},
},
HTTPMethod: "POST",
- HasBody: false,
+ HasBody: true,
IsBeta: true,
- RequiresBody: false,
- Path: "/api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}/trigger",
+ RequiresBody: true,
+ Path: "/api/v2/projects/{projectKey}/flag-release-plans",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "Create flag link",
- Long: "Create a new flag link. Flag links let you reference external resources and associate them with your flags.",
- Use: "create",
+ NewOperationCmd(gen_FlagReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Delete a flag release plan in a project",
+ Long: "Delete a flag release plan in a project.",
+ Use: "delete",
Params: []Param{
+ {
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
+ Type: "string",
+ },
{
Name: "project-key",
In: "path",
- Description: "The project key",
+ Description: "",
Type: "string",
},
{
- Name: "feature-flag-key",
+ Name: "plan-key",
In: "path",
- Description: "The feature flag key",
+ Description: "",
Type: "string",
},
},
- HTTPMethod: "POST",
- HasBody: true,
+ HTTPMethod: "DELETE",
+ HasBody: false,
IsBeta: true,
- RequiresBody: true,
- Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}",
+ RequiresBody: false,
+ Path: "/api/v2/projects/{projectKey}/flag-release-plans/{planKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "Delete flag link",
- Long: "Delete a flag link by ID or key.",
- Use: "delete",
+ NewOperationCmd(gen_FlagReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Get a flag release plan in a project by plan key",
+ Long: "Get a flag release plan in a project by plan key.",
+ Use: "get",
Params: []Param{
{
- Name: "project-key",
- In: "path",
- Description: "The project key",
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
Type: "string",
},
{
- Name: "feature-flag-key",
+ Name: "project-key",
In: "path",
- Description: "The feature flag key",
+ Description: "",
Type: "string",
},
{
- Name: "id",
+ Name: "plan-key",
In: "path",
- Description: "The flag link ID or Key",
+ Description: "",
Type: "string",
},
},
- HTTPMethod: "DELETE",
+ HTTPMethod: "GET",
HasBody: false,
IsBeta: true,
RequiresBody: false,
- Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}",
+ Path: "/api/v2/projects/{projectKey}/flag-release-plans/{planKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "List flag links",
- Long: "Get a list of all flag links.",
+ NewOperationCmd(gen_FlagReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "List a project's flag release plans",
+ Long: "List a project's flag release plans, in creation order.",
Use: "list",
Params: []Param{
{
- Name: "project-key",
- In: "path",
- Description: "The project key",
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
Type: "string",
},
{
- Name: "feature-flag-key",
+ Name: "project-key",
In: "path",
- Description: "The feature flag key",
+ Description: "",
Type: "string",
},
+ {
+ Name: "limit",
+ In: "query",
+ Description: "The number of flag release plans to return.",
+ Type: "integer",
+ },
+ {
+ Name: "offset",
+ In: "query",
+ Description: "The number of flag release plans to skip. Used for pagination.",
+ Type: "integer",
+ },
},
HTTPMethod: "GET",
HasBody: false,
IsBeta: true,
RequiresBody: false,
- Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}",
+ Path: "/api/v2/projects/{projectKey}/flag-release-plans",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_FlagLinksBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "Update flag link",
- Long: "Update a flag link. Updating a flag link uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).",
+ NewOperationCmd(gen_FlagReleasePlansBetaResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Replace a flag release plan configuration in a project",
+ Long: "Replace a flag release plan configuration in a project. This is a\nfull replace, not a merge, and anything omitted is overwritten.\nOmitting `default` clears it, so a request without it demotes the\nproject's default plan. The flag release plan's key is immutable, and\nits version increments by 1 on every successful update. The request's\nversion is an optional optimistic lock: when present it must match the\nplan's current version, and on mismatch the request is rejected with\n409 and no changes are applied, meaning the plan was edited since it\nwas read; get the plan again and retry with its current version. When\nomitted the update applies unconditionally to the plan currently\nholding the key. A flag release already started from the plan is not\naffected.\n",
Use: "update",
Params: []Param{
{
- Name: "project-key",
- In: "path",
- Description: "The project key",
+ Name: "ld-api-version",
+ In: "header",
+ Description: "Version of the endpoint.",
Type: "string",
},
{
- Name: "feature-flag-key",
+ Name: "project-key",
In: "path",
- Description: "The feature flag key",
+ Description: "",
Type: "string",
},
{
- Name: "id",
+ Name: "plan-key",
In: "path",
- Description: "The flag link ID",
+ Description: "",
Type: "string",
},
},
- HTTPMethod: "PATCH",
+ HTTPMethod: "PUT",
HasBody: true,
IsBeta: true,
RequiresBody: true,
- Path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id}",
+ Path: "/api/v2/projects/{projectKey}/flag-release-plans/{planKey}",
SupportsSemanticPatch: false,
})
@@ -7710,7 +8182,7 @@ func AddAllResourceCmds(
NewOperationCmd(gen_FeatureFlagsResourceCmd, client, markdownRenderer, OperationData{
Short: "Update feature flag",
- Long: "Perform a partial update to a feature flag. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://launchdarkly.com/docs/api#updates).\n\n### Using semantic patches on a feature flag\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating feature flags takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment.\n* `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating feature flags.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eturning flags on and off\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions require the `environmentKey` parameter.\n\n#### turnFlagOff\n\nSets the flag's targeting state to **Off**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOff\" } ]\n}\n```\n\n#### turnFlagOn\n\nSets the flag's targeting state to **On**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOn\" } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eworking with targeting and variations\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions require the `environmentKey` parameter.\n\nSeveral of the instructions for working with targeting and variations require flag rule IDs, variation IDs, or clause IDs as parameters. Each of these are returned as part of the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) response. The flag rule ID is the `_id` field of each element in the `rules` array within each environment listed in the `environments` object. The variation ID is the `_id` field in each element of the `variations` array. The clause ID is the `_id` field of each element of the `clauses` array within the `rules` array within each environment listed in the `environments` object.\n\n#### addClauses\n\nAdds the given clauses to the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauses\": [{\n\t\t\t\"contextKind\": \"user\",\n\t\t\t\"attribute\": \"country\",\n\t\t\t\"op\": \"in\",\n\t\t\t\"negate\": false,\n\t\t\t\"values\": [\"USA\", \"Canada\"]\n\t\t}]\n\t}]\n}\n```\n\n#### addPrerequisite\n\nAdds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter.\n\n##### Parameters\n\n- `key`: Flag key of the prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addPrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addRule\n\nAdds a new targeting rule to the flag. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate.\n\nIf you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list.\n\n##### Parameters\n\n- `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n- `beforeRuleId`: (Optional) ID of a flag rule.\n- Either\n - `variationId`: ID of a variation of the flag.\n\n or\n\n - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000).\n - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n - `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }]\n }]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }],\n \"rolloutContextKind\": \"organization\",\n \"rolloutWeights\": {\n \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n }\n }]\n}\n```\n\n#### addTargets\n\nAdds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the flag to target the same context key in multiple variations.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addUserTargets\n\nAdds user keys to the individual user targets for the variation that `variationId` specifies. Returns an error if this causes the flag to target the same user key in multiple variations. If you are working with contexts, use `addTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addValuesToClause\n\nAdds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addValuesToClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### addVariation\n\nAdds a variation to the flag.\n\n##### Parameters\n\n- `value`: The variation value.\n- `name`: (Optional) The variation name.\n- `description`: (Optional) A description for the variation.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ]\n}\n```\n\n#### clearTargets\n\nRemoves all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### clearUserTargets\n\nRemoves all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"]\n\t}]\n}\n```\n\n#### removePrerequisite\n\nRemoves the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ]\n}\n```\n\n#### removeRule\n\nRemoves the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ]\n}\n```\n\n#### removeTargets\n\nRemoves context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeUserTargets\n\nRemoves user keys from the individual user targets for the variation that `variationId` specifies. Does nothing if the flag does not target the user keys. If you are working with contexts, use `removeTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeValuesFromClause\n\nRemoves `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeValuesFromClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### removeVariation\n\nRemoves a variation from the flag.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag to remove.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### reorderRules\n\nRearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the flag.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all rules in the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"reorderRules\",\n\t\t\"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n\t}]\n}\n```\n\n#### replacePrerequisites\n\nRemoves all existing prerequisites and replaces them with the list you provide.\n\n##### Parameters\n\n- `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replacePrerequisites\",\n \"prerequisites\": [\n {\n \"key\": \"prereq-flag-key-123abc\",\n \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\"\n },\n {\n \"key\": \"another-prereq-flag-key-456def\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\"\n }\n ]\n }\n ]\n}\n```\n\n#### replaceRules\n\nRemoves all targeting rules for the flag and replaces them with the list you provide.\n\n##### Parameters\n\n- `rules`: A list of rules.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceRules\",\n \"rules\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"description\": \"My new rule\",\n \"clauses\": [\n {\n \"contextKind\": \"user\",\n \"attribute\": \"segmentMatch\",\n \"op\": \"segmentMatch\",\n \"values\": [\"test\"]\n }\n ],\n \"trackEvents\": true\n }\n ]\n }\n ]\n}\n```\n\n#### replaceTargets\n\nRemoves all existing targeting and replaces it with the list of targets you provide.\n\n##### Parameters\n\n- `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceTargets\",\n \"targets\": [\n {\n \"contextKind\": \"user\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\"]\n },\n {\n \"contextKind\": \"device\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"device-key-456def\"]\n }\n ]\n } \n ]\n}\n```\n\n#### replaceUserTargets\n\nRemoves all existing user targeting and replaces it with the list of targets you provide. In the list of targets, you must include a target for each of the flag's variations. If you are working with contexts, use `replaceTargets` instead of this instruction.\n\n##### Parameters\n\n- `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceUserTargets\",\n \"targets\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\", \"user-key-456def\"]\n },\n {\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"user-key-789ghi\"]\n }\n ]\n }\n ]\n}\n```\n\n#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"updateClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\",\n \"clause\": {\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Mexico\", \"Canada\"]\n }\n }]\n}\n```\n\n#### updateDefaultVariation\n\nUpdates the default on or off variation of the flag.\n\n##### Parameters\n\n- `onVariationValue`: (Optional) The value of the variation of the new on variation.\n- `offVariationValue`: (Optional) The value of the variation of the new off variation\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ]\n}\n```\n\n#### updateFallthroughVariationOrRollout\n\nUpdates the default or \"fallthrough\" rule for the flag, which the flag serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nor\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"rolloutContextKind\": \"user\",\n\t\t\"rolloutWeights\": {\n\t\t\t\"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n\t\t\t\"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n\t\t}\n\t}]\n}\n```\n\n#### updateOffVariation\n\nUpdates the default off variation to `variationId`. The flag serves the default off variation when the flag's targeting is **Off**.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### updatePrerequisite\n\nChanges the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updatePrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateRuleDescription\n\nUpdates the description of the feature flag rule.\n\n##### Parameters\n\n- `description`: The new human-readable description for this rule.\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleDescription\",\n\t\t\"description\": \"New rule description\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n\t}]\n}\n```\n\n#### updateRuleTrackEvents\n\nUpdates whether the SDK sends a detailed event for every evaluation of this rule, instead of only summary counts. Required for Data Export, but doesn't enable Data Export on its own.\n\n##### Parameters\n\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n- `trackEvents`: Whether or not detailed events are sent for this rule.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleTrackEvents\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"trackEvents\": true\n\t}]\n}\n```\n\n#### updateRuleVariationOrRollout\n\nUpdates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `variationId`: ID of a variation of the flag.\n\n or\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleVariationOrRollout\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether the SDK sends detailed evaluation events for this flag, for all rules. Required for Data Export, but doesn't enable Data Export on its own.\n\n##### Parameters\n\n- `trackEvents`: Whether or not detailed events are sent for this flag.\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 the SDK sends detailed evaluation events for the flag's default rule. Required for Data Export, but doesn't enable Data Export on its own.\n\n##### Parameters\n\n- `trackEvents`: Whether or not detailed events are sent for the default rule.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ]\n}\n```\n\n#### updateVariation\n\nUpdates a variation of the flag.\n\n##### Parameters\n\n- `variationId`: The ID of the variation to update.\n- `name`: (Optional) The updated variation name.\n- `value`: (Optional) The updated variation value.\n- `description`: (Optional) The updated variation description.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating flag settings\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### addCustomProperties\n\nAdds a new custom property to the feature flag. Custom properties are used to associate feature flags with LaunchDarkly integrations. For example, if you create an integration with an issue tracking service, you may want to associate a flag with a list of issues related to a feature's development.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"addCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"name\": \"Example custom property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### addTags\n\nAdds tags to the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### makeFlagPermanent\n\nMarks the feature flag as permanent. LaunchDarkly does not prompt you to remove permanent flags, even if one variation is rolled out to all your customers.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagPermanent\" } ]\n}\n```\n\n#### makeFlagTemporary\n\nMarks the feature flag as temporary.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagTemporary\" } ]\n}\n```\n\n#### removeCustomProperties\n\nRemoves the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `values`: A list of the associated values to remove from the custom property.\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"replaceCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### removeMaintainer\n\nRemoves the flag's maintainer. To set a new maintainer, use the `updateMaintainerMember` or `updateMaintainerTeam` instructions.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeMaintainer\" } ]\n}\n```\n\n#### removeTags\n\nRemoves tags from the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### replaceCustomProperties\n\nReplaces the existing associated values for a custom property with the new values.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the new associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceCustomProperties\",\n \"key\": \"example-custom-property\",\n \"name\": \"Example custom property\",\n \"values\": [\"value1\", \"value2\"]\n }]\n}\n```\n\n#### turnOffClientSideAvailability\n\nTurns off client-side SDK availability for the flag. This is equivalent to unchecking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn off availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOffClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### turnOnClientSideAvailability\n\nTurns on client-side SDK availability for the flag. This is equivalent to checking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn on availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOnClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### updateDescription\n\nUpdates the feature flag description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateDescription\", \"value\": \"Updated flag description\" } ]\n}\n```\n#### updateMaintainerMember\n\nUpdates the maintainer of the flag to an existing member and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The ID of the member.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerMember\", \"value\": \"61e9b714fd47591727db558a\" } ]\n}\n```\n\n#### updateMaintainerTeam\n\nUpdates the maintainer of the flag to an existing team and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The key of the team.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerTeam\", \"value\": \"example-team-key\" } ]\n}\n```\n\n#### updateName\n\nUpdates the feature flag name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateName\", \"value\": \"Updated flag name\" } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating the flag lifecycle\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### archiveFlag\n\nArchives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.\n\n```json\n{\n \"instructions\": [ { \"kind\": \"archiveFlag\" } ]\n}\n```\n\n#### deleteFlag\n\nDeletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deleteFlag\" } ]\n}\n```\n\n#### deprecateFlag\n\nDeprecates the feature flag. This hides it from the live flags list without archiving or deleting it.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deprecateFlag\" } ]\n}\n```\n\n#### restoreDeprecatedFlag\n\nRestores the feature flag if it was previously deprecated.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ]\n}\n```\n\n#### restoreFlag\n\nRestores the feature flag if it was previously archived.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreFlag\" } ]\n}\n```\n\n\u003c/details\u003e\n\n### Using JSON patches on a feature flag\n\nIf you do not include the semantic patch header described above, you can use a [JSON patch](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\nIn the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update.\n\nThere are a few special cases to keep in mind when determining the value of the `path` element:\n\n * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/0/values/-\",\n \"value\": \"TestClient10\"\n }\n ]\n ```\n\n * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/-\",\n \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] }\n }\n ]\n ```\n\n * To add a flag to a release pipeline, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/releasePipelineKey\",\n \"value\": \"example-release-pipeline-key\"\n }\n ]\n ```\n\n### Required approvals\nIf a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals).\n\n### Conflicts\nIf a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`.\n\n### Migration flags\nFor migration flags, the cohort information is included in the `rules` property of a flag's response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag's response. You can update the default cohort by updating `fallthrough`.\nWhen you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`.\nTo learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration).\n",
+ Long: "Perform a partial update to a feature flag. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://launchdarkly.com/docs/api#updates).\n\n### Using semantic patches on a feature flag\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating feature flags takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment.\n* `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating feature flags.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eturning flags on and off\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions require the `environmentKey` parameter.\n\n#### turnFlagOff\n\nSets the flag's targeting state to **Off**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOff\" } ]\n}\n```\n\n#### turnFlagOn\n\nSets the flag's targeting state to **On**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOn\" } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eworking with targeting and variations\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions require the `environmentKey` parameter.\n\nSeveral of the instructions for working with targeting and variations require flag rule IDs, variation IDs, or clause IDs as parameters. Each of these are returned as part of the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) response. The flag rule ID is the `_id` field of each element in the `rules` array within each environment listed in the `environments` object. The variation ID is the `_id` field in each element of the `variations` array. The clause ID is the `_id` field of each element of the `clauses` array within the `rules` array within each environment listed in the `environments` object.\n\n#### addClauses\n\nAdds the given clauses to the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauses\": [{\n\t\t\t\"contextKind\": \"user\",\n\t\t\t\"attribute\": \"country\",\n\t\t\t\"op\": \"in\",\n\t\t\t\"negate\": false,\n\t\t\t\"values\": [\"USA\", \"Canada\"]\n\t\t}]\n\t}]\n}\n```\n\n#### addPrerequisite\n\nAdds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter.\n\n##### Parameters\n\n- `key`: Flag key of the prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addPrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addRule\n\nAdds a new targeting rule to the flag. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate.\n\nIf you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list.\n\n##### Parameters\n\n- `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n- `beforeRuleId`: (Optional) ID of a flag rule.\n- Either\n - `variationId`: ID of a variation of the flag.\n\n or\n\n - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000).\n - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n - `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }]\n }]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }],\n \"rolloutContextKind\": \"organization\",\n \"rolloutWeights\": {\n \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n }\n }]\n}\n```\n\n#### addTargets\n\nAdds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the flag to target the same context key in multiple variations.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addUserTargets\n\nAdds user keys to the individual user targets for the variation that `variationId` specifies. Returns an error if this causes the flag to target the same user key in multiple variations. If you are working with contexts, use `addTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addValuesToClause\n\nAdds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addValuesToClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### addVariation\n\nAdds a variation to the flag.\n\n##### Parameters\n\n- `value`: The variation value.\n- `name`: (Optional) The variation name.\n- `description`: (Optional) A description for the variation.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ]\n}\n```\n\n#### clearTargets\n\nRemoves all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### clearUserTargets\n\nRemoves all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"]\n\t}]\n}\n```\n\n#### removePrerequisite\n\nRemoves the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ]\n}\n```\n\n#### removeRule\n\nRemoves the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ]\n}\n```\n\n#### removeTargets\n\nRemoves context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeUserTargets\n\nRemoves user keys from the individual user targets for the variation that `variationId` specifies. Does nothing if the flag does not target the user keys. If you are working with contexts, use `removeTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeValuesFromClause\n\nRemoves `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeValuesFromClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### removeVariation\n\nRemoves a variation from the flag.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag to remove.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### reorderRules\n\nRearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the flag.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all rules in the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"reorderRules\",\n\t\t\"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n\t}]\n}\n```\n\n#### replacePrerequisites\n\nRemoves all existing prerequisites and replaces them with the list you provide.\n\n##### Parameters\n\n- `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replacePrerequisites\",\n \"prerequisites\": [\n {\n \"key\": \"prereq-flag-key-123abc\",\n \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\"\n },\n {\n \"key\": \"another-prereq-flag-key-456def\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\"\n }\n ]\n }\n ]\n}\n```\n\n#### replaceRules\n\nRemoves all targeting rules for the flag and replaces them with the list you provide.\n\n##### Parameters\n\n- `rules`: A list of rules.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceRules\",\n \"rules\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"description\": \"My new rule\",\n \"clauses\": [\n {\n \"contextKind\": \"user\",\n \"attribute\": \"segmentMatch\",\n \"op\": \"segmentMatch\",\n \"values\": [\"test\"]\n }\n ],\n \"trackEvents\": true\n }\n ]\n }\n ]\n}\n```\n\n#### replaceTargets\n\nRemoves all existing targeting and replaces it with the list of targets you provide.\n\n##### Parameters\n\n- `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceTargets\",\n \"targets\": [\n {\n \"contextKind\": \"user\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\"]\n },\n {\n \"contextKind\": \"device\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"device-key-456def\"]\n }\n ]\n } \n ]\n}\n```\n\n#### replaceUserTargets\n\nRemoves all existing user targeting and replaces it with the list of targets you provide. In the list of targets, you must include a target for each of the flag's variations. If you are working with contexts, use `replaceTargets` instead of this instruction.\n\n##### Parameters\n\n- `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceUserTargets\",\n \"targets\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\", \"user-key-456def\"]\n },\n {\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"user-key-789ghi\"]\n }\n ]\n }\n ]\n}\n```\n\n#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"updateClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\",\n \"clause\": {\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Mexico\", \"Canada\"]\n }\n }]\n}\n```\n\n#### updateDefaultVariation\n\nUpdates the default on or off variation of the flag.\n\n##### Parameters\n\n- `onVariationValue`: (Optional) The value of the variation of the new on variation.\n- `offVariationValue`: (Optional) The value of the variation of the new off variation\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ]\n}\n```\n\n#### updateFallthroughVariationOrRollout\n\nUpdates the default or \"fallthrough\" rule for the flag, which the flag serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nor\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"rolloutContextKind\": \"user\",\n\t\t\"rolloutWeights\": {\n\t\t\t\"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n\t\t\t\"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n\t\t}\n\t}]\n}\n```\n\n#### updateOffVariation\n\nUpdates the default off variation to `variationId`. The flag serves the default off variation when the flag's targeting is **Off**.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### updatePrerequisite\n\nChanges the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updatePrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateRuleDescription\n\nUpdates the description of the feature flag rule.\n\n##### Parameters\n\n- `description`: The new human-readable description for this rule.\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleDescription\",\n\t\t\"description\": \"New rule description\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n\t}]\n}\n```\n\n#### updateRuleTrackEvents\n\nUpdates whether the SDK sends a detailed event for every evaluation of this rule, instead of only summary counts. Required for Data Export, but doesn't enable Data Export on its own.\n\n##### Parameters\n\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n- `trackEvents`: Whether or not detailed events are sent for this rule.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleTrackEvents\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"trackEvents\": true\n\t}]\n}\n```\n\n#### updateRuleVariationOrRollout\n\nUpdates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `variationId`: ID of a variation of the flag.\n\n or\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleVariationOrRollout\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether the SDK sends detailed evaluation events for this flag, for all rules. Required for Data Export, but doesn't enable Data Export on its own.\n\n##### Parameters\n\n- `trackEvents`: Whether or not detailed events are sent for this flag.\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 the SDK sends detailed evaluation events for the flag's default rule. Required for Data Export, but doesn't enable Data Export on its own.\n\n##### Parameters\n\n- `trackEvents`: Whether or not detailed events are sent for the default rule.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ]\n}\n```\n\n#### updateVariation\n\nUpdates a variation of the flag.\n\n##### Parameters\n\n- `variationId`: The ID of the variation to update.\n- `name`: (Optional) The updated variation name.\n- `value`: (Optional) The updated variation value.\n- `description`: (Optional) The updated variation description.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating flag settings\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### addCustomProperties\n\nAdds a new custom property to the feature flag. Custom properties are used to associate feature flags with LaunchDarkly integrations. For example, if you create an integration with an issue tracking service, you may want to associate a flag with a list of issues related to a feature's development.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"addCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"name\": \"Example custom property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### addTags\n\nAdds tags to the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### makeFlagPermanent\n\nMarks the feature flag as permanent. LaunchDarkly does not prompt you to remove permanent flags, even if one variation is rolled out to all your customers.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagPermanent\" } ]\n}\n```\n\n#### makeFlagTemporary\n\nMarks the feature flag as temporary.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagTemporary\" } ]\n}\n```\n\n#### removeCustomProperties\n\nRemoves the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `values`: A list of the associated values to remove from the custom property.\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"replaceCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### removeMaintainer\n\nRemoves the flag's maintainer. To set a new maintainer, use the `updateMaintainerMember` or `updateMaintainerTeam` instructions.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeMaintainer\" } ]\n}\n```\n\n#### removeTags\n\nRemoves tags from the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### replaceCustomProperties\n\nReplaces the existing associated values for a custom property with the new values.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the new associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceCustomProperties\",\n \"key\": \"example-custom-property\",\n \"name\": \"Example custom property\",\n \"values\": [\"value1\", \"value2\"]\n }]\n}\n```\n\n#### turnOffClientSideAvailability\n\nTurns off client-side SDK availability for the flag. This is equivalent to unchecking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn off availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOffClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### turnOnClientSideAvailability\n\nTurns on client-side SDK availability for the flag. This is equivalent to checking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn on availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOnClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### updateDescription\n\nUpdates the feature flag description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateDescription\", \"value\": \"Updated flag description\" } ]\n}\n```\n#### updateMaintainerMember\n\nUpdates the maintainer of the flag to an existing member and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The ID of the member.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerMember\", \"value\": \"61e9b714fd47591727db558a\" } ]\n}\n```\n\n#### updateMaintainerTeam\n\nUpdates the maintainer of the flag to an existing team and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The key of the team.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerTeam\", \"value\": \"example-team-key\" } ]\n}\n```\n\n#### updateName\n\nUpdates the feature flag name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateName\", \"value\": \"Updated flag name\" } ]\n}\n```\n\n\u003c/details\u003e\u003cbr /\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand instructions for \u003cstrong\u003eupdating the flag lifecycle\u003c/strong\u003e\u003c/summary\u003e\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### archiveFlag\n\nArchives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.\n\n```json\n{\n \"instructions\": [ { \"kind\": \"archiveFlag\" } ]\n}\n```\n\n#### deleteFlag\n\nDeletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deleteFlag\" } ]\n}\n```\n\n#### deprecateFlag\n\nDeprecates the feature flag. This hides it from the live flags list without archiving or deleting it. You cannot deprecate an archived flag. If the flag is archived, this instruction fails with a `409` status code and makes no changes. To deprecate an archived flag, restore it with `restoreFlag` first.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deprecateFlag\" } ]\n}\n```\n\n#### restoreDeprecatedFlag\n\nRestores the feature flag if it was previously deprecated. If the flag is archived, this instruction fails with a `409` status code and makes no changes. To restore an archived flag, use `restoreFlag`.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ]\n}\n```\n\n#### restoreFlag\n\nRestores the feature flag if it was previously archived.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreFlag\" } ]\n}\n```\n\n\u003c/details\u003e\n\n### Using JSON patches on a feature flag\n\nIf you do not include the semantic patch header described above, you can use a [JSON patch](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\nIn the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update.\n\nThere are a few special cases to keep in mind when determining the value of the `path` element:\n\n * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/0/values/-\",\n \"value\": \"TestClient10\"\n }\n ]\n ```\n\n * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/-\",\n \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] }\n }\n ]\n ```\n\n * To add a flag to a release pipeline, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/releasePipelineKey\",\n \"value\": \"example-release-pipeline-key\"\n }\n ]\n ```\n\n### Required approvals\nIf a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals).\n\n### Conflicts\nIf a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`.\n\n### Migration flags\nFor migration flags, the cohort information is included in the `rules` property of a flag's response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag's response. You can update the default cohort by updating `fallthrough`.\nWhen you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`.\nTo learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration).\n",
Use: "update",
Params: []Param{
{
@@ -9340,7 +9812,7 @@ func AddAllResourceCmds(
NewOperationCmd(gen_IntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{
Short: "Create integration configuration",
- Long: "Create a new integration configuration. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).)",
+ Long: "Create a new integration configuration. This endpoint does not include persistent store integrations or flag import configurations. To manage those, use the [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configuration](https://launchdarkly.com/docs/api/flag-import-configurations-beta) endpoints.",
Use: "create-configuration",
Params: []Param{
{
@@ -9360,7 +9832,7 @@ func AddAllResourceCmds(
NewOperationCmd(gen_IntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{
Short: "Delete integration configuration",
- Long: "Delete an integration configuration by ID. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).)",
+ Long: "Delete an integration configuration by ID. This endpoint does not include persistent store integrations or flag import configurations. To manage those, use the [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configuration](https://launchdarkly.com/docs/api/flag-import-configurations-beta) endpoints.",
Use: "delete-configuration",
Params: []Param{
{
@@ -9380,7 +9852,7 @@ func AddAllResourceCmds(
NewOperationCmd(gen_IntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{
Short: "Get all configurations for the integration",
- Long: "Get all integration configurations with the specified integration key. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).).",
+ Long: "Get all integration configurations with the specified integration key. This endpoint does not include persistent store integrations or flag import configurations. To manage those, use the [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configuration](https://launchdarkly.com/docs/api/flag-import-configurations-beta) endpoints.",
Use: "list-configurations",
Params: []Param{
{
@@ -9406,7 +9878,7 @@ func AddAllResourceCmds(
NewOperationCmd(gen_IntegrationsBetaResourceCmd, client, markdownRenderer, OperationData{
Short: "Get an integration configuration",
- Long: "Get integration configuration with the specified ID. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).)",
+ Long: "Get integration configuration with the specified ID. This endpoint does not include persistent store integrations or flag import configurations. To manage those, use the [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configuration](https://launchdarkly.com/docs/api/flag-import-configurations-beta) endpoints.",
Use: "get-configuration",
Params: []Param{
{
@@ -10701,170 +11173,8 @@ func AddAllResourceCmds(
NewOperationCmd(gen_ReleasePipelinesDeprecatedResourceCmd, client, markdownRenderer, OperationData{
Short: "Get release for flag",
Long: "Get currently active release for a flag",
- Use: "get-release",
- Params: []Param{
- {
- Name: "project-key",
- In: "path",
- Description: "The project key",
- Type: "string",
- },
- {
- Name: "flag-key",
- In: "path",
- Description: "The flag key",
- Type: "string",
- },
- },
- HTTPMethod: "GET",
- HasBody: false,
- IsBeta: false,
- RequiresBody: false,
- Path: "/api/v2/flags/{projectKey}/{flagKey}/release",
- SupportsSemanticPatch: false,
- })
-
- NewOperationCmd(gen_ReleasePipelinesDeprecatedResourceCmd, client, markdownRenderer, OperationData{
- Short: "Get release pipeline by key",
- Long: "Get a release pipeline by key",
- Use: "get-release-pipeline",
- Params: []Param{
- {
- Name: "project-key",
- In: "path",
- Description: "The project key",
- Type: "string",
- },
- {
- Name: "pipeline-key",
- In: "path",
- Description: "The release pipeline key",
- Type: "string",
- },
- },
- HTTPMethod: "GET",
- HasBody: false,
- IsBeta: false,
- RequiresBody: false,
- Path: "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}",
- SupportsSemanticPatch: false,
- })
-
- NewOperationCmd(gen_ReleasePipelinesDeprecatedResourceCmd, client, markdownRenderer, OperationData{
- Short: "Patch release for flag",
- Long: "This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/release-pipelines-deprecated/update-phase-status) endpoint.\n\nUpdate currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).\n\nYou can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body:\n\n```\n [\n {\n \"op\": \"replace\",\n \"path\": \"/phase/0/complete\",\n \"value\": true\n }\n ]\n```\n",
- Use: "update-release",
- Params: []Param{
- {
- Name: "project-key",
- In: "path",
- Description: "The project key",
- Type: "string",
- },
- {
- Name: "flag-key",
- In: "path",
- Description: "The flag key",
- Type: "string",
- },
- },
- HTTPMethod: "PATCH",
- HasBody: true,
- IsBeta: false,
- RequiresBody: true,
- Path: "/api/v2/flags/{projectKey}/{flagKey}/release",
- SupportsSemanticPatch: false,
- })
-
- NewOperationCmd(gen_ReleasePipelinesDeprecatedResourceCmd, client, markdownRenderer, OperationData{
- Short: "Create a release pipeline",
- Long: "Creates a new release pipeline.\n\nThe first release pipeline you create is automatically set as the default release pipeline for your project. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`.\n\nYou can create up to 20 release pipelines per project.\n",
- Use: "create-release-pipeline",
- Params: []Param{
- {
- Name: "project-key",
- In: "path",
- Description: "The project key",
- Type: "string",
- },
- },
- HTTPMethod: "POST",
- HasBody: true,
- IsBeta: false,
- RequiresBody: true,
- Path: "/api/v2/projects/{projectKey}/release-pipelines",
- SupportsSemanticPatch: false,
- })
-
- NewOperationCmd(gen_ReleasePipelinesDeprecatedResourceCmd, client, markdownRenderer, OperationData{
- Short: "Update a release pipeline",
- Long: "Updates a release pipeline.",
- Use: "replace-release-pipeline",
- Params: []Param{
- {
- Name: "project-key",
- In: "path",
- Description: "The project key",
- Type: "string",
- },
- {
- Name: "pipeline-key",
- In: "path",
- Description: "The release pipeline key",
- Type: "string",
- },
- },
- HTTPMethod: "PUT",
- HasBody: true,
- IsBeta: false,
- RequiresBody: true,
- Path: "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}",
- SupportsSemanticPatch: false,
- })
-
- NewOperationCmd(gen_ReleasePipelinesDeprecatedResourceCmd, client, markdownRenderer, OperationData{
- Short: "Update phase status for release",
- Long: "Updates the execution status of a phase of a release",
- Use: "update-phase-status",
- Params: []Param{
- {
- Name: "project-key",
- In: "path",
- Description: "The project key",
- Type: "string",
- },
- {
- Name: "flag-key",
- In: "path",
- Description: "The flag key",
- Type: "string",
- },
- {
- Name: "phase-id",
- In: "path",
- Description: "The phase ID",
- Type: "string",
- },
- },
- HTTPMethod: "PUT",
- HasBody: true,
- IsBeta: false,
- RequiresBody: true,
- Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId}",
- SupportsSemanticPatch: false,
- })
-
- NewOperationCmd(gen_ReleasePoliciesBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "Delete a release policy",
- Long: "Delete an existing release policy for the specified project.",
- Use: "delete-release-policy",
- Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
+ Use: "get-release",
+ Params: []Param{
{
Name: "project-key",
In: "path",
@@ -10872,31 +11182,25 @@ func AddAllResourceCmds(
Type: "string",
},
{
- Name: "policy-key",
+ Name: "flag-key",
In: "path",
- Description: "The human-readable key of the release policy",
+ Description: "The flag key",
Type: "string",
},
},
- HTTPMethod: "DELETE",
+ HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
- Path: "/api/v2/projects/{projectKey}/release-policies/{policyKey}",
+ Path: "/api/v2/flags/{projectKey}/{flagKey}/release",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_ReleasePoliciesBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "List release policies",
- Long: "Get a list of release policies for the specified project with optional filtering.",
- Use: "list",
+ NewOperationCmd(gen_ReleasePipelinesDeprecatedResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Get release pipeline by key",
+ Long: "Get a release pipeline by key",
+ Use: "get-release-pipeline",
Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -10904,31 +11208,25 @@ func AddAllResourceCmds(
Type: "string",
},
{
- Name: "exclude-default",
- In: "query",
- Description: "When true, exclude the default release policy from the response. When false or omitted, include the default policy if an environment filter is present.",
- Type: "boolean",
+ Name: "pipeline-key",
+ In: "path",
+ Description: "The release pipeline key",
+ Type: "string",
},
},
HTTPMethod: "GET",
HasBody: false,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: false,
- Path: "/api/v2/projects/{projectKey}/release-policies",
+ Path: "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_ReleasePoliciesBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "Get a release policy by key",
- Long: "Retrieve a single release policy by its key for the specified project.",
- Use: "get-release-policy",
+ NewOperationCmd(gen_ReleasePipelinesDeprecatedResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Patch release for flag",
+ Long: "This endpoint is only available for releases that are part of a legacy release pipeline. Releases for new release pipelines should use the [Update phase status for release](https://launchdarkly.com/docs/api/release-pipelines-deprecated/update-phase-status) endpoint.\n\nUpdate currently active release for a flag. Updating releases requires the [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) format. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).\n\nYou can only use this endpoint to mark a release phase complete or incomplete. To indicate which phase to update, use the array index in the `path`. For example, to mark the first phase of a release as complete, use the following request body:\n\n```\n [\n {\n \"op\": \"replace\",\n \"path\": \"/phase/0/complete\",\n \"value\": true\n }\n ]\n```\n",
+ Use: "update-release",
Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -10936,31 +11234,25 @@ func AddAllResourceCmds(
Type: "string",
},
{
- Name: "policy-key",
+ Name: "flag-key",
In: "path",
- Description: "The release policy key",
+ Description: "The flag key",
Type: "string",
},
},
- HTTPMethod: "GET",
- HasBody: false,
- IsBeta: true,
- RequiresBody: false,
- Path: "/api/v2/projects/{projectKey}/release-policies/{policyKey}",
+ HTTPMethod: "PATCH",
+ HasBody: true,
+ IsBeta: false,
+ RequiresBody: true,
+ Path: "/api/v2/flags/{projectKey}/{flagKey}/release",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_ReleasePoliciesBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "Update the order of existing release policies",
- Long: "Update the order of existing release policies for the specified project.",
- Use: "create-order",
+ NewOperationCmd(gen_ReleasePipelinesDeprecatedResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Create a release pipeline",
+ Long: "Creates a new release pipeline.\n\nThe first release pipeline you create is automatically set as the default release pipeline for your project. To change the default release pipeline, use the [Update project](https://launchdarkly.com/docs/api/projects/patch-project) API to set the `defaultReleasePipelineKey`.\n\nYou can create up to 20 release pipelines per project.\n",
+ Use: "create-release-pipeline",
Params: []Param{
- {
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
- Type: "string",
- },
{
Name: "project-key",
In: "path",
@@ -10970,67 +11262,67 @@ func AddAllResourceCmds(
},
HTTPMethod: "POST",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: true,
- Path: "/api/v2/projects/{projectKey}/release-policies/order",
+ Path: "/api/v2/projects/{projectKey}/release-pipelines",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_ReleasePoliciesBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "Create a release policy",
- Long: "Create a new release policy for the specified project.",
- Use: "create-release-policy",
+ NewOperationCmd(gen_ReleasePipelinesDeprecatedResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Update a release pipeline",
+ Long: "Updates a release pipeline.",
+ Use: "replace-release-pipeline",
Params: []Param{
{
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
+ Name: "project-key",
+ In: "path",
+ Description: "The project key",
Type: "string",
},
{
- Name: "project-key",
+ Name: "pipeline-key",
In: "path",
- Description: "The project key",
+ Description: "The release pipeline key",
Type: "string",
},
},
- HTTPMethod: "POST",
+ HTTPMethod: "PUT",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: true,
- Path: "/api/v2/projects/{projectKey}/release-policies",
+ Path: "/api/v2/projects/{projectKey}/release-pipelines/{pipelineKey}",
SupportsSemanticPatch: false,
})
- NewOperationCmd(gen_ReleasePoliciesBetaResourceCmd, client, markdownRenderer, OperationData{
- Short: "Update a release policy",
- Long: "Update an existing release policy for the specified project.",
- Use: "replace-release-policy",
+ NewOperationCmd(gen_ReleasePipelinesDeprecatedResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Update phase status for release",
+ Long: "Updates the execution status of a phase of a release",
+ Use: "update-phase-status",
Params: []Param{
{
- Name: "ld-api-version",
- In: "header",
- Description: "Version of the endpoint.",
+ Name: "project-key",
+ In: "path",
+ Description: "The project key",
Type: "string",
},
{
- Name: "project-key",
+ Name: "flag-key",
In: "path",
- Description: "The project key",
+ Description: "The flag key",
Type: "string",
},
{
- Name: "policy-key",
+ Name: "phase-id",
In: "path",
- Description: "The human-readable key of the release policy",
+ Description: "The phase ID",
Type: "string",
},
},
HTTPMethod: "PUT",
HasBody: true,
- IsBeta: true,
+ IsBeta: false,
RequiresBody: true,
- Path: "/api/v2/projects/{projectKey}/release-policies/{policyKey}",
+ Path: "/api/v2/projects/{projectKey}/flags/{flagKey}/release/phases/{phaseId}",
SupportsSemanticPatch: false,
})
@@ -11628,6 +11920,44 @@ func AddAllResourceCmds(
SupportsSemanticPatch: false,
})
+ NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Delete a scheduled change for a segment",
+ Long: "Delete a scheduled change before its execution date, so that its instructions are never applied to the segment.\n\nDeleting a change with a `failed` status removes it from the segment's scheduled changes. Its instructions were not applied.\n\nThe caller must be allowed to update scheduled changes on the segment.\n\nIf an approval request scheduled the change, deleting the change also terminates that request, so it cannot be applied again. Declining the request is only an option while it is still awaiting review. Once it is applied, its instructions belong to a scheduled change, and this endpoint is how to stop them.\n\nReturns 409 if the scheduled change is already being applied or has already run.\n",
+ Use: "delete-scheduled-change",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "segment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "id",
+ In: "path",
+ Description: "The ID of the scheduled change",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "DELETE",
+ HasBody: false,
+ IsBeta: false,
+ RequiresBody: false,
+ Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/scheduled-changes/{id}",
+ SupportsSemanticPatch: false,
+ })
+
NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{
Short: "Get big segment export",
Long: "Returns information about a big segment export process. This is an export for a synced segment or a list-based segment that can include more than 15,000 entries.",
@@ -11902,6 +12232,76 @@ func AddAllResourceCmds(
SupportsSemanticPatch: false,
})
+ NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Get a scheduled change for a segment",
+ Long: "Get one scheduled change that has not been applied yet, or that failed to apply. Returns 404 if the ID is not a scheduled change for the segment in the path.\n\nThe caller must be allowed to view the segment's project.\n",
+ Use: "get-scheduled-change",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "segment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "id",
+ In: "path",
+ Description: "The ID of the scheduled change",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "GET",
+ HasBody: false,
+ IsBeta: false,
+ RequiresBody: false,
+ Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/scheduled-changes/{id}",
+ SupportsSemanticPatch: false,
+ })
+
+ NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "List scheduled changes for a segment",
+ Long: "Get every scheduled change for a segment that has not been applied yet, plus any that failed to apply, soonest first. Use the `status` of each change to tell them apart.\n\nThe caller must be allowed to view the segment's project.\n",
+ Use: "list-scheduled-changes",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "segment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "GET",
+ HasBody: false,
+ IsBeta: false,
+ RequiresBody: false,
+ Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/scheduled-changes",
+ SupportsSemanticPatch: false,
+ })
+
NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{
Short: "List segments",
Long: "Get a list of all segments in the given project.\n\nSegments can be rule-based, list-based, or synced. Big segments include larger list-based segments and synced segments. Some fields in the response only apply to big segments.\n\n### Filtering segments\n\nThe `filter` parameter supports the following operators: `equals`, `anyOf`, and `exists`.\n\nYou can also combine filters in the following ways:\n\n- Use a comma (`,`) as an AND operator\n- Use a vertical bar (`|`) as an OR operator\n- Use parentheses (`()`) to group filters\n\n#### Supported fields and operators\n\nYou can only filter certain fields in segments when using the `filter` parameter. Additionally, you can only filter some fields with certain operators.\n\nWhen you search for segments, the `filter` parameter supports the following fields and operators:\n\n|\u003cdiv style=\"width:120px\"\u003eField\u003c/div\u003e |Description |Supported operators |\n|---|---|---|\n| `excludedKeys` | The segment keys of segments to exclude from the results. | `anyOf` |\n| `external` | Whether the segment is a synced segment. | `exists` |\n| `includedKeys` | The segment keys of segments to include in the results. | `anyOf` |\n| `query` | A \"fuzzy\" search across segment key, name, and description. Supply a string or list of strings to the operator. | `equals` |\n| `tags` | The segment tags. | `anyOf` |\n| `unbounded` | Whether the segment is a standard segment (`false`) or a big segment (`true`). Standard segments include rule-based segments and smaller list-based segments. Big segments include larger list-based segments and synced segments. | `equals` |\n\nHere are a few examples:\n\n* The filter `?filter=tags anyOf [\"enterprise\", \"beta\"],query equals \"toggle\"` matches segments with \"toggle\" in their key, name, or description that also have \"enterprise\" or \"beta\" as a tag.\n* The filter `?filter=excludedKeys anyOf [\"segmentKey1\", \"segmentKey2\"]` excludes the segments with those keys from the results.\n* The filter `?filter=unbounded equals true` matches larger list-based segments and synced segments.\n\nThe documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=tags anyOf [\"enterprise\", \"beta\"]` must be encoded to `%5B`.\n",
@@ -12054,6 +12454,44 @@ func AddAllResourceCmds(
SupportsSemanticPatch: true,
})
+ NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Update a scheduled change for a segment",
+ Long: "Edit the execution date and/or the comment of a scheduled change that has not been applied yet. A field you leave out is unchanged, and an empty comment clears the comment.\n\nThe caller must be allowed to update scheduled changes on the segment, and must also be allowed to make the change's instructions directly. If the segment requires approvals, the caller must also be allowed to bypass them.\n\nReturns 409 if the scheduled change is already being applied or was changed by someone else in the meantime.\n",
+ Use: "update-scheduled-change",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "segment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "id",
+ In: "path",
+ Description: "The ID of the scheduled change",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "PATCH",
+ HasBody: true,
+ IsBeta: false,
+ RequiresBody: true,
+ Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/scheduled-changes/{id}",
+ SupportsSemanticPatch: false,
+ })
+
NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{
Short: "Create segment",
Long: "Create a new segment. The new segment has no individual targets or rules.\n\nThe request body only accepts the fields documented below. If you include targeting fields such as `included`, `excluded`, `includedContexts`, `excludedContexts`, or `rules`, LaunchDarkly ignores them and does not return an error. These fields are empty in the response.\n\nTo add individual targets or rules after you create the segment, use [Update segment](https://launchdarkly.com/docs/api/segments/patch-segment) with a semantic patch. For example, use the `addIncludedTargets` or `addExcludedTargets` instruction to add individual targets, and the `addRule` instruction to add a rule. For big segments, use the `addBigSegmentIncludedTargets` or `addBigSegmentExcludedTargets` instruction.\n",
@@ -12080,6 +12518,38 @@ func AddAllResourceCmds(
SupportsSemanticPatch: true,
})
+ NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{
+ Short: "Create a scheduled change for a segment",
+ Long: "Schedule semantic patch instructions to be applied to a segment at a future time.\n\nEach instruction uses the same format as an instruction in a semantic patch request to update a segment. Send between 1 and 100 instructions. LaunchDarkly rejects the request with a 400 if an instruction has an unknown `kind` or is malformed.\n\nThe caller must be allowed to update scheduled changes on the segment, and must also be allowed to make each instruction's change directly. If the segment requires approvals for an instruction, the caller must also be allowed to bypass them. Otherwise, request the change through an approval request instead. To learn more about semantic patches, read [Updates](/reference#updates-using-semantic-patch).\n",
+ Use: "create-scheduled-change",
+ Params: []Param{
+ {
+ Name: "project-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "environment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ {
+ Name: "segment-key",
+ In: "path",
+ Description: "",
+ Type: "string",
+ },
+ },
+ HTTPMethod: "POST",
+ HasBody: true,
+ IsBeta: false,
+ RequiresBody: true,
+ Path: "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/scheduled-changes",
+ SupportsSemanticPatch: true,
+ })
+
NewOperationCmd(gen_SegmentsResourceCmd, client, markdownRenderer, OperationData{
Short: "Update context targets on a big segment",
Long: "Update context targets included or excluded in a big segment. Big segments include larger list-based segments and synced segments. This operation does not support standard segments.",
diff --git a/cmd/resources/resource_utils.go b/cmd/resources/resource_utils.go
index a40fc80d1..352894c82 100644
--- a/cmd/resources/resource_utils.go
+++ b/cmd/resources/resource_utils.go
@@ -41,6 +41,11 @@ func getResourceNames(name string) (string, string) {
}
var mapOperationIdToCmdUse = map[string]string{
+ // The generated verb misdescribes these operations, which set or clear
+ // which plan is the default. The names follow the operation summaries.
+ "DeleteDefaultEnvironmentReleasePlan": "clear-default",
+ "PutDefaultEnvironmentReleasePlan": "set-default",
+
"createSubscription": "create",
"createTriggerWorkflow": "create",
"deleteDestination": "delete",
diff --git a/ld-openapi.json b/ld-openapi.json
index c73ab61e1..1da19a81b 100644
--- a/ld-openapi.json
+++ b/ld-openapi.json
@@ -93,9 +93,13 @@
"name": "Data Export destinations",
"description": "> ### Data Export is an add-on feature\n>\n> Data Export is available as an add-on for customers on a Foundation or Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nData Export provides a real-time export of raw analytics data, including feature flag requests, analytics events, custom events, and more.\n\nData Export destinations are locations that receive exported data. The Data Export destinations API allows you to configure destinations so that your data can be exported.\n\nSeveral of the endpoints in the Data Export destinations API require a Data Export destination ID. The Data Export destination ID is returned as part of the [Create a Data Export destination](https://launchdarkly.com/docs/api/data-export-destinations/post-destination) and [List destinations](https://launchdarkly.com/docs/api/data-export-destinations/get-destinations) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n\nTo learn more, read [Data Export](https://launchdarkly.com/docs/integrations/data-export).\n"
},
+ {
+ "name": "Environment release plans (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\nAn environment release plan is a reusable release configuration for one environment. Each plan has an ordered list of phases that [progressively](https://launchdarkly.com/docs/home/releases/progressive-rollouts) roll out a new flag variation to an audience, and can [guard](https://launchdarkly.com/docs/home/releases/guarded-rollouts) one or more metrics to monitor for regressions. When you start a release in that environment, you can select one of its plans instead of configuring the release from scratch. An environment can also have a default release plan, which is preselected when you start a release.\n\nUse the environment release plans API to create, list, view, update, and delete the release plans in an environment, and to read, set, or clear an environment's default release plan. Environment release plans replace release policies.\n"
+ },
{
"name": "Environment 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\nAn environment release [progressively](https://launchdarkly.com/docs/home/releases/progressive-rollouts#progressive-rollouts) rolls out a new flag variation in one environment. On select plans, you can [guard](https://launchdarkly.com/docs/home/releases/guarded-rollouts) one or more metrics, monitoring them for regressions. Use the environment releases API to list releases, get a release, start a release, or stop an active release.\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\nAn environment release [progressively](https://launchdarkly.com/docs/home/releases/progressive-rollouts) rolls out a new flag variation in one environment. On select plans, you can [guard](https://launchdarkly.com/docs/home/releases/guarded-rollouts) one or more metrics, monitoring them for regressions. Use the environment releases API to list releases, get a release, start a release, or stop an active release.\n"
},
{
"name": "Environments",
@@ -121,6 +125,10 @@
"name": "Flag links (beta)",
"description": "> ### This feature is in beta\n>\n> To use this feature, pass in a header including the `LD-API-Version` key with value set to `beta`. Use this header with each call. To learn more, read [Beta resources](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\nFlag links let you view external mentions of flags from other tools and services. Links to external conversations and references to your flags allow you to collaborate more easily and quickly review relevant flag contexts. To learn more, read [Flag links](https://launchdarkly.com/docs/home/flags/links).\n\nYou can create custom flag links by associating an external URL with a feature flag. After you create a flag link, it applies across all your environments. You should use caution when you delete a flag link, because it will be deleted from all your environments.\n\nWith the flag links API, you can view, create, update, and delete links to flags.\n\nSeveral of the endpoints in the flag links API require a flag link ID. The flag link ID is returned as part of the [Create flag link](https://launchdarkly.com/docs/api/flag-links-beta/create-flag-link) and [List flag links](https://launchdarkly.com/docs/api/flag-links-beta/get-flag-links) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n"
},
+ {
+ "name": "Flag release plans (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\nA flag release plan is a reusable release configuration for a flag across the environments in a project. It lists the environments to release to, the order to release them in, and how each one releases: either immediately or by running one of that environment's [environment release plans](https://launchdarkly.com/docs/api/environment-release-plans-beta). Each environment also has a trigger that starts its release, such as a manual start or a promotion from the previous environment. A project can have one default flag release plan.\n\nUse the flag release plans API to create, list, view, update, and delete the flag release plans in a project.\n"
+ },
{
"name": "Flag triggers",
"description": "> ### Flag triggers is an Enterprise feature\n>\n> Flag triggers 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\nFlag triggers let you initiate flag changes remotely using a unique webhook URL. For example, you can integrate triggers with your existing tools to enable or disable flags when you hit specific operational health thresholds or receive certain alerts. To learn more, read [Flag triggers](https://launchdarkly.com/docs/home/releases/triggers).\n\nWith the flag triggers API, you can create, delete, and manage triggers.\n\nSeveral of the endpoints in the flag triggers API require a flag trigger ID. The flag trigger ID is returned as part of the [Create flag trigger](https://launchdarkly.com/docs/api/flag-triggers/create-trigger-workflow) and [List flag triggers](https://launchdarkly.com/docs/api/flag-triggers/get-trigger-workflows) responses. It is the `_id` field, or the `_id` field of each element in the `items` array.\n"
@@ -205,10 +213,6 @@
"name": "Release pipelines (deprecated)",
"description": "> ### Release pipelines are deprecated\n>\n> Release pipelines and the endpoints in this section are deprecated.\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\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 an existing release pipeline, you create a \"release\" to automate that flag's progress through the pipeline's phases. Use the release endpoints in this section 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/release-pipelines-deprecated/create-release-for-flag) or [Get the release for a flag](https://launchdarkly.com/docs/api/release-pipelines-deprecated/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/release-pipelines-deprecated/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"
},
- {
- "name": "Release policies (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\n> ### This feature is deprecated\n>\n> The release policies API is deprecated and will be removed. Release policies continue to work during the deprecation period. LaunchDarkly will announce the exact dates for end of support and removal of access separately.\n\nRelease policies let you specify your preferred rollout method for a given set of environments.\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\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"
@@ -219,7 +223,7 @@
},
{
"name": "Segments",
- "description": "\n> ### Synced segments and larger list-based segments are an Enterprise feature\n>\n> This section documents endpoints for rule-based, list-based, and synced segments.\n>\n> A \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n>\n> In the segments API, a big segment is indicated by the `unbounded` field being set to `true`.\n>\n> These segments are available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nSegments are groups of contexts that you can use to manage flag targeting behavior in bulk. LaunchDarkly supports:\n\n* rule-based segments, which let you target groups of contexts individually or by attribute,\n* list-based segments, which let you target individual contexts or uploaded lists of contexts, and\n* synced segments, which let you target groups of contexts backed by an external data store.\n\nTo learn more, read [Segments](https://launchdarkly.com/docs/home/flags/segments).\n\nThe segments API allows you to list, create, modify, and delete segments programmatically.\n\nYou can find other APIs for working with big segments under [Persistent store integrations (beta)](https://launchdarkly.com/docs/api/persistent-store-integrations-beta).\n"
+ "description": "\n> ### Synced segments and larger list-based segments are an Enterprise feature\n>\n> This section documents endpoints for rule-based, list-based, and synced segments.\n>\n> A \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance.\n>\n> In the segments API, a big segment is indicated by the `unbounded` field being set to `true`.\n>\n> These segments are available to customers on an Enterprise plan. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/).\n\nSegments are groups of contexts that you can use to manage flag targeting behavior in bulk. LaunchDarkly supports:\n\n* rule-based segments, which let you target groups of contexts individually or by attribute,\n* list-based segments, which let you target individual contexts or uploaded lists of contexts, and\n* synced segments, which let you target groups of contexts backed by an external data store.\n\nTo learn more, read [Segments](https://launchdarkly.com/docs/home/flags/segments).\n\nThe segments API allows you to list, create, modify, and delete segments programmatically.\n\nYou can also schedule segment changes that take effect at a later time. Scheduled changes use the same semantic patch instructions as updating a segment. You can list, edit, and delete scheduled changes for each segment. Use the `scheduled-changes` endpoints to manage them.\n\nYou can find other APIs for working with big segments under [Persistent store integrations (beta)](https://launchdarkly.com/docs/api/persistent-store-integrations-beta).\n"
},
{
"name": "Tags",
@@ -2344,6 +2348,16 @@
"format": "string",
"description": "An access token ID that lets you filter audit log listings by the token that made the change. Repeat the parameter to filter by multiple tokens."
}
+ },
+ {
+ "name": "rollup",
+ "in": "query",
+ "description": "Set to 1 to return rolled-up audit log entries, which group related changes into one entry. By default, entries aren't rolled up.",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Set to 1 to return rolled-up audit log entries, which group related changes into one entry. By default, entries aren't rolled up."
+ }
}
],
"requestBody": {
@@ -6028,7 +6042,7 @@
"Feature flags"
],
"summary": "Update feature flag",
- "description": "Perform a partial update to a feature flag. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://launchdarkly.com/docs/api#updates).\n\n### Using semantic patches on a feature flag\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating feature flags takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment.\n* `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating feature flags.\n\n\nClick to expand instructions for turning flags on and off
\n\nThese instructions require the `environmentKey` parameter.\n\n#### turnFlagOff\n\nSets the flag's targeting state to **Off**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOff\" } ]\n}\n```\n\n#### turnFlagOn\n\nSets the flag's targeting state to **On**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOn\" } ]\n}\n```\n\n
\n\n\nClick to expand instructions for working with targeting and variations
\n\nThese instructions require the `environmentKey` parameter.\n\nSeveral of the instructions for working with targeting and variations require flag rule IDs, variation IDs, or clause IDs as parameters. Each of these are returned as part of the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) response. The flag rule ID is the `_id` field of each element in the `rules` array within each environment listed in the `environments` object. The variation ID is the `_id` field in each element of the `variations` array. The clause ID is the `_id` field of each element of the `clauses` array within the `rules` array within each environment listed in the `environments` object.\n\n#### addClauses\n\nAdds the given clauses to the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauses\": [{\n\t\t\t\"contextKind\": \"user\",\n\t\t\t\"attribute\": \"country\",\n\t\t\t\"op\": \"in\",\n\t\t\t\"negate\": false,\n\t\t\t\"values\": [\"USA\", \"Canada\"]\n\t\t}]\n\t}]\n}\n```\n\n#### addPrerequisite\n\nAdds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter.\n\n##### Parameters\n\n- `key`: Flag key of the prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addPrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addRule\n\nAdds a new targeting rule to the flag. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate.\n\nIf you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list.\n\n##### Parameters\n\n- `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n- `beforeRuleId`: (Optional) ID of a flag rule.\n- Either\n - `variationId`: ID of a variation of the flag.\n\n or\n\n - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000).\n - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n - `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }]\n }]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }],\n \"rolloutContextKind\": \"organization\",\n \"rolloutWeights\": {\n \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n }\n }]\n}\n```\n\n#### addTargets\n\nAdds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the flag to target the same context key in multiple variations.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addUserTargets\n\nAdds user keys to the individual user targets for the variation that `variationId` specifies. Returns an error if this causes the flag to target the same user key in multiple variations. If you are working with contexts, use `addTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addValuesToClause\n\nAdds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addValuesToClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### addVariation\n\nAdds a variation to the flag.\n\n##### Parameters\n\n- `value`: The variation value.\n- `name`: (Optional) The variation name.\n- `description`: (Optional) A description for the variation.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ]\n}\n```\n\n#### clearTargets\n\nRemoves all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### clearUserTargets\n\nRemoves all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"]\n\t}]\n}\n```\n\n#### removePrerequisite\n\nRemoves the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ]\n}\n```\n\n#### removeRule\n\nRemoves the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ]\n}\n```\n\n#### removeTargets\n\nRemoves context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeUserTargets\n\nRemoves user keys from the individual user targets for the variation that `variationId` specifies. Does nothing if the flag does not target the user keys. If you are working with contexts, use `removeTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeValuesFromClause\n\nRemoves `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeValuesFromClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### removeVariation\n\nRemoves a variation from the flag.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag to remove.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### reorderRules\n\nRearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the flag.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all rules in the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"reorderRules\",\n\t\t\"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n\t}]\n}\n```\n\n#### replacePrerequisites\n\nRemoves all existing prerequisites and replaces them with the list you provide.\n\n##### Parameters\n\n- `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replacePrerequisites\",\n \"prerequisites\": [\n {\n \"key\": \"prereq-flag-key-123abc\",\n \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\"\n },\n {\n \"key\": \"another-prereq-flag-key-456def\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\"\n }\n ]\n }\n ]\n}\n```\n\n#### replaceRules\n\nRemoves all targeting rules for the flag and replaces them with the list you provide.\n\n##### Parameters\n\n- `rules`: A list of rules.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceRules\",\n \"rules\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"description\": \"My new rule\",\n \"clauses\": [\n {\n \"contextKind\": \"user\",\n \"attribute\": \"segmentMatch\",\n \"op\": \"segmentMatch\",\n \"values\": [\"test\"]\n }\n ],\n \"trackEvents\": true\n }\n ]\n }\n ]\n}\n```\n\n#### replaceTargets\n\nRemoves all existing targeting and replaces it with the list of targets you provide.\n\n##### Parameters\n\n- `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceTargets\",\n \"targets\": [\n {\n \"contextKind\": \"user\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\"]\n },\n {\n \"contextKind\": \"device\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"device-key-456def\"]\n }\n ]\n } \n ]\n}\n```\n\n#### replaceUserTargets\n\nRemoves all existing user targeting and replaces it with the list of targets you provide. In the list of targets, you must include a target for each of the flag's variations. If you are working with contexts, use `replaceTargets` instead of this instruction.\n\n##### Parameters\n\n- `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceUserTargets\",\n \"targets\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\", \"user-key-456def\"]\n },\n {\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"user-key-789ghi\"]\n }\n ]\n }\n ]\n}\n```\n\n#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"updateClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\",\n \"clause\": {\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Mexico\", \"Canada\"]\n }\n }]\n}\n```\n\n#### updateDefaultVariation\n\nUpdates the default on or off variation of the flag.\n\n##### Parameters\n\n- `onVariationValue`: (Optional) The value of the variation of the new on variation.\n- `offVariationValue`: (Optional) The value of the variation of the new off variation\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ]\n}\n```\n\n#### updateFallthroughVariationOrRollout\n\nUpdates the default or \"fallthrough\" rule for the flag, which the flag serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nor\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"rolloutContextKind\": \"user\",\n\t\t\"rolloutWeights\": {\n\t\t\t\"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n\t\t\t\"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n\t\t}\n\t}]\n}\n```\n\n#### updateOffVariation\n\nUpdates the default off variation to `variationId`. The flag serves the default off variation when the flag's targeting is **Off**.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### updatePrerequisite\n\nChanges the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updatePrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateRuleDescription\n\nUpdates the description of the feature flag rule.\n\n##### Parameters\n\n- `description`: The new human-readable description for this rule.\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleDescription\",\n\t\t\"description\": \"New rule description\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n\t}]\n}\n```\n\n#### updateRuleTrackEvents\n\nUpdates whether the SDK sends a detailed event for every evaluation of this rule, instead of only summary counts. Required for Data Export, but doesn't enable Data Export on its own.\n\n##### Parameters\n\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n- `trackEvents`: Whether or not detailed events are sent for this rule.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleTrackEvents\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"trackEvents\": true\n\t}]\n}\n```\n\n#### updateRuleVariationOrRollout\n\nUpdates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `variationId`: ID of a variation of the flag.\n\n or\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleVariationOrRollout\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether the SDK sends detailed evaluation events for this flag, for all rules. Required for Data Export, but doesn't enable Data Export on its own.\n\n##### Parameters\n\n- `trackEvents`: Whether or not detailed events are sent for this flag.\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 the SDK sends detailed evaluation events for the flag's default rule. Required for Data Export, but doesn't enable Data Export on its own.\n\n##### Parameters\n\n- `trackEvents`: Whether or not detailed events are sent for the default rule.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ]\n}\n```\n\n#### updateVariation\n\nUpdates a variation of the flag.\n\n##### Parameters\n\n- `variationId`: The ID of the variation to update.\n- `name`: (Optional) The updated variation name.\n- `value`: (Optional) The updated variation value.\n- `description`: (Optional) The updated variation description.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ]\n}\n```\n\n
\n\n\nClick to expand instructions for updating flag settings
\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### addCustomProperties\n\nAdds a new custom property to the feature flag. Custom properties are used to associate feature flags with LaunchDarkly integrations. For example, if you create an integration with an issue tracking service, you may want to associate a flag with a list of issues related to a feature's development.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"addCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"name\": \"Example custom property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### addTags\n\nAdds tags to the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### makeFlagPermanent\n\nMarks the feature flag as permanent. LaunchDarkly does not prompt you to remove permanent flags, even if one variation is rolled out to all your customers.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagPermanent\" } ]\n}\n```\n\n#### makeFlagTemporary\n\nMarks the feature flag as temporary.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagTemporary\" } ]\n}\n```\n\n#### removeCustomProperties\n\nRemoves the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `values`: A list of the associated values to remove from the custom property.\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"replaceCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### removeMaintainer\n\nRemoves the flag's maintainer. To set a new maintainer, use the `updateMaintainerMember` or `updateMaintainerTeam` instructions.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeMaintainer\" } ]\n}\n```\n\n#### removeTags\n\nRemoves tags from the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### replaceCustomProperties\n\nReplaces the existing associated values for a custom property with the new values.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the new associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceCustomProperties\",\n \"key\": \"example-custom-property\",\n \"name\": \"Example custom property\",\n \"values\": [\"value1\", \"value2\"]\n }]\n}\n```\n\n#### turnOffClientSideAvailability\n\nTurns off client-side SDK availability for the flag. This is equivalent to unchecking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn off availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOffClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### turnOnClientSideAvailability\n\nTurns on client-side SDK availability for the flag. This is equivalent to checking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn on availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOnClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### updateDescription\n\nUpdates the feature flag description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateDescription\", \"value\": \"Updated flag description\" } ]\n}\n```\n#### updateMaintainerMember\n\nUpdates the maintainer of the flag to an existing member and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The ID of the member.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerMember\", \"value\": \"61e9b714fd47591727db558a\" } ]\n}\n```\n\n#### updateMaintainerTeam\n\nUpdates the maintainer of the flag to an existing team and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The key of the team.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerTeam\", \"value\": \"example-team-key\" } ]\n}\n```\n\n#### updateName\n\nUpdates the feature flag name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateName\", \"value\": \"Updated flag name\" } ]\n}\n```\n\n
\n\n\nClick to expand instructions for updating the flag lifecycle
\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### archiveFlag\n\nArchives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.\n\n```json\n{\n \"instructions\": [ { \"kind\": \"archiveFlag\" } ]\n}\n```\n\n#### deleteFlag\n\nDeletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deleteFlag\" } ]\n}\n```\n\n#### deprecateFlag\n\nDeprecates the feature flag. This hides it from the live flags list without archiving or deleting it.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deprecateFlag\" } ]\n}\n```\n\n#### restoreDeprecatedFlag\n\nRestores the feature flag if it was previously deprecated.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ]\n}\n```\n\n#### restoreFlag\n\nRestores the feature flag if it was previously archived.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreFlag\" } ]\n}\n```\n\n \n\n### Using JSON patches on a feature flag\n\nIf you do not include the semantic patch header described above, you can use a [JSON patch](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\nIn the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update.\n\nThere are a few special cases to keep in mind when determining the value of the `path` element:\n\n * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/0/values/-\",\n \"value\": \"TestClient10\"\n }\n ]\n ```\n\n * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/-\",\n \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] }\n }\n ]\n ```\n\n * To add a flag to a release pipeline, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/releasePipelineKey\",\n \"value\": \"example-release-pipeline-key\"\n }\n ]\n ```\n\n### Required approvals\nIf a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals).\n\n### Conflicts\nIf a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`.\n\n### Migration flags\nFor migration flags, the cohort information is included in the `rules` property of a flag's response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag's response. You can update the default cohort by updating `fallthrough`.\nWhen you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`.\nTo learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration).\n",
+ "description": "Perform a partial update to a feature flag. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://launchdarkly.com/docs/api#updates).\n\n### Using semantic patches on a feature flag\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\nThe body of a semantic patch request for updating feature flags takes the following properties:\n\n* `comment` (string): (Optional) A description of the update.\n* `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment.\n* `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions.\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating feature flags.\n\n\nClick to expand instructions for turning flags on and off
\n\nThese instructions require the `environmentKey` parameter.\n\n#### turnFlagOff\n\nSets the flag's targeting state to **Off**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOff\" } ]\n}\n```\n\n#### turnFlagOn\n\nSets the flag's targeting state to **On**.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"turnFlagOn\" } ]\n}\n```\n\n
\n\n\nClick to expand instructions for working with targeting and variations
\n\nThese instructions require the `environmentKey` parameter.\n\nSeveral of the instructions for working with targeting and variations require flag rule IDs, variation IDs, or clause IDs as parameters. Each of these are returned as part of the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) response. The flag rule ID is the `_id` field of each element in the `rules` array within each environment listed in the `environments` object. The variation ID is the `_id` field in each element of the `variations` array. The clause ID is the `_id` field of each element of the `clauses` array within the `rules` array within each environment listed in the `environments` object.\n\n#### addClauses\n\nAdds the given clauses to the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauses\": [{\n\t\t\t\"contextKind\": \"user\",\n\t\t\t\"attribute\": \"country\",\n\t\t\t\"op\": \"in\",\n\t\t\t\"negate\": false,\n\t\t\t\"values\": [\"USA\", \"Canada\"]\n\t\t}]\n\t}]\n}\n```\n\n#### addPrerequisite\n\nAdds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter.\n\n##### Parameters\n\n- `key`: Flag key of the prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addPrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addRule\n\nAdds a new targeting rule to the flag. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate.\n\nIf you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list.\n\n##### Parameters\n\n- `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n- `beforeRuleId`: (Optional) ID of a flag rule.\n- Either\n - `variationId`: ID of a variation of the flag.\n\n or\n\n - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000).\n - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n - `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }]\n }]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"addRule\",\n \"clauses\": [{\n \"contextKind\": \"organization\",\n \"attribute\": \"located_in\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Sweden\", \"Norway\"]\n }],\n \"rolloutContextKind\": \"organization\",\n \"rolloutWeights\": {\n \"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n \"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n }\n }]\n}\n```\n\n#### addTargets\n\nAdds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the flag to target the same context key in multiple variations.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addUserTargets\n\nAdds user keys to the individual user targets for the variation that `variationId` specifies. Returns an error if this causes the flag to target the same user key in multiple variations. If you are working with contexts, use `addTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### addValuesToClause\n\nAdds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"addValuesToClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### addVariation\n\nAdds a variation to the flag.\n\n##### Parameters\n\n- `value`: The variation value.\n- `name`: (Optional) The variation name.\n- `description`: (Optional) A description for the variation.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"addVariation\", \"value\": 20, \"name\": \"New variation\" } ]\n}\n```\n\n#### clearTargets\n\nRemoves all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### clearUserTargets\n\nRemoves all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction.\n\n##### Parameters\n\n- `variationId`: ID of a variation on the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"clearUserTargets\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### removeClauses\n\nRemoves the clauses specified by `clauseIds` from the rule indicated by `ruleId`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseIds`: Array of IDs of clauses in the rule.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeClauses\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"]\n\t}]\n}\n```\n\n#### removePrerequisite\n\nRemoves the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removePrerequisite\", \"key\": \"prereq-flag-key-123abc\" } ]\n}\n```\n\n#### removeRule\n\nRemoves the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" } ]\n}\n```\n\n#### removeTargets\n\nRemoves context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys.\n\n##### Parameters\n\n- `values`: List of context keys.\n- `contextKind`: (Optional) Context kind to target, defaults to `user`\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeTargets\",\n\t\t\"values\": [\"context-key-123abc\", \"context-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeUserTargets\n\nRemoves user keys from the individual user targets for the variation that `variationId` specifies. Does nothing if the flag does not target the user keys. If you are working with contexts, use `removeTargets` instead of this instruction.\n\n##### Parameters\n\n- `values`: List of user keys.\n- `variationId`: ID of a flag variation.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeUserTargets\",\n\t\t\"values\": [\"user-key-123abc\", \"user-key-456def\"],\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### removeValuesFromClause\n\nRemoves `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `values`: Array of strings, case sensitive.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"removeValuesFromClause\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\",\n\t\t\"values\": [\"beta_testers\"]\n\t}]\n}\n```\n\n#### removeVariation\n\nRemoves a variation from the flag.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag to remove.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"removeVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### reorderRules\n\nRearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the flag.\n\n##### Parameters\n\n- `ruleIds`: Array of IDs of all rules in the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"reorderRules\",\n\t\t\"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"]\n\t}]\n}\n```\n\n#### replacePrerequisites\n\nRemoves all existing prerequisites and replaces them with the list you provide.\n\n##### Parameters\n\n- `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replacePrerequisites\",\n \"prerequisites\": [\n {\n \"key\": \"prereq-flag-key-123abc\",\n \"variationId\": \"10a58772-3121-400f-846b-b8a04e8944ed\"\n },\n {\n \"key\": \"another-prereq-flag-key-456def\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\"\n }\n ]\n }\n ]\n}\n```\n\n#### replaceRules\n\nRemoves all targeting rules for the flag and replaces them with the list you provide.\n\n##### Parameters\n\n- `rules`: A list of rules.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceRules\",\n \"rules\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"description\": \"My new rule\",\n \"clauses\": [\n {\n \"contextKind\": \"user\",\n \"attribute\": \"segmentMatch\",\n \"op\": \"segmentMatch\",\n \"values\": [\"test\"]\n }\n ],\n \"trackEvents\": true\n }\n ]\n }\n ]\n}\n```\n\n#### replaceTargets\n\nRemoves all existing targeting and replaces it with the list of targets you provide.\n\n##### Parameters\n\n- `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceTargets\",\n \"targets\": [\n {\n \"contextKind\": \"user\",\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\"]\n },\n {\n \"contextKind\": \"device\",\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"device-key-456def\"]\n }\n ]\n } \n ]\n}\n```\n\n#### replaceUserTargets\n\nRemoves all existing user targeting and replaces it with the list of targets you provide. In the list of targets, you must include a target for each of the flag's variations. If you are working with contexts, use `replaceTargets` instead of this instruction.\n\n##### Parameters\n\n- `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [\n {\n \"kind\": \"replaceUserTargets\",\n \"targets\": [\n {\n \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\",\n \"values\": [\"user-key-123abc\", \"user-key-456def\"]\n },\n {\n \"variationId\": \"e5830889-1ec5-4b0c-9cc9-c48790090c43\",\n \"values\": [\"user-key-789ghi\"]\n }\n ]\n }\n ]\n}\n```\n\n#### updateClause\n\nReplaces the clause indicated by `ruleId` and `clauseId` with `clause`.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `clauseId`: ID of a clause in that rule.\n- `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [{\n \"kind\": \"updateClause\",\n \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\",\n \"clause\": {\n \"contextKind\": \"user\",\n \"attribute\": \"country\",\n \"op\": \"in\",\n \"negate\": false,\n \"values\": [\"Mexico\", \"Canada\"]\n }\n }]\n}\n```\n\n#### updateDefaultVariation\n\nUpdates the default on or off variation of the flag.\n\n##### Parameters\n\n- `onVariationValue`: (Optional) The value of the variation of the new on variation.\n- `offVariationValue`: (Optional) The value of the variation of the new off variation\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateDefaultVariation\", \"OnVariationValue\": true, \"OffVariationValue\": false } ]\n}\n```\n\n#### updateFallthroughVariationOrRollout\n\nUpdates the default or \"fallthrough\" rule for the flag, which the flag serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nor\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example that uses a `variationId`:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\nHere's an example that uses a percentage rollout:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateFallthroughVariationOrRollout\",\n\t\t\"rolloutContextKind\": \"user\",\n\t\t\"rolloutWeights\": {\n\t\t\t\"2f43f67c-3e4e-4945-a18a-26559378ca00\": 15000, // serve 15% this variation\n\t\t\t\"e5830889-1ec5-4b0c-9cc9-c48790090c43\": 85000 // serve 85% this variation\n\t\t}\n\t}]\n}\n```\n\n#### updateOffVariation\n\nUpdates the default off variation to `variationId`. The flag serves the default off variation when the flag's targeting is **Off**.\n\n##### Parameters\n\n- `variationId`: ID of a variation of the flag.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateOffVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\" } ]\n}\n```\n\n#### updatePrerequisite\n\nChanges the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist.\n\n##### Parameters\n\n- `key`: Flag key of an existing prerequisite flag.\n- `variationId`: ID of a variation of the prerequisite flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updatePrerequisite\",\n\t\t\"key\": \"example-prereq-flag-key\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateRuleDescription\n\nUpdates the description of the feature flag rule.\n\n##### Parameters\n\n- `description`: The new human-readable description for this rule.\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleDescription\",\n\t\t\"description\": \"New rule description\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\"\n\t}]\n}\n```\n\n#### updateRuleTrackEvents\n\nUpdates whether the SDK sends a detailed event for every evaluation of this rule, instead of only summary counts. Required for Data Export, but doesn't enable Data Export on its own.\n\n##### Parameters\n\n- `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.\n- `trackEvents`: Whether or not detailed events are sent for this rule.\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleTrackEvents\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"trackEvents\": true\n\t}]\n}\n```\n\n#### updateRuleVariationOrRollout\n\nUpdates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate.\n\n##### Parameters\n\n- `ruleId`: ID of a rule in the flag.\n- `variationId`: ID of a variation of the flag.\n\n or\n\n- `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).\n- `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.\n- `rolloutContextKind`: (Optional) Context kind, defaults to `user`\n\nHere's an example:\n\n```json\n{\n\t\"environmentKey\": \"environment-key-123abc\",\n\t\"instructions\": [{\n\t\t\"kind\": \"updateRuleVariationOrRollout\",\n\t\t\"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\",\n\t\t\"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\"\n\t}]\n}\n```\n\n#### updateTrackEvents\n\nUpdates whether the SDK sends detailed evaluation events for this flag, for all rules. Required for Data Export, but doesn't enable Data Export on its own.\n\n##### Parameters\n\n- `trackEvents`: Whether or not detailed events are sent for this flag.\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 the SDK sends detailed evaluation events for the flag's default rule. Required for Data Export, but doesn't enable Data Export on its own.\n\n##### Parameters\n\n- `trackEvents`: Whether or not detailed events are sent for the default rule.\n\nHere's an example:\n\n```json\n{\n \"environmentKey\": \"environment-key-123abc\",\n \"instructions\": [ { \"kind\": \"updateTrackEventsFallthrough\", \"trackEvents\": true } ]\n}\n```\n\n#### updateVariation\n\nUpdates a variation of the flag.\n\n##### Parameters\n\n- `variationId`: The ID of the variation to update.\n- `name`: (Optional) The updated variation name.\n- `value`: (Optional) The updated variation value.\n- `description`: (Optional) The updated variation description.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [ { \"kind\": \"updateVariation\", \"variationId\": \"2f43f67c-3e4e-4945-a18a-26559378ca00\", \"value\": 20 } ]\n}\n```\n\n
\n\n\nClick to expand instructions for updating flag settings
\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### addCustomProperties\n\nAdds a new custom property to the feature flag. Custom properties are used to associate feature flags with LaunchDarkly integrations. For example, if you create an integration with an issue tracking service, you may want to associate a flag with a list of issues related to a feature's development.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"addCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"name\": \"Example custom property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### addTags\n\nAdds tags to the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to add.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### makeFlagPermanent\n\nMarks the feature flag as permanent. LaunchDarkly does not prompt you to remove permanent flags, even if one variation is rolled out to all your customers.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagPermanent\" } ]\n}\n```\n\n#### makeFlagTemporary\n\nMarks the feature flag as temporary.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"makeFlagTemporary\" } ]\n}\n```\n\n#### removeCustomProperties\n\nRemoves the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `values`: A list of the associated values to remove from the custom property.\n\n```json\n{\n\t\"instructions\": [{\n\t\t\"kind\": \"replaceCustomProperties\",\n\t\t\"key\": \"example-custom-property\",\n\t\t\"values\": [\"value1\", \"value2\"]\n\t}]\n}\n```\n\n#### removeMaintainer\n\nRemoves the flag's maintainer. To set a new maintainer, use the `updateMaintainerMember` or `updateMaintainerTeam` instructions.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeMaintainer\" } ]\n}\n```\n\n#### removeTags\n\nRemoves tags from the feature flag.\n\n##### Parameters\n\n- `values`: A list of tags to remove.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] } ]\n}\n```\n\n#### replaceCustomProperties\n\nReplaces the existing associated values for a custom property with the new values.\n\n##### Parameters\n\n - `key`: The custom property key.\n - `name`: The custom property name.\n - `values`: A list of the new associated values for the custom property.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"replaceCustomProperties\",\n \"key\": \"example-custom-property\",\n \"name\": \"Example custom property\",\n \"values\": [\"value1\", \"value2\"]\n }]\n}\n```\n\n#### turnOffClientSideAvailability\n\nTurns off client-side SDK availability for the flag. This is equivalent to unchecking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn off availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOffClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### turnOnClientSideAvailability\n\nTurns on client-side SDK availability for the flag. This is equivalent to checking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.\n\n##### Parameters\n\n- `value`: Use \"usingMobileKey\" to turn on availability for mobile SDKs. Use \"usingEnvironmentId\" to turn on availability for client-side SDKs.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"turnOnClientSideAvailability\", \"value\": \"usingMobileKey\" } ]\n}\n```\n\n#### updateDescription\n\nUpdates the feature flag description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateDescription\", \"value\": \"Updated flag description\" } ]\n}\n```\n#### updateMaintainerMember\n\nUpdates the maintainer of the flag to an existing member and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The ID of the member.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerMember\", \"value\": \"61e9b714fd47591727db558a\" } ]\n}\n```\n\n#### updateMaintainerTeam\n\nUpdates the maintainer of the flag to an existing team and removes the existing maintainer.\n\n##### Parameters\n\n- `value`: The key of the team.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateMaintainerTeam\", \"value\": \"example-team-key\" } ]\n}\n```\n\n#### updateName\n\nUpdates the feature flag name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"updateName\", \"value\": \"Updated flag name\" } ]\n}\n```\n\n
\n\n\nClick to expand instructions for updating the flag lifecycle
\n\nThese instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.\n\n#### archiveFlag\n\nArchives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.\n\n```json\n{\n \"instructions\": [ { \"kind\": \"archiveFlag\" } ]\n}\n```\n\n#### deleteFlag\n\nDeletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deleteFlag\" } ]\n}\n```\n\n#### deprecateFlag\n\nDeprecates the feature flag. This hides it from the live flags list without archiving or deleting it. You cannot deprecate an archived flag. If the flag is archived, this instruction fails with a `409` status code and makes no changes. To deprecate an archived flag, restore it with `restoreFlag` first.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"deprecateFlag\" } ]\n}\n```\n\n#### restoreDeprecatedFlag\n\nRestores the feature flag if it was previously deprecated. If the flag is archived, this instruction fails with a `409` status code and makes no changes. To restore an archived flag, use `restoreFlag`.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreDeprecatedFlag\" } ]\n}\n```\n\n#### restoreFlag\n\nRestores the feature flag if it was previously archived.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [ { \"kind\": \"restoreFlag\" } ]\n}\n```\n\n \n\n### Using JSON patches on a feature flag\n\nIf you do not include the semantic patch header described above, you can use a [JSON patch](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\nIn the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update.\n\nThere are a few special cases to keep in mind when determining the value of the `path` element:\n\n * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/0/values/-\",\n \"value\": \"TestClient10\"\n }\n ]\n ```\n\n * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/environments/devint/targets/-\",\n \"value\": { \"variation\": 0, \"values\": [\"TestClient10\"] }\n }\n ]\n ```\n\n * To add a flag to a release pipeline, the path for the JSON patch operation is:\n\n ```json\n [\n {\n \"op\": \"add\",\n \"path\": \"/releasePipelineKey\",\n \"value\": \"example-release-pipeline-key\"\n }\n ]\n ```\n\n### Required approvals\nIf a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals).\n\n### Conflicts\nIf a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`.\n\n### Migration flags\nFor migration flags, the cohort information is included in the `rules` property of a flag's response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag's response. You can update the default cohort by updating `fallthrough`.\nWhen you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`.\nTo learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration).\n",
"parameters": [
{
"name": "projectKey",
@@ -9617,7 +9631,7 @@
"Integrations (beta)"
],
"summary": "Get all configurations for the integration",
- "description": "Get all integration configurations with the specified integration key. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).).",
+ "description": "Get all integration configurations with the specified integration key. This endpoint does not include persistent store integrations or flag import configurations. To manage those, use the [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configuration](https://launchdarkly.com/docs/api/flag-import-configurations-beta) endpoints.",
"parameters": [
{
"name": "integrationKey",
@@ -9719,7 +9733,7 @@
"Integrations (beta)"
],
"summary": "Create integration configuration",
- "description": "Create a new integration configuration. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).)",
+ "description": "Create a new integration configuration. This endpoint does not include persistent store integrations or flag import configurations. To manage those, use the [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configuration](https://launchdarkly.com/docs/api/flag-import-configurations-beta) endpoints.",
"parameters": [
{
"name": "integrationKey",
@@ -9814,7 +9828,7 @@
"Integrations (beta)"
],
"summary": "Get an integration configuration",
- "description": "Get integration configuration with the specified ID. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).)",
+ "description": "Get integration configuration with the specified ID. This endpoint does not include persistent store integrations or flag import configurations. To manage those, use the [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configuration](https://launchdarkly.com/docs/api/flag-import-configurations-beta) endpoints.",
"parameters": [
{
"name": "integrationConfigurationId",
@@ -9990,7 +10004,7 @@
"Integrations (beta)"
],
"summary": "Delete integration configuration",
- "description": "Delete an integration configuration by ID. (Excludes [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configurations](https://launchdarkly.com/docs/api/flag-import-configurations-beta).)",
+ "description": "Delete an integration configuration by ID. This endpoint does not include persistent store integrations or flag import configurations. To manage those, use the [persistent store](https://launchdarkly.com/docs/api/persistent-store-integrations-beta) and [flag import configuration](https://launchdarkly.com/docs/api/flag-import-configurations-beta) endpoints.",
"parameters": [
{
"name": "integrationConfigurationId",
@@ -14436,7 +14450,7 @@
"Experiments"
],
"summary": "Patch experiment",
- "description": "Update an experiment. Updating an experiment uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating experiments.\n\n#### updateName\n\n> **Deprecated**: `updateName` will be removed in a future version. Use `updateExperimentFields` instead.\n\nUpdates the experiment name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Example updated experiment name\"\n }]\n}\n```\n\n#### updateDescription\n\n> **Deprecated**: `updateDescription` will be removed in a future version. Use `updateExperimentFields` instead.\n\nUpdates the experiment description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Example updated description\"\n }]\n}\n```\n\n#### updateExperimentFields\n\nUpdates one or more fields on an experiment or its current iteration. Each field update specifies an operation (`add`, `update`, or `remove`) and an optional value.\n\nWhich fields are mutable depends on the current iteration status. To discover which fields and operations are allowed, expand `mutableFieldsByStatus` on the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response.\n\n##### Parameters\n\n- `value`: An object mapping field names to field updates. Each field update has the following properties:\n - `operation`: The operation to perform. One of `add`, `update`, or `remove`.\n - `value`: The new value for the field. Required for `add` and `update` operations.\n\nTo find which fields are supported and which operations are allowed for each iteration status, expand `mutableFieldsByStatus` on the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExperimentFields\",\n \"value\": {\n \"name\": {\n \"operation\": \"update\",\n \"value\": \"Updated experiment name\"\n },\n \"tags\": {\n \"operation\": \"add\",\n \"value\": [\"tag1\", \"tag2\"]\n }\n }\n }]\n}\n```\n\n#### saveAndStartNewIteration\n\nStops the current running iteration, creates a new iteration from it, optionally applies field updates, and starts the new iteration. This is a convenience instruction that combines stopping, updating, and starting in a single operation.\n\n##### Parameters\n\n- `changeJustification`: (Optional) The reason for stopping and starting a new iteration.\n- `value`: (Optional) An object mapping field names to field updates, using the same format as `updateExperimentFields`. These updates are applied to the new iteration before it is started.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"saveAndStartNewIteration\",\n \"changeJustification\": \"Adjusting hypothesis based on early results\",\n \"value\": {\n \"hypothesis\": {\n \"operation\": \"update\",\n \"value\": \"Updated hypothesis text\"\n }\n }\n }]\n}\n```\n\n#### startIteration\n\nStarts a new iteration for this experiment. You must [create a new iteration](https://launchdarkly.com/docs/api/experiments/create-iteration) before calling this instruction.\n\nAn iteration may not be started until it meets the following criteria:\n\n* Its associated flag is toggled on and is not archived\n* Its `randomizationUnit` is set\n* At least one of its `treatments` has a non-zero `allocationPercent`\n\n##### Parameters\n\n- `changeJustification`: The reason for starting a new iteration. Required when you call `startIteration` on an already running experiment, otherwise optional.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"startIteration\",\n \"changeJustification\": \"It's time to start a new iteration\"\n }]\n}\n```\n\n#### stopIteration\n\nStops the current iteration for this experiment.\n\n##### Parameters\n\n- `winningTreatmentId`: The ID of the winning treatment. Treatment IDs are returned as part of the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response. They are the `_id` of each element in the `treatments` array.\n- `winningReason`: The reason for the winner\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"stopIteration\",\n \"winningTreatmentId\": \"3a548ec2-72ac-4e59-8518-5c24f5609ccf\",\n \"winningReason\": \"Example reason to stop the iteration\"\n }]\n}\n```\n\n#### archiveExperiment\n\nArchives this experiment. Archived experiments are hidden by default in the LaunchDarkly user interface. You cannot start new iterations for archived experiments.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"archiveExperiment\" }]\n}\n```\n\n#### restoreExperiment\n\nRestores an archived experiment. After restoring an experiment, you can start new iterations for it again.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"restoreExperiment\" }]\n}\n```\n",
+ "description": "Update an experiment. Updating an experiment uses the semantic patch format.\n\nTo make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).\n\n### Instructions\n\nSemantic patch requests support the following `kind` instructions for updating experiments.\n\n#### updateName\n\n> **Deprecated**: `updateName` will be removed in a future version. Use `updateExperimentFields` instead.\n\nUpdates the experiment name.\n\n##### Parameters\n\n- `value`: The new name.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateName\",\n \"value\": \"Example updated experiment name\"\n }]\n}\n```\n\n#### updateDescription\n\n> **Deprecated**: `updateDescription` will be removed in a future version. Use `updateExperimentFields` instead.\n\nUpdates the experiment description.\n\n##### Parameters\n\n- `value`: The new description.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateDescription\",\n \"value\": \"Example updated description\"\n }]\n}\n```\n\n#### updateExperimentFields\n\nUpdates one or more fields on an experiment or its current iteration. Each field update specifies an operation (`add`, `update`, or `remove`) and an optional value.\n\nWhich fields are mutable depends on the current iteration status. To discover which fields and operations are allowed, expand `mutableFieldsByStatus` on the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response.\n\n##### Parameters\n\n- `value`: An object mapping field names to field updates. Each field update has the following properties:\n - `operation`: The operation to perform. One of `add`, `update`, or `remove`.\n - `value`: The new value for the field. Required for `add` and `update` operations.\n\nTo find which fields are supported and which operations are allowed for each iteration status, expand `mutableFieldsByStatus` on the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExperimentFields\",\n \"value\": {\n \"name\": {\n \"operation\": \"update\",\n \"value\": \"Updated experiment name\"\n },\n \"tags\": {\n \"operation\": \"add\",\n \"value\": [\"tag1\", \"tag2\"]\n }\n }\n }]\n}\n```\n\n##### Custom assignment source fields\n\nIf your experiment reads its assignment data from your data warehouse, two additional fields control the assignment source it uses.\n\nUse `assignmentDataSource` to attach an assignment source to an iteration, change which source it points at, or detach it. Its value is an object with the following properties:\n\n- `key`: (Required) The key of the assignment data source.\n- `experimentId`: The experiment identifier in the assignment data source. You can omit this while the experiment is a draft, but you must set it before you start the experiment.\n- `startTime`: (Optional) The start of the assignment data window, in Unix milliseconds.\n- `endTime`: (Optional) The end of the assignment data window, in Unix milliseconds. This must be later than `startTime`.\n\nTo detach the assignment source, send `null` as the value. You can only change this field while the iteration is still a draft.\n\nUse `assignmentDataSourceWindow` to change only the dates on an assignment source that is already attached. Its value is an object with the same `startTime` and `endTime` properties. The iteration must already have an assignment source. This is how you adjust the dates after an iteration has run, because the source itself is fixed at that point.\n\nMulti-armed bandits use flags for assignment, so they support neither field.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"updateExperimentFields\",\n \"value\": {\n \"assignmentDataSource\": {\n \"operation\": \"update\",\n \"value\": {\n \"key\": \"my-assignment-data-source\",\n \"experimentId\": \"experiment-123\",\n \"startTime\": 1690000000000,\n \"endTime\": 1690600000000\n }\n }\n }\n }]\n}\n```\n\n#### saveAndStartNewIteration\n\nStops the current running iteration, creates a new iteration from it, optionally applies field updates, and starts the new iteration. This is a convenience instruction that combines stopping, updating, and starting in a single operation.\n\n##### Parameters\n\n- `changeJustification`: (Optional) The reason for stopping and starting a new iteration.\n- `value`: (Optional) An object mapping field names to field updates, using the same format as `updateExperimentFields`. These updates are applied to the new iteration before it is started.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"saveAndStartNewIteration\",\n \"changeJustification\": \"Adjusting hypothesis based on early results\",\n \"value\": {\n \"hypothesis\": {\n \"operation\": \"update\",\n \"value\": \"Updated hypothesis text\"\n }\n }\n }]\n}\n```\n\n#### startIteration\n\nStarts a new iteration for this experiment. You must [create a new iteration](https://launchdarkly.com/docs/api/experiments/create-iteration) before calling this instruction.\n\nAn iteration may not be started until it meets the following criteria:\n\n* Its associated flag is toggled on and is not archived\n* Its `randomizationUnit` is set\n* At least one of its `treatments` has a non-zero `allocationPercent`\n\n##### Parameters\n\n- `changeJustification`: The reason for starting a new iteration. Required when you call `startIteration` on an already running experiment, otherwise optional.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"startIteration\",\n \"changeJustification\": \"It's time to start a new iteration\"\n }]\n}\n```\n\n#### stopIteration\n\nStops the current iteration for this experiment.\n\n##### Parameters\n\n- `winningTreatmentId`: The ID of the winning treatment. Treatment IDs are returned as part of the [Get experiment](https://launchdarkly.com/docs/api/experiments/get-experiment) response. They are the `_id` of each element in the `treatments` array.\n- `winningReason`: The reason for the winner\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{\n \"kind\": \"stopIteration\",\n \"winningTreatmentId\": \"3a548ec2-72ac-4e59-8518-5c24f5609ccf\",\n \"winningReason\": \"Example reason to stop the iteration\"\n }]\n}\n```\n\n#### archiveExperiment\n\nArchives this experiment. Archived experiments are hidden by default in the LaunchDarkly user interface. You cannot start new iterations for archived experiments.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"archiveExperiment\" }]\n}\n```\n\n#### restoreExperiment\n\nRestores an archived experiment. After restoring an experiment, you can start new iterations for it again.\n\nHere's an example:\n\n```json\n{\n \"instructions\": [{ \"kind\": \"restoreExperiment\" }]\n}\n```\n",
"parameters": [
{
"name": "projectKey",
@@ -32995,6 +33009,17 @@
"type": "string"
},
"style": "form"
+ },
+ {
+ "description": "A sort to apply to the list of agent skills. Use `usedIn` to sort by the number of AgentControl configs that use each skill, fewest first, or `-usedIn` for most first. Without a sort, skills are ordered by creation date, newest first.",
+ "explode": true,
+ "in": "query",
+ "name": "sort",
+ "required": false,
+ "schema": {
+ "type": "string"
+ },
+ "style": "form"
}
],
"responses": {
@@ -34124,7 +34149,7 @@
},
"/api/v2/projects/{projectKey}/agent-optimizations": {
"get": {
- "description": "Get a list of all agent optimizations in the given project.",
+ "description": "Get a list of all agent optimizations in the given project.\n\n### Filtering optimizations\n\nThe `filter` parameter supports the following fields and operators:\n\n- `query` with the `equals` operator: case-insensitive substring match on the optimization key, label, or AgentControl config key.\n- `aiConfigKey` with the `equals` operator: exact match on the key of the AgentControl config being optimized.\n\nSeparate multiple fields with a comma, for example `filter=aiConfigKey equals \"my-agent\",query equals \"tone\"`.\n",
"operationId": "listAgentOptimizations",
"parameters": [
{
@@ -36901,10 +36926,10 @@
]
}
},
- "/api/v2/projects/{projectKey}/release-policies": {
+ "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases": {
"get": {
- "description": "Get a list of release policies for the specified project with optional filtering.",
- "operationId": "GetReleasePolicies",
+ "description": "Returns the environment releases for the flag in the environment, newest first.\nEach release includes its phases in phase-index order.\nMetric definitions are not included. To get them, call\n`getEnvironmentRelease` with `expand=metrics`.\nReturns an empty `items` array when the flag has no releases in the environment,\nor when no release matches the `filter`.\nReleases that ended more than 90 days ago are not returned.\n\nResults are paginated. By default, the first 25 releases are returned. Use\n`limit` and `offset` to page through the rest, and `totalCount` to learn how\nmany releases match in total. The `_links` object includes `first`, `prev`,\n`next`, and `last` links where they apply.\n",
+ "operationId": "listEnvironmentReleases",
"parameters": [
{
"description": "Version of the endpoint.",
@@ -36921,8 +36946,6 @@
"style": "simple"
},
{
- "description": "The project key",
- "example": "default",
"explode": false,
"in": "path",
"name": "projectKey",
@@ -36933,775 +36956,91 @@
"style": "simple"
},
{
- "description": "When true, exclude the default release policy from the response. When false or omitted, include the default policy if an environment filter is present.",
- "example": false,
- "explode": true,
- "in": "query",
- "name": "excludeDefault",
- "required": false,
- "schema": {
- "default": false,
- "type": "boolean"
- },
- "style": "form"
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ReleasePoliciesResponse"
- }
- }
- },
- "description": "List of release policies"
- },
- "400": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Bad request"
- },
- "401": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Invalid access token"
- },
- "403": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Forbidden"
- },
- "404": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Not found"
- },
- "500": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Internal server error"
- }
- },
- "summary": "List release policies",
- "tags": [
- "Release policies (beta)"
- ]
- },
- "post": {
- "description": "Create a new release policy for the specified project.",
- "operationId": "PostReleasePolicy",
- "parameters": [
- {
- "description": "Version of the endpoint.",
"explode": false,
- "in": "header",
- "name": "LD-API-Version",
+ "in": "path",
+ "name": "flagKey",
"required": true,
"schema": {
- "enum": [
- "beta"
- ],
"type": "string"
},
"style": "simple"
},
{
- "description": "The project key",
- "example": "default",
"explode": false,
"in": "path",
- "name": "projectKey",
+ "name": "environmentKey",
"required": true,
"schema": {
"type": "string"
},
"style": "simple"
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/PostReleasePolicyRequest"
- }
- }
- },
- "description": "Release policy to create",
- "required": true
- },
- "responses": {
- "201": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ReleasePolicy"
- }
- }
- },
- "description": "Release policy created successfully"
},
- "400": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Bad request"
- },
- "401": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Invalid access token"
- },
- "403": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
+ {
+ "description": "A queryfilter expression that narrows the list. Supported fields and operators:\n`kind` (`equals`) with values `progressive` or `guarded`.\n",
+ "examples": {
+ "byKind": {
+ "summary": "Guarded releases only",
+ "value": "kind equals guarded"
}
},
- "description": "Forbidden"
- },
- "404": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
+ "explode": true,
+ "in": "query",
+ "name": "filter",
+ "required": false,
+ "schema": {
+ "type": "string"
},
- "description": "Not found"
+ "style": "form"
},
- "409": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
+ {
+ "description": "The number of releases to return. Defaults to 25. Maximum is 100.",
+ "explode": true,
+ "in": "query",
+ "name": "limit",
+ "required": false,
+ "schema": {
+ "default": 25,
+ "maximum": 100,
+ "minimum": 1,
+ "type": "integer"
},
- "description": "Conflict"
+ "style": "form"
},
- "500": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Internal server error"
- }
- },
- "summary": "Create a release policy",
- "tags": [
- "Release policies (beta)"
- ]
- }
- },
- "/api/v2/projects/{projectKey}/release-policies/order": {
- "post": {
- "description": "Update the order of existing release policies for the specified project.",
- "operationId": "PostReleasePoliciesOrder",
- "parameters": [
{
- "description": "Version of the endpoint.",
- "explode": false,
- "in": "header",
- "name": "LD-API-Version",
- "required": true,
+ "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten releases and then returns the next releases in the list, up to the query `limit`.",
+ "explode": true,
+ "in": "query",
+ "name": "offset",
+ "required": false,
"schema": {
- "enum": [
- "beta"
- ],
- "type": "string"
+ "default": 0,
+ "minimum": 0,
+ "type": "integer"
},
- "style": "simple"
+ "style": "form"
},
{
- "description": "The project key",
- "example": "default",
- "explode": false,
- "in": "path",
- "name": "projectKey",
- "required": true,
+ "description": "Pins the read to a moment in time (nanoseconds since the Unix epoch) so pages walked in sequence reflect one consistent snapshot. Follow the pagination links rather than constructing this value. Out-of-range values are ignored.",
+ "explode": true,
+ "in": "query",
+ "name": "_snapshot",
+ "required": false,
"schema": {
"type": "string"
},
- "style": "simple"
+ "style": "form"
}
],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "description": "Ordered list of release policy keys",
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- }
- },
- "description": "Array of release policy keys in the desired rank order (scoped policies only). These keys must include _all_ of the scoped release policies for the project.",
- "required": true
- },
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
- "items": {
- "$ref": "#/components/schemas/ReleasePolicy"
- },
- "type": "array"
+ "$ref": "#/components/schemas/EnvironmentReleaseCollection"
}
}
},
- "description": "Release policies updated successfully"
- },
- "400": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Bad request"
- },
- "401": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Invalid access token"
- },
- "403": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Forbidden"
- },
- "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 the order of existing release policies",
- "tags": [
- "Release policies (beta)"
- ]
- }
- },
- "/api/v2/projects/{projectKey}/release-policies/{policyKey}": {
- "delete": {
- "description": "Delete an existing release policy for the specified project.",
- "operationId": "DeleteReleasePolicy",
- "parameters": [
- {
- "description": "Version of the endpoint.",
- "explode": false,
- "in": "header",
- "name": "LD-API-Version",
- "required": true,
- "schema": {
- "enum": [
- "beta"
- ],
- "type": "string"
- },
- "style": "simple"
- },
- {
- "description": "The project key",
- "example": "default",
- "explode": false,
- "in": "path",
- "name": "projectKey",
- "required": true,
- "schema": {
- "type": "string"
- },
- "style": "simple"
- },
- {
- "description": "The human-readable key of the release policy",
- "example": "production-release",
- "explode": false,
- "in": "path",
- "name": "policyKey",
- "required": true,
- "schema": {
- "type": "string"
- },
- "style": "simple"
- }
- ],
- "responses": {
- "204": {
- "description": "Release policy deleted successfully"
- },
- "400": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Bad request"
- },
- "401": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Invalid access token"
- },
- "403": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Forbidden"
- },
- "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 a release policy",
- "tags": [
- "Release policies (beta)"
- ]
- },
- "get": {
- "description": "Retrieve a single release policy by its key for the specified project.",
- "operationId": "GetReleasePolicy",
- "parameters": [
- {
- "description": "Version of the endpoint.",
- "explode": false,
- "in": "header",
- "name": "LD-API-Version",
- "required": true,
- "schema": {
- "enum": [
- "beta"
- ],
- "type": "string"
- },
- "style": "simple"
- },
- {
- "description": "The project key",
- "example": "default",
- "explode": false,
- "in": "path",
- "name": "projectKey",
- "required": true,
- "schema": {
- "type": "string"
- },
- "style": "simple"
- },
- {
- "description": "The release policy key",
- "example": "production-release",
- "explode": false,
- "in": "path",
- "name": "policyKey",
- "required": true,
- "schema": {
- "type": "string"
- },
- "style": "simple"
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ReleasePolicy"
- }
- }
- },
- "description": "Release policy found"
- },
- "400": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Bad request"
- },
- "401": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Invalid access token"
- },
- "403": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Forbidden"
- },
- "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 a release policy by key",
- "tags": [
- "Release policies (beta)"
- ]
- },
- "put": {
- "description": "Update an existing release policy for the specified project.",
- "operationId": "PutReleasePolicy",
- "parameters": [
- {
- "description": "Version of the endpoint.",
- "explode": false,
- "in": "header",
- "name": "LD-API-Version",
- "required": true,
- "schema": {
- "enum": [
- "beta"
- ],
- "type": "string"
- },
- "style": "simple"
- },
- {
- "description": "The project key",
- "example": "default",
- "explode": false,
- "in": "path",
- "name": "projectKey",
- "required": true,
- "schema": {
- "type": "string"
- },
- "style": "simple"
- },
- {
- "description": "The human-readable key of the release policy",
- "example": "production-release",
- "explode": false,
- "in": "path",
- "name": "policyKey",
- "required": true,
- "schema": {
- "type": "string"
- },
- "style": "simple"
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/PutReleasePolicyRequest"
- }
- }
- },
- "description": "Release policy data to update",
- "required": true
- },
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ReleasePolicy"
- }
- }
- },
- "description": "Release policy updated successfully"
- },
- "400": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Bad request"
- },
- "401": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Invalid access token"
- },
- "403": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Forbidden"
- },
- "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 a release policy",
- "tags": [
- "Release policies (beta)"
- ]
- }
- },
- "/api/v2/projects/{projectKey}/flags/{flagKey}/environments/{environmentKey}/releases": {
- "get": {
- "description": "Returns the environment releases for the flag in the environment, newest first.\nEach release includes its phases in phase-index order.\nMetric definitions are not included. To get them, call\n`getEnvironmentRelease` with `expand=metrics`.\nReturns an empty `items` array when the flag has no releases in the environment,\nor when no release matches the `filter`.\nReleases that ended more than 90 days ago are not returned.\n\nResults are paginated. By default, the first 25 releases are returned. Use\n`limit` and `offset` to page through the rest, and `totalCount` to learn how\nmany releases match in total. The `_links` object includes `first`, `prev`,\n`next`, and `last` links where they apply.\n",
- "operationId": "listEnvironmentReleases",
- "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": "flagKey",
- "required": true,
- "schema": {
- "type": "string"
- },
- "style": "simple"
- },
- {
- "explode": false,
- "in": "path",
- "name": "environmentKey",
- "required": true,
- "schema": {
- "type": "string"
- },
- "style": "simple"
- },
- {
- "description": "A queryfilter expression that narrows the list. Supported fields and operators:\n`kind` (`equals`) with values `progressive` or `guarded`.\n",
- "examples": {
- "byKind": {
- "summary": "Guarded releases only",
- "value": "kind equals guarded"
- }
- },
- "explode": true,
- "in": "query",
- "name": "filter",
- "required": false,
- "schema": {
- "type": "string"
- },
- "style": "form"
- },
- {
- "description": "The number of releases to return. Defaults to 25. Maximum is 100.",
- "explode": true,
- "in": "query",
- "name": "limit",
- "required": false,
- "schema": {
- "default": 25,
- "maximum": 100,
- "minimum": 1,
- "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 releases and then returns the next releases in the list, up to the query `limit`.",
- "explode": true,
- "in": "query",
- "name": "offset",
- "required": false,
- "schema": {
- "default": 0,
- "minimum": 0,
- "type": "integer"
- },
- "style": "form"
- },
- {
- "description": "Pins the read to a moment in time (nanoseconds since the Unix epoch) so pages walked in sequence reflect one consistent snapshot. Follow the pagination links rather than constructing this value. Out-of-range values are ignored.",
- "explode": true,
- "in": "query",
- "name": "_snapshot",
- "required": false,
- "schema": {
- "type": "string"
- },
- "style": "form"
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/EnvironmentReleaseCollection"
- }
- }
- },
- "description": "Environment releases."
+ "description": "Environment releases."
},
"400": {
"content": {
@@ -38478,115 +37817,99 @@
]
}
},
- "/api/v2/account/ip-allowlist": {
+ "/api/v2/projects/{projectKey}/environments/{environmentKey}/release-plans": {
"get": {
- "description": "Get the current IP allowlist configuration and entries.",
- "operationId": "getIpAllowlist",
+ "description": "Get the environment's release plans, ordered by creation time.",
+ "operationId": "GetEnvironmentReleasePlans",
"parameters": [
{
- "description": "A case-insensitive substring to filter entries by. Matches against the IP address or CIDR block and the description.",
- "explode": true,
- "in": "query",
- "name": "search",
- "required": false,
+ "description": "Version of the endpoint.",
+ "explode": false,
+ "in": "header",
+ "name": "LD-API-Version",
+ "required": true,
"schema": {
+ "enum": [
+ "beta"
+ ],
"type": "string"
},
- "style": "form"
+ "style": "simple"
},
{
- "description": "The number of entries to return. Defaults to 20. Maximum is 100.",
- "explode": true,
- "in": "query",
- "name": "limit",
- "required": false,
+ "description": "The project key",
+ "example": "default",
+ "explode": false,
+ "in": "path",
+ "name": "projectKey",
+ "required": true,
"schema": {
- "type": "integer"
+ "type": "string"
},
- "style": "form"
+ "style": "simple"
},
{
- "description": "The number of entries to skip. Used for pagination.",
+ "description": "The environment key",
+ "example": "production",
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "A queryfilter expression that narrows the list by text match. Supported field and operators: `query` (`equals`, `contains`). When present, only release plans whose name or key contains the text, case-insensitively, are returned, and totalCount counts the matches. Surrounding whitespace is ignored, and the text is at most 256 bytes. Omitting the filter lists every release plan in the environment.",
+ "examples": {
+ "byText": {
+ "summary": "Plans whose name or key contains the text",
+ "value": "query contains \"checkout\""
+ }
+ },
"explode": true,
"in": "query",
- "name": "offset",
+ "name": "filter",
"required": false,
"schema": {
- "type": "integer"
+ "type": "string"
},
"style": "form"
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/IpAllowlistResponse"
- }
- }
- },
- "description": "IP allowlist configuration and entries"
- },
- "401": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Invalid access token"
},
- "403": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
+ {
+ "description": "The number of release plans to return. Defaults to 20. Maximum is 100.",
+ "explode": true,
+ "in": "query",
+ "name": "limit",
+ "required": false,
+ "schema": {
+ "type": "integer"
},
- "description": "Forbidden"
+ "style": "form"
},
- "500": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
+ {
+ "description": "The number of release plans to skip. Used for pagination.",
+ "explode": true,
+ "in": "query",
+ "name": "offset",
+ "required": false,
+ "schema": {
+ "type": "integer"
},
- "description": "Internal server error"
+ "style": "form"
}
- },
- "summary": "Get IP Allowlist",
- "tags": [
- "IP Allowlist (beta)"
- ]
- },
- "patch": {
- "description": "Update sessionAllowlistEnabled and apiTokenAllowlistEnabled settings.",
- "operationId": "patchIpAllowlistConfig",
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/patchIpAllowlistConfig_request"
- }
- }
- },
- "required": true
- },
+ ],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/IpAllowlistResponse"
+ "$ref": "#/components/schemas/EnvironmentReleasePlans"
}
}
},
- "description": "Updated IP allowlist configuration and entries"
+ "description": "Release plan collection response"
},
"400": {
"content": {
@@ -38618,7 +37941,7 @@
},
"description": "Forbidden"
},
- "409": {
+ "404": {
"content": {
"application/json": {
"schema": {
@@ -38626,7 +37949,7 @@
}
}
},
- "description": "Conflict"
+ "description": "Not found"
},
"500": {
"content": {
@@ -38639,22 +37962,63 @@
"description": "Internal server error"
}
},
- "summary": "Update IP Allowlist Configuration",
+ "summary": "List release plans",
"tags": [
- "IP Allowlist (beta)"
+ "Environment release plans (beta)"
]
},
"post": {
- "description": "Create a new IP allowlist entry.",
- "operationId": "createIpAllowlistEntry",
+ "description": "Create a new release plan for the specified environment.",
+ "operationId": "PostEnvironmentReleasePlan",
+ "parameters": [
+ {
+ "description": "Version of the endpoint.",
+ "explode": false,
+ "in": "header",
+ "name": "LD-API-Version",
+ "required": true,
+ "schema": {
+ "enum": [
+ "beta"
+ ],
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "The project key",
+ "example": "default",
+ "explode": false,
+ "in": "path",
+ "name": "projectKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "The environment key",
+ "example": "production",
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ }
+ ],
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateIpAllowlistEntryRequest"
+ "$ref": "#/components/schemas/PostEnvironmentReleasePlanRequest"
}
}
},
+ "description": "Release plan to create",
"required": true
},
"responses": {
@@ -38662,11 +38026,11 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/IpAllowlistEntryResponse"
+ "$ref": "#/components/schemas/EnvironmentReleasePlan"
}
}
},
- "description": "IP allowlist entry created"
+ "description": "Release plan created successfully"
},
"400": {
"content": {
@@ -38729,22 +38093,61 @@
"description": "Internal server error"
}
},
- "summary": "Create IP Allowlist Entry",
+ "summary": "Create a release plan",
"tags": [
- "IP Allowlist (beta)"
+ "Environment release plans (beta)"
]
}
},
- "/api/v2/account/ip-allowlist/{id}": {
+ "/api/v2/projects/{projectKey}/environments/{environmentKey}/release-plans/{releasePlanKey}": {
"delete": {
- "description": "Delete an IP allowlist entry by id.",
- "operationId": "deleteIpAllowlistEntry",
+ "description": "Delete a release plan by its key. The plan no longer appears in reads, and its key becomes available for reuse by a new plan. Returns 409 while a flag release plan still uses the release plan; remove it from those flag release plans first.",
+ "operationId": "DeleteEnvironmentReleasePlan",
"parameters": [
{
- "description": "Unique identifier for the allowlist entry",
+ "description": "Version of the endpoint.",
+ "explode": false,
+ "in": "header",
+ "name": "LD-API-Version",
+ "required": true,
+ "schema": {
+ "enum": [
+ "beta"
+ ],
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "The project key",
+ "example": "default",
"explode": false,
"in": "path",
- "name": "id",
+ "name": "projectKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "The environment key",
+ "example": "production",
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "The release plan key",
+ "example": "checkout-flow-rollout",
+ "explode": false,
+ "in": "path",
+ "name": "releasePlanKey",
"required": true,
"schema": {
"type": "string"
@@ -38754,7 +38157,7 @@
],
"responses": {
"204": {
- "description": "IP allowlist entry deleted successfully"
+ "description": "Release plan deleted successfully"
},
"400": {
"content": {
@@ -38817,20 +38220,59 @@
"description": "Internal server error"
}
},
- "summary": "Delete IP Allowlist Entry",
+ "summary": "Delete a release plan",
"tags": [
- "IP Allowlist (beta)"
+ "Environment release plans (beta)"
]
},
- "patch": {
- "description": "Update the description of an IP allowlist entry.",
- "operationId": "patchIpAllowlistEntry",
+ "get": {
+ "description": "Get a single release plan by its key.",
+ "operationId": "GetEnvironmentReleasePlan",
"parameters": [
{
- "description": "Unique identifier for the allowlist entry",
+ "description": "Version of the endpoint.",
+ "explode": false,
+ "in": "header",
+ "name": "LD-API-Version",
+ "required": true,
+ "schema": {
+ "enum": [
+ "beta"
+ ],
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "The project key",
+ "example": "default",
"explode": false,
"in": "path",
- "name": "id",
+ "name": "projectKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "The environment key",
+ "example": "production",
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "The release plan key",
+ "example": "checkout-flow-rollout",
+ "explode": false,
+ "in": "path",
+ "name": "releasePlanKey",
"required": true,
"schema": {
"type": "string"
@@ -38838,26 +38280,16 @@
"style": "simple"
}
],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/patchIpAllowlistEntry_request"
- }
- }
- },
- "required": true
- },
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/IpAllowlistEntryResponse"
+ "$ref": "#/components/schemas/EnvironmentReleasePlan"
}
}
},
- "description": "Updated IP allowlist entry"
+ "description": "Release plan response"
},
"400": {
"content": {
@@ -38910,16 +38342,14 @@
"description": "Internal server error"
}
},
- "summary": "Update IP Allowlist Entry Description",
+ "summary": "Get a release plan",
"tags": [
- "IP Allowlist (beta)"
+ "Environment release plans (beta)"
]
- }
- },
- "/api/v2/projects/{projectKey}/sdk-keys": {
- "get": {
- "description": "Get all SDK keys for a given project across environments.",
- "operationId": "getProjectSdkKeys",
+ },
+ "put": {
+ "description": "Replace a release plan's configuration. This is a full replace, not a merge: the plan's phases, steps, clauses, and metrics become exactly what the request specifies, and anything omitted is removed. The plan's key and environment are immutable, and its version increments by 1 on every successful update. The request's version is an optional optimistic lock: when present it must match the plan's current version, and on mismatch the request is rejected with 409 and no changes are applied, meaning the plan was edited since it was read; get the plan again and retry with its current version. When omitted the update applies unconditionally to the plan currently holding the key. A release already started from the plan is not affected.",
+ "operationId": "PutEnvironmentReleasePlan",
"parameters": [
{
"description": "Version of the endpoint.",
@@ -38931,14 +38361,12 @@
"enum": [
"beta"
],
- "type": "string",
- "x-enum-varnames": [
- "GetProjectSdkKeysParamsLDAPIVersionBeta"
- ]
+ "type": "string"
},
"style": "simple"
},
{
+ "description": "The project key",
"example": "default",
"explode": false,
"in": "path",
@@ -38950,76 +38378,51 @@
"style": "simple"
},
{
- "description": "A queryfilter expression to apply to the list of SDK keys. Supports the following fields and operators: `kind` (`equals`, `anyOf`; values: \"sdk\", \"mobile\"), `active` (`equals`, `anyOf`; values: `true`, `false`), `environmentKey` (`equals`, `anyOf`; values: environment keys), `viewKey` (`equals`, `anyOf`; values: view key strings — returns only SDK keys linked to the specified view(s)), `name` (`equals` only; returns SDK keys whose name or key contains the value, matched case-insensitively). Example: `kind anyOf [\"sdk\",\"mobile\"], environmentKey anyOf [\"production\",\"test\"], viewKey equals my-view, name equals \"production\"`.",
- "explode": true,
- "in": "query",
- "name": "filter",
- "required": false,
- "schema": {
- "type": "string"
- },
- "style": "form"
- },
- {
- "description": "The number of SDK keys to return. Defaults to 20. Maximum is 100.",
- "explode": true,
- "in": "query",
- "name": "limit",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "style": "form"
- },
- {
- "description": "The number of SDK keys to skip. Used for pagination.",
- "explode": true,
- "in": "query",
- "name": "offset",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "style": "form"
- },
- {
- "description": "A comma-separated list of fields to expand in the response. Supported fields: `environmentSummary`, `viewSummaries`.",
- "explode": true,
- "in": "query",
- "name": "expand",
- "required": false,
+ "description": "The environment key",
+ "example": "production",
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
"schema": {
"type": "string"
},
- "style": "form"
+ "style": "simple"
},
{
- "description": "A sort to apply to the list of SDK keys. Supported fields: `createdAt` and `environmentKey`. Prefix `createdAt` with `-` to sort in descending order (for example, `-createdAt`). `environmentKey` orders keys by environment key ascending, then by creation time ascending within each environment, so each page is environment-contiguous.",
- "explode": true,
- "in": "query",
- "name": "sort",
- "required": false,
+ "description": "The release plan key",
+ "example": "checkout-flow-rollout",
+ "explode": false,
+ "in": "path",
+ "name": "releasePlanKey",
+ "required": true,
"schema": {
- "enum": [
- "createdAt",
- "-createdAt",
- "environmentKey"
- ],
"type": "string"
},
- "style": "form"
+ "style": "simple"
}
],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PutEnvironmentReleasePlanRequest"
+ }
+ }
+ },
+ "description": "The release plan's replacement configuration",
+ "required": true
+ },
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SdkKeys"
+ "$ref": "#/components/schemas/EnvironmentReleasePlan"
}
}
},
- "description": "Successful response"
+ "description": "Release plan updated successfully"
},
"400": {
"content": {
@@ -39031,6 +38434,16 @@
},
"description": "Bad request"
},
+ "401": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Invalid access token"
+ },
"403": {
"content": {
"application/json": {
@@ -39051,6 +38464,16 @@
},
"description": "Not found"
},
+ "409": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Conflict"
+ },
"500": {
"content": {
"application/json": {
@@ -39062,16 +38485,16 @@
"description": "Internal server error"
}
},
- "summary": "Get all project SDK keys",
+ "summary": "Update a release plan",
"tags": [
- "SDK Keys (beta)"
+ "Environment release plans (beta)"
]
}
},
- "/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys": {
- "get": {
- "description": "Get all SDK keys for a given project and environment. Can filter by kind.",
- "operationId": "getSdkKeys",
+ "/api/v2/projects/{projectKey}/environments/{environmentKey}/default-release-plan": {
+ "delete": {
+ "description": "Clear the environment's default release plan, incrementing the formerly-default plan's version by 1; the environment then has none. Idempotent: returns `204` whether or not a default was set.",
+ "operationId": "DeleteDefaultEnvironmentReleasePlan",
"parameters": [
{
"description": "Version of the endpoint.",
@@ -39088,6 +38511,7 @@
"style": "simple"
},
{
+ "description": "The project key",
"example": "default",
"explode": false,
"in": "path",
@@ -39099,6 +38523,7 @@
"style": "simple"
},
{
+ "description": "The environment key",
"example": "production",
"explode": false,
"in": "path",
@@ -39108,68 +38533,23 @@
"type": "string"
},
"style": "simple"
- },
- {
- "description": "A filter to apply to the list of SDK keys. Supports the following fields and operators: `kind` (equals \"sdk\" or \"mobile\"), `active` (equals true or false). Format: `field:value`. Example: `kind:sdk`.",
- "explode": true,
- "in": "query",
- "name": "filter",
- "required": false,
- "schema": {
- "type": "string"
- },
- "style": "form"
- },
- {
- "description": "The number of SDK keys to return. Defaults to 20. Maximum is 100.",
- "explode": true,
- "in": "query",
- "name": "limit",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "style": "form"
- },
- {
- "description": "The number of SDK keys to skip. Used for pagination.",
- "explode": true,
- "in": "query",
- "name": "offset",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "style": "form"
- },
- {
- "description": "A sort to apply to the list of SDK keys. Supported field: `createdAt`. Prefix the field with `-` to sort in descending order (for example, `-createdAt`).",
- "explode": true,
- "in": "query",
- "name": "sort",
- "required": false,
- "schema": {
- "enum": [
- "createdAt",
- "-createdAt"
- ],
- "type": "string"
- },
- "style": "form"
}
],
"responses": {
- "200": {
+ "204": {
+ "description": "The environment no longer has a default release plan"
+ },
+ "400": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SdkKeysForGetSdkKeys"
+ "$ref": "#/components/schemas/Error"
}
}
},
- "description": "Successful response"
+ "description": "Bad request"
},
- "400": {
+ "401": {
"content": {
"application/json": {
"schema": {
@@ -39177,7 +38557,7 @@
}
}
},
- "description": "Bad request"
+ "description": "Invalid access token"
},
"403": {
"content": {
@@ -39210,14 +38590,14 @@
"description": "Internal server error"
}
},
- "summary": "Get all environment SDK keys",
+ "summary": "Clear the default release plan",
"tags": [
- "SDK Keys (beta)"
+ "Environment release plans (beta)"
]
},
- "post": {
- "description": "Create a new server-side or mobile SDK key.\n\nDeleted SDK keys are retained for 180 days. During that period you cannot reuse the `key` of a deleted SDK key, even though the deleted key no longer appears in the list of SDK keys for the environment.",
- "operationId": "postSdkKey",
+ "get": {
+ "description": "Get the environment's default release plan — the plan consumers preselect when starting a release. Returns `204 No Content` when the environment has no default.",
+ "operationId": "GetDefaultEnvironmentReleasePlan",
"parameters": [
{
"description": "Version of the endpoint.",
@@ -39234,6 +38614,7 @@
"style": "simple"
},
{
+ "description": "The project key",
"example": "default",
"explode": false,
"in": "path",
@@ -39245,6 +38626,7 @@
"style": "simple"
},
{
+ "description": "The environment key",
"example": "production",
"explode": false,
"in": "path",
@@ -39256,27 +38638,19 @@
"style": "simple"
}
],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/SdkKeyPost"
- }
- }
- },
- "description": "Parameters for creating a new SDK key",
- "required": true
- },
"responses": {
- "201": {
+ "200": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SdkKey"
+ "$ref": "#/components/schemas/EnvironmentReleasePlan"
}
}
},
- "description": "SDK key created"
+ "description": "Default release plan response"
+ },
+ "204": {
+ "description": "The environment has no default release plan"
},
"400": {
"content": {
@@ -39288,7 +38662,7 @@
},
"description": "Bad request"
},
- "403": {
+ "401": {
"content": {
"application/json": {
"schema": {
@@ -39296,9 +38670,9 @@
}
}
},
- "description": "Forbidden"
+ "description": "Invalid access token"
},
- "404": {
+ "403": {
"content": {
"application/json": {
"schema": {
@@ -39306,9 +38680,9 @@
}
}
},
- "description": "Not found"
+ "description": "Forbidden"
},
- "409": {
+ "404": {
"content": {
"application/json": {
"schema": {
@@ -39316,7 +38690,7 @@
}
}
},
- "description": "Conflict"
+ "description": "Not found"
},
"500": {
"content": {
@@ -39329,16 +38703,14 @@
"description": "Internal server error"
}
},
- "summary": "Create SDK key",
+ "summary": "Get the default release plan",
"tags": [
- "SDK Keys (beta)"
+ "Environment release plans (beta)"
]
- }
- },
- "/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}": {
- "delete": {
- "description": "Delete a specific SDK key by its key.",
- "operationId": "deleteSdkKeyByKey",
+ },
+ "put": {
+ "description": "Set the plan with the given key as the environment's default, atomically replacing whatever was default before. Each plan whose default flag changes has its version incremented by 1. Idempotent: setting the current default again changes nothing. Rejects a key that is not an active plan in the environment, or a plan that has no randomization unit.",
+ "operationId": "PutDefaultEnvironmentReleasePlan",
"parameters": [
{
"description": "Version of the endpoint.",
@@ -39355,6 +38727,7 @@
"style": "simple"
},
{
+ "description": "The project key",
"example": "default",
"explode": false,
"in": "path",
@@ -39366,6 +38739,7 @@
"style": "simple"
},
{
+ "description": "The environment key",
"example": "production",
"explode": false,
"in": "path",
@@ -39375,23 +38749,29 @@
"type": "string"
},
"style": "simple"
- },
- {
- "description": "The user-defined identifying key of the SDK key. This is used solely to identify an SDK key and is distinct from the value field, which is the actual SDK key value.",
- "example": "my-sdk-key",
- "explode": false,
- "in": "path",
- "name": "sdkKeyKey",
- "required": true,
- "schema": {
- "type": "string"
- },
- "style": "simple"
}
],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PutDefaultEnvironmentReleasePlanRequest"
+ }
+ }
+ },
+ "description": "The plan to set as the environment's default",
+ "required": true
+ },
"responses": {
- "204": {
- "description": "SDK key deleted"
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlan"
+ }
+ }
+ },
+ "description": "The now-default release plan"
},
"400": {
"content": {
@@ -39403,7 +38783,7 @@
},
"description": "Bad request"
},
- "403": {
+ "401": {
"content": {
"application/json": {
"schema": {
@@ -39411,9 +38791,9 @@
}
}
},
- "description": "Forbidden"
+ "description": "Invalid access token"
},
- "404": {
+ "403": {
"content": {
"application/json": {
"schema": {
@@ -39421,9 +38801,9 @@
}
}
},
- "description": "Not found"
+ "description": "Forbidden"
},
- "409": {
+ "404": {
"content": {
"application/json": {
"schema": {
@@ -39431,7 +38811,7 @@
}
}
},
- "description": "Conflict"
+ "description": "Not found"
},
"500": {
"content": {
@@ -39444,14 +38824,16 @@
"description": "Internal server error"
}
},
- "summary": "Delete SDK key",
+ "summary": "Set the default release plan",
"tags": [
- "SDK Keys (beta)"
+ "Environment release plans (beta)"
]
- },
+ }
+ },
+ "/api/v2/projects/{projectKey}/flag-release-plans": {
"get": {
- "description": "Get a specific SDK key by its key.",
- "operationId": "getSdkKeyByKey",
+ "description": "List a project's flag release plans, in creation order.",
+ "operationId": "listFlagReleasePlans",
"parameters": [
{
"description": "Version of the endpoint.",
@@ -39468,38 +38850,42 @@
"style": "simple"
},
{
- "example": "default",
"explode": false,
"in": "path",
"name": "projectKey",
"required": true,
"schema": {
+ "minLength": 1,
"type": "string"
},
"style": "simple"
},
{
- "example": "production",
- "explode": false,
- "in": "path",
- "name": "environmentKey",
- "required": true,
+ "description": "The number of flag release plans to return.",
+ "explode": true,
+ "in": "query",
+ "name": "limit",
+ "required": false,
"schema": {
- "type": "string"
+ "default": 25,
+ "maximum": 50,
+ "minimum": 1,
+ "type": "integer"
},
- "style": "simple"
+ "style": "form"
},
{
- "description": "The user-defined identifying key of the SDK key. This is used solely to identify an SDK key and is distinct from the value field, which is the actual SDK key value.",
- "example": "my-sdk-key",
- "explode": false,
- "in": "path",
- "name": "sdkKeyKey",
- "required": true,
+ "description": "The number of flag release plans to skip. Used for pagination.",
+ "explode": true,
+ "in": "query",
+ "name": "offset",
+ "required": false,
"schema": {
- "type": "string"
+ "default": 0,
+ "minimum": 0,
+ "type": "integer"
},
- "style": "simple"
+ "style": "form"
}
],
"responses": {
@@ -39507,61 +38893,71 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SdkKey"
+ "$ref": "#/components/schemas/ListFlagReleasePlansResponse"
}
}
},
- "description": "Successful response"
+ "description": "Flag release plans found."
},
"400": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Bad request"
+ "description": "Invalid request"
+ },
+ "401": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/FlagReleasePlansError"
+ }
+ }
+ },
+ "description": "Missing authenticated account identity"
},
"403": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Forbidden"
+ "description": "The caller may not act on this account or project"
},
"404": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Not found"
+ "description": "No such project or rollout config"
},
"500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Internal server error"
+ "description": "Internal Server Error"
}
},
- "summary": "Get SDK key",
+ "summary": "List a project's flag release plans",
"tags": [
- "SDK Keys (beta)"
+ "Flag release plans (beta)"
]
},
- "patch": {
- "description": "Update a an existing SDK key by its identifying key.",
- "operationId": "patchSdkKeyByKey",
+ "post": {
+ "description": "Creates a flag release plan. The key must not be in use by another\nactive plan in the project, or the request is rejected with 409.\nThe request is rejected with 400 when an environment isn't in the\nproject, the maintainer isn't in the account, an environment release\nplan doesn't exist, is incomplete, or is in another environment,\n`default` is set while the project already has a default plan, or the\nproject already has the maximum number of plans. To make a new plan\nthe project's default, create it, then update it with `default` set,\nwhich demotes the current default.\n",
+ "operationId": "createFlagReleasePlan",
"parameters": [
{
"description": "Version of the endpoint.",
@@ -39578,134 +38974,109 @@
"style": "simple"
},
{
- "example": "default",
"explode": false,
"in": "path",
"name": "projectKey",
"required": true,
"schema": {
+ "minLength": 1,
"type": "string"
},
"style": "simple"
- },
- {
- "example": "production",
- "explode": false,
- "in": "path",
- "name": "environmentKey",
- "required": true,
- "schema": {
- "type": "string"
- },
- "style": "simple"
- },
- {
- "description": "The user-defined identifying key of the SDK key. This is used solely to identify an SDK key and is distinct from the value field, which is the actual SDK key value.",
- "example": "my-sdk-key",
- "explode": false,
- "in": "path",
- "name": "sdkKeyKey",
- "required": true,
- "schema": {
- "type": "string"
- },
- "style": "simple"
- },
- {
- "description": "The version of the SDK key for optimistic locking. If provided, the update will only succeed if the current version matches.",
- "explode": true,
- "in": "query",
- "name": "version",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "style": "form"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SdkKeyPatch"
+ "$ref": "#/components/schemas/CreateFlagReleasePlanRequest"
}
}
},
- "description": "An array of patches for updating an existing SDK key. The following fields are supported: `name`, `description`, `expiry`.",
"required": true
},
"responses": {
- "200": {
+ "201": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SdkKey"
+ "$ref": "#/components/schemas/FlagReleasePlan"
}
}
},
- "description": "Successful response"
+ "description": "Flag release plan created."
},
"400": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Bad request"
+ "description": "Invalid request"
+ },
+ "401": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/FlagReleasePlansError"
+ }
+ }
+ },
+ "description": "Missing authenticated account identity"
},
"403": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Forbidden"
+ "description": "The caller may not act on this account or project"
},
"404": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Not found"
+ "description": "No such project or rollout config"
},
"409": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Conflict"
+ "description": "The request conflicts with the current state of the rollout config"
},
"500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Internal server error"
+ "description": "Internal Server Error"
}
},
- "summary": "Update SDK key",
+ "summary": "Create a flag release plan for a project",
"tags": [
- "SDK Keys (beta)"
+ "Flag release plans (beta)"
]
}
},
- "/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}/views": {
- "put": {
- "description": "Replace the set of views associated with an SDK key. The `viewKeys` field is required. To remove all views from the SDK key, pass an empty `viewKeys` array.",
- "operationId": "putSdkKeyViews",
+ "/api/v2/projects/{projectKey}/flag-release-plans/{planKey}": {
+ "delete": {
+ "description": "Delete a flag release plan in a project.",
+ "operationId": "deleteFlagReleasePlan",
"parameters": [
{
"description": "Version of the endpoint.",
@@ -39727,6 +39098,7 @@
"name": "projectKey",
"required": true,
"schema": {
+ "minLength": 1,
"type": "string"
},
"style": "simple"
@@ -39734,114 +39106,79 @@
{
"explode": false,
"in": "path",
- "name": "environmentKey",
- "required": true,
- "schema": {
- "type": "string"
- },
- "style": "simple"
- },
- {
- "explode": false,
- "in": "path",
- "name": "sdkKeyKey",
+ "name": "planKey",
"required": true,
"schema": {
+ "minLength": 1,
"type": "string"
},
"style": "simple"
- },
- {
- "description": "A comma-separated list of fields to expand in the response. Supported fields: `viewSummaries`.",
- "explode": true,
- "in": "query",
- "name": "expand",
- "required": false,
- "schema": {
- "type": "string"
- },
- "style": "form"
}
],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/SdkKeyViewsPut"
- }
- }
- },
- "required": true
- },
"responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/SdkKeyForPutSdkKeyViews"
- }
- }
- },
- "description": "Successful response"
+ "204": {
+ "description": "Flag release plan deleted."
},
- "400": {
+ "401": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Bad request"
+ "description": "Missing authenticated account identity"
},
"403": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Forbidden"
+ "description": "The caller may not act on this account or project"
},
"404": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Not found"
+ "description": "No such project or rollout config"
},
"500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Internal server error"
+ "description": "Internal Server Error"
}
},
- "summary": "Replace SDK key views",
+ "summary": "Delete a flag release plan in a project",
"tags": [
- "SDK Keys (beta)"
+ "Flag release plans (beta)"
]
- }
- },
- "/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers": {
+ },
"get": {
- "description": "List all adaptive triggers for a resource.",
- "operationId": "listAdaptiveTriggers",
+ "description": "Get a flag release plan in a project by plan key.",
+ "operationId": "getFlagReleasePlan",
"parameters": [
{
+ "description": "Version of the endpoint.",
"explode": false,
- "in": "path",
- "name": "projectKey",
+ "in": "header",
+ "name": "LD-API-Version",
"required": true,
"schema": {
+ "enum": [
+ "beta"
+ ],
"type": "string"
},
"style": "simple"
@@ -39849,59 +39186,24 @@
{
"explode": false,
"in": "path",
- "name": "environmentKey",
+ "name": "projectKey",
"required": true,
"schema": {
+ "minLength": 1,
"type": "string"
},
"style": "simple"
},
{
- "explode": true,
- "in": "query",
- "name": "resourceKind",
- "required": true,
- "schema": {
- "$ref": "#/components/schemas/AdaptiveTriggerResourceKind"
- },
- "style": "form"
- },
- {
- "explode": true,
- "in": "query",
- "name": "resourceKey",
+ "explode": false,
+ "in": "path",
+ "name": "planKey",
"required": true,
"schema": {
+ "minLength": 1,
"type": "string"
},
- "style": "form"
- },
- {
- "description": "The number of items to return.",
- "explode": true,
- "in": "query",
- "name": "limit",
- "required": false,
- "schema": {
- "default": 25,
- "maximum": 50,
- "minimum": 1,
- "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": {
- "default": 0,
- "minimum": 0,
- "type": "integer"
- },
- "style": "form"
+ "style": "simple"
}
],
"responses": {
@@ -39909,78 +39211,83 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AdaptiveTriggers"
+ "$ref": "#/components/schemas/FlagReleasePlan"
}
}
},
- "description": "Adaptive Triggers list"
+ "description": "Flag release plan found."
},
- "400": {
+ "401": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Bad request"
+ "description": "Missing authenticated account identity"
},
"403": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Forbidden"
+ "description": "The caller may not act on this account or project"
},
"404": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- },
- "description": "Not found"
- },
- "429": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Rate Limited"
+ "description": "No such project or rollout config"
},
"500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Internal server error"
+ "description": "Internal Server Error"
}
},
- "summary": "List adaptive triggers",
+ "summary": "Get a flag release plan in a project by plan key",
"tags": [
- "Adaptive triggers"
+ "Flag release plans (beta)"
]
},
- "post": {
- "description": "Create a new adaptive trigger for a resource.",
- "operationId": "postAdaptiveTrigger",
+ "put": {
+ "description": "Replace a flag release plan configuration in a project. This is a\nfull replace, not a merge, and anything omitted is overwritten.\nOmitting `default` clears it, so a request without it demotes the\nproject's default plan. The flag release plan's key is immutable, and\nits version increments by 1 on every successful update. The request's\nversion is an optional optimistic lock: when present it must match the\nplan's current version, and on mismatch the request is rejected with\n409 and no changes are applied, meaning the plan was edited since it\nwas read; get the plan again and retry with its current version. When\nomitted the update applies unconditionally to the plan currently\nholding the key. A flag release already started from the plan is not\naffected.\n",
+ "operationId": "updateFlagReleasePlan",
"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": {
+ "minLength": 1,
"type": "string"
},
"style": "simple"
@@ -39988,9 +39295,10 @@
{
"explode": false,
"in": "path",
- "name": "environmentKey",
+ "name": "planKey",
"required": true,
"schema": {
+ "minLength": 1,
"type": "string"
},
"style": "simple"
@@ -40000,94 +39308,94 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateAdaptiveTriggerRequest"
+ "$ref": "#/components/schemas/PutFlagReleasePlanRequest"
}
}
},
"required": true
},
"responses": {
- "201": {
+ "200": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AdaptiveTrigger"
+ "$ref": "#/components/schemas/FlagReleasePlan"
}
}
},
- "description": "Adaptive Trigger created"
+ "description": "Flag release plan updated."
},
"400": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Bad request"
+ "description": "Invalid request"
},
- "403": {
+ "401": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Forbidden"
+ "description": "Missing authenticated account identity"
},
- "404": {
+ "403": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Not found"
+ "description": "The caller may not act on this account or project"
},
- "409": {
+ "404": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Conflict"
+ "description": "No such project or rollout config"
},
- "429": {
+ "409": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Rate Limited"
+ "description": "The request conflicts with the current state of the rollout config"
},
"500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/FlagReleasePlansError"
}
}
},
- "description": "Internal server error"
+ "description": "Internal Server Error"
}
},
- "summary": "Create an adaptive trigger",
+ "summary": "Replace a flag release plan configuration in a project",
"tags": [
- "Adaptive triggers"
+ "Flag release plans (beta)"
]
}
},
- "/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}": {
- "delete": {
- "description": "Delete a single adaptive trigger.",
- "operationId": "deleteAdaptiveTrigger",
+ "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/scheduled-changes": {
+ "get": {
+ "description": "Get every scheduled change for a segment that has not been applied yet, plus any that failed to apply, soonest first. Use the `status` of each change to tell them apart.\n\nThe caller must be allowed to view the segment's project.\n",
+ "operationId": "getSegmentScheduledChanges",
"parameters": [
{
"explode": false,
@@ -40112,18 +39420,24 @@
{
"explode": false,
"in": "path",
- "name": "triggerID",
+ "name": "segmentKey",
"required": true,
"schema": {
- "format": "uuid",
"type": "string"
},
"style": "simple"
}
],
"responses": {
- "204": {
- "description": "No content"
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SegmentScheduledChanges"
+ }
+ }
+ },
+ "description": "Scheduled changes for the segment"
},
"400": {
"content": {
@@ -40133,7 +39447,17 @@
}
}
},
- "description": "Bad request"
+ "description": "Invalid request"
+ },
+ "401": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Invalid access token"
},
"403": {
"content": {
@@ -40153,7 +39477,7 @@
}
}
},
- "description": "Not found"
+ "description": "Invalid resource identifier"
},
"429": {
"content": {
@@ -40163,7 +39487,7 @@
}
}
},
- "description": "Rate Limited"
+ "description": "Rate limited"
},
"500": {
"content": {
@@ -40176,14 +39500,14 @@
"description": "Internal server error"
}
},
- "summary": "Delete an adaptive trigger",
+ "summary": "List scheduled changes for a segment",
"tags": [
- "Adaptive triggers"
+ "Segments"
]
},
- "get": {
- "description": "Get a single adaptive trigger.",
- "operationId": "getAdaptiveTrigger",
+ "post": {
+ "description": "Schedule semantic patch instructions to be applied to a segment at a future time.\n\nEach instruction uses the same format as an instruction in a semantic patch request to update a segment. Send between 1 and 100 instructions. LaunchDarkly rejects the request with a 400 if an instruction has an unknown `kind` or is malformed.\n\nThe caller must be allowed to update scheduled changes on the segment, and must also be allowed to make each instruction's change directly. If the segment requires approvals for an instruction, the caller must also be allowed to bypass them. Otherwise, request the change through an approval request instead. To learn more about semantic patches, read [Updates](/reference#updates-using-semantic-patch).\n",
+ "operationId": "postSegmentScheduledChange",
"parameters": [
{
"explode": false,
@@ -40208,25 +39532,34 @@
{
"explode": false,
"in": "path",
- "name": "triggerID",
+ "name": "segmentKey",
"required": true,
"schema": {
- "format": "uuid",
"type": "string"
},
"style": "simple"
}
],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PostSegmentScheduledChangeInput"
+ }
+ }
+ },
+ "required": true
+ },
"responses": {
- "200": {
+ "201": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AdaptiveTrigger"
+ "$ref": "#/components/schemas/SegmentScheduledChange"
}
}
},
- "description": "Trigger"
+ "description": "Scheduled change created"
},
"400": {
"content": {
@@ -40236,7 +39569,17 @@
}
}
},
- "description": "Bad request"
+ "description": "Invalid request"
+ },
+ "401": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Invalid access token"
},
"403": {
"content": {
@@ -40256,7 +39599,7 @@
}
}
},
- "description": "Not found"
+ "description": "Invalid resource identifier"
},
"429": {
"content": {
@@ -40266,7 +39609,7 @@
}
}
},
- "description": "Rate Limited"
+ "description": "Rate limited"
},
"500": {
"content": {
@@ -40279,14 +39622,16 @@
"description": "Internal server error"
}
},
- "summary": "Get an adaptive trigger",
+ "summary": "Create a scheduled change for a segment",
"tags": [
- "Adaptive triggers"
+ "Segments"
]
- },
- "patch": {
- "description": "Update a single adaptive trigger.",
- "operationId": "patchAdaptiveTrigger",
+ }
+ },
+ "/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/scheduled-changes/{id}": {
+ "delete": {
+ "description": "Delete a scheduled change before its execution date, so that its instructions are never applied to the segment.\n\nDeleting a change with a `failed` status removes it from the segment's scheduled changes. Its instructions were not applied.\n\nThe caller must be allowed to update scheduled changes on the segment.\n\nIf an approval request scheduled the change, deleting the change also terminates that request, so it cannot be applied again. Declining the request is only an option while it is still awaiting review. Once it is applied, its instructions belong to a scheduled change, and this endpoint is how to stop them.\n\nReturns 409 if the scheduled change is already being applied or has already run.\n",
+ "operationId": "deleteSegmentScheduledChange",
"parameters": [
{
"explode": false,
@@ -40311,37 +39656,40 @@
{
"explode": false,
"in": "path",
- "name": "triggerID",
+ "name": "segmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "The ID of the scheduled change",
+ "explode": false,
+ "in": "path",
+ "name": "id",
"required": true,
"schema": {
- "format": "uuid",
"type": "string"
},
"style": "simple"
}
],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UpdateAdaptiveTriggerRequest"
- }
- }
- },
- "required": true
- },
"responses": {
- "200": {
+ "204": {
+ "description": "Scheduled change deleted"
+ },
+ "400": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AdaptiveTrigger"
+ "$ref": "#/components/schemas/Error"
}
}
},
- "description": "Adaptive Trigger updated"
+ "description": "Invalid request"
},
- "400": {
+ "401": {
"content": {
"application/json": {
"schema": {
@@ -40349,7 +39697,7 @@
}
}
},
- "description": "Bad request"
+ "description": "Invalid access token"
},
"403": {
"content": {
@@ -40369,7 +39717,17 @@
}
}
},
- "description": "Not found"
+ "description": "Invalid resource identifier"
+ },
+ "409": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Conflict"
},
"429": {
"content": {
@@ -40379,7 +39737,7 @@
}
}
},
- "description": "Rate Limited"
+ "description": "Rate limited"
},
"500": {
"content": {
@@ -40392,16 +39750,14 @@
"description": "Internal server error"
}
},
- "summary": "Update an adaptive trigger",
+ "summary": "Delete a scheduled change for a segment",
"tags": [
- "Adaptive triggers"
+ "Segments"
]
- }
- },
- "/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/enable": {
- "post": {
- "description": "Enable an adaptive trigger.",
- "operationId": "postEnableAdaptiveTrigger",
+ },
+ "get": {
+ "description": "Get one scheduled change that has not been applied yet, or that failed to apply. Returns 404 if the ID is not a scheduled change for the segment in the path.\n\nThe caller must be allowed to view the segment's project.\n",
+ "operationId": "getSegmentScheduledChange",
"parameters": [
{
"explode": false,
@@ -40426,18 +39782,35 @@
{
"explode": false,
"in": "path",
- "name": "triggerID",
+ "name": "segmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "The ID of the scheduled change",
+ "explode": false,
+ "in": "path",
+ "name": "id",
"required": true,
"schema": {
- "format": "uuid",
"type": "string"
},
"style": "simple"
}
],
"responses": {
- "204": {
- "description": "No content"
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SegmentScheduledChange"
+ }
+ }
+ },
+ "description": "The scheduled change"
},
"400": {
"content": {
@@ -40447,7 +39820,17 @@
}
}
},
- "description": "Bad request"
+ "description": "Invalid request"
+ },
+ "401": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Invalid access token"
},
"403": {
"content": {
@@ -40467,7 +39850,7 @@
}
}
},
- "description": "Not found"
+ "description": "Invalid resource identifier"
},
"429": {
"content": {
@@ -40477,7 +39860,7 @@
}
}
},
- "description": "Rate Limited"
+ "description": "Rate limited"
},
"500": {
"content": {
@@ -40490,16 +39873,14 @@
"description": "Internal server error"
}
},
- "summary": "Enable an adaptive trigger",
+ "summary": "Get a scheduled change for a segment",
"tags": [
- "Adaptive triggers"
+ "Segments"
]
- }
- },
- "/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/disable": {
- "post": {
- "description": "Disable an adaptive trigger.",
- "operationId": "postDisableAdaptiveTrigger",
+ },
+ "patch": {
+ "description": "Edit the execution date and/or the comment of a scheduled change that has not been applied yet. A field you leave out is unchanged, and an empty comment clears the comment.\n\nThe caller must be allowed to update scheduled changes on the segment, and must also be allowed to make the change's instructions directly. If the segment requires approvals, the caller must also be allowed to bypass them.\n\nReturns 409 if the scheduled change is already being applied or was changed by someone else in the meantime.\n",
+ "operationId": "patchSegmentScheduledChange",
"parameters": [
{
"explode": false,
@@ -40524,30 +39905,47 @@
{
"explode": false,
"in": "path",
- "name": "triggerID",
+ "name": "segmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "The ID of the scheduled change",
+ "explode": false,
+ "in": "path",
+ "name": "id",
"required": true,
"schema": {
- "format": "uuid",
"type": "string"
},
"style": "simple"
}
],
- "responses": {
- "204": {
- "description": "No content"
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PatchSegmentScheduledChangeInput"
+ }
+ }
},
- "400": {
+ "required": true
+ },
+ "responses": {
+ "200": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Error"
+ "$ref": "#/components/schemas/SegmentScheduledChange"
}
}
},
- "description": "Bad request"
+ "description": "The updated scheduled change"
},
- "403": {
+ "400": {
"content": {
"application/json": {
"schema": {
@@ -40555,9 +39953,9 @@
}
}
},
- "description": "Forbidden"
+ "description": "Invalid request"
},
- "404": {
+ "401": {
"content": {
"application/json": {
"schema": {
@@ -40565,9 +39963,9 @@
}
}
},
- "description": "Not found"
+ "description": "Invalid access token"
},
- "429": {
+ "403": {
"content": {
"application/json": {
"schema": {
@@ -40575,9 +39973,9 @@
}
}
},
- "description": "Rate Limited"
+ "description": "Forbidden"
},
- "500": {
+ "404": {
"content": {
"application/json": {
"schema": {
@@ -40585,2172 +39983,2259 @@
}
}
},
- "description": "Internal server error"
- }
- },
- "summary": "Disable an adaptive trigger",
- "tags": [
- "Adaptive triggers"
- ]
- }
- },
- "/api/v2/engineering-insights/charts/deployments/frequency": {
- "get": {
- "responses": {
- "200": {
- "description": "Chart response",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/InsightsChart"
- }
- }
- }
- },
- "400": {
- "description": "Invalid request",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
- }
- }
- }
- },
- "401": {
- "description": "Invalid access token",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- }
- }
- }
+ "description": "Invalid resource identifier"
},
- "403": {
- "description": "Forbidden",
+ "409": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Conflict"
},
- "404": {
- "description": "Invalid resource identifier",
+ "429": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Rate limited"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Update a scheduled change for a segment",
"tags": [
- "Insights charts (beta)"
- ],
- "summary": "Get deployment frequency chart data",
- "description": "Get deployment frequency chart data. Engineering insights displays deployment frequency data in the [deployment frequency metric view](https://launchdarkly.com/docs/home/observability/deployments).\n\n### Expanding the chart response\n\nLaunchDarkly supports expanding the chart response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `metrics` includes details on the metrics related to deployment frequency\n\nFor example, use `?expand=metrics` to include the `metrics` field in the response. By default, this field is **not** included in the response.\n",
+ "Segments"
+ ]
+ }
+ },
+ "/api/v2/account/ip-allowlist": {
+ "get": {
+ "description": "Get the current IP allowlist configuration and entries.",
+ "operationId": "getIpAllowlist",
"parameters": [
{
- "name": "projectKey",
- "in": "query",
- "description": "The project key",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "The project key"
- }
- },
- {
- "name": "environmentKey",
- "in": "query",
- "description": "The environment key",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "The environment key"
- }
- },
- {
- "name": "applicationKey",
- "in": "query",
- "description": "Comma separated list of application keys",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Comma separated list of application keys"
- }
- },
- {
- "name": "from",
- "in": "query",
- "description": "Unix timestamp in milliseconds. Default value is 7 days ago.",
- "schema": {
- "type": "string",
- "format": "date-time"
- }
- },
- {
- "name": "to",
- "in": "query",
- "description": "Unix timestamp in milliseconds. Default value is now.",
- "schema": {
- "type": "string",
- "format": "date-time"
- }
- },
- {
- "name": "bucketType",
- "in": "query",
- "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`."
- }
- },
- {
- "name": "bucketMs",
+ "description": "A case-insensitive substring to filter entries by. Matches against the IP address or CIDR block and the description.",
+ "explode": true,
"in": "query",
- "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).",
+ "name": "search",
+ "required": false,
"schema": {
- "type": "integer",
- "format": "int64",
- "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds)."
- }
+ "type": "string"
+ },
+ "style": "form"
},
{
- "name": "groupBy",
+ "description": "The number of entries to return. Defaults to 20. Maximum is 100.",
+ "explode": true,
"in": "query",
- "description": "Options: `application`, `kind`",
+ "name": "limit",
+ "required": false,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Options: `application`, `kind`"
- }
+ "type": "integer"
+ },
+ "style": "form"
},
{
- "name": "expand",
+ "description": "The number of entries to skip. Used for pagination.",
+ "explode": true,
"in": "query",
- "description": "Options: `metrics`",
+ "name": "offset",
+ "required": false,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Options: `metrics`"
- }
+ "type": "integer"
+ },
+ "style": "form"
}
],
- "operationId": "getDeploymentFrequencyChart"
- }
- },
- "/api/v2/engineering-insights/charts/flags/stale": {
- "get": {
"responses": {
"200": {
- "description": "Chart response",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/InsightsChart"
- }
- }
- }
- },
- "400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/IpAllowlistResponse"
}
}
- }
+ },
+ "description": "IP allowlist configuration and entries"
},
"401": {
- "description": "Invalid access token",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Invalid access token"
},
"403": {
- "description": "Forbidden",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
- }
- }
- }
- },
- "404": {
- "description": "Invalid resource identifier",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Get IP Allowlist",
"tags": [
- "Insights charts (beta)"
- ],
- "summary": "Get stale flags chart data",
- "description": "Get stale flags chart data. Engineering insights displays stale flags data in the [flag health metric view](https://launchdarkly.com/docs/home/observability/flag-health).\n\n### Expanding the chart response\n\nLaunchDarkly supports expanding the chart response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `metrics` includes details on the metrics related to stale flags\n\nFor example, use `?expand=metrics` to include the `metrics` field in the response. By default, this field is **not** included in the response.\n",
- "parameters": [
- {
- "name": "projectKey",
- "in": "query",
- "description": "The project key",
- "required": true,
- "schema": {
- "type": "string",
- "format": "string",
- "description": "The project key"
- }
- },
- {
- "name": "environmentKey",
- "in": "query",
- "description": "The environment key",
- "required": true,
- "schema": {
- "type": "string",
- "format": "string",
- "description": "The environment key"
- }
- },
- {
- "name": "applicationKey",
- "in": "query",
- "description": "Comma separated list of application keys",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Comma separated list of application keys"
- }
- },
- {
- "name": "groupBy",
- "in": "query",
- "description": "Property to group results by. Options: `maintainer`",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Property to group results by. Options: `maintainer`"
- }
- },
- {
- "name": "maintainerId",
- "in": "query",
- "description": "Comma-separated list of individual maintainers to filter results.",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Comma-separated list of individual maintainers to filter results."
- }
- },
- {
- "name": "maintainerTeamKey",
- "in": "query",
- "description": "Comma-separated list of team maintainer keys to filter results.",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Comma-separated list of team maintainer keys to filter results."
+ "IP Allowlist (beta)"
+ ]
+ },
+ "patch": {
+ "description": "Update sessionAllowlistEnabled and apiTokenAllowlistEnabled settings.",
+ "operationId": "patchIpAllowlistConfig",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/patchIpAllowlistConfig_request"
+ }
}
},
- {
- "name": "expand",
- "in": "query",
- "description": "Options: `metrics`",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Options: `metrics`"
- }
- }
- ],
- "operationId": "getStaleFlagsChart"
- }
- },
- "/api/v2/engineering-insights/charts/flags/status": {
- "get": {
+ "required": true
+ },
"responses": {
"200": {
- "description": "Chart response",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/InsightsChart"
+ "$ref": "#/components/schemas/IpAllowlistResponse"
}
}
- }
+ },
+ "description": "Updated IP allowlist configuration and entries"
},
"400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
"401": {
- "description": "Invalid access token",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Invalid access token"
},
"403": {
- "description": "Forbidden",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
- "404": {
- "description": "Invalid resource identifier",
+ "409": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Conflict"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Update IP Allowlist Configuration",
"tags": [
- "Insights charts (beta)"
- ],
- "summary": "Get flag status chart data",
- "description": "Get flag status chart data. To learn more, read [Flag statuses](https://launchdarkly.com/docs/home/observability/flag-health#flag-statuses).",
- "parameters": [
- {
- "name": "projectKey",
- "in": "query",
- "description": "The project key",
- "required": true,
- "schema": {
- "type": "string",
- "format": "string",
- "description": "The project key"
- }
- },
- {
- "name": "environmentKey",
- "in": "query",
- "description": "The environment key",
- "required": true,
- "schema": {
- "type": "string",
- "format": "string",
- "description": "The environment key"
+ "IP Allowlist (beta)"
+ ]
+ },
+ "post": {
+ "description": "Create a new IP allowlist entry.",
+ "operationId": "createIpAllowlistEntry",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateIpAllowlistEntryRequest"
+ }
}
},
- {
- "name": "applicationKey",
- "in": "query",
- "description": "Comma separated list of application keys",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Comma separated list of application keys"
- }
- }
- ],
- "operationId": "getFlagStatusChart"
- }
- },
- "/api/v2/engineering-insights/charts/lead-time": {
- "get": {
+ "required": true
+ },
"responses": {
- "200": {
- "description": "Chart response",
+ "201": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/InsightsChart"
+ "$ref": "#/components/schemas/IpAllowlistEntryResponse"
}
}
- }
+ },
+ "description": "IP allowlist entry created"
},
"400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
"401": {
- "description": "Invalid access token",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Invalid access token"
},
"403": {
- "description": "Forbidden",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
"404": {
- "description": "Invalid resource identifier",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
- "429": {
- "description": "Rate limited",
+ "409": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Conflict"
+ },
+ "500": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Create IP Allowlist Entry",
"tags": [
- "Insights charts (beta)"
- ],
- "summary": "Get lead time chart data",
- "description": "Get lead time chart data. The engineering insights UI displays lead time data in the [lead time metric view](https://launchdarkly.com/docs/home/observability/lead-time).",
+ "IP Allowlist (beta)"
+ ]
+ }
+ },
+ "/api/v2/account/ip-allowlist/{id}": {
+ "delete": {
+ "description": "Delete an IP allowlist entry by id.",
+ "operationId": "deleteIpAllowlistEntry",
"parameters": [
{
- "name": "projectKey",
- "in": "query",
- "description": "The project key",
+ "description": "Unique identifier for the allowlist entry",
+ "explode": false,
+ "in": "path",
+ "name": "id",
"required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "The project key"
- }
- },
- {
- "name": "environmentKey",
- "in": "query",
- "description": "The environment key",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "The environment key"
- }
- },
- {
- "name": "applicationKey",
- "in": "query",
- "description": "Comma separated list of application keys",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Comma separated list of application keys"
- }
- },
- {
- "name": "from",
- "in": "query",
- "description": "Unix timestamp in milliseconds. Default value is 7 days ago.",
- "schema": {
- "type": "integer",
- "format": "int64",
- "description": "Unix timestamp in milliseconds. Default value is 7 days ago."
- }
- },
- {
- "name": "to",
- "in": "query",
- "description": "Unix timestamp in milliseconds. Default value is now.",
- "schema": {
- "type": "integer",
- "format": "int64",
- "description": "Unix timestamp in milliseconds. Default value is now."
- }
- },
- {
- "name": "bucketType",
- "in": "query",
- "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`."
- }
- },
- {
- "name": "bucketMs",
- "in": "query",
- "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).",
- "schema": {
- "type": "integer",
- "format": "int64",
- "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds)."
- }
- },
- {
- "name": "groupBy",
- "in": "query",
- "description": "Options: `application`, `stage`. Default: `stage`.",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Options: `application`, `stage`. Default: `stage`."
- }
- },
- {
- "name": "expand",
- "in": "query",
- "description": "Options: `metrics`, `percentiles`.",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Options: `metrics`, `percentiles`."
- }
+ "type": "string"
+ },
+ "style": "simple"
}
],
- "operationId": "getLeadTimeChart"
- }
- },
- "/api/v2/engineering-insights/charts/releases/frequency": {
- "get": {
"responses": {
- "200": {
- "description": "Chart response",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/InsightsChart"
- }
- }
- }
+ "204": {
+ "description": "IP allowlist entry deleted successfully"
},
"400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
"401": {
- "description": "Invalid access token",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Invalid access token"
},
"403": {
- "description": "Forbidden",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
"404": {
- "description": "Invalid resource identifier",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
- }
- }
- }
- },
- "429": {
- "description": "Rate limited",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
- }
- }
- }
- }
- },
- "tags": [
- "Insights charts (beta)"
- ],
- "summary": "Get release frequency chart data",
- "description": "Get release frequency chart data. Engineering insights displays release frequency data in the [release frequency metric view](https://launchdarkly.com/docs/home/observability/releases).",
- "parameters": [
- {
- "name": "projectKey",
- "in": "query",
- "description": "The project key",
- "required": true,
- "schema": {
- "type": "string",
- "format": "string",
- "description": "The project key"
- }
- },
- {
- "name": "environmentKey",
- "in": "query",
- "description": "The environment key",
- "required": true,
- "schema": {
- "type": "string",
- "format": "string",
- "description": "The environment key"
- }
- },
- {
- "name": "applicationKey",
- "in": "query",
- "description": "Comma separated list of application keys",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Comma separated list of application keys"
- }
- },
- {
- "name": "hasExperiments",
- "in": "query",
- "description": "Filter events to those associated with an experiment (`true`) or without an experiment (`false`)",
- "schema": {
- "type": "boolean",
- "format": "boolean",
- "description": "Filter events to those associated with an experiment (`true`) or without an experiment (`false`)"
- }
- },
- {
- "name": "global",
- "in": "query",
- "description": "Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`"
- }
- },
- {
- "name": "groupBy",
- "in": "query",
- "description": "Property to group results by. Options: `impact`",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Property to group results by. Options: `impact`"
- }
- },
- {
- "name": "from",
- "in": "query",
- "description": "Unix timestamp in milliseconds. Default value is 7 days ago.",
- "schema": {
- "type": "string",
- "format": "date-time"
- }
- },
- {
- "name": "to",
- "in": "query",
- "description": "Unix timestamp in milliseconds. Default value is now.",
- "schema": {
- "type": "string",
- "format": "date-time"
- }
- },
- {
- "name": "bucketType",
- "in": "query",
- "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`."
- }
- },
- {
- "name": "bucketMs",
- "in": "query",
- "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).",
- "schema": {
- "type": "integer",
- "format": "int64",
- "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds)."
- }
- },
- {
- "name": "expand",
- "in": "query",
- "description": "Options: `metrics`",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Options: `metrics`"
- }
- }
- ],
- "operationId": "getReleaseFrequencyChart"
- }
- },
- "/api/v2/engineering-insights/deployment-events": {
- "post": {
- "responses": {
- "201": {
- "description": "Created"
- },
- "400": {
- "description": "Invalid request",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
- }
- }
- }
- },
- "401": {
- "description": "Invalid access token",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
- }
- }
- }
- },
- "403": {
- "description": "Forbidden",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
- "404": {
- "description": "Invalid resource identifier",
+ "409": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Conflict"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Delete IP Allowlist Entry",
"tags": [
- "Insights deployments (beta)"
+ "IP Allowlist (beta)"
+ ]
+ },
+ "patch": {
+ "description": "Update the description of an IP allowlist entry.",
+ "operationId": "patchIpAllowlistEntry",
+ "parameters": [
+ {
+ "description": "Unique identifier for the allowlist entry",
+ "explode": false,
+ "in": "path",
+ "name": "id",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ }
],
- "summary": "Create deployment event",
- "description": "Create deployment event",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/PostDeploymentEventInput"
+ "$ref": "#/components/schemas/patchIpAllowlistEntry_request"
}
}
},
"required": true
},
- "operationId": "createDeploymentEvent"
- }
- },
- "/api/v2/engineering-insights/deployments": {
- "get": {
"responses": {
"200": {
- "description": "Deployment collection response",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeploymentCollectionRep"
+ "$ref": "#/components/schemas/IpAllowlistEntryResponse"
}
}
- }
+ },
+ "description": "Updated IP allowlist entry"
},
"400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
"401": {
- "description": "Invalid access token",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Invalid access token"
},
"403": {
- "description": "Forbidden",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
"404": {
- "description": "Invalid resource identifier",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Update IP Allowlist Entry Description",
"tags": [
- "Insights deployments (beta)"
- ],
- "summary": "List deployments",
- "description": "Get a list of deployments\n\n### Expanding the deployment collection response\n\nLaunchDarkly supports expanding the deployment collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `pullRequests` includes details on all of the pull requests associated with each deployment\n* `flagReferences` includes details on all of the references to flags in each deployment\n\nFor example, use `?expand=pullRequests` to include the `pullRequests` field in the response. By default, this field is **not** included in the response.\n",
+ "IP Allowlist (beta)"
+ ]
+ }
+ },
+ "/api/v2/projects/{projectKey}/sdk-keys": {
+ "get": {
+ "description": "Get all SDK keys for a given project across environments.",
+ "operationId": "getProjectSdkKeys",
"parameters": [
{
- "name": "projectKey",
- "in": "query",
- "description": "The project key",
+ "description": "Version of the endpoint.",
+ "explode": false,
+ "in": "header",
+ "name": "LD-API-Version",
"required": true,
"schema": {
+ "enum": [
+ "beta"
+ ],
"type": "string",
- "format": "string",
- "description": "The project key"
- }
+ "x-enum-varnames": [
+ "GetProjectSdkKeysParamsLDAPIVersionBeta"
+ ]
+ },
+ "style": "simple"
},
{
- "name": "environmentKey",
- "in": "query",
- "description": "The environment key",
+ "example": "default",
+ "explode": false,
+ "in": "path",
+ "name": "projectKey",
"required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "The environment key"
- }
- },
- {
- "name": "applicationKey",
- "in": "query",
- "description": "Comma separated list of application keys",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Comma separated list of application keys"
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "limit",
+ "description": "A queryfilter expression to apply to the list of SDK keys. Supports the following fields and operators: `kind` (`equals`, `anyOf`; values: \"sdk\", \"mobile\"), `active` (`equals`, `anyOf`; values: `true`, `false`), `environmentKey` (`equals`, `anyOf`; values: environment keys), `viewKey` (`equals`, `anyOf`; values: view key strings — returns only SDK keys linked to the specified view(s)), `name` (`equals` only; returns SDK keys whose name or key contains the value, matched case-insensitively). Example: `kind anyOf [\"sdk\",\"mobile\"], environmentKey anyOf [\"production\",\"test\"], viewKey equals my-view, name equals \"production\"`.",
+ "explode": true,
"in": "query",
- "description": "The number of deployments to return. Default is 20. Maximum allowed is 100.",
+ "name": "filter",
+ "required": false,
"schema": {
- "type": "integer",
- "format": "int64",
- "description": "The number of deployments to return. Default is 20. Maximum allowed is 100."
- }
+ "type": "string"
+ },
+ "style": "form"
},
{
- "name": "expand",
+ "description": "The number of SDK keys to return. Defaults to 20. Maximum is 100.",
+ "explode": true,
"in": "query",
- "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`",
+ "name": "limit",
+ "required": false,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`"
- }
+ "type": "integer"
+ },
+ "style": "form"
},
{
- "name": "from",
+ "description": "The number of SDK keys to skip. Used for pagination.",
+ "explode": true,
"in": "query",
- "description": "Unix timestamp in milliseconds. Default value is 7 days ago.",
+ "name": "offset",
+ "required": false,
"schema": {
- "type": "integer",
- "format": "int64",
- "description": "Unix timestamp in milliseconds. Default value is 7 days ago."
- }
+ "type": "integer"
+ },
+ "style": "form"
},
{
- "name": "to",
+ "description": "A comma-separated list of fields to expand in the response. Supported fields: `environmentSummary`, `viewSummaries`.",
+ "explode": true,
"in": "query",
- "description": "Unix timestamp in milliseconds. Default value is now.",
+ "name": "expand",
+ "required": false,
"schema": {
- "type": "integer",
- "format": "int64",
- "description": "Unix timestamp in milliseconds. Default value is now."
- }
+ "type": "string"
+ },
+ "style": "form"
},
{
- "name": "after",
+ "description": "A sort to apply to the list of SDK keys. Supported fields: `createdAt` and `environmentKey`. Prefix `createdAt` with `-` to sort in descending order (for example, `-createdAt`). `environmentKey` orders keys by environment key ascending, then by creation time ascending within each environment, so each page is environment-contiguous.",
+ "explode": true,
"in": "query",
- "description": "Identifier used for pagination",
+ "name": "sort",
+ "required": false,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Identifier used for pagination"
- }
- },
- {
- "name": "before",
- "in": "query",
- "description": "Identifier used for pagination",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Identifier used for pagination"
- }
- },
- {
- "name": "kind",
- "in": "query",
- "description": "The deployment kind",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "The deployment kind"
- }
- },
- {
- "name": "status",
- "in": "query",
- "description": "The deployment status",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "The deployment status"
- }
+ "enum": [
+ "createdAt",
+ "-createdAt",
+ "environmentKey"
+ ],
+ "type": "string"
+ },
+ "style": "form"
}
],
- "operationId": "getDeployments"
- }
- },
- "/api/v2/engineering-insights/deployments/{deploymentID}": {
- "get": {
"responses": {
"200": {
- "description": "Deployment response",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeploymentRep"
+ "$ref": "#/components/schemas/SdkKeys"
}
}
- }
+ },
+ "description": "Successful response"
},
"400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
- }
- }
- }
- },
- "401": {
- "description": "Invalid access token",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
"403": {
- "description": "Forbidden",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
"404": {
- "description": "Invalid resource identifier",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Get all project SDK keys",
"tags": [
- "Insights deployments (beta)"
- ],
- "summary": "Get deployment",
- "description": "Get a deployment by ID.\n\nThe deployment ID is returned as part of the [List deployments](https://launchdarkly.com/docs/api/insights-deployments-beta/get-deployments) response. It is the `id` field of each element in the `items` array.\n\n### Expanding the deployment response\n\nLaunchDarkly supports expanding the deployment response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `pullRequests` includes details on all of the pull requests associated with each deployment\n* `flagReferences` includes details on all of the references to flags in each deployment\n\nFor example, use `?expand=pullRequests` to include the `pullRequests` field in the response. By default, this field is **not** included in the response.\n",
+ "SDK Keys (beta)"
+ ]
+ }
+ },
+ "/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys": {
+ "get": {
+ "description": "Get all SDK keys for a given project and environment. Can filter by kind.",
+ "operationId": "getSdkKeys",
"parameters": [
{
- "name": "deploymentID",
+ "description": "Version of the endpoint.",
+ "explode": false,
+ "in": "header",
+ "name": "LD-API-Version",
+ "required": true,
+ "schema": {
+ "enum": [
+ "beta"
+ ],
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "example": "default",
+ "explode": false,
"in": "path",
- "description": "The deployment ID",
+ "name": "projectKey",
"required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "The deployment ID"
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "expand",
+ "example": "production",
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "A filter to apply to the list of SDK keys. Supports the following fields and operators: `kind` (equals \"sdk\" or \"mobile\"), `active` (equals true or false). Format: `field:value`. Example: `kind:sdk`.",
+ "explode": true,
"in": "query",
- "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`",
+ "name": "filter",
+ "required": false,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`"
- }
+ "type": "string"
+ },
+ "style": "form"
+ },
+ {
+ "description": "The number of SDK keys to return. Defaults to 20. Maximum is 100.",
+ "explode": true,
+ "in": "query",
+ "name": "limit",
+ "required": false,
+ "schema": {
+ "type": "integer"
+ },
+ "style": "form"
+ },
+ {
+ "description": "The number of SDK keys to skip. Used for pagination.",
+ "explode": true,
+ "in": "query",
+ "name": "offset",
+ "required": false,
+ "schema": {
+ "type": "integer"
+ },
+ "style": "form"
+ },
+ {
+ "description": "A sort to apply to the list of SDK keys. Supported field: `createdAt`. Prefix the field with `-` to sort in descending order (for example, `-createdAt`).",
+ "explode": true,
+ "in": "query",
+ "name": "sort",
+ "required": false,
+ "schema": {
+ "enum": [
+ "createdAt",
+ "-createdAt"
+ ],
+ "type": "string"
+ },
+ "style": "form"
}
],
- "operationId": "getDeployment"
- },
- "patch": {
"responses": {
"200": {
- "description": "Deployment response",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeploymentRep"
+ "$ref": "#/components/schemas/SdkKeysForGetSdkKeys"
}
}
- }
+ },
+ "description": "Successful response"
},
"400": {
- "description": "Invalid request",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
- }
- }
- }
- },
- "401": {
- "description": "Invalid access token",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
"403": {
- "description": "Forbidden",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
"404": {
- "description": "Invalid resource identifier",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Get all environment SDK keys",
"tags": [
- "Insights deployments (beta)"
- ],
- "summary": "Update deployment",
- "description": "Update a deployment by ID. Updating a deployment uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).
The deployment ID is returned as part of the [List deployments](https://launchdarkly.com/docs/api/insights-deployments-beta/get-deployments) response. It is the `id` field of each element in the `items` array.",
+ "SDK Keys (beta)"
+ ]
+ },
+ "post": {
+ "description": "Create a new server-side or mobile SDK key.\n\nDeleted SDK keys are retained for 180 days. During that period you cannot reuse the `key` of a deleted SDK key, even though the deleted key no longer appears in the list of SDK keys for the environment.",
+ "operationId": "postSdkKey",
"parameters": [
{
- "name": "deploymentID",
+ "description": "Version of the endpoint.",
+ "explode": false,
+ "in": "header",
+ "name": "LD-API-Version",
+ "required": true,
+ "schema": {
+ "enum": [
+ "beta"
+ ],
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "example": "default",
+ "explode": false,
"in": "path",
- "description": "The deployment ID",
+ "name": "projectKey",
"required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "The deployment ID"
- }
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "example": "production",
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/JSONPatch"
- },
- "example": [
- {
- "op": "replace",
- "path": "/status",
- "value": "finished"
- }
- ]
+ "$ref": "#/components/schemas/SdkKeyPost"
+ }
}
},
+ "description": "Parameters for creating a new SDK key",
"required": true
},
- "operationId": "updateDeployment"
- }
- },
- "/api/v2/engineering-insights/flag-events": {
- "get": {
"responses": {
- "200": {
- "description": "Flag event collection response",
+ "201": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/FlagEventCollectionRep"
+ "$ref": "#/components/schemas/SdkKey"
}
}
- }
+ },
+ "description": "SDK key created"
},
"400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
- "401": {
- "description": "Invalid access token",
+ "403": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
- "403": {
- "description": "Forbidden",
+ "404": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
- "404": {
- "description": "Invalid resource identifier",
+ "409": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Conflict"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Create SDK key",
"tags": [
- "Insights flag events (beta)"
- ],
- "summary": "List flag events",
- "description": "Get a list of flag events\n\n### Expanding the flag event collection response\n\nLaunchDarkly supports expanding the flag event collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `experiments` includes details on all of the experiments run on each flag\n\nFor example, use `?expand=experiments` to include the `experiments` field in the response. By default, this field is **not** included in the response.\n",
+ "SDK Keys (beta)"
+ ]
+ }
+ },
+ "/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}": {
+ "delete": {
+ "description": "Delete a specific SDK key by its key.",
+ "operationId": "deleteSdkKeyByKey",
"parameters": [
{
- "name": "projectKey",
- "in": "query",
- "description": "The project key",
+ "description": "Version of the endpoint.",
+ "explode": false,
+ "in": "header",
+ "name": "LD-API-Version",
"required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "The project key"
- }
+ "enum": [
+ "beta"
+ ],
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "environmentKey",
- "in": "query",
- "description": "The environment key",
+ "example": "default",
+ "explode": false,
+ "in": "path",
+ "name": "projectKey",
"required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "The environment key"
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "applicationKey",
- "in": "query",
- "description": "Comma separated list of application keys",
+ "example": "production",
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Comma separated list of application keys"
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "query",
- "in": "query",
- "description": "Filter events by flag key",
+ "description": "The user-defined identifying key of the SDK key. This is used solely to identify an SDK key and is distinct from the value field, which is the actual SDK key value.",
+ "example": "my-sdk-key",
+ "explode": false,
+ "in": "path",
+ "name": "sdkKeyKey",
+ "required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Filter events by flag key"
- }
+ "type": "string"
+ },
+ "style": "simple"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "SDK key deleted"
+ },
+ "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"
+ },
+ "409": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Conflict"
},
+ "500": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Internal server error"
+ }
+ },
+ "summary": "Delete SDK key",
+ "tags": [
+ "SDK Keys (beta)"
+ ]
+ },
+ "get": {
+ "description": "Get a specific SDK key by its key.",
+ "operationId": "getSdkKeyByKey",
+ "parameters": [
{
- "name": "impactSize",
- "in": "query",
- "description": "Filter events by impact size. A small impact created a less than 20% change in the proportion of end users receiving one or more flag variations. A medium impact created between a 20%-80% change. A large impact created a more than 80% change. Options: `none`, `small`, `medium`, `large`",
+ "description": "Version of the endpoint.",
+ "explode": false,
+ "in": "header",
+ "name": "LD-API-Version",
+ "required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Filter events by impact size. A small impact created a less than 20% change in the proportion of end users receiving one or more flag variations. A medium impact created between a 20%-80% change. A large impact created a more than 80% change. Options: `none`, `small`, `medium`, `large`"
- }
+ "enum": [
+ "beta"
+ ],
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "hasExperiments",
- "in": "query",
- "description": "Filter events to those associated with an experiment (`true`) or without an experiment (`false`)",
+ "example": "default",
+ "explode": false,
+ "in": "path",
+ "name": "projectKey",
+ "required": true,
"schema": {
- "type": "boolean",
- "format": "boolean",
- "description": "Filter events to those associated with an experiment (`true`) or without an experiment (`false`)"
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "global",
- "in": "query",
- "description": "Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`",
+ "example": "production",
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`"
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "expand",
- "in": "query",
- "description": "Expand properties in response. Options: `experiments`",
+ "description": "The user-defined identifying key of the SDK key. This is used solely to identify an SDK key and is distinct from the value field, which is the actual SDK key value.",
+ "example": "my-sdk-key",
+ "explode": false,
+ "in": "path",
+ "name": "sdkKeyKey",
+ "required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Expand properties in response. Options: `experiments`"
- }
+ "type": "string"
+ },
+ "style": "simple"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SdkKey"
+ }
+ }
+ },
+ "description": "Successful response"
+ },
+ "400": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Bad request"
+ },
+ "403": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Forbidden"
+ },
+ "404": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Not found"
},
+ "500": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Internal server error"
+ }
+ },
+ "summary": "Get SDK key",
+ "tags": [
+ "SDK Keys (beta)"
+ ]
+ },
+ "patch": {
+ "description": "Update a an existing SDK key by its identifying key.",
+ "operationId": "patchSdkKeyByKey",
+ "parameters": [
{
- "name": "limit",
- "in": "query",
- "description": "The number of deployments to return. Default is 20. Maximum allowed is 100.",
+ "description": "Version of the endpoint.",
+ "explode": false,
+ "in": "header",
+ "name": "LD-API-Version",
+ "required": true,
"schema": {
- "type": "integer",
- "format": "int64",
- "description": "The number of deployments to return. Default is 20. Maximum allowed is 100."
- }
+ "enum": [
+ "beta"
+ ],
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "from",
- "in": "query",
- "description": "Unix timestamp in milliseconds. Default value is 7 days ago.",
+ "example": "default",
+ "explode": false,
+ "in": "path",
+ "name": "projectKey",
+ "required": true,
"schema": {
- "type": "integer",
- "format": "int64",
- "description": "Unix timestamp in milliseconds. Default value is 7 days ago."
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "to",
- "in": "query",
- "description": "Unix timestamp in milliseconds. Default value is now.",
+ "example": "production",
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
"schema": {
- "type": "integer",
- "format": "int64",
- "description": "Unix timestamp in milliseconds. Default value is now."
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "after",
- "in": "query",
- "description": "Identifier used for pagination",
+ "description": "The user-defined identifying key of the SDK key. This is used solely to identify an SDK key and is distinct from the value field, which is the actual SDK key value.",
+ "example": "my-sdk-key",
+ "explode": false,
+ "in": "path",
+ "name": "sdkKeyKey",
+ "required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Identifier used for pagination"
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "before",
+ "description": "The version of the SDK key for optimistic locking. If provided, the update will only succeed if the current version matches.",
+ "explode": true,
"in": "query",
- "description": "Identifier used for pagination",
+ "name": "version",
+ "required": false,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Identifier used for pagination"
- }
+ "type": "integer"
+ },
+ "style": "form"
}
],
- "operationId": "getFlagEvents"
- }
- },
- "/api/v2/engineering-insights/insights/group": {
- "post": {
- "responses": {
- "201": {
- "description": "Created",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/InsightGroup"
- }
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SdkKeyPatch"
}
}
},
- "400": {
- "description": "Invalid request",
+ "description": "An array of patches for updating an existing SDK key. The following fields are supported: `name`, `description`, `expiry`.",
+ "required": true
+ },
+ "responses": {
+ "200": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/SdkKey"
}
}
- }
+ },
+ "description": "Successful response"
},
- "401": {
- "description": "Invalid access token",
+ "400": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
"403": {
- "description": "Forbidden",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
"404": {
- "description": "Invalid resource identifier",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
"409": {
- "description": "Status conflict",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/StatusConflictErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Conflict"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Update SDK key",
"tags": [
- "Insights scores (beta)"
+ "SDK Keys (beta)"
+ ]
+ }
+ },
+ "/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}/views": {
+ "put": {
+ "description": "Replace the set of views associated with an SDK key. The `viewKeys` field is required. To remove all views from the SDK key, pass an empty `viewKeys` array.",
+ "operationId": "putSdkKeyViews",
+ "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": "environmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "explode": false,
+ "in": "path",
+ "name": "sdkKeyKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "description": "A comma-separated list of fields to expand in the response. Supported fields: `viewSummaries`.",
+ "explode": true,
+ "in": "query",
+ "name": "expand",
+ "required": false,
+ "schema": {
+ "type": "string"
+ },
+ "style": "form"
+ }
],
- "summary": "Create insight group",
- "description": "Create insight group",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/PostInsightGroupParams"
+ "$ref": "#/components/schemas/SdkKeyViewsPut"
}
}
},
"required": true
},
- "operationId": "createInsightGroup"
- }
- },
- "/api/v2/engineering-insights/insights/groups": {
- "get": {
"responses": {
"200": {
- "description": "Insight groups collection response",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/InsightGroupCollection"
+ "$ref": "#/components/schemas/SdkKeyForPutSdkKeyViews"
}
}
- }
+ },
+ "description": "Successful response"
},
"400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
- "401": {
- "description": "Invalid access token",
+ "403": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
- "403": {
- "description": "Forbidden",
+ "404": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Replace SDK key views",
"tags": [
- "Insights scores (beta)"
- ],
- "summary": "List insight groups",
- "description": "List groups for which you are collecting insights\n\n### Expanding the insight groups collection response\n\nLaunchDarkly supports expanding the insight groups collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `scores` includes details on all of the scores used in the engineering insights metrics views for each group\n* `environment` includes details on each environment associated with each group\n* `metadata` includes counts of the number of insight groups with particular indicators, such as \"excellent,\" \"good,\" \"fair,\" and so on.\n\nFor example, use `?expand=scores` to include the `scores` field in the response. By default, this field is **not** included in the response.\n",
+ "SDK Keys (beta)"
+ ]
+ }
+ },
+ "/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers": {
+ "get": {
+ "description": "List all adaptive triggers for a resource.",
+ "operationId": "listAdaptiveTriggers",
"parameters": [
{
- "name": "limit",
- "in": "query",
- "description": "The number of insight groups to return. Default is 20. Must be between 1 and 20 inclusive.",
+ "explode": false,
+ "in": "path",
+ "name": "projectKey",
+ "required": true,
"schema": {
- "type": "integer",
- "format": "int64",
- "description": "The number of insight groups to return. Default is 20. Must be between 1 and 20 inclusive."
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "offset",
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "explode": true,
"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`.",
+ "name": "resourceKind",
+ "required": true,
"schema": {
- "type": "integer",
- "format": "int64",
- "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`."
- }
+ "$ref": "#/components/schemas/AdaptiveTriggerResourceKind"
+ },
+ "style": "form"
},
{
- "name": "sort",
+ "explode": true,
"in": "query",
- "description": "Sort flag list by field. Prefix field with - to sort in descending order. Allowed fields: name",
+ "name": "resourceKey",
+ "required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Sort flag list by field. Prefix field with - to sort in descending order. Allowed fields: name"
- }
+ "type": "string"
+ },
+ "style": "form"
},
{
- "name": "query",
+ "description": "The number of items to return.",
+ "explode": true,
"in": "query",
- "description": "Filter list of insights groups by name.",
+ "name": "limit",
+ "required": false,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Filter list of insights groups by name."
- }
+ "default": 25,
+ "maximum": 50,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "style": "form"
},
{
- "name": "expand",
+ "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",
- "description": "Options: `scores`, `environment`, `metadata`",
+ "name": "offset",
+ "required": false,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Options: `scores`, `environment`, `metadata`"
- }
+ "default": 0,
+ "minimum": 0,
+ "type": "integer"
+ },
+ "style": "form"
}
],
- "operationId": "getInsightGroups"
- }
- },
- "/api/v2/engineering-insights/insights/groups/{insightGroupKey}": {
- "get": {
"responses": {
"200": {
- "description": "Insight group response",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/InsightGroup"
+ "$ref": "#/components/schemas/AdaptiveTriggers"
}
}
- }
+ },
+ "description": "Adaptive Triggers list"
},
"400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
- "401": {
- "description": "Invalid access token",
+ "403": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
- "403": {
- "description": "Forbidden",
+ "404": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
- "404": {
- "description": "Invalid resource identifier",
+ "429": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Rate Limited"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "List adaptive triggers",
"tags": [
- "Insights scores (beta)"
- ],
- "summary": "Get insight group",
- "description": "Get insight group\n\n### Expanding the insight group response\n\nLaunchDarkly supports expanding the insight group response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `scores` includes details on all of the scores used in the engineering insights metrics views for this group\n* `environment` includes details on each environment associated with this group\n\nFor example, use `?expand=scores` to include the `scores` field in the response. By default, this field is **not** included in the response.\n",
+ "Adaptive triggers"
+ ]
+ },
+ "post": {
+ "description": "Create a new adaptive trigger for a resource.",
+ "operationId": "postAdaptiveTrigger",
"parameters": [
{
- "name": "insightGroupKey",
+ "explode": false,
"in": "path",
- "description": "The insight group key",
+ "name": "projectKey",
"required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "The insight group key"
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "expand",
- "in": "query",
- "description": "Options: `scores`, `environment`",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Options: `scores`, `environment`"
- }
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
}
],
- "operationId": "getInsightGroup"
- },
- "patch": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateAdaptiveTriggerRequest"
+ }
+ }
+ },
+ "required": true
+ },
"responses": {
- "200": {
- "description": "Insight group response",
+ "201": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/InsightGroup"
+ "$ref": "#/components/schemas/AdaptiveTrigger"
}
}
- }
+ },
+ "description": "Adaptive Trigger created"
},
"400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
- "401": {
- "description": "Invalid access token",
+ "403": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
- "403": {
- "description": "Forbidden",
+ "404": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
- "404": {
- "description": "Invalid resource identifier",
+ "409": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Conflict"
},
- "422": {
- "description": "Invalid patch content",
+ "429": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/PatchFailedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Rate Limited"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Create an adaptive trigger",
"tags": [
- "Insights scores (beta)"
- ],
- "summary": "Patch insight group",
- "description": "Update an insight group. Updating an insight group uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).",
+ "Adaptive triggers"
+ ]
+ }
+ },
+ "/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}": {
+ "delete": {
+ "description": "Delete a single adaptive trigger.",
+ "operationId": "deleteAdaptiveTrigger",
"parameters": [
{
- "name": "insightGroupKey",
+ "explode": false,
"in": "path",
- "description": "The insight group key",
+ "name": "projectKey",
"required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "The insight group key"
- }
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "explode": false,
+ "in": "path",
+ "name": "triggerID",
+ "required": true,
+ "schema": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "style": "simple"
}
],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/JSONPatch"
- },
- "example": [
- {
- "op": "replace",
- "path": "/name",
- "value": "Prod group"
- }
- ]
- }
- },
- "required": true
- },
- "operationId": "patchInsightGroup"
- },
- "delete": {
"responses": {
"204": {
- "description": "Action succeeded"
+ "description": "No content"
},
"400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
- "401": {
- "description": "Invalid access token",
+ "403": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
- "403": {
- "description": "Forbidden",
+ "404": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
- "404": {
- "description": "Invalid resource identifier",
+ "429": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Rate Limited"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Delete an adaptive trigger",
"tags": [
- "Insights scores (beta)"
- ],
- "summary": "Delete insight group",
- "description": "Delete insight group",
+ "Adaptive triggers"
+ ]
+ },
+ "get": {
+ "description": "Get a single adaptive trigger.",
+ "operationId": "getAdaptiveTrigger",
"parameters": [
{
- "name": "insightGroupKey",
+ "explode": false,
"in": "path",
- "description": "The insight group key",
+ "name": "projectKey",
"required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "The insight group key"
- }
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "explode": false,
+ "in": "path",
+ "name": "triggerID",
+ "required": true,
+ "schema": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "style": "simple"
}
],
- "operationId": "deleteInsightGroup"
- }
- },
- "/api/v2/engineering-insights/insights/scores": {
- "get": {
"responses": {
"200": {
- "description": "Insight score response",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/InsightScores"
+ "$ref": "#/components/schemas/AdaptiveTrigger"
}
}
- }
+ },
+ "description": "Trigger"
},
"400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
- "401": {
- "description": "Invalid access token",
+ "403": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
- "403": {
- "description": "Forbidden",
+ "404": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
"429": {
- "description": "Rate limited",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Rate Limited"
+ },
+ "500": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Get an adaptive trigger",
"tags": [
- "Insights scores (beta)"
- ],
- "summary": "Get insight scores",
- "description": "Return insights scores, based on the given parameters. This data is also used in engineering insights metrics views.",
+ "Adaptive triggers"
+ ]
+ },
+ "patch": {
+ "description": "Update a single adaptive trigger.",
+ "operationId": "patchAdaptiveTrigger",
"parameters": [
{
+ "explode": false,
+ "in": "path",
"name": "projectKey",
- "in": "query",
- "description": "The project key",
"required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "The project key"
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
+ "explode": false,
+ "in": "path",
"name": "environmentKey",
- "in": "query",
- "description": "The environment key",
"required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "The environment key"
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "applicationKey",
- "in": "query",
- "description": "Comma separated list of application keys",
+ "explode": false,
+ "in": "path",
+ "name": "triggerID",
+ "required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Comma separated list of application keys"
- }
+ "format": "uuid",
+ "type": "string"
+ },
+ "style": "simple"
}
],
- "operationId": "getInsightsScores"
- }
- },
- "/api/v2/engineering-insights/pull-requests": {
- "get": {
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateAdaptiveTriggerRequest"
+ }
+ }
+ },
+ "required": true
+ },
"responses": {
"200": {
- "description": "Pull request collection response",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/PullRequestCollectionRep"
+ "$ref": "#/components/schemas/AdaptiveTrigger"
}
}
- }
+ },
+ "description": "Adaptive Trigger updated"
},
"400": {
- "description": "Invalid request",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Bad request"
},
- "401": {
- "description": "Invalid access token",
+ "403": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Forbidden"
},
- "403": {
- "description": "Forbidden",
+ "404": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ForbiddenErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Not found"
},
- "404": {
- "description": "Invalid resource identifier",
+ "429": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Rate Limited"
},
- "429": {
- "description": "Rate limited",
+ "500": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/RateLimitedErrorRep"
+ "$ref": "#/components/schemas/Error"
}
}
- }
+ },
+ "description": "Internal server error"
}
},
+ "summary": "Update an adaptive trigger",
"tags": [
- "Insights pull requests (beta)"
- ],
- "summary": "List pull requests",
- "description": "Get a list of pull requests\n\n### Expanding the pull request collection response\n\nLaunchDarkly supports expanding the pull request collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `deployments` includes details on all of the deployments associated with each pull request\n* `flagReferences` includes details on all of the references to flags in each pull request\n* `leadTime` includes details about the lead time of the pull request for each stage\n\nFor example, use `?expand=deployments` to include the `deployments` field in the response. By default, this field is **not** included in the response.\n",
+ "Adaptive triggers"
+ ]
+ }
+ },
+ "/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/enable": {
+ "post": {
+ "description": "Enable an adaptive trigger.",
+ "operationId": "postEnableAdaptiveTrigger",
"parameters": [
{
+ "explode": false,
+ "in": "path",
"name": "projectKey",
- "in": "query",
- "description": "The project key",
"required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "The project key"
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
+ "explode": false,
+ "in": "path",
"name": "environmentKey",
- "in": "query",
- "description": "Required if you are using the sort parameter's leadTime option to sort pull requests.",
+ "required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Required if you are using the sort parameter's leadTime option to sort pull requests."
- }
+ "type": "string"
+ },
+ "style": "simple"
},
{
- "name": "applicationKey",
- "in": "query",
- "description": "Filter the results to pull requests deployed to a comma separated list of applications",
+ "explode": false,
+ "in": "path",
+ "name": "triggerID",
+ "required": true,
"schema": {
- "type": "string",
- "format": "string",
- "description": "Filter the results to pull requests deployed to a comma separated list of applications"
- }
+ "format": "uuid",
+ "type": "string"
+ },
+ "style": "simple"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "No content"
},
- {
- "name": "status",
- "in": "query",
- "description": "Filter results to pull requests with the given status. Options: `open`, `merged`, `closed`, `deployed`.",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Filter results to pull requests with the given status. Options: `open`, `merged`, `closed`, `deployed`."
- }
+ "400": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Bad request"
},
- {
- "name": "query",
- "in": "query",
- "description": "Filter list of pull requests by title or author",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Filter list of pull requests by title or author"
- }
+ "403": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Forbidden"
},
- {
- "name": "limit",
- "in": "query",
- "description": "The number of pull requests to return. Default is 20. Maximum allowed is 100.",
- "schema": {
- "type": "integer",
- "format": "int64",
- "description": "The number of pull requests to return. Default is 20. Maximum allowed is 100."
- }
+ "404": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Not found"
},
- {
- "name": "expand",
- "in": "query",
- "description": "Expand properties in response. Options: `deployments`, `flagReferences`, `leadTime`.",
- "schema": {
- "type": "string",
- "format": "string",
- "description": "Expand properties in response. Options: `deployments`, `flagReferences`, `leadTime`."
- }
+ "429": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Rate Limited"
},
- {
- "name": "sort",
+ "500": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Internal server error"
+ }
+ },
+ "summary": "Enable an adaptive trigger",
+ "tags": [
+ "Adaptive triggers"
+ ]
+ }
+ },
+ "/api/v2/projects/{projectKey}/environments/{environmentKey}/adaptive-triggers/{triggerID}/disable": {
+ "post": {
+ "description": "Disable an adaptive trigger.",
+ "operationId": "postDisableAdaptiveTrigger",
+ "parameters": [
+ {
+ "explode": false,
+ "in": "path",
+ "name": "projectKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "explode": false,
+ "in": "path",
+ "name": "environmentKey",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "style": "simple"
+ },
+ {
+ "explode": false,
+ "in": "path",
+ "name": "triggerID",
+ "required": true,
+ "schema": {
+ "format": "uuid",
+ "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"
+ },
+ "429": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Rate Limited"
+ },
+ "500": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ },
+ "description": "Internal server error"
+ }
+ },
+ "summary": "Disable an adaptive trigger",
+ "tags": [
+ "Adaptive triggers"
+ ]
+ }
+ },
+ "/api/v2/engineering-insights/charts/deployments/frequency": {
+ "get": {
+ "responses": {
+ "200": {
+ "description": "Chart response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InsightsChart"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights charts (beta)"
+ ],
+ "summary": "Get deployment frequency chart data",
+ "description": "Get deployment frequency chart data. Engineering insights displays deployment frequency data in the [deployment frequency metric view](https://launchdarkly.com/docs/home/observability/deployments).\n\n### Expanding the chart response\n\nLaunchDarkly supports expanding the chart response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `metrics` includes details on the metrics related to deployment frequency\n\nFor example, use `?expand=metrics` to include the `metrics` field in the response. By default, this field is **not** included in the response.\n",
+ "parameters": [
+ {
+ "name": "projectKey",
"in": "query",
- "description": "Sort results. Requires the `environmentKey` to be set. Options: `leadTime` (asc) and `-leadTime` (desc). When query option is excluded, default sort is by created or merged date.",
+ "description": "The project key",
"schema": {
"type": "string",
"format": "string",
- "description": "Sort results. Requires the `environmentKey` to be set. Options: `leadTime` (asc) and `-leadTime` (desc). When query option is excluded, default sort is by created or merged date."
+ "description": "The project key"
+ }
+ },
+ {
+ "name": "environmentKey",
+ "in": "query",
+ "description": "The environment key",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The environment key"
+ }
+ },
+ {
+ "name": "applicationKey",
+ "in": "query",
+ "description": "Comma separated list of application keys",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Comma separated list of application keys"
}
},
{
@@ -42772,38 +42257,58 @@
}
},
{
- "name": "after",
+ "name": "bucketType",
"in": "query",
- "description": "Identifier used for pagination",
+ "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.",
"schema": {
"type": "string",
"format": "string",
- "description": "Identifier used for pagination"
+ "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`."
}
},
{
- "name": "before",
+ "name": "bucketMs",
"in": "query",
- "description": "Identifier used for pagination",
+ "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds)."
+ }
+ },
+ {
+ "name": "groupBy",
+ "in": "query",
+ "description": "Options: `application`, `kind`",
"schema": {
"type": "string",
"format": "string",
- "description": "Identifier used for pagination"
+ "description": "Options: `application`, `kind`"
+ }
+ },
+ {
+ "name": "expand",
+ "in": "query",
+ "description": "Options: `metrics`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Options: `metrics`"
}
}
],
- "operationId": "getPullRequests"
+ "operationId": "getDeploymentFrequencyChart"
}
},
- "/api/v2/engineering-insights/repositories": {
+ "/api/v2/engineering-insights/charts/flags/stale": {
"get": {
"responses": {
"200": {
- "description": "Repository collection response",
+ "description": "Chart response",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/InsightsRepositoryCollection"
+ "$ref": "#/components/schemas/InsightsChart"
}
}
}
@@ -42860,34 +42365,96 @@
}
},
"tags": [
- "Insights repositories (beta)"
+ "Insights charts (beta)"
],
- "summary": "List repositories",
- "description": "Get a list of repositories\n\n### Expanding the repository collection response\n\nLaunchDarkly supports expanding the repository collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `projects` includes details on all of the LaunchDarkly projects associated with each repository\n\nFor example, use `?expand=projects` to include the `projects` field in the response. By default, this field is **not** included in the response.\n",
+ "summary": "Get stale flags chart data",
+ "description": "Get stale flags chart data. Engineering insights displays stale flags data in the [flag health metric view](https://launchdarkly.com/docs/home/observability/flag-health).\n\n### Expanding the chart response\n\nLaunchDarkly supports expanding the chart response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `metrics` includes details on the metrics related to stale flags\n\nFor example, use `?expand=metrics` to include the `metrics` field in the response. By default, this field is **not** included in the response.\n",
"parameters": [
+ {
+ "name": "projectKey",
+ "in": "query",
+ "description": "The project key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The project key"
+ }
+ },
+ {
+ "name": "environmentKey",
+ "in": "query",
+ "description": "The environment key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The environment key"
+ }
+ },
+ {
+ "name": "applicationKey",
+ "in": "query",
+ "description": "Comma separated list of application keys",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Comma separated list of application keys"
+ }
+ },
+ {
+ "name": "groupBy",
+ "in": "query",
+ "description": "Property to group results by. Options: `maintainer`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Property to group results by. Options: `maintainer`"
+ }
+ },
+ {
+ "name": "maintainerId",
+ "in": "query",
+ "description": "Comma-separated list of individual maintainers to filter results.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Comma-separated list of individual maintainers to filter results."
+ }
+ },
+ {
+ "name": "maintainerTeamKey",
+ "in": "query",
+ "description": "Comma-separated list of team maintainer keys to filter results.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Comma-separated list of team maintainer keys to filter results."
+ }
+ },
{
"name": "expand",
"in": "query",
- "description": "Expand properties in response. Options: `projects`",
+ "description": "Options: `metrics`",
"schema": {
"type": "string",
"format": "string",
- "description": "Expand properties in response. Options: `projects`"
+ "description": "Options: `metrics`"
}
}
],
- "operationId": "getInsightsRepositories"
+ "operationId": "getStaleFlagsChart"
}
},
- "/api/v2/engineering-insights/repositories/projects": {
- "put": {
+ "/api/v2/engineering-insights/charts/flags/status": {
+ "get": {
"responses": {
"200": {
- "description": "Repositories projects response",
+ "description": "Chart response",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/InsightsRepositoryProjectCollection"
+ "$ref": "#/components/schemas/InsightsChart"
}
}
}
@@ -42944,28 +42511,59 @@
}
},
"tags": [
- "Insights repositories (beta)"
+ "Insights charts (beta)"
],
- "summary": "Associate repositories with projects",
- "description": "Associate repositories with projects",
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/InsightsRepositoryProjectMappings"
- }
+ "summary": "Get flag status chart data",
+ "description": "Get flag status chart data. To learn more, read [Flag statuses](https://launchdarkly.com/docs/home/observability/flag-health#flag-statuses).",
+ "parameters": [
+ {
+ "name": "projectKey",
+ "in": "query",
+ "description": "The project key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The project key"
}
},
- "required": true
- },
- "operationId": "associateRepositoriesAndProjects"
+ {
+ "name": "environmentKey",
+ "in": "query",
+ "description": "The environment key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The environment key"
+ }
+ },
+ {
+ "name": "applicationKey",
+ "in": "query",
+ "description": "Comma separated list of application keys",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Comma separated list of application keys"
+ }
+ }
+ ],
+ "operationId": "getFlagStatusChart"
}
},
- "/api/v2/engineering-insights/repositories/{repositoryKey}/projects/{projectKey}": {
- "delete": {
+ "/api/v2/engineering-insights/charts/lead-time": {
+ "get": {
"responses": {
- "204": {
- "description": "Action succeeded"
+ "200": {
+ "description": "Chart response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InsightsChart"
+ }
+ }
+ }
},
"400": {
"description": "Invalid request",
@@ -43019,105 +42617,2051 @@
}
},
"tags": [
- "Insights repositories (beta)"
+ "Insights charts (beta)"
],
- "summary": "Remove repository project association",
- "description": "Remove repository project association",
+ "summary": "Get lead time chart data",
+ "description": "Get lead time chart data. The engineering insights UI displays lead time data in the [lead time metric view](https://launchdarkly.com/docs/home/observability/lead-time).",
"parameters": [
{
- "name": "repositoryKey",
- "in": "path",
- "description": "The repository key",
+ "name": "projectKey",
+ "in": "query",
+ "description": "The project key",
"required": true,
"schema": {
"type": "string",
"format": "string",
- "description": "The repository key"
+ "description": "The project key"
}
},
{
- "name": "projectKey",
- "in": "path",
- "description": "The project key",
- "required": true,
+ "name": "environmentKey",
+ "in": "query",
+ "description": "The environment key",
"schema": {
"type": "string",
"format": "string",
- "description": "The project key"
+ "description": "The environment key"
}
- }
- ],
- "operationId": "deleteRepositoryProject"
- }
- }
- },
- "components": {
- "schemas": {
- "AIConfigRep": {
- "type": "object",
- "required": [
- "key",
- "name"
- ],
- "properties": {
- "key": {
- "type": "string",
- "description": "The key of the AI Config",
- "example": "aiconfig-key-123abc"
},
- "name": {
- "type": "string",
- "description": "The name of the AI Config",
- "example": "AI Config 1"
- }
- }
- },
- "Access": {
- "type": "object",
- "required": [
- "denied",
- "allowed"
- ],
- "properties": {
- "denied": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/AccessDenied"
+ {
+ "name": "applicationKey",
+ "in": "query",
+ "description": "Comma separated list of application keys",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Comma separated list of application keys"
}
},
- "allowed": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/AccessAllowedRep"
+ {
+ "name": "from",
+ "in": "query",
+ "description": "Unix timestamp in milliseconds. Default value is 7 days ago.",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Unix timestamp in milliseconds. Default value is 7 days ago."
}
- }
- }
- },
- "AccessAllowedReason": {
- "properties": {
- "resources": {
- "description": "Resource specifier strings",
- "example": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "items": {
- "type": "string"
- },
- "type": "array"
},
- "notResources": {
- "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.",
- "items": {
- "type": "string"
- },
- "type": "array"
+ {
+ "name": "to",
+ "in": "query",
+ "description": "Unix timestamp in milliseconds. Default value is now.",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Unix timestamp in milliseconds. Default value is now."
+ }
},
- "actions": {
- "description": "Actions to perform on a resource",
- "example": [
- "*"
- ],
- "items": {
+ {
+ "name": "bucketType",
+ "in": "query",
+ "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`."
+ }
+ },
+ {
+ "name": "bucketMs",
+ "in": "query",
+ "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds)."
+ }
+ },
+ {
+ "name": "groupBy",
+ "in": "query",
+ "description": "Options: `application`, `stage`. Default: `stage`.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Options: `application`, `stage`. Default: `stage`."
+ }
+ },
+ {
+ "name": "expand",
+ "in": "query",
+ "description": "Options: `metrics`, `percentiles`.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Options: `metrics`, `percentiles`."
+ }
+ }
+ ],
+ "operationId": "getLeadTimeChart"
+ }
+ },
+ "/api/v2/engineering-insights/charts/releases/frequency": {
+ "get": {
+ "responses": {
+ "200": {
+ "description": "Chart response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InsightsChart"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights charts (beta)"
+ ],
+ "summary": "Get release frequency chart data",
+ "description": "Get release frequency chart data. Engineering insights displays release frequency data in the [release frequency metric view](https://launchdarkly.com/docs/home/observability/releases).",
+ "parameters": [
+ {
+ "name": "projectKey",
+ "in": "query",
+ "description": "The project key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The project key"
+ }
+ },
+ {
+ "name": "environmentKey",
+ "in": "query",
+ "description": "The environment key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The environment key"
+ }
+ },
+ {
+ "name": "applicationKey",
+ "in": "query",
+ "description": "Comma separated list of application keys",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Comma separated list of application keys"
+ }
+ },
+ {
+ "name": "hasExperiments",
+ "in": "query",
+ "description": "Filter events to those associated with an experiment (`true`) or without an experiment (`false`)",
+ "schema": {
+ "type": "boolean",
+ "format": "boolean",
+ "description": "Filter events to those associated with an experiment (`true`) or without an experiment (`false`)"
+ }
+ },
+ {
+ "name": "global",
+ "in": "query",
+ "description": "Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`"
+ }
+ },
+ {
+ "name": "groupBy",
+ "in": "query",
+ "description": "Property to group results by. Options: `impact`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Property to group results by. Options: `impact`"
+ }
+ },
+ {
+ "name": "from",
+ "in": "query",
+ "description": "Unix timestamp in milliseconds. Default value is 7 days ago.",
+ "schema": {
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ {
+ "name": "to",
+ "in": "query",
+ "description": "Unix timestamp in milliseconds. Default value is now.",
+ "schema": {
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ {
+ "name": "bucketType",
+ "in": "query",
+ "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Specify type of bucket. Options: `rolling`, `hour`, `day`. Default: `rolling`."
+ }
+ },
+ {
+ "name": "bucketMs",
+ "in": "query",
+ "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds).",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Duration of intervals for x-axis in milliseconds. Default value is one day (`86400000` milliseconds)."
+ }
+ },
+ {
+ "name": "expand",
+ "in": "query",
+ "description": "Options: `metrics`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Options: `metrics`"
+ }
+ }
+ ],
+ "operationId": "getReleaseFrequencyChart"
+ }
+ },
+ "/api/v2/engineering-insights/deployment-events": {
+ "post": {
+ "responses": {
+ "201": {
+ "description": "Created"
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights deployments (beta)"
+ ],
+ "summary": "Create deployment event",
+ "description": "Create deployment event",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PostDeploymentEventInput"
+ }
+ }
+ },
+ "required": true
+ },
+ "operationId": "createDeploymentEvent"
+ }
+ },
+ "/api/v2/engineering-insights/deployments": {
+ "get": {
+ "responses": {
+ "200": {
+ "description": "Deployment collection response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DeploymentCollectionRep"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights deployments (beta)"
+ ],
+ "summary": "List deployments",
+ "description": "Get a list of deployments\n\n### Expanding the deployment collection response\n\nLaunchDarkly supports expanding the deployment collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `pullRequests` includes details on all of the pull requests associated with each deployment\n* `flagReferences` includes details on all of the references to flags in each deployment\n\nFor example, use `?expand=pullRequests` to include the `pullRequests` field in the response. By default, this field is **not** included in the response.\n",
+ "parameters": [
+ {
+ "name": "projectKey",
+ "in": "query",
+ "description": "The project key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The project key"
+ }
+ },
+ {
+ "name": "environmentKey",
+ "in": "query",
+ "description": "The environment key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The environment key"
+ }
+ },
+ {
+ "name": "applicationKey",
+ "in": "query",
+ "description": "Comma separated list of application keys",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Comma separated list of application keys"
+ }
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "The number of deployments to return. Default is 20. Maximum allowed is 100.",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "The number of deployments to return. Default is 20. Maximum allowed is 100."
+ }
+ },
+ {
+ "name": "expand",
+ "in": "query",
+ "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`"
+ }
+ },
+ {
+ "name": "from",
+ "in": "query",
+ "description": "Unix timestamp in milliseconds. Default value is 7 days ago.",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Unix timestamp in milliseconds. Default value is 7 days ago."
+ }
+ },
+ {
+ "name": "to",
+ "in": "query",
+ "description": "Unix timestamp in milliseconds. Default value is now.",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Unix timestamp in milliseconds. Default value is now."
+ }
+ },
+ {
+ "name": "after",
+ "in": "query",
+ "description": "Identifier used for pagination",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Identifier used for pagination"
+ }
+ },
+ {
+ "name": "before",
+ "in": "query",
+ "description": "Identifier used for pagination",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Identifier used for pagination"
+ }
+ },
+ {
+ "name": "kind",
+ "in": "query",
+ "description": "The deployment kind",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The deployment kind"
+ }
+ },
+ {
+ "name": "status",
+ "in": "query",
+ "description": "The deployment status",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The deployment status"
+ }
+ }
+ ],
+ "operationId": "getDeployments"
+ }
+ },
+ "/api/v2/engineering-insights/deployments/{deploymentID}": {
+ "get": {
+ "responses": {
+ "200": {
+ "description": "Deployment response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DeploymentRep"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights deployments (beta)"
+ ],
+ "summary": "Get deployment",
+ "description": "Get a deployment by ID.\n\nThe deployment ID is returned as part of the [List deployments](https://launchdarkly.com/docs/api/insights-deployments-beta/get-deployments) response. It is the `id` field of each element in the `items` array.\n\n### Expanding the deployment response\n\nLaunchDarkly supports expanding the deployment response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `pullRequests` includes details on all of the pull requests associated with each deployment\n* `flagReferences` includes details on all of the references to flags in each deployment\n\nFor example, use `?expand=pullRequests` to include the `pullRequests` field in the response. By default, this field is **not** included in the response.\n",
+ "parameters": [
+ {
+ "name": "deploymentID",
+ "in": "path",
+ "description": "The deployment ID",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The deployment ID"
+ }
+ },
+ {
+ "name": "expand",
+ "in": "query",
+ "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Expand properties in response. Options: `pullRequests`, `flagReferences`"
+ }
+ }
+ ],
+ "operationId": "getDeployment"
+ },
+ "patch": {
+ "responses": {
+ "200": {
+ "description": "Deployment response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DeploymentRep"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights deployments (beta)"
+ ],
+ "summary": "Update deployment",
+ "description": "Update a deployment by ID. Updating a deployment uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).
The deployment ID is returned as part of the [List deployments](https://launchdarkly.com/docs/api/insights-deployments-beta/get-deployments) response. It is the `id` field of each element in the `items` array.",
+ "parameters": [
+ {
+ "name": "deploymentID",
+ "in": "path",
+ "description": "The deployment ID",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The deployment ID"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/JSONPatch"
+ },
+ "example": [
+ {
+ "op": "replace",
+ "path": "/status",
+ "value": "finished"
+ }
+ ]
+ }
+ },
+ "required": true
+ },
+ "operationId": "updateDeployment"
+ }
+ },
+ "/api/v2/engineering-insights/flag-events": {
+ "get": {
+ "responses": {
+ "200": {
+ "description": "Flag event collection response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/FlagEventCollectionRep"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights flag events (beta)"
+ ],
+ "summary": "List flag events",
+ "description": "Get a list of flag events\n\n### Expanding the flag event collection response\n\nLaunchDarkly supports expanding the flag event collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `experiments` includes details on all of the experiments run on each flag\n\nFor example, use `?expand=experiments` to include the `experiments` field in the response. By default, this field is **not** included in the response.\n",
+ "parameters": [
+ {
+ "name": "projectKey",
+ "in": "query",
+ "description": "The project key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The project key"
+ }
+ },
+ {
+ "name": "environmentKey",
+ "in": "query",
+ "description": "The environment key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The environment key"
+ }
+ },
+ {
+ "name": "applicationKey",
+ "in": "query",
+ "description": "Comma separated list of application keys",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Comma separated list of application keys"
+ }
+ },
+ {
+ "name": "query",
+ "in": "query",
+ "description": "Filter events by flag key",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Filter events by flag key"
+ }
+ },
+ {
+ "name": "impactSize",
+ "in": "query",
+ "description": "Filter events by impact size. A small impact created a less than 20% change in the proportion of end users receiving one or more flag variations. A medium impact created between a 20%-80% change. A large impact created a more than 80% change. Options: `none`, `small`, `medium`, `large`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Filter events by impact size. A small impact created a less than 20% change in the proportion of end users receiving one or more flag variations. A medium impact created between a 20%-80% change. A large impact created a more than 80% change. Options: `none`, `small`, `medium`, `large`"
+ }
+ },
+ {
+ "name": "hasExperiments",
+ "in": "query",
+ "description": "Filter events to those associated with an experiment (`true`) or without an experiment (`false`)",
+ "schema": {
+ "type": "boolean",
+ "format": "boolean",
+ "description": "Filter events to those associated with an experiment (`true`) or without an experiment (`false`)"
+ }
+ },
+ {
+ "name": "global",
+ "in": "query",
+ "description": "Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`"
+ }
+ },
+ {
+ "name": "expand",
+ "in": "query",
+ "description": "Expand properties in response. Options: `experiments`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Expand properties in response. Options: `experiments`"
+ }
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "The number of deployments to return. Default is 20. Maximum allowed is 100.",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "The number of deployments to return. Default is 20. Maximum allowed is 100."
+ }
+ },
+ {
+ "name": "from",
+ "in": "query",
+ "description": "Unix timestamp in milliseconds. Default value is 7 days ago.",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Unix timestamp in milliseconds. Default value is 7 days ago."
+ }
+ },
+ {
+ "name": "to",
+ "in": "query",
+ "description": "Unix timestamp in milliseconds. Default value is now.",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Unix timestamp in milliseconds. Default value is now."
+ }
+ },
+ {
+ "name": "after",
+ "in": "query",
+ "description": "Identifier used for pagination",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Identifier used for pagination"
+ }
+ },
+ {
+ "name": "before",
+ "in": "query",
+ "description": "Identifier used for pagination",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Identifier used for pagination"
+ }
+ }
+ ],
+ "operationId": "getFlagEvents"
+ }
+ },
+ "/api/v2/engineering-insights/insights/group": {
+ "post": {
+ "responses": {
+ "201": {
+ "description": "Created",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InsightGroup"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "409": {
+ "description": "Status conflict",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/StatusConflictErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights scores (beta)"
+ ],
+ "summary": "Create insight group",
+ "description": "Create insight group",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PostInsightGroupParams"
+ }
+ }
+ },
+ "required": true
+ },
+ "operationId": "createInsightGroup"
+ }
+ },
+ "/api/v2/engineering-insights/insights/groups": {
+ "get": {
+ "responses": {
+ "200": {
+ "description": "Insight groups collection response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InsightGroupCollection"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights scores (beta)"
+ ],
+ "summary": "List insight groups",
+ "description": "List groups for which you are collecting insights\n\n### Expanding the insight groups collection response\n\nLaunchDarkly supports expanding the insight groups collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `scores` includes details on all of the scores used in the engineering insights metrics views for each group\n* `environment` includes details on each environment associated with each group\n* `metadata` includes counts of the number of insight groups with particular indicators, such as \"excellent,\" \"good,\" \"fair,\" and so on.\n\nFor example, use `?expand=scores` to include the `scores` field in the response. By default, this field is **not** included in the response.\n",
+ "parameters": [
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "The number of insight groups to return. Default is 20. Must be between 1 and 20 inclusive.",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "The number of insight groups to return. Default is 20. Must be between 1 and 20 inclusive."
+ }
+ },
+ {
+ "name": "offset",
+ "in": "query",
+ "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`."
+ }
+ },
+ {
+ "name": "sort",
+ "in": "query",
+ "description": "Sort flag list by field. Prefix field with - to sort in descending order. Allowed fields: name",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Sort flag list by field. Prefix field with - to sort in descending order. Allowed fields: name"
+ }
+ },
+ {
+ "name": "query",
+ "in": "query",
+ "description": "Filter list of insights groups by name.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Filter list of insights groups by name."
+ }
+ },
+ {
+ "name": "expand",
+ "in": "query",
+ "description": "Options: `scores`, `environment`, `metadata`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Options: `scores`, `environment`, `metadata`"
+ }
+ }
+ ],
+ "operationId": "getInsightGroups"
+ }
+ },
+ "/api/v2/engineering-insights/insights/groups/{insightGroupKey}": {
+ "get": {
+ "responses": {
+ "200": {
+ "description": "Insight group response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InsightGroup"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights scores (beta)"
+ ],
+ "summary": "Get insight group",
+ "description": "Get insight group\n\n### Expanding the insight group response\n\nLaunchDarkly supports expanding the insight group response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `scores` includes details on all of the scores used in the engineering insights metrics views for this group\n* `environment` includes details on each environment associated with this group\n\nFor example, use `?expand=scores` to include the `scores` field in the response. By default, this field is **not** included in the response.\n",
+ "parameters": [
+ {
+ "name": "insightGroupKey",
+ "in": "path",
+ "description": "The insight group key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The insight group key"
+ }
+ },
+ {
+ "name": "expand",
+ "in": "query",
+ "description": "Options: `scores`, `environment`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Options: `scores`, `environment`"
+ }
+ }
+ ],
+ "operationId": "getInsightGroup"
+ },
+ "patch": {
+ "responses": {
+ "200": {
+ "description": "Insight group response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InsightGroup"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Invalid patch content",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PatchFailedErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights scores (beta)"
+ ],
+ "summary": "Patch insight group",
+ "description": "Update an insight group. Updating an insight group uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).",
+ "parameters": [
+ {
+ "name": "insightGroupKey",
+ "in": "path",
+ "description": "The insight group key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The insight group key"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/JSONPatch"
+ },
+ "example": [
+ {
+ "op": "replace",
+ "path": "/name",
+ "value": "Prod group"
+ }
+ ]
+ }
+ },
+ "required": true
+ },
+ "operationId": "patchInsightGroup"
+ },
+ "delete": {
+ "responses": {
+ "204": {
+ "description": "Action succeeded"
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights scores (beta)"
+ ],
+ "summary": "Delete insight group",
+ "description": "Delete insight group",
+ "parameters": [
+ {
+ "name": "insightGroupKey",
+ "in": "path",
+ "description": "The insight group key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The insight group key"
+ }
+ }
+ ],
+ "operationId": "deleteInsightGroup"
+ }
+ },
+ "/api/v2/engineering-insights/insights/scores": {
+ "get": {
+ "responses": {
+ "200": {
+ "description": "Insight score response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InsightScores"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights scores (beta)"
+ ],
+ "summary": "Get insight scores",
+ "description": "Return insights scores, based on the given parameters. This data is also used in engineering insights metrics views.",
+ "parameters": [
+ {
+ "name": "projectKey",
+ "in": "query",
+ "description": "The project key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The project key"
+ }
+ },
+ {
+ "name": "environmentKey",
+ "in": "query",
+ "description": "The environment key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The environment key"
+ }
+ },
+ {
+ "name": "applicationKey",
+ "in": "query",
+ "description": "Comma separated list of application keys",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Comma separated list of application keys"
+ }
+ }
+ ],
+ "operationId": "getInsightsScores"
+ }
+ },
+ "/api/v2/engineering-insights/pull-requests": {
+ "get": {
+ "responses": {
+ "200": {
+ "description": "Pull request collection response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PullRequestCollectionRep"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights pull requests (beta)"
+ ],
+ "summary": "List pull requests",
+ "description": "Get a list of pull requests\n\n### Expanding the pull request collection response\n\nLaunchDarkly supports expanding the pull request collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `deployments` includes details on all of the deployments associated with each pull request\n* `flagReferences` includes details on all of the references to flags in each pull request\n* `leadTime` includes details about the lead time of the pull request for each stage\n\nFor example, use `?expand=deployments` to include the `deployments` field in the response. By default, this field is **not** included in the response.\n",
+ "parameters": [
+ {
+ "name": "projectKey",
+ "in": "query",
+ "description": "The project key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The project key"
+ }
+ },
+ {
+ "name": "environmentKey",
+ "in": "query",
+ "description": "Required if you are using the sort parameter's leadTime option to sort pull requests.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Required if you are using the sort parameter's leadTime option to sort pull requests."
+ }
+ },
+ {
+ "name": "applicationKey",
+ "in": "query",
+ "description": "Filter the results to pull requests deployed to a comma separated list of applications",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Filter the results to pull requests deployed to a comma separated list of applications"
+ }
+ },
+ {
+ "name": "status",
+ "in": "query",
+ "description": "Filter results to pull requests with the given status. Options: `open`, `merged`, `closed`, `deployed`.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Filter results to pull requests with the given status. Options: `open`, `merged`, `closed`, `deployed`."
+ }
+ },
+ {
+ "name": "query",
+ "in": "query",
+ "description": "Filter list of pull requests by title or author",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Filter list of pull requests by title or author"
+ }
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "The number of pull requests to return. Default is 20. Maximum allowed is 100.",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "description": "The number of pull requests to return. Default is 20. Maximum allowed is 100."
+ }
+ },
+ {
+ "name": "expand",
+ "in": "query",
+ "description": "Expand properties in response. Options: `deployments`, `flagReferences`, `leadTime`.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Expand properties in response. Options: `deployments`, `flagReferences`, `leadTime`."
+ }
+ },
+ {
+ "name": "sort",
+ "in": "query",
+ "description": "Sort results. Requires the `environmentKey` to be set. Options: `leadTime` (asc) and `-leadTime` (desc). When query option is excluded, default sort is by created or merged date.",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Sort results. Requires the `environmentKey` to be set. Options: `leadTime` (asc) and `-leadTime` (desc). When query option is excluded, default sort is by created or merged date."
+ }
+ },
+ {
+ "name": "from",
+ "in": "query",
+ "description": "Unix timestamp in milliseconds. Default value is 7 days ago.",
+ "schema": {
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ {
+ "name": "to",
+ "in": "query",
+ "description": "Unix timestamp in milliseconds. Default value is now.",
+ "schema": {
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ {
+ "name": "after",
+ "in": "query",
+ "description": "Identifier used for pagination",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Identifier used for pagination"
+ }
+ },
+ {
+ "name": "before",
+ "in": "query",
+ "description": "Identifier used for pagination",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Identifier used for pagination"
+ }
+ }
+ ],
+ "operationId": "getPullRequests"
+ }
+ },
+ "/api/v2/engineering-insights/repositories": {
+ "get": {
+ "responses": {
+ "200": {
+ "description": "Repository collection response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InsightsRepositoryCollection"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights repositories (beta)"
+ ],
+ "summary": "List repositories",
+ "description": "Get a list of repositories\n\n### Expanding the repository collection response\n\nLaunchDarkly supports expanding the repository collection response to include additional fields.\n\nTo expand the response, append the `expand` query parameter and include the following:\n\n* `projects` includes details on all of the LaunchDarkly projects associated with each repository\n\nFor example, use `?expand=projects` to include the `projects` field in the response. By default, this field is **not** included in the response.\n",
+ "parameters": [
+ {
+ "name": "expand",
+ "in": "query",
+ "description": "Expand properties in response. Options: `projects`",
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "Expand properties in response. Options: `projects`"
+ }
+ }
+ ],
+ "operationId": "getInsightsRepositories"
+ }
+ },
+ "/api/v2/engineering-insights/repositories/projects": {
+ "put": {
+ "responses": {
+ "200": {
+ "description": "Repositories projects response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InsightsRepositoryProjectCollection"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights repositories (beta)"
+ ],
+ "summary": "Associate repositories with projects",
+ "description": "Associate repositories with projects",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InsightsRepositoryProjectMappings"
+ }
+ }
+ },
+ "required": true
+ },
+ "operationId": "associateRepositoriesAndProjects"
+ }
+ },
+ "/api/v2/engineering-insights/repositories/{repositoryKey}/projects/{projectKey}": {
+ "delete": {
+ "responses": {
+ "204": {
+ "description": "Action succeeded"
+ },
+ "400": {
+ "description": "Invalid request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationFailedErrorRep"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Invalid access token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UnauthorizedErrorRep"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ForbiddenErrorRep"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Invalid resource identifier",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundErrorRep"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limited",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RateLimitedErrorRep"
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Insights repositories (beta)"
+ ],
+ "summary": "Remove repository project association",
+ "description": "Remove repository project association",
+ "parameters": [
+ {
+ "name": "repositoryKey",
+ "in": "path",
+ "description": "The repository key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The repository key"
+ }
+ },
+ {
+ "name": "projectKey",
+ "in": "path",
+ "description": "The project key",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "string",
+ "description": "The project key"
+ }
+ }
+ ],
+ "operationId": "deleteRepositoryProject"
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "AIConfigRep": {
+ "type": "object",
+ "required": [
+ "key",
+ "name"
+ ],
+ "properties": {
+ "key": {
+ "type": "string",
+ "description": "The key of the AI Config",
+ "example": "aiconfig-key-123abc"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the AI Config",
+ "example": "AI Config 1"
+ }
+ }
+ },
+ "Access": {
+ "type": "object",
+ "required": [
+ "denied",
+ "allowed"
+ ],
+ "properties": {
+ "denied": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/AccessDenied"
+ }
+ },
+ "allowed": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/AccessAllowedRep"
+ }
+ }
+ }
+ },
+ "AccessAllowedReason": {
+ "properties": {
+ "resources": {
+ "description": "Resource specifier strings",
+ "example": [
+ "proj/*:env/*;qa_*:/flag/*"
+ ],
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "notResources": {
+ "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "actions": {
+ "description": "Actions to perform on a resource",
+ "example": [
+ "*"
+ ],
+ "items": {
"$ref": "#/components/schemas/ActionSpecifier"
},
"type": "array"
@@ -43861,6 +45405,34 @@
}
}
},
+ "AssignmentDataSourceInput": {
+ "type": "object",
+ "required": [
+ "key"
+ ],
+ "properties": {
+ "key": {
+ "type": "string",
+ "description": "The key of the assignment data source to use for this iteration",
+ "example": "my-assignment-data-source"
+ },
+ "experimentId": {
+ "type": "string",
+ "description": "The experiment identifier in the assignment data source. You can omit this while the experiment is a draft, but it must be set before you start the experiment.",
+ "example": "experiment-123"
+ },
+ "startTime": {
+ "description": "The start of the assignment data window, in Unix milliseconds",
+ "example": "1690000000000",
+ "$ref": "#/components/schemas/UnixMillis"
+ },
+ "endTime": {
+ "description": "The end of the assignment data window, in Unix milliseconds",
+ "example": "1690000000000",
+ "$ref": "#/components/schemas/UnixMillis"
+ }
+ }
+ },
"Audience": {
"type": "object",
"required": [
@@ -47954,6 +49526,19 @@
"snowflake"
]
},
+ "assignmentSourceType": {
+ "type": "string",
+ "description": "The source of assignment data for this experiment. Defaults to \"launchdarkly\" when not provided.",
+ "example": "snowflake",
+ "enum": [
+ "launchdarkly",
+ "snowflake",
+ "databricks",
+ "redshift",
+ "bigquery",
+ "clickhouse"
+ ]
+ },
"archivedDate": {
"description": "Timestamp of when the experiment was archived",
"example": "1654104600000",
@@ -50980,6 +52565,10 @@
"_access": {
"description": "Details on the allowed and denied actions for this configuration",
"$ref": "#/components/schemas/Access"
+ },
+ "_status": {
+ "description": "Sync status for this feature store. Recent error bodies are included only when fetching a single configuration.",
+ "$ref": "#/components/schemas/IntegrationDeliveryConfigurationStatus"
}
}
},
@@ -51095,6 +52684,42 @@
}
}
},
+ "IntegrationDeliveryConfigurationStatus": {
+ "type": "object",
+ "required": [
+ "available",
+ "potentiallyStale"
+ ],
+ "properties": {
+ "available": {
+ "type": "boolean",
+ "description": "Whether the latest sync succeeded",
+ "example": false
+ },
+ "potentiallyStale": {
+ "type": "boolean",
+ "description": "Whether the feature store may be missing flag data from a failed or in-progress sync",
+ "example": true
+ },
+ "lastSync": {
+ "description": "Timestamp of the most recent successful sync",
+ "example": "1717263000000",
+ "$ref": "#/components/schemas/UnixMillis"
+ },
+ "lastError": {
+ "description": "Timestamp of the most recent sync error, if any",
+ "example": "1714584600000",
+ "$ref": "#/components/schemas/UnixMillis"
+ },
+ "errors": {
+ "type": "array",
+ "description": "Recent failed sync responses. Successful (200) and in-progress (202) responses are omitted. Included only when fetching a single configuration by ID.",
+ "items": {
+ "$ref": "#/components/schemas/StoreIntegrationError"
+ }
+ }
+ }
+ },
"IntegrationMetadata": {
"type": "object",
"required": [
@@ -51209,6 +52834,41 @@
}
}
},
+ "IterationAssignmentDataSourceRep": {
+ "type": "object",
+ "required": [
+ "key",
+ "name",
+ "experimentId"
+ ],
+ "properties": {
+ "key": {
+ "type": "string",
+ "description": "The key of the assignment data source used for this iteration",
+ "example": "my-assignment-data-source"
+ },
+ "name": {
+ "type": "string",
+ "description": "The display name of the assignment data source",
+ "example": "Snowflake production assignments"
+ },
+ "experimentId": {
+ "type": "string",
+ "description": "The experiment identifier in the assignment data source",
+ "example": "experiment-123"
+ },
+ "startTime": {
+ "description": "The start of the assignment data window, in Unix milliseconds",
+ "example": "1690000000000",
+ "$ref": "#/components/schemas/UnixMillis"
+ },
+ "endTime": {
+ "description": "The end of the assignment data window, in Unix milliseconds",
+ "example": "1690000000000",
+ "$ref": "#/components/schemas/UnixMillis"
+ }
+ }
+ },
"IterationInput": {
"type": "object",
"required": [
@@ -51251,6 +52911,10 @@
"example": "{\"example-flag-key\": { \"ruleId\": \"e432f62b-55f6-49dd-a02f-eb24acf39d05\", \"flagConfigVersion\": 12, \"notInExperimentVariationId\": \"e432f62b-55f6-49dd-a02f-eb24acf39d05\" }}",
"$ref": "#/components/schemas/FlagsInput"
},
+ "assignmentDataSource": {
+ "description": "Details on the custom assignment data source configuration for this iteration",
+ "$ref": "#/components/schemas/AssignmentDataSourceInput"
+ },
"randomizationUnit": {
"type": "string",
"description": "The unit of randomization for this iteration. Defaults to user.",
@@ -51267,7 +52931,7 @@
},
"attributes": {
"type": "array",
- "description": "The attributes that this iteration's results can be sliced by",
+ "description": "The attributes that this iteration's results can be sliced by, whose values come from flag evaluation events",
"items": {
"type": "string"
},
@@ -51374,7 +53038,7 @@
},
"attributes": {
"type": "array",
- "description": "The available attribute filters for this iteration",
+ "description": "The attributes this iteration slices results by, whose values come from flag evaluation events.",
"items": {
"type": "string"
}
@@ -51408,6 +53072,10 @@
"covariateInfo": {
"description": "Details of the covariate file for stratified sampling",
"$ref": "#/components/schemas/CovariateInfoRep"
+ },
+ "assignmentDataSource": {
+ "description": "The custom assignment data source configuration for this iteration",
+ "$ref": "#/components/schemas/IterationAssignmentDataSourceRep"
}
}
},
@@ -56708,6 +58376,11 @@
"items": {
"$ref": "#/components/schemas/TreatmentParameterInput"
}
+ },
+ "assignmentVariantId": {
+ "type": "string",
+ "description": "The variant identifier in the warehouse-native assignment source that maps to this treatment",
+ "example": "treatment-1"
}
}
},
@@ -56763,6 +58436,11 @@
"items": {
"$ref": "#/components/schemas/ParameterRep"
}
+ },
+ "assignmentVariantId": {
+ "type": "string",
+ "description": "The variant identifier in the warehouse-native assignment source that maps to this treatment",
+ "example": "treatment_a"
}
}
},
@@ -57813,6 +59491,11 @@
"description": "The secret for this webhook",
"example": "frobozz"
},
+ "hasBearerToken": {
+ "type": "boolean",
+ "description": "Whether this webhook sends a bearer token. The token itself is never returned.",
+ "example": true
+ },
"statements": {
"type": "array",
"description": "Represents a Custom role policy, defining a resource kinds filter the webhook responds to.",
@@ -59046,6 +60729,11 @@
"description": "If sign is true, and the secret attribute is omitted, LaunchDarkly automatically generates a secret for you.",
"example": "frobozz"
},
+ "bearerToken": {
+ "type": "string",
+ "description": "An optional token. If set, LaunchDarkly sends it in an Authorization: Bearer header with each request. It is write-only and is never returned.",
+ "example": "example-token"
+ },
"statements": {
"description": "Represents a Custom role policy, defining a resource kinds filter the webhook should respond to.",
"$ref": "#/components/schemas/StatementPostList"
@@ -60506,7 +62194,8 @@
"type": "array"
},
"isInverted": {
- "description": "Whether the evaluation metric is inverted, meaning a lower value is better if set as true",
+ "description": "The success direction of a judge. Offline evaluations use it to decide whether a score passes.\n\n- `true`: A lower score is better. Use this for a judge that scores bad output, such as a toxicity or hallucination judge.\n- `false`: A higher score is better. Use this for a judge that scores good output, such as an accuracy or relevance judge.\n\nThe response includes this field only when `mode` is `judge`. For a built-in judge key, the value is always the built-in direction. Built-in judge keys are `ld-ai-judge-accuracy`, `ld-ai-judge-relevance`, and `ld-ai-judge-toxicity`, with or without a `-` suffix such as `ld-ai-judge-accuracy-1760000000000`. A custom judge with no stored direction omits this field.\n",
+ "example": true,
"type": "boolean"
},
"dependencies": {
@@ -60677,7 +62366,8 @@
"type": "string"
},
"isInverted": {
- "description": "Whether the evaluation metric is inverted, meaning a lower value is better if set as true",
+ "description": "The success direction of a judge. Offline evaluations use it to decide whether a score passes.\n\n- `true`: A lower score is better. Use this for a judge that scores bad output, such as a toxicity or hallucination judge.\n- `false`: A higher score is better. Use this for a judge that scores good output, such as an accuracy or relevance judge.\n\n**Required for a custom judge.** A custom judge has `mode` set to `judge` and a `key` that is not a built-in judge key. Built-in judge keys are `ld-ai-judge-accuracy`, `ld-ai-judge-relevance`, and `ld-ai-judge-toxicity`, with or without a `-` suffix such as `ld-ai-judge-accuracy-1760000000000`. For a built-in judge key, this field is optional, and the API always uses the built-in direction.\n\nDo not send this field when `mode` is `agent` or `completion`.\n\nThis field is not in the schema's `required` list, because only custom judges need it.\n\nThe API returns a `400` error in these cases:\n- `isInverted is required for a custom judge: ...`: You create a custom judge without this field. Send `true` or `false`.\n- `isInverted is only supported for judge mode`: You send this field and `mode` is `agent` or `completion`. Remove the field, or set `mode` to `judge`.\n- `isInverted is not supported`: Custom judges are not available for your account. Remove the field from the request.\n",
+ "example": true,
"type": "boolean"
}
},
@@ -60736,7 +62426,8 @@
"type": "string"
},
"isInverted": {
- "description": "Whether the evaluation metric is inverted, meaning a lower value is better if set as true",
+ "description": "The success direction of a judge. Offline evaluations use it to decide whether a score passes.\n\n- `true`: A lower score is better. Use this for a judge that scores bad output, such as a toxicity or hallucination judge.\n- `false`: A higher score is better. Use this for a judge that scores good output, such as an accuracy or relevance judge.\n\nSend this field only when the AI Config's `mode` is `judge`. If you omit it, the current direction does not change. For a built-in judge key, the API always returns the built-in direction. Built-in judge keys are `ld-ai-judge-accuracy`, `ld-ai-judge-relevance`, and `ld-ai-judge-toxicity`, with or without a `-` suffix such as `ld-ai-judge-accuracy-1760000000000`.\n\nThe API returns a `400` error in these cases:\n- `isInverted is only supported for judge mode`: You send this field and the AI Config's `mode` is `agent` or `completion`. Remove the field.\n- `isInverted is not supported`: Custom judges are not available for your account. Remove the field from the request.\n",
+ "example": true,
"type": "boolean"
}
},
@@ -62454,6 +64145,7 @@
"id": "id"
}
],
+ "_id": "_id",
"trackEvents": true
},
{
@@ -62479,10 +64171,11 @@
"id": "id"
}
],
+ "_id": "_id",
"trackEvents": true
}
],
- "lastModified": 2,
+ "lastModified": 7,
"trackEvents": true,
"fallthrough": {
"rollout": {
@@ -62509,7 +64202,7 @@
},
"variation": 5
},
- "offVariation": 4,
+ "offVariation": 1,
"targets": [
{
"values": [
@@ -62528,7 +64221,7 @@
"variation": 5
}
],
- "_version": 7,
+ "_version": 1,
"enabled": true
}
},
@@ -62558,15 +64251,15 @@
],
"_environmentSettings": {
"key": {
- "startDate": 6,
- "stopDate": 8,
+ "startDate": 9,
+ "stopDate": 6,
"enabledPeriods": [
{
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
},
{
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
}
]
@@ -62584,7 +64277,7 @@
}
},
"activeExperimentCount": 2,
- "windowEndOffset": 1,
+ "windowEndOffset": 5,
"randomizationUnits": [
"user"
],
@@ -62686,8 +64379,8 @@
"kind": "custom",
"_attachedFlagCount": 0,
"metricGroupCount": 0,
- "_creationDate": 1,
- "windowStartOffset": 7,
+ "_creationDate": 6,
+ "windowStartOffset": 4,
"tags": [],
"winsorIncludeImputed": false,
"denominator": {
@@ -62712,15 +64405,15 @@
"key": "key",
"environmentKey": "environmentKey"
},
- "windowStartOffset": 4,
- "windowEndOffset": 5,
- "winsorLowerPercentile": 9.965781217890562,
- "winsorUpperPercentile": 9.369310271410669,
+ "windowStartOffset": 9,
+ "windowEndOffset": 9,
+ "winsorLowerPercentile": 6.683562403749608,
+ "winsorUpperPercentile": 8.762042012749001,
"winsorIncludeImputed": true
},
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
- "lastSeen": 1,
+ "lastSeen": 7,
"isNumeric": true,
"experimentCount": 0,
"name": "My metric",
@@ -62780,7 +64473,7 @@
"disabled": true,
"value": 0
},
- "archivedAt": 6,
+ "archivedAt": 1,
"successCriteria": "HigherThanBaseline",
"releasePolicyCount": 0,
"_versionId": "version-id-123abc",
@@ -62799,15 +64492,15 @@
],
"_environmentSettings": {
"key": {
- "startDate": 6,
- "stopDate": 8,
+ "startDate": 9,
+ "stopDate": 6,
"enabledPeriods": [
{
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
},
{
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
}
]
@@ -62825,7 +64518,7 @@
}
},
"activeExperimentCount": 2,
- "windowEndOffset": 1,
+ "windowEndOffset": 5,
"randomizationUnits": [
"user"
],
@@ -62927,8 +64620,8 @@
"kind": "custom",
"_attachedFlagCount": 0,
"metricGroupCount": 0,
- "_creationDate": 1,
- "windowStartOffset": 7,
+ "_creationDate": 6,
+ "windowStartOffset": 4,
"tags": [],
"winsorIncludeImputed": false,
"denominator": {
@@ -62953,15 +64646,15 @@
"key": "key",
"environmentKey": "environmentKey"
},
- "windowStartOffset": 4,
- "windowEndOffset": 5,
- "winsorLowerPercentile": 9.965781217890562,
- "winsorUpperPercentile": 9.369310271410669,
+ "windowStartOffset": 9,
+ "windowEndOffset": 9,
+ "winsorLowerPercentile": 6.683562403749608,
+ "winsorUpperPercentile": 8.762042012749001,
"winsorIncludeImputed": true
},
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
- "lastSeen": 1,
+ "lastSeen": 7,
"isNumeric": true,
"experimentCount": 0,
"name": "My metric",
@@ -63021,7 +64714,7 @@
"disabled": true,
"value": 0
},
- "archivedAt": 6,
+ "archivedAt": 1,
"successCriteria": "HigherThanBaseline",
"releasePolicyCount": 0,
"_versionId": "version-id-123abc",
@@ -63034,7 +64727,7 @@
]
},
"name": "name",
- "_version": 3,
+ "_version": 1,
"key": "key",
"tags": [
"tags",
@@ -63148,6 +64841,18 @@
"judgeToxicity": 0.6846853,
"totalTokens": 1,
"judgeAccuracy": 0.10246457,
+ "judgeScores": [
+ {
+ "score": 7.4577446,
+ "metricKey": "$ld:ai:judge:helpfulness",
+ "count": 1
+ },
+ {
+ "score": 7.4577446,
+ "metricKey": "$ld:ai:judge:helpfulness",
+ "count": 1
+ }
+ ],
"generationCount": 5,
"timeToFirstTokenMs": 2,
"outputTokens": 6,
@@ -63234,8 +64939,44 @@
"maximum": 1,
"minimum": 0,
"type": "number"
+ },
+ "judgeScores": {
+ "description": "Average score and sample count for every judge metric recorded in the time range, keyed by the judge's evaluation metric key. Includes custom judges and the built-in accuracy, relevance, and toxicity judges. Omitted when no judge scores were recorded.",
+ "items": {
+ "$ref": "#/components/schemas/JudgeScore"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "JudgeScore": {
+ "example": {
+ "score": 7.4577446,
+ "metricKey": "$ld:ai:judge:helpfulness",
+ "count": 1
+ },
+ "properties": {
+ "metricKey": {
+ "description": "The judge's evaluation metric key",
+ "example": "$ld:ai:judge:helpfulness",
+ "type": "string"
+ },
+ "score": {
+ "description": "Average judge score across the recorded samples",
+ "format": "float",
+ "type": "number"
+ },
+ "count": {
+ "description": "Number of judge scores recorded",
+ "type": "integer"
}
},
+ "required": [
+ "count",
+ "metricKey",
+ "score"
+ ],
"type": "object"
},
"MetricByVariation": {
@@ -63251,6 +64992,18 @@
"judgeToxicity": 0.6846853,
"totalTokens": 1,
"judgeAccuracy": 0.10246457,
+ "judgeScores": [
+ {
+ "score": 7.4577446,
+ "metricKey": "$ld:ai:judge:helpfulness",
+ "count": 1
+ },
+ {
+ "score": 7.4577446,
+ "metricKey": "$ld:ai:judge:helpfulness",
+ "count": 1
+ }
+ ],
"generationCount": 5,
"timeToFirstTokenMs": 2,
"outputTokens": 6,
@@ -63431,6 +65184,7 @@
"id": "id"
}
],
+ "_id": "_id",
"trackEvents": true
},
{
@@ -63456,10 +65210,11 @@
"id": "id"
}
],
+ "_id": "_id",
"trackEvents": true
}
],
- "lastModified": 2,
+ "lastModified": 7,
"trackEvents": true,
"fallthrough": {
"rollout": {
@@ -63486,7 +65241,7 @@
},
"variation": 5
},
- "offVariation": 4,
+ "offVariation": 1,
"targets": [
{
"values": [
@@ -63505,7 +65260,7 @@
"variation": 5
}
],
- "_version": 7,
+ "_version": 1,
"enabled": true
},
"properties": {
@@ -63742,9 +65497,14 @@
"id": "id"
}
],
+ "_id": "_id",
"trackEvents": true
},
"properties": {
+ "_id": {
+ "description": "The rule ID. Pass it as ruleId in targeting instructions that change this rule.",
+ "type": "string"
+ },
"clauses": {
"description": "The clauses a context must match",
"items": {
@@ -63758,6 +65518,7 @@
}
},
"required": [
+ "_id",
"clauses",
"trackEvents"
],
@@ -68890,15 +70651,15 @@
],
"_environmentSettings": {
"key": {
- "startDate": 6,
- "stopDate": 8,
+ "startDate": 9,
+ "stopDate": 6,
"enabledPeriods": [
{
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
},
{
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
}
]
@@ -68916,7 +70677,7 @@
}
},
"activeExperimentCount": 2,
- "windowEndOffset": 1,
+ "windowEndOffset": 5,
"randomizationUnits": [
"user"
],
@@ -69018,8 +70779,8 @@
"kind": "custom",
"_attachedFlagCount": 0,
"metricGroupCount": 0,
- "_creationDate": 1,
- "windowStartOffset": 7,
+ "_creationDate": 6,
+ "windowStartOffset": 4,
"tags": [],
"winsorIncludeImputed": false,
"denominator": {
@@ -69044,15 +70805,15 @@
"key": "key",
"environmentKey": "environmentKey"
},
- "windowStartOffset": 4,
- "windowEndOffset": 5,
- "winsorLowerPercentile": 9.965781217890562,
- "winsorUpperPercentile": 9.369310271410669,
+ "windowStartOffset": 9,
+ "windowEndOffset": 9,
+ "winsorLowerPercentile": 6.683562403749608,
+ "winsorUpperPercentile": 8.762042012749001,
"winsorIncludeImputed": true
},
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
- "lastSeen": 1,
+ "lastSeen": 7,
"isNumeric": true,
"experimentCount": 0,
"name": "My metric",
@@ -69112,7 +70873,7 @@
"disabled": true,
"value": 0
},
- "archivedAt": 6,
+ "archivedAt": 1,
"successCriteria": "HigherThanBaseline",
"releasePolicyCount": 0,
"_versionId": "version-id-123abc",
@@ -69131,15 +70892,15 @@
],
"_environmentSettings": {
"key": {
- "startDate": 6,
- "stopDate": 8,
+ "startDate": 9,
+ "stopDate": 6,
"enabledPeriods": [
{
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
},
{
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
}
]
@@ -69157,7 +70918,7 @@
}
},
"activeExperimentCount": 2,
- "windowEndOffset": 1,
+ "windowEndOffset": 5,
"randomizationUnits": [
"user"
],
@@ -69259,8 +71020,8 @@
"kind": "custom",
"_attachedFlagCount": 0,
"metricGroupCount": 0,
- "_creationDate": 1,
- "windowStartOffset": 7,
+ "_creationDate": 6,
+ "windowStartOffset": 4,
"tags": [],
"winsorIncludeImputed": false,
"denominator": {
@@ -69285,15 +71046,15 @@
"key": "key",
"environmentKey": "environmentKey"
},
- "windowStartOffset": 4,
- "windowEndOffset": 5,
- "winsorLowerPercentile": 9.965781217890562,
- "winsorUpperPercentile": 9.369310271410669,
+ "windowStartOffset": 9,
+ "windowEndOffset": 9,
+ "winsorLowerPercentile": 6.683562403749608,
+ "winsorUpperPercentile": 8.762042012749001,
"winsorIncludeImputed": true
},
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
- "lastSeen": 1,
+ "lastSeen": 7,
"isNumeric": true,
"experimentCount": 0,
"name": "My metric",
@@ -69353,7 +71114,7 @@
"disabled": true,
"value": 0
},
- "archivedAt": 6,
+ "archivedAt": 1,
"successCriteria": "HigherThanBaseline",
"releasePolicyCount": 0,
"_versionId": "version-id-123abc",
@@ -69392,15 +71153,15 @@
],
"_environmentSettings": {
"key": {
- "startDate": 6,
- "stopDate": 8,
+ "startDate": 9,
+ "stopDate": 6,
"enabledPeriods": [
{
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
},
{
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
}
]
@@ -69418,7 +71179,7 @@
}
},
"activeExperimentCount": 2,
- "windowEndOffset": 1,
+ "windowEndOffset": 5,
"randomizationUnits": [
"user"
],
@@ -69520,8 +71281,8 @@
"kind": "custom",
"_attachedFlagCount": 0,
"metricGroupCount": 0,
- "_creationDate": 1,
- "windowStartOffset": 7,
+ "_creationDate": 6,
+ "windowStartOffset": 4,
"tags": [],
"winsorIncludeImputed": false,
"denominator": {
@@ -69546,15 +71307,15 @@
"key": "key",
"environmentKey": "environmentKey"
},
- "windowStartOffset": 4,
- "windowEndOffset": 5,
- "winsorLowerPercentile": 9.965781217890562,
- "winsorUpperPercentile": 9.369310271410669,
+ "windowStartOffset": 9,
+ "windowEndOffset": 9,
+ "winsorLowerPercentile": 6.683562403749608,
+ "winsorUpperPercentile": 8.762042012749001,
"winsorIncludeImputed": true
},
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
- "lastSeen": 1,
+ "lastSeen": 7,
"isNumeric": true,
"experimentCount": 0,
"name": "My metric",
@@ -69614,7 +71375,7 @@
"disabled": true,
"value": 0
},
- "archivedAt": 6,
+ "archivedAt": 1,
"successCriteria": "HigherThanBaseline",
"releasePolicyCount": 0,
"_versionId": "version-id-123abc",
@@ -69665,7 +71426,7 @@
}
},
"activeExperimentCount": 2,
- "windowEndOffset": 1,
+ "windowEndOffset": 5,
"randomizationUnits": [
"user"
],
@@ -69767,8 +71528,8 @@
"kind": "custom",
"_attachedFlagCount": 0,
"metricGroupCount": 0,
- "_creationDate": 1,
- "windowStartOffset": 7,
+ "_creationDate": 6,
+ "windowStartOffset": 4,
"tags": [],
"winsorIncludeImputed": false,
"denominator": {
@@ -69793,15 +71554,15 @@
"key": "key",
"environmentKey": "environmentKey"
},
- "windowStartOffset": 4,
- "windowEndOffset": 5,
- "winsorLowerPercentile": 9.965781217890562,
- "winsorUpperPercentile": 9.369310271410669,
+ "windowStartOffset": 9,
+ "windowEndOffset": 9,
+ "winsorLowerPercentile": 6.683562403749608,
+ "winsorUpperPercentile": 8.762042012749001,
"winsorIncludeImputed": true
},
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
- "lastSeen": 1,
+ "lastSeen": 7,
"isNumeric": true,
"experimentCount": 0,
"name": "My metric",
@@ -69861,7 +71622,7 @@
"disabled": true,
"value": 0
},
- "archivedAt": 6,
+ "archivedAt": 1,
"successCriteria": "HigherThanBaseline",
"releasePolicyCount": 0,
"_versionId": "version-id-123abc",
@@ -70366,10 +72127,10 @@
"key": "key",
"environmentKey": "environmentKey"
},
- "windowStartOffset": 4,
- "windowEndOffset": 5,
- "winsorLowerPercentile": 9.965781217890562,
- "winsorUpperPercentile": 9.369310271410669,
+ "windowStartOffset": 9,
+ "windowEndOffset": 9,
+ "winsorLowerPercentile": 6.683562403749608,
+ "winsorUpperPercentile": 8.762042012749001,
"winsorIncludeImputed": true
},
"properties": {
@@ -70426,15 +72187,15 @@
},
"AiConfigsExperimentEnvironmentSettingRep": {
"example": {
- "startDate": 6,
- "stopDate": 8,
+ "startDate": 9,
+ "stopDate": 6,
"enabledPeriods": [
{
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
},
{
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
}
]
@@ -70459,7 +72220,7 @@
},
"AiConfigsExperimentEnabledPeriodRep": {
"example": {
- "startDate": 9,
+ "startDate": 3,
"stopDate": 6
},
"properties": {
@@ -71921,9 +73682,6 @@
},
"key": "key",
"updatedAt": 1,
- "payloadSummary": {
- "sdkKeyCount": 6
- },
"resourcesExpanded": {
"totalCount": 7,
"items": {
@@ -72040,112 +73798,6 @@
}
]
},
- "aiConfigs": {
- "totalCount": 3,
- "items": [
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- },
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- }
- ]
- },
- "metrics": {
- "totalCount": 3,
- "items": [
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- },
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- }
- ]
- },
"segments": {
"totalCount": 6,
"items": [
@@ -72209,19 +73861,14 @@
},
"resourceSummary": {
"flagCount": 4,
- "metricCount": 1,
"totalCount": 1,
- "segmentCount": 7,
- "aiConfigCount": 1
+ "segmentCount": 7
},
"version": 0,
"tags": [
"tags",
"tags"
],
- "applicationSummary": {
- "applicationKey": "applicationKey"
- },
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
@@ -72695,9 +74342,6 @@
},
"key": "key",
"updatedAt": 1,
- "payloadSummary": {
- "sdkKeyCount": 6
- },
"resourcesExpanded": {
"totalCount": 7,
"items": {
@@ -72814,112 +74458,6 @@
}
]
},
- "aiConfigs": {
- "totalCount": 3,
- "items": [
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- },
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- }
- ]
- },
- "metrics": {
- "totalCount": 3,
- "items": [
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- },
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- }
- ]
- },
"segments": {
"totalCount": 6,
"items": [
@@ -72983,19 +74521,14 @@
},
"resourceSummary": {
"flagCount": 4,
- "metricCount": 1,
"totalCount": 1,
- "segmentCount": 7,
- "aiConfigCount": 1
+ "segmentCount": 7
},
"version": 0,
"tags": [
"tags",
"tags"
],
- "applicationSummary": {
- "applicationKey": "applicationKey"
- },
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
@@ -73492,9 +75025,6 @@
},
"key": "key",
"updatedAt": 1,
- "payloadSummary": {
- "sdkKeyCount": 6
- },
"resourcesExpanded": {
"totalCount": 7,
"items": {
@@ -73554,68 +75084,11 @@
"tags",
"tags"
]
- },
- {
- "archived": true,
- "temporary": true,
- "includeInSnippet": true,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "creationDate": 7,
- "_version": 1,
- "key": "key",
- "maintainer": {
- "kind": "member",
- "_member": {
- "firstName": "Ariel",
- "lastName": "Flores",
- "role": "admin",
- "_links": {
- "self": {
- "href": "/api/v2/members/569f183514f4432160000007",
- "type": "application/json"
- }
- },
- "_id": "569f183514f4432160000007",
- "email": "ariel@acme.com"
- },
- "_team": {
- "_links": {
- "key": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "QA Team",
- "customRoleKeys": [
- "access-to-test-projects"
- ],
- "key": "team-key-123abc"
- },
- "key": "key"
- },
- "tags": [
- "tags",
- "tags"
- ]
- }
- ]
- },
- "aiConfigs": {
- "totalCount": 3,
- "items": [
+ },
{
- "createdAt": 2,
+ "archived": true,
+ "temporary": true,
+ "includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
@@ -73628,92 +75101,43 @@
},
"name": "name",
"description": "description",
- "version": 1,
+ "creationDate": 7,
+ "_version": 1,
"key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- },
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
+ "maintainer": {
+ "kind": "member",
+ "_member": {
+ "firstName": "Ariel",
+ "lastName": "Flores",
+ "role": "admin",
+ "_links": {
+ "self": {
+ "href": "/api/v2/members/569f183514f4432160000007",
+ "type": "application/json"
+ }
+ },
+ "_id": "569f183514f4432160000007",
+ "email": "ariel@acme.com"
},
- "self": {
- "href": "href",
- "type": "type"
- }
+ "_team": {
+ "_links": {
+ "key": {
+ "href": "href",
+ "type": "type"
+ }
+ },
+ "name": "QA Team",
+ "customRoleKeys": [
+ "access-to-test-projects"
+ ],
+ "key": "team-key-123abc"
+ },
+ "key": "key"
},
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
"tags": [
"tags",
"tags"
- ],
- "updatedAt": 6
- }
- ]
- },
- "metrics": {
- "totalCount": 3,
- "items": [
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- },
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
+ ]
}
]
},
@@ -73780,19 +75204,14 @@
},
"resourceSummary": {
"flagCount": 4,
- "metricCount": 1,
"totalCount": 1,
- "segmentCount": 7,
- "aiConfigCount": 1
+ "segmentCount": 7
},
"version": 0,
"tags": [
"tags",
"tags"
],
- "applicationSummary": {
- "applicationKey": "applicationKey"
- },
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
@@ -74610,9 +76029,6 @@
},
"key": "key",
"updatedAt": 1,
- "payloadSummary": {
- "sdkKeyCount": 6
- },
"resourcesExpanded": {
"totalCount": 7,
"items": {
@@ -74729,112 +76145,6 @@
}
]
},
- "aiConfigs": {
- "totalCount": 3,
- "items": [
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- },
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- }
- ]
- },
- "metrics": {
- "totalCount": 3,
- "items": [
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- },
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- }
- ]
- },
"segments": {
"totalCount": 6,
"items": [
@@ -74898,19 +76208,14 @@
},
"resourceSummary": {
"flagCount": 4,
- "metricCount": 1,
"totalCount": 1,
- "segmentCount": 7,
- "aiConfigCount": 1
+ "segmentCount": 7
},
"version": 0,
"tags": [
"tags",
"tags"
],
- "applicationSummary": {
- "applicationKey": "applicationKey"
- },
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
@@ -75532,9 +76837,6 @@
},
"key": "key",
"updatedAt": 1,
- "payloadSummary": {
- "sdkKeyCount": 6
- },
"resourcesExpanded": {
"totalCount": 7,
"items": {
@@ -75651,112 +76953,6 @@
}
]
},
- "aiConfigs": {
- "totalCount": 3,
- "items": [
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- },
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- }
- ]
- },
- "metrics": {
- "totalCount": 3,
- "items": [
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- },
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- }
- ]
- },
"segments": {
"totalCount": 6,
"items": [
@@ -75820,19 +77016,14 @@
},
"resourceSummary": {
"flagCount": 4,
- "metricCount": 1,
"totalCount": 1,
- "segmentCount": 7,
- "aiConfigCount": 1
+ "segmentCount": 7
},
"version": 0,
"tags": [
"tags",
"tags"
],
- "applicationSummary": {
- "applicationKey": "applicationKey"
- },
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
@@ -76477,9 +77668,6 @@
},
"key": "key",
"updatedAt": 1,
- "payloadSummary": {
- "sdkKeyCount": 6
- },
"resourcesExpanded": {
"totalCount": 7,
"items": {
@@ -76596,112 +77784,6 @@
}
]
},
- "aiConfigs": {
- "totalCount": 3,
- "items": [
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- },
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- }
- ]
- },
- "metrics": {
- "totalCount": 3,
- "items": [
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- },
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- }
- ]
- },
"segments": {
"totalCount": 6,
"items": [
@@ -76765,19 +77847,14 @@
},
"resourceSummary": {
"flagCount": 4,
- "metricCount": 1,
"totalCount": 1,
- "segmentCount": 7,
- "aiConfigCount": 1
+ "segmentCount": 7
},
"version": 0,
"tags": [
"tags",
"tags"
],
- "applicationSummary": {
- "applicationKey": "applicationKey"
- },
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
@@ -77517,9 +78594,6 @@
},
"key": "key",
"updatedAt": 1,
- "payloadSummary": {
- "sdkKeyCount": 6
- },
"resourcesExpanded": {
"totalCount": 7,
"items": {
@@ -77636,112 +78710,6 @@
}
]
},
- "aiConfigs": {
- "totalCount": 3,
- "items": [
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- },
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- }
- ]
- },
- "metrics": {
- "totalCount": 3,
- "items": [
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- },
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- }
- ]
- },
"segments": {
"totalCount": 6,
"items": [
@@ -77805,19 +78773,14 @@
},
"resourceSummary": {
"flagCount": 4,
- "metricCount": 1,
"totalCount": 1,
- "segmentCount": 7,
- "aiConfigCount": 1
+ "segmentCount": 7
},
"version": 0,
"tags": [
"tags",
"tags"
],
- "applicationSummary": {
- "applicationKey": "applicationKey"
- },
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
@@ -78439,9 +79402,6 @@
},
"key": "key",
"updatedAt": 1,
- "payloadSummary": {
- "sdkKeyCount": 6
- },
"resourcesExpanded": {
"totalCount": 7,
"items": {
@@ -78558,112 +79518,6 @@
}
]
},
- "aiConfigs": {
- "totalCount": 3,
- "items": [
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- },
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- }
- ]
- },
- "metrics": {
- "totalCount": 3,
- "items": [
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- },
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- }
- ]
- },
"segments": {
"totalCount": 6,
"items": [
@@ -78727,19 +79581,14 @@
},
"resourceSummary": {
"flagCount": 4,
- "metricCount": 1,
"totalCount": 1,
- "segmentCount": 7,
- "aiConfigCount": 1
+ "segmentCount": 7
},
"version": 0,
"tags": [
"tags",
"tags"
],
- "applicationSummary": {
- "applicationKey": "applicationKey"
- },
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
@@ -79328,10 +80177,8 @@
"ResourceSummary": {
"example": {
"flagCount": 4,
- "metricCount": 1,
"totalCount": 1,
- "segmentCount": 7,
- "aiConfigCount": 1
+ "segmentCount": 7
},
"properties": {
"flagCount": {
@@ -79980,112 +80827,6 @@
}
]
},
- "aiConfigs": {
- "totalCount": 3,
- "items": [
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- },
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- }
- ]
- },
- "metrics": {
- "totalCount": 3,
- "items": [
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- },
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- }
- ]
- },
"segments": {
"totalCount": 6,
"items": [
@@ -81331,9 +82072,6 @@
},
"key": "key",
"updatedAt": 1,
- "payloadSummary": {
- "sdkKeyCount": 6
- },
"resourcesExpanded": {
"totalCount": 7,
"items": {
@@ -81450,112 +82188,6 @@
}
]
},
- "aiConfigs": {
- "totalCount": 3,
- "items": [
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- },
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- }
- ]
- },
- "metrics": {
- "totalCount": 3,
- "items": [
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- },
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
- }
- ]
- },
"segments": {
"totalCount": 6,
"items": [
@@ -81619,19 +82251,14 @@
},
"resourceSummary": {
"flagCount": 4,
- "metricCount": 1,
"totalCount": 1,
- "segmentCount": 7,
- "aiConfigCount": 1
+ "segmentCount": 7
},
"version": 0,
"tags": [
"tags",
"tags"
],
- "applicationSummary": {
- "applicationKey": "applicationKey"
- },
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
@@ -82416,147 +83043,15 @@
},
"key": "key"
},
- "tags": [
- "tags",
- "tags"
- ]
- },
- {
- "archived": true,
- "temporary": true,
- "includeInSnippet": true,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "creationDate": 7,
- "_version": 1,
- "key": "key",
- "maintainer": {
- "kind": "member",
- "_member": {
- "firstName": "Ariel",
- "lastName": "Flores",
- "role": "admin",
- "_links": {
- "self": {
- "href": "/api/v2/members/569f183514f4432160000007",
- "type": "application/json"
- }
- },
- "_id": "569f183514f4432160000007",
- "email": "ariel@acme.com"
- },
- "_team": {
- "_links": {
- "key": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "QA Team",
- "customRoleKeys": [
- "access-to-test-projects"
- ],
- "key": "team-key-123abc"
- },
- "key": "key"
- },
- "tags": [
- "tags",
- "tags"
- ]
- }
- ]
- },
- "aiConfigs": {
- "totalCount": 3,
- "items": [
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- },
- {
- "createdAt": 2,
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "name": "name",
- "description": "description",
- "version": 1,
- "key": "key",
- "flagKey": "flagKey",
- "tags": [
- "tags",
- "tags"
- ],
- "updatedAt": 6
- }
- ]
- },
- "metrics": {
- "totalCount": 3,
- "items": [
- {
- "_links": {
- "parent": {
- "href": "href",
- "type": "type"
- },
- "self": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
- "name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
+ "tags": [
+ "tags",
+ "tags"
+ ]
},
{
+ "archived": true,
+ "temporary": true,
+ "includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
@@ -82567,19 +83062,45 @@
"type": "type"
}
},
- "kind": "kind",
- "description": "description",
- "creationDate": 9,
- "isActive": true,
- "lastSeen": 3,
- "eventKey": "eventKey",
- "_versionId": "_versionId",
- "isNumeric": true,
"name": "name",
- "lastModified": 6,
- "_id": "_id",
- "category": "category",
- "key": "key"
+ "description": "description",
+ "creationDate": 7,
+ "_version": 1,
+ "key": "key",
+ "maintainer": {
+ "kind": "member",
+ "_member": {
+ "firstName": "Ariel",
+ "lastName": "Flores",
+ "role": "admin",
+ "_links": {
+ "self": {
+ "href": "/api/v2/members/569f183514f4432160000007",
+ "type": "application/json"
+ }
+ },
+ "_id": "569f183514f4432160000007",
+ "email": "ariel@acme.com"
+ },
+ "_team": {
+ "_links": {
+ "key": {
+ "href": "href",
+ "type": "type"
+ }
+ },
+ "name": "QA Team",
+ "customRoleKeys": [
+ "access-to-test-projects"
+ ],
+ "key": "team-key-123abc"
+ },
+ "key": "key"
+ },
+ "tags": [
+ "tags",
+ "tags"
+ ]
}
]
},
@@ -82644,865 +83165,1170 @@
}
},
"properties": {
- "flags": {
- "$ref": "#/components/schemas/ExpandedLinkedResourcesFlags"
+ "flags": {
+ "$ref": "#/components/schemas/ExpandedLinkedResourcesFlags"
+ },
+ "segments": {
+ "$ref": "#/components/schemas/ExpandedLinkedResourcesSegments"
+ }
+ },
+ "required": [
+ "flags"
+ ],
+ "title": "ExpandedLinkedResourcesItems",
+ "type": "object"
+ },
+ "ReleaseType": {
+ "description": "Whether the release uses metric monitoring.",
+ "enum": [
+ "progressive",
+ "guarded"
+ ],
+ "type": "string",
+ "x-enum-varnames": [
+ "ReleaseTypeProgressive",
+ "ReleaseTypeGuarded"
+ ]
+ },
+ "ReleaseStatus": {
+ "description": "High-level status of an environment release or release phase.\n- `pending`: The release or phase has not started.\n- `in_progress`: The release or phase is progressing without requiring action.\n- `waiting`: The release is partially rolled out, but is paused and waiting for action from the user.\n- `completed`: The release or phase reached the target variation.\n- `reverted`: The release or phase returned to the original variation.\n",
+ "enum": [
+ "pending",
+ "in_progress",
+ "waiting",
+ "completed",
+ "reverted"
+ ],
+ "type": "string",
+ "x-enum-varnames": [
+ "ReleaseStatusPending",
+ "ReleaseStatusInProgress",
+ "ReleaseStatusWaiting",
+ "ReleaseStatusCompleted",
+ "ReleaseStatusReverted"
+ ]
+ },
+ "ReleaseStatusReason": {
+ "description": "Additional detail for a `waiting`, `completed`, or `reverted` status.\nThe field may be absent for a `waiting` status when there is no\nspecific reason.\n`waiting_phase_ended` appears only on the release, never on a phase.\nIt means a phase of a multi-phase release with `advancementMode`\n`manual` ended and the release must be advanced to the next phase.\n`reverted_discarded` means the phase ended without a regression or a\nmember rolling it back. A running phase is discarded when the flag\nchanges underneath it, for example when the flag is turned off,\narchived, or deleted. A pending phase is discarded when the release\nends before it starts, either because an earlier phase reverted or\nbecause the release was stopped with a resolution that removes pending\nphases. A release reports `reverted_discarded` only when the last phase\nthat started was discarded.\n",
+ "enum": [
+ "waiting_regression_detected",
+ "waiting_phase_ended",
+ "completed_automatic",
+ "completed_manual",
+ "reverted_regression_detected",
+ "reverted_manual",
+ "reverted_discarded",
+ "reverted_insufficient_data"
+ ],
+ "type": "string",
+ "x-enum-varnames": [
+ "ReleaseStatusReasonWaitingRegressionDetected",
+ "ReleaseStatusReasonWaitingPhaseEnded",
+ "ReleaseStatusReasonCompletedAutomatic",
+ "ReleaseStatusReasonCompletedManual",
+ "ReleaseStatusReasonRevertedRegressionDetected",
+ "ReleaseStatusReasonRevertedManual",
+ "ReleaseStatusReasonRevertedDiscarded",
+ "ReleaseStatusReasonRevertedInsufficientData"
+ ]
+ },
+ "CleanupBehavior": {
+ "description": "What happens to the release rules when the final phase completes,\neither on its own or because a stop rolls it forward while it's\nrunning:\n\n- `remove_rules_and_update_default_rule`: The release rules are\n removed and the default rule serves the target variation.\n- `leave_rules_in_place`: The release rules stay and serve the\n target variation.\n\nIn every other case, including a revert, it has no effect: release\nrules left on the flag keep serving the variation the release ended\non, ahead of rules added later without `beforeRuleId`.\n",
+ "enum": [
+ "remove_rules_and_update_default_rule",
+ "leave_rules_in_place"
+ ],
+ "type": "string",
+ "x-enum-varnames": [
+ "CleanupBehaviorRemoveRulesAndUpdateDefaultRule",
+ "CleanupBehaviorLeaveRulesInPlace"
+ ]
+ },
+ "ReleaseHealthCheckKind": {
+ "description": "A release health check:\n- `flag_evaluations_any`: The flag has recently been evaluated.\n- `flag_evaluations_with_context`: The flag has recently been\n evaluated for contexts of the `randomizationUnit` kind.\n- `metric_events_any`: Guarded releases only. The metric has\n received events.\n- `metric_events_with_context`: Guarded releases only. The metric\n has received events for contexts of the `randomizationUnit` kind.\n",
+ "enum": [
+ "flag_evaluations_any",
+ "flag_evaluations_with_context",
+ "metric_events_any",
+ "metric_events_with_context"
+ ],
+ "type": "string",
+ "x-enum-varnames": [
+ "ReleaseHealthCheckKindFlagEvaluationsAny",
+ "ReleaseHealthCheckKindFlagEvaluationsWithContext",
+ "ReleaseHealthCheckKindMetricEventsAny",
+ "ReleaseHealthCheckKindMetricEventsWithContext"
+ ]
+ },
+ "ReleaseHealthCheckFailure": {
+ "example": {
+ "metricKey": "metricKey",
+ "kind": "flag_evaluations_any",
+ "message": "message"
+ },
+ "properties": {
+ "kind": {
+ "$ref": "#/components/schemas/ReleaseHealthCheckKind"
+ },
+ "metricKey": {
+ "description": "The metric key associated with a metric event check.",
+ "type": "string"
+ },
+ "message": {
+ "description": "A description of the failed health check.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "kind",
+ "message"
+ ],
+ "type": "object"
+ },
+ "StartEnvironmentReleaseBadRequest": {
+ "example": {
+ "failingChecks": [
+ {
+ "metricKey": "metricKey",
+ "kind": "flag_evaluations_any",
+ "message": "message"
+ },
+ {
+ "metricKey": "metricKey",
+ "kind": "flag_evaluations_any",
+ "message": "message"
+ }
+ ],
+ "code": "code",
+ "message": "message"
+ },
+ "properties": {
+ "code": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "failingChecks": {
+ "description": "Present when `code` is `health_checks_failed`.",
+ "items": {
+ "$ref": "#/components/schemas/ReleaseHealthCheckFailure"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object"
+ },
+ "ReleaseStep": {
+ "description": "One step in a phase's rollout schedule.",
+ "example": {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
+ },
+ "properties": {
+ "stepIndex": {
+ "description": "Zero-based index of this step.",
+ "minimum": 0,
+ "readOnly": true,
+ "type": "integer"
+ },
+ "allocation": {
+ "description": "Thousandths of a percent. `100000` is 100%, and `10000` is 10%.\nGuarded releases cannot exceed `50000`, preserving a control\ngroup.\n",
+ "maximum": 100000,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "durationMillis": {
+ "format": "int64",
+ "minimum": 1,
+ "type": "integer"
+ },
+ "startedAt": {
+ "description": "Start of the step in Unix milliseconds.",
+ "format": "int64",
+ "readOnly": true,
+ "type": "integer"
+ },
+ "endedAt": {
+ "description": "End of the step in Unix milliseconds.",
+ "format": "int64",
+ "readOnly": true,
+ "type": "integer"
+ }
+ },
+ "required": [
+ "allocation",
+ "durationMillis",
+ "stepIndex"
+ ],
+ "type": "object"
+ },
+ "EnvironmentReleasePhase": {
+ "description": "One ordered phase of an environment release.",
+ "example": {
+ "metricStatuses": {
+ "key": "ok"
+ },
+ "statusReason": null,
+ "endedAt": 3,
+ "phaseIndex": 0,
+ "description": "description",
+ "currentStepIndex": 0,
+ "startedAt": 9,
+ "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "ruleId": "ruleId",
+ "steps": [
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
+ },
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
+ }
+ ],
+ "status": null
+ },
+ "properties": {
+ "id": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "phaseIndex": {
+ "description": "Zero-based index of this phase.",
+ "minimum": 0,
+ "readOnly": true,
+ "type": "integer"
+ },
+ "ruleId": {
+ "description": "ID of the flag rule for this phase. New public-API releases always\nhave a rule ID. `null` is retained only when reading a historical\nrelease that ran on the default rule.\n",
+ "nullable": true,
+ "type": "string"
+ },
+ "description": {
+ "description": "The description of the flag rule when this release was created.\nOmitted for default-rule phases.\n",
+ "readOnly": true,
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/components/schemas/ReleaseStatus"
+ },
+ "statusReason": {
+ "$ref": "#/components/schemas/ReleaseStatusReason"
+ },
+ "steps": {
+ "items": {
+ "$ref": "#/components/schemas/ReleaseStep"
+ },
+ "type": "array"
+ },
+ "currentStepIndex": {
+ "description": "Zero-based index of the step the phase is on. Omitted until the\nfirst step starts. Once the phase completes or reverts, it stays at\nthe last step that started, unlike `currentPhaseIndex`, which\nbecomes `null` when the release reaches a terminal status.\n",
+ "minimum": 0,
+ "readOnly": true,
+ "type": "integer"
+ },
+ "startedAt": {
+ "description": "Start of the phase in Unix milliseconds.",
+ "format": "int64",
+ "readOnly": true,
+ "type": "integer"
+ },
+ "endedAt": {
+ "description": "End of the phase in Unix milliseconds.",
+ "format": "int64",
+ "readOnly": true,
+ "type": "integer"
+ },
+ "metricStatuses": {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/ReleaseMetricStatus"
+ },
+ "description": "Per-phase metric status keyed by metric key. Empty for progressive\nreleases. Metric definitions and monitoring preferences live once\nin the parent release's `metrics` array.\n",
+ "readOnly": true,
+ "type": "object"
+ }
+ },
+ "required": [
+ "id",
+ "metricStatuses",
+ "phaseIndex",
+ "ruleId",
+ "status",
+ "steps"
+ ],
+ "type": "object"
+ },
+ "ReleaseMetric": {
+ "description": "A metric shared by every phase of a guarded release.",
+ "example": {
+ "metricKey": "metricKey",
+ "definition": "",
+ "autoRollback": true,
+ "analysisUnit": "analysisUnit",
+ "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ "properties": {
+ "metricKey": {
+ "type": "string"
+ },
+ "metricVersionId": {
+ "format": "uuid",
+ "readOnly": true,
+ "type": "string"
+ },
+ "autoRollback": {
+ "description": "Whether a regression automatically reverts the release.",
+ "type": "boolean"
+ },
+ "analysisUnit": {
+ "description": "Key of the context kind this metric is analyzed on. It is the release's\nrandomization unit unless the metric uses a decoupled unit of analysis.\nOmitted on releases started before analysis units were recorded. Those\nmetrics are analyzed on the randomization unit.\n",
+ "readOnly": true,
+ "type": "string"
+ },
+ "definition": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/EnvironmentReleasesMetricListingRep"
+ }
+ ],
+ "description": "Present only when the caller requests `expand=metrics` and the pinned\nmetric version still exists. A metric whose pinned version has been\ndeleted keeps its `metricKey` and `metricVersionId` but has no definition.\n",
+ "readOnly": true
+ }
+ },
+ "required": [
+ "autoRollback",
+ "metricKey"
+ ],
+ "type": "object"
+ },
+ "ReleaseMetricStatus": {
+ "enum": [
+ "ok",
+ "regressed",
+ "regression_dismissed"
+ ],
+ "type": "string",
+ "x-enum-varnames": [
+ "ReleaseMetricStatusOK",
+ "ReleaseMetricStatusRegressed",
+ "ReleaseMetricStatusRegressionDismissed"
+ ]
+ },
+ "EnvironmentRelease": {
+ "description": "A flag release in one environment, made up of one or more ordered\nphases. The top-level status is derived from the phases: it reflects\nthe active phase, reports `waiting` between successfully completed\nphases, and reports the terminal outcome of the release.\n",
+ "example": {
+ "originalVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "_links": {
+ "key": {
+ "href": "href",
+ "type": "type"
+ }
+ },
+ "kind": "progressive",
+ "startedAt": 7,
+ "originalVariationValue": "",
+ "cleanupBehavior": "remove_rules_and_update_default_rule",
+ "environmentKey": "environmentKey",
+ "targetVariationValue": "",
+ "createdAt": 4,
+ "projectKey": "projectKey",
+ "statusReason": "waiting_regression_detected",
+ "advancementMode": "manual",
+ "endedAt": 1,
+ "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "targetVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "metrics": [
+ {
+ "metricKey": "metricKey",
+ "definition": "",
+ "autoRollback": true,
+ "analysisUnit": "analysisUnit",
+ "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "metricKey": "metricKey",
+ "definition": "",
+ "autoRollback": true,
+ "analysisUnit": "analysisUnit",
+ "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ],
+ "randomizationUnit": "randomizationUnit",
+ "currentPhaseIndex": 0,
+ "flagKey": "flagKey",
+ "phases": [
+ {
+ "metricStatuses": {
+ "key": "ok"
+ },
+ "statusReason": null,
+ "endedAt": 3,
+ "phaseIndex": 0,
+ "description": "description",
+ "currentStepIndex": 0,
+ "startedAt": 9,
+ "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "ruleId": "ruleId",
+ "steps": [
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
+ },
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
+ }
+ ],
+ "status": null
+ },
+ {
+ "metricStatuses": {
+ "key": "ok"
+ },
+ "statusReason": null,
+ "endedAt": 3,
+ "phaseIndex": 0,
+ "description": "description",
+ "currentStepIndex": 0,
+ "startedAt": 9,
+ "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "ruleId": "ruleId",
+ "steps": [
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
+ },
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
+ }
+ ],
+ "status": null
+ }
+ ],
+ "status": "pending"
+ },
+ "properties": {
+ "id": {
+ "format": "uuid",
+ "type": "string"
},
- "segments": {
- "$ref": "#/components/schemas/ExpandedLinkedResourcesSegments"
- }
- },
- "required": [
- "flags"
- ],
- "title": "ExpandedLinkedResourcesItems",
- "type": "object"
- },
- "PostReleasePolicyRequest": {
- "example": {
- "releaseMethod": "guarded-release",
- "scope": {
- "environmentKeys": [
- "production",
- "staging"
- ],
- "flagTagKeys": [
- "frontend",
- "backend"
- ],
- "viewKeys": [
- "feature-a",
- "team-a"
- ]
+ "status": {
+ "$ref": "#/components/schemas/ReleaseStatus"
},
- "progressiveReleaseConfig": {
- "rolloutContextKindKey": "user",
- "stages": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
- ]
+ "statusReason": {
+ "$ref": "#/components/schemas/ReleaseStatusReason"
},
- "name": "Production Release",
- "guardedReleaseConfig": {
- "metricKeys": [
- "http-errors",
- "latency"
- ],
- "rolloutContextKindKey": "user",
- "metricGroupKeys": [
- "frontend-metrics",
- "backend-metrics"
- ],
- "minSampleSize": 100,
- "stages": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
- ],
- "rollbackOnRegression": true
+ "projectKey": {
+ "type": "string"
},
- "key": "production-release"
- },
- "properties": {
- "scope": {
- "$ref": "#/components/schemas/ReleasePolicyScope"
+ "environmentKey": {
+ "type": "string"
},
- "releaseMethod": {
- "$ref": "#/components/schemas/ReleaseMethod"
+ "flagKey": {
+ "type": "string"
},
- "guardedReleaseConfig": {
- "$ref": "#/components/schemas/GuardedReleaseConfig"
+ "originalVariationId": {
+ "description": "ID of the variation the release started from.",
+ "format": "uuid",
+ "type": "string"
},
- "progressiveReleaseConfig": {
- "$ref": "#/components/schemas/ProgressiveReleaseConfig"
+ "originalVariationValue": {
+ "description": "The value of the variation. This may be a string, boolean, number, JSON object, or array."
},
- "name": {
- "description": "The name of the release policy",
- "example": "Production Release",
- "maxLength": 256,
+ "targetVariationId": {
+ "description": "ID of the variation being released.",
+ "format": "uuid",
"type": "string"
},
- "key": {
- "description": "The human-readable key of the release policy",
- "example": "production-release",
+ "targetVariationValue": {
+ "description": "The value of the variation. This may be a string, boolean, number, JSON object, or array."
+ },
+ "randomizationUnit": {
+ "description": "Key of the context kind the release randomizes on.",
"type": "string"
+ },
+ "cleanupBehavior": {
+ "$ref": "#/components/schemas/CleanupBehavior"
+ },
+ "kind": {
+ "$ref": "#/components/schemas/ReleaseType"
+ },
+ "metrics": {
+ "items": {
+ "$ref": "#/components/schemas/ReleaseMetric"
+ },
+ "type": "array"
+ },
+ "phases": {
+ "items": {
+ "$ref": "#/components/schemas/EnvironmentReleasePhase"
+ },
+ "minItems": 1,
+ "type": "array"
+ },
+ "currentPhaseIndex": {
+ "description": "Zero-based index of the active phase. Null before the first phase, between phases, and after the release reaches a terminal status.",
+ "minimum": 0,
+ "nullable": true,
+ "type": "integer"
+ },
+ "advancementMode": {
+ "$ref": "#/components/schemas/EnvironmentReleaseAdvancementMode"
+ },
+ "createdAt": {
+ "description": "Creation time in Unix milliseconds.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "startedAt": {
+ "description": "Start of the first phase in Unix milliseconds. Absent until a phase has started.",
+ "format": "int64",
+ "readOnly": true,
+ "type": "integer"
+ },
+ "endedAt": {
+ "description": "End of the last started phase in Unix milliseconds. Present only after the release reaches a terminal status of `completed` or `reverted`.",
+ "format": "int64",
+ "readOnly": true,
+ "type": "integer"
+ },
+ "_links": {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/EnvironmentReleaseLink"
+ },
+ "type": "object"
}
},
"required": [
- "key",
- "name",
- "releaseMethod"
+ "advancementMode",
+ "cleanupBehavior",
+ "createdAt",
+ "currentPhaseIndex",
+ "environmentKey",
+ "flagKey",
+ "id",
+ "kind",
+ "metrics",
+ "originalVariationId",
+ "originalVariationValue",
+ "phases",
+ "projectKey",
+ "randomizationUnit",
+ "status",
+ "targetVariationId",
+ "targetVariationValue"
],
"type": "object"
},
- "PutReleasePolicyRequest": {
- "example": {
- "releaseMethod": "guarded-release",
- "scope": {
- "environmentKeys": [
- "production",
- "staging"
- ],
- "flagTagKeys": [
- "frontend",
- "backend"
- ],
- "viewKeys": [
- "feature-a",
- "team-a"
- ]
- },
- "progressiveReleaseConfig": {
- "rolloutContextKindKey": "user",
- "stages": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
- ]
- },
- "name": "Production Release",
- "guardedReleaseConfig": {
- "metricKeys": [
- "http-errors",
- "latency"
- ],
- "rolloutContextKindKey": "user",
- "metricGroupKeys": [
- "frontend-metrics",
- "backend-metrics"
- ],
- "minSampleSize": 100,
- "stages": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
- ],
- "rollbackOnRegression": true
- }
- },
+ "EnvironmentReleaseAdvancementMode": {
+ "description": "Whether a multi-phase release advances to the next phase automatically\nonce the current phase's steps complete, or waits for an explicit\nadvance. Has no effect on a single-phase release.\n",
+ "enum": [
+ "manual",
+ "automatic"
+ ],
+ "type": "string",
+ "x-enum-varnames": [
+ "EnvironmentReleaseAdvancementModeManual",
+ "EnvironmentReleaseAdvancementModeAutomatic"
+ ]
+ },
+ "EnvironmentReleaseClause": {
+ "description": "One targeting clause of a rule created for the release.",
"properties": {
- "scope": {
- "$ref": "#/components/schemas/ReleasePolicyScope"
+ "contextKind": {
+ "description": "Context kind the clause applies to. Omit for `segmentMatch`.",
+ "type": "string"
},
- "releaseMethod": {
- "$ref": "#/components/schemas/ReleaseMethod"
+ "attribute": {
+ "type": "string"
},
- "guardedReleaseConfig": {
- "$ref": "#/components/schemas/GuardedReleaseConfig"
+ "op": {
+ "description": "One of `in`, `endsWith`, `startsWith`, `matches`, `contains`,\n`lessThan`, `lessThanOrEqual`, `greaterThan`, `greaterThanOrEqual`,\n`before`, `after`, `segmentMatch`, `semVerEqual`, `semVerLessThan`,\n`semVerGreaterThan`.\n",
+ "type": "string"
},
- "progressiveReleaseConfig": {
- "$ref": "#/components/schemas/ProgressiveReleaseConfig"
+ "values": {
+ "description": "JSON primitives only (strings, numbers, booleans); objects, arrays, and null are rejected.",
+ "items": {},
+ "type": "array"
},
- "name": {
- "description": "The name of the release policy",
- "example": "Production Release",
- "maxLength": 256,
- "type": "string"
+ "negate": {
+ "default": false,
+ "type": "boolean"
}
},
"required": [
- "name",
- "releaseMethod"
+ "attribute",
+ "op",
+ "values"
],
"type": "object"
},
- "ReleasePolicy": {
+ "EnvironmentReleaseStepInput": {
+ "description": "One step of a phase's rollout schedule.",
"example": {
- "releaseMethod": "guarded-release",
- "_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"
- }
- ]
- },
- "scope": {
- "environmentKeys": [
- "production",
- "staging"
- ],
- "flagTagKeys": [
- "frontend",
- "backend"
- ],
- "viewKeys": [
- "feature-a",
- "team-a"
- ]
- },
- "progressiveReleaseConfig": {
- "rolloutContextKindKey": "user",
- "stages": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
- ]
- },
- "name": "Production Release",
- "rank": 1,
- "_id": "550e8400-e29b-41d4-a716-446655440000",
- "guardedReleaseConfig": {
- "metricKeys": [
- "http-errors",
- "latency"
- ],
- "rolloutContextKindKey": "user",
- "metricGroupKeys": [
- "frontend-metrics",
- "backend-metrics"
- ],
- "minSampleSize": 100,
- "stages": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
- ],
- "rollbackOnRegression": true
- },
- "key": "production-release"
+ "allocation": 8009,
+ "durationMillis": 1
},
"properties": {
- "_access": {
- "$ref": "#/components/schemas/ReleasePoliciesAccessRep"
- },
- "_id": {
- "description": "The unique identifier of the release policy",
- "example": "550e8400-e29b-41d4-a716-446655440000",
- "type": "string"
- },
- "scope": {
- "$ref": "#/components/schemas/ReleasePolicyScope"
- },
- "rank": {
- "description": "The rank/priority of the release policy",
- "example": 1,
+ "allocation": {
+ "description": "Thousandths of a percent. `100000` is 100%, and `10000` is 10%.\nGuarded releases cannot exceed `50000`, preserving a control\ngroup. Each step's allocation must be greater than the previous\nstep's.\n\nIn a progressive release, an allocation of N% serves the target\nvariation to N% of the phase's contexts and the original\nvariation to the rest. In a guarded release, it serves the\ntarget variation to N%, the original variation to another N% as\nthe measured control group, and the original variation to the\nrest without measuring them.\n",
+ "maximum": 100000,
+ "minimum": 1,
"type": "integer"
},
- "releaseMethod": {
- "$ref": "#/components/schemas/ReleaseMethod"
- },
- "guardedReleaseConfig": {
- "$ref": "#/components/schemas/GuardedReleaseConfig"
- },
- "progressiveReleaseConfig": {
- "$ref": "#/components/schemas/ProgressiveReleaseConfig"
- },
- "name": {
- "description": "The name of the release policy",
- "example": "Production Release",
- "maxLength": 256,
+ "durationMillis": {
+ "format": "int64",
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ "required": [
+ "allocation",
+ "durationMillis"
+ ],
+ "type": "object"
+ },
+ "EnvironmentReleaseMetricInput": {
+ "description": "A metric to monitor across every phase of a guarded release.",
+ "example": {
+ "metricKey": "metricKey",
+ "autoRollback": false,
+ "analysisUnit": "analysisUnit"
+ },
+ "properties": {
+ "metricKey": {
"type": "string"
},
- "key": {
- "description": "The human-readable key of the release policy",
- "example": "production-release",
+ "autoRollback": {
+ "default": false,
+ "description": "Whether a regression on this metric automatically reverts the\nrelease. When `false`, a detected regression pauses the release\ninstead: it reports `waiting` with reason\n`waiting_regression_detected` and does not advance until the\nregression is dismissed or the release is stopped.\n",
+ "type": "boolean"
+ },
+ "analysisUnit": {
+ "description": "Key of the context kind to analyze this metric on. Omit it to analyze\non the randomization unit. A value must differ from the randomization\nunit and be one of the metric's units. Percentile metrics, ratio\nmetrics, and metrics in a group cannot set it. The value cannot be\nchanged after the release starts.\n",
"type": "string"
}
},
"required": [
- "_id",
- "key",
- "name",
- "rank",
- "releaseMethod"
+ "metricKey"
],
"type": "object"
},
- "ReleasePolicyScope": {
+ "EnvironmentReleasePhaseInput": {
+ "description": "One phase of a release. Each phase creates a flag rule unless it sets `ruleId`.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/EnvironmentReleaseExistingRulePhaseInput"
+ },
+ {
+ "$ref": "#/components/schemas/EnvironmentReleaseNewRulePhaseInput"
+ }
+ ]
+ },
+ "EnvironmentReleaseExistingRulePhaseInput": {
+ "additionalProperties": false,
+ "description": "A phase that releases on an existing rule. Allowed only on a single-phase release.",
"example": {
- "environmentKeys": [
- "production",
- "staging"
- ],
- "flagTagKeys": [
- "frontend",
- "backend"
- ],
- "viewKeys": [
- "feature-a",
- "team-a"
+ "ruleId": "ruleId",
+ "steps": [
+ {
+ "allocation": 8009,
+ "durationMillis": 1
+ },
+ {
+ "allocation": 8009,
+ "durationMillis": 1
+ }
]
},
"properties": {
- "environmentKeys": {
- "description": "List of environment keys this policy applies to",
- "example": [
- "production",
- "staging"
- ],
+ "ruleId": {
+ "description": "Existing rule to release on. The rule must already include the\n`kind` clause for `randomizationUnit` described in\n`startEnvironmentRelease`.\n",
+ "type": "string"
+ },
+ "steps": {
"items": {
- "type": "string"
+ "$ref": "#/components/schemas/EnvironmentReleaseStepInput"
+ },
+ "minItems": 1,
+ "type": "array"
+ }
+ },
+ "required": [
+ "ruleId",
+ "steps"
+ ],
+ "type": "object"
+ },
+ "EnvironmentReleaseNewRulePhaseInput": {
+ "additionalProperties": false,
+ "description": "A phase that creates a new rule.",
+ "properties": {
+ "clauses": {
+ "description": "Clauses for a new rule. Must include the `kind` clause for\n`randomizationUnit` described in `startEnvironmentRelease`. A\nnew rule that exactly duplicates an existing rule on the flag\nreturns `400` with\n`new rule is exact duplicate of an existing rule at index `.\n",
+ "items": {
+ "$ref": "#/components/schemas/EnvironmentReleaseClause"
},
+ "minItems": 1,
"type": "array"
},
- "flagTagKeys": {
- "description": "List of flag tag keys this policy applies to. At most 1000 keys. Each key must only contain letters, numbers, '-', '_', or '.', and be at most 64 characters.",
- "example": [
- "frontend",
- "backend"
- ],
+ "description": {
+ "description": "Description for a new rule. Must differ from the description of\nevery other rule on the flag, including rules an earlier release\nleft in place, or the request returns `400` with\n`duplicate rule description not allowed`.\n",
+ "type": "string"
+ },
+ "steps": {
"items": {
- "maxLength": 64,
- "pattern": "^[.A-Za-z_0-9-]+$",
- "type": "string"
+ "$ref": "#/components/schemas/EnvironmentReleaseStepInput"
},
- "maxItems": 1000,
+ "minItems": 1,
"type": "array"
}
},
+ "required": [
+ "clauses",
+ "steps"
+ ],
"type": "object"
},
- "GuardedReleaseConfig": {
- "description": "Configuration for guarded releases",
+ "StartEnvironmentReleaseRequest": {
"example": {
- "metricKeys": [
- "http-errors",
- "latency"
- ],
- "rolloutContextKindKey": "user",
- "metricGroupKeys": [
- "frontend-metrics",
- "backend-metrics"
+ "beforeRuleId": "beforeRuleId",
+ "originalVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "advancementMode": "",
+ "bypassHealthChecks": [
+ "flag_evaluations_any",
+ "flag_evaluations_with_context",
+ "metric_events_any",
+ "metric_events_with_context"
],
- "minSampleSize": 100,
- "stages": [
+ "comment": "comment",
+ "targetVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "metrics": [
{
- "allocation": 25000,
- "durationMillis": 60000
+ "metricKey": "metricKey",
+ "autoRollback": false,
+ "analysisUnit": "analysisUnit"
},
{
- "allocation": 50000,
- "durationMillis": 60000
+ "metricKey": "metricKey",
+ "autoRollback": false,
+ "analysisUnit": "analysisUnit"
}
],
- "rollbackOnRegression": true
+ "randomizationUnit": "randomizationUnit",
+ "releasePlanKey": "releasePlanKey",
+ "cleanupBehavior": "",
+ "phases": [
+ {
+ "ruleId": "ruleId",
+ "steps": [
+ {
+ "allocation": 8009,
+ "durationMillis": 1
+ },
+ {
+ "allocation": 8009,
+ "durationMillis": 1
+ }
+ ]
+ },
+ {
+ "ruleId": "ruleId",
+ "steps": [
+ {
+ "allocation": 8009,
+ "durationMillis": 1
+ },
+ {
+ "allocation": 8009,
+ "durationMillis": 1
+ }
+ ]
+ }
+ ]
},
"properties": {
- "rolloutContextKindKey": {
- "description": "Context kind key to use as the randomization unit for the rollout",
- "example": "user",
+ "beforeRuleId": {
+ "description": "Insert the newly created rule or phase rules before this rule. If\nomitted, append them to the end of the rule list.\n",
"type": "string"
},
- "minSampleSize": {
- "description": "The minimum number of samples required to make a decision",
- "example": 100,
- "type": "integer"
+ "originalVariationId": {
+ "description": "ID of the variation the release starts from. The release\ngradually moves traffic from it to the target variation, and\nmoves traffic back to it if the release reverts.\n",
+ "format": "uuid",
+ "type": "string"
},
- "rollbackOnRegression": {
- "description": "Whether to roll back on regression",
- "example": true,
- "type": "boolean"
+ "targetVariationId": {
+ "description": "ID of the variation being released. The release gradually moves\ntraffic to it from the original variation, and moves traffic back\nto the original variation if the release reverts.\n",
+ "format": "uuid",
+ "type": "string"
+ },
+ "releasePlanKey": {
+ "description": "Key of an environment release plan in this environment. The plan\nsupplies `randomizationUnit`, `phases`, `metrics`, `advancementMode`,\nand `cleanupBehavior`, so omit them. Omit this field to configure\nthe release inline.\n",
+ "minLength": 1,
+ "type": "string"
+ },
+ "randomizationUnit": {
+ "description": "Key of an existing, non-archived context kind in the project that\nthe release randomizes on, such as `user`. Each phase's rule must\ninclude the clause `{\"contextKind\": \"\", \"attribute\": \"kind\",\n\"op\": \"in\", \"values\": [\"\"]}`. Required unless `releasePlanKey`\nis set.\n",
+ "minLength": 1,
+ "type": "string"
},
- "metricKeys": {
- "description": "List of metric keys",
- "example": [
- "http-errors",
- "latency"
+ "advancementMode": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/EnvironmentReleaseAdvancementMode"
+ }
],
+ "description": "How the release moves between phases. Required when `phases` has\nmore than one entry; a single-phase release ignores it and may omit it.\nOmit when `releasePlanKey` is set.\n"
+ },
+ "phases": {
+ "description": "Ordered phases of the release. Required unless `releasePlanKey` is set.",
"items": {
- "type": "string"
+ "$ref": "#/components/schemas/EnvironmentReleasePhaseInput"
},
+ "minItems": 1,
"type": "array"
},
- "metricGroupKeys": {
- "description": "List of metric group keys",
- "example": [
- "frontend-metrics",
- "backend-metrics"
- ],
+ "metrics": {
+ "description": "Metrics shared by every phase. Omit or pass an empty array for a\nprogressive release. Metric groups cannot be listed inline; a\nrelease plan's metric groups expand into their member metrics at\nstart. Omit when `releasePlanKey` is set.\n",
"items": {
- "type": "string"
+ "$ref": "#/components/schemas/EnvironmentReleaseMetricInput"
},
"type": "array"
},
- "stages": {
- "description": "List of stages. At most 10 stages by default; the server enforces the per-account limit, which is never more than 20.",
+ "bypassHealthChecks": {
+ "description": "Health check kinds that do not block this request. LaunchDarkly\nstill runs and enforces every health check kind not listed here.\n",
"example": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
+ "flag_evaluations_any",
+ "flag_evaluations_with_context",
+ "metric_events_any",
+ "metric_events_with_context"
],
"items": {
- "$ref": "#/components/schemas/ReleasePolicyStage"
+ "$ref": "#/components/schemas/ReleaseHealthCheckKind"
},
- "maxItems": 20,
- "type": "array"
+ "type": "array",
+ "uniqueItems": true
+ },
+ "cleanupBehavior": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/CleanupBehavior"
+ }
+ ],
+ "description": "What happens to the release rules after the release completes. Omit\nfor `leave_rules_in_place`. Omit when `releasePlanKey` is set.\n"
+ },
+ "comment": {
+ "description": "Optional comment written to the flag's audit-log entry.",
+ "type": "string"
}
},
+ "required": [
+ "originalVariationId",
+ "targetVariationId"
+ ],
"type": "object"
},
- "ProgressiveReleaseConfig": {
- "description": "Configuration for progressive releases",
+ "EnvironmentReleaseResolution": {
+ "description": "How to resolve each phase of the release when you stop it:\n\n- `roll_forward_all_phases`: All phases serve the target variation.\n Pending phases stay on the flag and are enabled.\n- `roll_forward_current_phase_and_remove_pending_phases`: Current and\n completed phases serve the target variation. Pending phases are\n removed.\n- `roll_back_all_phases_and_remove_pending_phases`: Current and\n completed phases serve the original variation. Pending phases are\n removed.\n- `roll_back_current_phase_and_remove_pending_phases`: The current\n phase serves the original variation, and completed phases keep\n serving the target variation. Pending phases are removed.\n\nFor a single-phase release there are no completed or pending phases,\nso the two roll-forward values are equivalent, as are the two roll-back\nvalues.\n\nThe `current_phase` values return `400` if the release is between\nphases. Use an `all_phases` value instead. A terminal release returns\n`200` unchanged for every resolution.\n",
+ "enum": [
+ "roll_forward_all_phases",
+ "roll_forward_current_phase_and_remove_pending_phases",
+ "roll_back_all_phases_and_remove_pending_phases",
+ "roll_back_current_phase_and_remove_pending_phases"
+ ],
+ "type": "string",
+ "x-enum-varnames": [
+ "EnvironmentReleaseResolutionRollForwardAllPhases",
+ "EnvironmentReleaseResolutionRollForwardCurrentPhaseAndRemovePendingPhases",
+ "EnvironmentReleaseResolutionRollBackAllPhasesAndRemovePendingPhases",
+ "EnvironmentReleaseResolutionRollBackCurrentPhaseAndRemovePendingPhases"
+ ]
+ },
+ "StopEnvironmentReleaseRequest": {
"example": {
- "rolloutContextKindKey": "user",
- "stages": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
- ]
+ "comment": "comment",
+ "resolution": "roll_forward_all_phases"
},
"properties": {
- "rolloutContextKindKey": {
- "description": "Context kind key to use as the randomization unit for the rollout",
- "example": "user",
- "type": "string"
+ "resolution": {
+ "$ref": "#/components/schemas/EnvironmentReleaseResolution"
},
- "stages": {
- "description": "List of stages. At most 10 stages by default; the server enforces the per-account limit, which is never more than 20.",
- "example": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
- ],
- "items": {
- "$ref": "#/components/schemas/ReleasePolicyStage"
- },
- "maxItems": 20,
- "type": "array"
+ "comment": {
+ "description": "Optional comment written to the flag's audit-log entry.",
+ "type": "string"
}
},
+ "required": [
+ "resolution"
+ ],
"type": "object"
},
- "ReleasePoliciesResponse": {
+ "EnvironmentReleaseCollection": {
+ "description": "One page of environment releases for one flag in one environment, newest first.",
"example": {
- "totalCount": 42,
+ "_links": {
+ "key": {
+ "href": "href",
+ "type": "type"
+ }
+ },
+ "totalCount": 1,
"items": [
{
- "releaseMethod": "guarded-release",
- "_access": {
- "allowed": [
- {
- "reason": {
- "role_name": "role_name",
- "notActions": [
- null,
- null
- ],
- "notResources": [
- "notResources",
- "notResources"
- ],
- "effect": "allow",
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "actions": [
- "*"
- ]
- },
- "action": "action"
+ "originalVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "_links": {
+ "key": {
+ "href": "href",
+ "type": "type"
+ }
+ },
+ "kind": "progressive",
+ "startedAt": 7,
+ "originalVariationValue": "",
+ "cleanupBehavior": "remove_rules_and_update_default_rule",
+ "environmentKey": "environmentKey",
+ "targetVariationValue": "",
+ "createdAt": 4,
+ "projectKey": "projectKey",
+ "statusReason": "waiting_regression_detected",
+ "advancementMode": "manual",
+ "endedAt": 1,
+ "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "targetVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "metrics": [
+ {
+ "metricKey": "metricKey",
+ "definition": "",
+ "autoRollback": true,
+ "analysisUnit": "analysisUnit",
+ "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "metricKey": "metricKey",
+ "definition": "",
+ "autoRollback": true,
+ "analysisUnit": "analysisUnit",
+ "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ],
+ "randomizationUnit": "randomizationUnit",
+ "currentPhaseIndex": 0,
+ "flagKey": "flagKey",
+ "phases": [
+ {
+ "metricStatuses": {
+ "key": "ok"
},
- {
- "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": [
- "*"
- ]
+ "statusReason": null,
+ "endedAt": 3,
+ "phaseIndex": 0,
+ "description": "description",
+ "currentStepIndex": 0,
+ "startedAt": 9,
+ "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "ruleId": "ruleId",
+ "steps": [
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
},
- "action": "action"
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
+ }
+ ],
+ "status": null
+ },
+ {
+ "metricStatuses": {
+ "key": "ok"
},
- {
- "reason": {
- "role_name": "role_name",
- "notActions": [
- null,
- null
- ],
- "notResources": [
- "notResources",
- "notResources"
- ],
- "effect": "allow",
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "actions": [
- "*"
- ]
+ "statusReason": null,
+ "endedAt": 3,
+ "phaseIndex": 0,
+ "description": "description",
+ "currentStepIndex": 0,
+ "startedAt": 9,
+ "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "ruleId": "ruleId",
+ "steps": [
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
},
- "action": "action"
- }
- ]
- },
- "scope": {
- "environmentKeys": [
- "production",
- "staging"
- ],
- "flagTagKeys": [
- "frontend",
- "backend"
- ],
- "viewKeys": [
- "feature-a",
- "team-a"
- ]
- },
- "progressiveReleaseConfig": {
- "rolloutContextKindKey": "user",
- "stages": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
- ]
- },
- "name": "Production Release",
- "rank": 1,
- "_id": "550e8400-e29b-41d4-a716-446655440000",
- "guardedReleaseConfig": {
- "metricKeys": [
- "http-errors",
- "latency"
- ],
- "rolloutContextKindKey": "user",
- "metricGroupKeys": [
- "frontend-metrics",
- "backend-metrics"
- ],
- "minSampleSize": 100,
- "stages": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
- ],
- "rollbackOnRegression": true
- },
- "key": "production-release"
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
+ }
+ ],
+ "status": null
+ }
+ ],
+ "status": "pending"
},
{
- "releaseMethod": "guarded-release",
- "_access": {
- "allowed": [
- {
- "reason": {
- "role_name": "role_name",
- "notActions": [
- null,
- null
- ],
- "notResources": [
- "notResources",
- "notResources"
- ],
- "effect": "allow",
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "actions": [
- "*"
- ]
- },
- "action": "action"
+ "originalVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "_links": {
+ "key": {
+ "href": "href",
+ "type": "type"
+ }
+ },
+ "kind": "progressive",
+ "startedAt": 7,
+ "originalVariationValue": "",
+ "cleanupBehavior": "remove_rules_and_update_default_rule",
+ "environmentKey": "environmentKey",
+ "targetVariationValue": "",
+ "createdAt": 4,
+ "projectKey": "projectKey",
+ "statusReason": "waiting_regression_detected",
+ "advancementMode": "manual",
+ "endedAt": 1,
+ "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "targetVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "metrics": [
+ {
+ "metricKey": "metricKey",
+ "definition": "",
+ "autoRollback": true,
+ "analysisUnit": "analysisUnit",
+ "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "metricKey": "metricKey",
+ "definition": "",
+ "autoRollback": true,
+ "analysisUnit": "analysisUnit",
+ "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ],
+ "randomizationUnit": "randomizationUnit",
+ "currentPhaseIndex": 0,
+ "flagKey": "flagKey",
+ "phases": [
+ {
+ "metricStatuses": {
+ "key": "ok"
},
- {
- "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": [
- "*"
- ]
+ "statusReason": null,
+ "endedAt": 3,
+ "phaseIndex": 0,
+ "description": "description",
+ "currentStepIndex": 0,
+ "startedAt": 9,
+ "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "ruleId": "ruleId",
+ "steps": [
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
},
- "action": "action"
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
+ }
+ ],
+ "status": null
+ },
+ {
+ "metricStatuses": {
+ "key": "ok"
},
- {
- "reason": {
- "role_name": "role_name",
- "notActions": [
- null,
- null
- ],
- "notResources": [
- "notResources",
- "notResources"
- ],
- "effect": "allow",
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "actions": [
- "*"
- ]
+ "statusReason": null,
+ "endedAt": 3,
+ "phaseIndex": 0,
+ "description": "description",
+ "currentStepIndex": 0,
+ "startedAt": 9,
+ "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "ruleId": "ruleId",
+ "steps": [
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
},
- "action": "action"
- }
- ]
- },
- "scope": {
- "environmentKeys": [
- "production",
- "staging"
- ],
- "flagTagKeys": [
- "frontend",
- "backend"
- ],
- "viewKeys": [
- "feature-a",
- "team-a"
- ]
- },
- "progressiveReleaseConfig": {
- "rolloutContextKindKey": "user",
- "stages": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
- ]
- },
- "name": "Production Release",
- "rank": 1,
- "_id": "550e8400-e29b-41d4-a716-446655440000",
- "guardedReleaseConfig": {
- "metricKeys": [
- "http-errors",
- "latency"
- ],
- "rolloutContextKindKey": "user",
- "metricGroupKeys": [
- "frontend-metrics",
- "backend-metrics"
- ],
- "minSampleSize": 100,
- "stages": [
- {
- "allocation": 25000,
- "durationMillis": 60000
- },
- {
- "allocation": 50000,
- "durationMillis": 60000
- }
- ],
- "rollbackOnRegression": true
- },
- "key": "production-release"
+ {
+ "allocation": 14658,
+ "stepIndex": 0,
+ "endedAt": 2,
+ "startedAt": 5,
+ "durationMillis": 1
+ }
+ ],
+ "status": null
+ }
+ ],
+ "status": "pending"
}
]
},
"properties": {
"items": {
- "description": "List of release policies",
+ "description": "The releases on this page.",
"items": {
- "$ref": "#/components/schemas/ReleasePolicy"
+ "$ref": "#/components/schemas/EnvironmentRelease"
},
"type": "array"
},
"totalCount": {
- "description": "Total number of release policies",
- "example": 42,
+ "description": "The total number of releases that match the request, before `limit` and `offset` are applied.",
"type": "integer"
+ },
+ "_links": {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/EnvironmentReleaseLink"
+ },
+ "description": "Links to this page (`self`), the flag (`parent`), and, where they apply, the `first`, `prev`, `next`, and `last` pages.",
+ "type": "object"
}
},
"required": [
@@ -83511,287 +84337,350 @@
],
"type": "object"
},
- "ReleaseMethod": {
- "description": "The release method for this policy",
- "enum": [
- "guarded-release",
- "immediate-release",
- "progressive-release"
- ],
- "type": "string"
- },
- "ReleasePolicyStage": {
+ "EnvironmentReleaseLink": {
+ "example": {
+ "href": "href",
+ "type": "type"
+ },
"properties": {
- "allocation": {
- "example": 25000,
- "type": "integer"
+ "href": {
+ "type": "string"
},
- "durationMillis": {
- "example": 60000,
- "format": "int64",
- "type": "integer"
+ "type": {
+ "type": "string"
}
},
"required": [
- "allocation",
- "durationMillis"
+ "href",
+ "type"
],
"type": "object"
},
- "ReleasePoliciesAccessRep": {
- "allOf": [
- {
- "$ref": "#/components/schemas/ReleasePoliciesAccess"
- }
- ],
- "example": {
- "allowed": [
- {
- "reason": {
- "role_name": "role_name",
- "notActions": [
- null,
- null
- ],
- "notResources": [
- "notResources",
- "notResources"
- ],
- "effect": "allow",
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "actions": [
- "*"
- ]
- },
- "action": "action"
- },
- {
- "reason": {
- "role_name": "role_name",
- "notActions": [
- null,
- null
- ],
- "notResources": [
- "notResources",
- "notResources"
- ],
- "effect": "allow",
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "actions": [
- "*"
- ]
- },
- "action": "action"
- }
- ],
- "denied": [
- {
- "reason": {
- "role_name": "role_name",
- "notActions": [
- null,
- null
- ],
- "notResources": [
- "notResources",
- "notResources"
- ],
- "effect": "allow",
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "actions": [
- "*"
- ]
- },
- "action": "action"
+ "EnvironmentReleasesMetricListingRep": {
+ "properties": {
+ "experimentCount": {
+ "description": "The number of experiments using this metric",
+ "example": 0,
+ "type": "integer"
+ },
+ "metricGroupCount": {
+ "description": "The number of metric groups using this metric",
+ "example": 0,
+ "type": "integer"
+ },
+ "guardedRolloutCount": {
+ "description": "The number of guarded rollouts using this metric",
+ "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,
+ "type": "integer"
+ },
+ "activeGuardedRolloutCount": {
+ "description": "The number of active guarded rollouts using this metric",
+ "example": 1,
+ "type": "integer"
+ },
+ "_id": {
+ "description": "The ID of this metric",
+ "example": "5902deadbeef667524a01290",
+ "type": "string"
+ },
+ "_versionId": {
+ "description": "The version ID of the metric",
+ "example": "version-id-123abc",
+ "type": "string"
+ },
+ "_version": {
+ "description": "Version of the metric",
+ "example": 1,
+ "type": "integer"
+ },
+ "key": {
+ "description": "A unique key to reference the metric",
+ "example": "metric-key-123abc",
+ "type": "string"
+ },
+ "name": {
+ "description": "A human-friendly name for the metric",
+ "example": "My metric",
+ "type": "string"
+ },
+ "kind": {
+ "description": "The kind of event the metric tracks",
+ "enum": [
+ "pageview",
+ "click",
+ "custom",
+ "trace"
+ ],
+ "example": "custom",
+ "type": "string"
+ },
+ "_attachedFlagCount": {
+ "description": "The number of feature flags currently attached to this metric",
+ "example": 0,
+ "type": "integer"
+ },
+ "_links": {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/Link"
},
- {
- "reason": {
- "role_name": "role_name",
- "notActions": [
- null,
- null
- ],
- "notResources": [
- "notResources",
- "notResources"
- ],
- "effect": "allow",
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "actions": [
- "*"
- ]
+ "description": "The location and content type of related resources",
+ "example": {
+ "parent": {
+ "href": "/api/v2/metrics/my-project",
+ "type": "application/json"
},
- "action": "action"
- }
- ]
- }
- },
- "ReleasePoliciesAccess": {
- "properties": {
- "denied": {
- "items": {
- "$ref": "#/components/schemas/ReleasePoliciesAccessDenied"
+ "self": {
+ "href": "/api/v2/metrics/my-project/my-metric",
+ "type": "application/json"
+ }
},
- "type": "array"
+ "type": "object"
},
- "allowed": {
+ "_site": {
+ "$ref": "#/components/schemas/Link"
+ },
+ "_access": {
+ "$ref": "#/components/schemas/EnvironmentReleasesAccess"
+ },
+ "tags": {
+ "description": "Tags for the metric",
+ "example": [],
"items": {
- "$ref": "#/components/schemas/ReleasePoliciesAccessAllowedRep"
+ "type": "string"
},
"type": "array"
- }
- },
- "required": [
- "allowed",
- "denied"
- ],
- "type": "object"
- },
- "ReleasePoliciesAccessDenied": {
- "example": {
- "reason": {
- "role_name": "role_name",
- "notActions": [
- null,
- null
- ],
- "notResources": [
- "notResources",
- "notResources"
- ],
- "effect": "allow",
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
+ },
+ "_creationDate": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "lastModified": {
+ "$ref": "#/components/schemas/EnvironmentReleasesModification"
+ },
+ "maintainerId": {
+ "description": "The ID of the member who maintains this metric",
+ "example": "569fdeadbeef1644facecafe",
+ "type": "string"
+ },
+ "_maintainer": {
+ "$ref": "#/components/schemas/EnvironmentReleasesMemberSummary"
+ },
+ "description": {
+ "description": "Description of the metric",
+ "type": "string"
+ },
+ "category": {
+ "description": "The category of the metric",
+ "example": "Error monitoring",
+ "type": "string"
+ },
+ "isNumeric": {
+ "description": "For custom and trace metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).",
+ "example": true,
+ "type": "boolean"
+ },
+ "successCriteria": {
+ "description": "For custom and trace metrics, the success criteria",
+ "enum": [
+ "HigherThanBaseline",
+ "LowerThanBaseline"
],
- "actions": [
- "*"
- ]
+ "type": "string"
},
- "action": "action"
- },
- "properties": {
- "action": {
+ "unit": {
+ "description": "For numeric custom and trace metrics, the unit of measure",
"type": "string"
},
- "reason": {
- "$ref": "#/components/schemas/ReleasePoliciesAccessDeniedReason"
- }
- },
- "required": [
- "action",
- "reason"
- ],
- "type": "object"
- },
- "ReleasePoliciesAccessDeniedReason": {
- "example": {
- "role_name": "role_name",
- "notActions": [
- null,
- null
- ],
- "notResources": [
- "notResources",
- "notResources"
- ],
- "effect": "allow",
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "actions": [
- "*"
- ]
- },
- "properties": {
- "resources": {
- "description": "Resource specifier strings",
+ "eventKey": {
+ "description": "For custom metrics, the event key to use in your code",
+ "example": "Order placed",
+ "type": "string"
+ },
+ "randomizationUnits": {
+ "deprecated": true,
+ "description": "Deprecated, use analysisUnits instead.",
"example": [
- "proj/*:env/*;qa_*:/flag/*"
+ "user"
],
"items": {
"type": "string"
},
"type": "array"
},
- "notResources": {
- "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.",
+ "analysisUnits": {
+ "description": "An array of analysis units allowed for this metric.",
+ "example": [
+ "user"
+ ],
"items": {
"type": "string"
},
"type": "array"
},
- "actions": {
- "description": "Actions to perform on a resource",
- "example": [
- "*"
+ "filters": {
+ "$ref": "#/components/schemas/EnvironmentReleasesFilter"
+ },
+ "unitAggregationType": {
+ "description": "The method by which multiple unit event values are aggregated",
+ "enum": [
+ "average",
+ "sum",
+ "count_distinct"
],
- "items": {
- "$ref": "#/components/schemas/ActionSpecifier"
- },
- "type": "array"
+ "example": "average",
+ "type": "string"
},
- "notActions": {
- "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.",
+ "analysisType": {
+ "description": "The method for analyzing metric events",
+ "enum": [
+ "mean",
+ "percentile"
+ ],
+ "example": "mean",
+ "type": "string"
+ },
+ "percentileValue": {
+ "description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysisType is percentile.",
+ "example": 95,
+ "type": "integer"
+ },
+ "eventDefault": {
+ "$ref": "#/components/schemas/MetricEventDefaultRep"
+ },
+ "dataSource": {
+ "$ref": "#/components/schemas/MetricDataSourceRefRep"
+ },
+ "lastSeen": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "archived": {
+ "description": "Whether the metric version is archived",
+ "type": "boolean"
+ },
+ "archivedAt": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "selector": {
+ "description": "For click metrics, the CSS selectors",
+ "type": "string"
+ },
+ "urls": {
"items": {
- "$ref": "#/components/schemas/ActionSpecifier"
+ "$ref": "#/components/schemas/UrlMatcher"
},
"type": "array"
},
- "effect": {
- "description": "Whether this statement should allow or deny actions on the resources.",
- "enum": [
- "allow",
- "deny"
- ],
- "example": "allow",
+ "windowStartOffset": {
+ "description": "Not yet implemented - The start of the measurement window, in milliseconds relative to the unit's first exposure to a flag variation",
+ "format": "int64",
+ "type": "integer"
+ },
+ "windowEndOffset": {
+ "description": "Not yet implemented - The end of the measurement window, in milliseconds relative to the unit's first exposure to a flag variation",
+ "format": "int64",
+ "type": "integer"
+ },
+ "winsorLowerPercentile": {
+ "description": "Lower winsorization percentile, expressed as a percent in the open interval (0, 100). When both bounds are set, defines a two-sided clamp range. Otherwise lower-only winsorization.",
+ "example": 1,
+ "type": "number"
+ },
+ "winsorUpperPercentile": {
+ "description": "Upper winsorization percentile, expressed as a percent in the open interval (0, 100). When both bounds are set, must be greater than winsorLowerPercentile.",
+ "example": 99.5,
+ "type": "number"
+ },
+ "winsorIncludeImputed": {
+ "description": "When true, the percentile bound calculation includes imputed zeros. Only meaningful when at least one bound is set and the metric includes units that didn't send events.",
+ "example": false,
+ "type": "boolean"
+ },
+ "traceQuery": {
+ "description": "For trace metrics, the trace query to use for the metric.",
+ "example": "service.name = \"checkout\"",
"type": "string"
},
- "role_name": {
+ "traceValueLocation": {
+ "description": "For trace metrics, the location in the trace to use for numeric values.",
+ "example": "duration",
+ "type": "string"
+ },
+ "unitAggregationField": {
+ "description": "For count_distinct metrics, the column to count distinct values of",
"type": "string"
+ },
+ "denominator": {
+ "$ref": "#/components/schemas/EnvironmentReleasesMetricDenominatorRep"
}
},
"required": [
- "effect"
+ "_creationDate",
+ "_id",
+ "_links",
+ "_versionId",
+ "dataSource",
+ "key",
+ "kind",
+ "name",
+ "tags"
],
"type": "object"
},
- "ReleasePoliciesAccessAllowedRep": {
- "example": {
- "reason": {
- "role_name": "role_name",
- "notActions": [
- null,
- null
- ],
- "notResources": [
- "notResources",
- "notResources"
- ],
- "effect": "allow",
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "actions": [
- "*"
- ]
+ "EnvironmentReleasesAccess": {
+ "properties": {
+ "denied": {
+ "items": {
+ "$ref": "#/components/schemas/EnvironmentReleasesAccessDenied"
+ },
+ "type": "array"
},
- "action": "action"
+ "allowed": {
+ "items": {
+ "$ref": "#/components/schemas/EnvironmentReleasesAccessAllowedRep"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "allowed",
+ "denied"
+ ],
+ "type": "object"
+ },
+ "EnvironmentReleasesAccessDenied": {
+ "properties": {
+ "action": {
+ "type": "string"
+ },
+ "reason": {
+ "$ref": "#/components/schemas/AccessDeniedReason"
+ }
},
+ "required": [
+ "action",
+ "reason"
+ ],
+ "type": "object"
+ },
+ "EnvironmentReleasesAccessAllowedRep": {
"properties": {
"action": {
"type": "string"
},
"reason": {
- "$ref": "#/components/schemas/ReleasePoliciesAccessAllowedReason"
+ "$ref": "#/components/schemas/AccessAllowedReason"
}
},
"required": [
@@ -83800,698 +84689,817 @@
],
"type": "object"
},
- "ReleasePoliciesAccessAllowedReason": {
- "example": {
- "role_name": "role_name",
- "notActions": [
- null,
- null
- ],
- "notResources": [
- "notResources",
- "notResources"
- ],
- "effect": "allow",
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "actions": [
- "*"
- ]
+ "EnvironmentReleasesModification": {
+ "properties": {
+ "date": {
+ "example": "2021-08-05T19:46:31.148Z",
+ "format": "date-time",
+ "type": "string"
+ }
},
+ "type": "object"
+ },
+ "EnvironmentReleasesMemberSummary": {
"properties": {
- "resources": {
- "description": "Resource specifier strings",
- "example": [
- "proj/*:env/*;qa_*:/flag/*"
- ],
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "notResources": {
- "description": "Targeted resources are the resources NOT in this list. The resources and notActions fields must be empty to use this field.",
- "items": {
- "type": "string"
+ "_links": {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/Link"
},
- "type": "array"
- },
- "actions": {
- "description": "Actions to perform on a resource",
- "example": [
- "*"
- ],
- "items": {
- "$ref": "#/components/schemas/ActionSpecifier"
+ "description": "The location and content type of related resources",
+ "example": {
+ "self": {
+ "href": "/api/v2/members/569f183514f4432160000007",
+ "type": "application/json"
+ }
},
- "type": "array"
+ "type": "object"
},
- "notActions": {
- "description": "Targeted actions are the actions NOT in this list. The actions and notResources fields must be empty to use this field.",
- "items": {
- "$ref": "#/components/schemas/ActionSpecifier"
- },
- "type": "array"
+ "_id": {
+ "description": "The member's ID",
+ "example": "569f183514f4432160000007",
+ "type": "string"
},
- "effect": {
- "description": "Whether this statement should allow or deny actions on the resources.",
- "enum": [
- "allow",
- "deny"
- ],
- "example": "allow",
+ "firstName": {
+ "description": "The member's first name",
+ "example": "Ariel",
"type": "string"
},
- "role_name": {
+ "lastName": {
+ "description": "The member's last name",
+ "example": "Flores",
"type": "string"
- }
- },
- "required": [
- "effect"
- ],
- "type": "object"
- },
- "ReleaseType": {
- "description": "Whether the release uses metric monitoring.",
- "enum": [
- "progressive",
- "guarded"
- ],
- "type": "string",
- "x-enum-varnames": [
- "ReleaseTypeProgressive",
- "ReleaseTypeGuarded"
- ]
- },
- "ReleaseStatus": {
- "description": "High-level status of an environment release or release phase.\n- `pending`: The release or phase has not started.\n- `in_progress`: The release or phase is progressing without requiring action.\n- `waiting`: The release is partially rolled out, but is paused and waiting for action from the user.\n- `completed`: The release or phase reached the target variation.\n- `reverted`: The release or phase returned to the original variation.\n",
- "enum": [
- "pending",
- "in_progress",
- "waiting",
- "completed",
- "reverted"
- ],
- "type": "string",
- "x-enum-varnames": [
- "ReleaseStatusPending",
- "ReleaseStatusInProgress",
- "ReleaseStatusWaiting",
- "ReleaseStatusCompleted",
- "ReleaseStatusReverted"
- ]
- },
- "ReleaseStatusReason": {
- "description": "Additional detail for a `waiting`, `completed`, or `reverted` status.\nThe field may be absent for a `waiting` status when there is no\nspecific reason.\n`waiting_phase_ended` appears only on the release, never on a phase.\nIt means a phase of a multi-phase release with `advancementMode`\n`manual` ended and the release must be advanced to the next phase.\n`reverted_discarded` means the phase ended without a regression or a\nmember rolling it back. A running phase is discarded when the flag\nchanges underneath it, for example when the flag is turned off,\narchived, or deleted. A pending phase is discarded when the release\nends before it starts, either because an earlier phase reverted or\nbecause the release was stopped with a resolution that removes pending\nphases. A release reports `reverted_discarded` only when the last phase\nthat started was discarded.\n",
- "enum": [
- "waiting_regression_detected",
- "waiting_phase_ended",
- "completed_automatic",
- "completed_manual",
- "reverted_regression_detected",
- "reverted_manual",
- "reverted_discarded",
- "reverted_insufficient_data"
- ],
- "type": "string",
- "x-enum-varnames": [
- "ReleaseStatusReasonWaitingRegressionDetected",
- "ReleaseStatusReasonWaitingPhaseEnded",
- "ReleaseStatusReasonCompletedAutomatic",
- "ReleaseStatusReasonCompletedManual",
- "ReleaseStatusReasonRevertedRegressionDetected",
- "ReleaseStatusReasonRevertedManual",
- "ReleaseStatusReasonRevertedDiscarded",
- "ReleaseStatusReasonRevertedInsufficientData"
- ]
- },
- "CleanupBehavior": {
- "description": "What happens to the release rules when the final phase completes,\neither on its own or because a stop rolls it forward while it's\nrunning:\n\n- `remove_rules_and_update_default_rule`: The release rules are\n removed and the default rule serves the target variation.\n- `leave_rules_in_place`: The release rules stay and serve the\n target variation.\n\nIn every other case, including a revert, it has no effect: release\nrules left on the flag keep serving the variation the release ended\non, ahead of rules added later without `beforeRuleId`.\n",
- "enum": [
- "remove_rules_and_update_default_rule",
- "leave_rules_in_place"
- ],
- "type": "string",
- "x-enum-varnames": [
- "CleanupBehaviorRemoveRulesAndUpdateDefaultRule",
- "CleanupBehaviorLeaveRulesInPlace"
- ]
- },
- "ReleaseHealthCheckKind": {
- "description": "A release health check:\n- `flag_evaluations_any`: The flag has recently been evaluated.\n- `flag_evaluations_with_context`: The flag has recently been\n evaluated for contexts of the `randomizationUnit` kind.\n- `metric_events_any`: Guarded releases only. The metric has\n received events.\n- `metric_events_with_context`: Guarded releases only. The metric\n has received events for contexts of the `randomizationUnit` kind.\n",
- "enum": [
- "flag_evaluations_any",
- "flag_evaluations_with_context",
- "metric_events_any",
- "metric_events_with_context"
- ],
- "type": "string",
- "x-enum-varnames": [
- "ReleaseHealthCheckKindFlagEvaluationsAny",
- "ReleaseHealthCheckKindFlagEvaluationsWithContext",
- "ReleaseHealthCheckKindMetricEventsAny",
- "ReleaseHealthCheckKindMetricEventsWithContext"
- ]
- },
- "ReleaseHealthCheckFailure": {
- "example": {
- "metricKey": "metricKey",
- "kind": "flag_evaluations_any",
- "message": "message"
- },
- "properties": {
- "kind": {
- "$ref": "#/components/schemas/ReleaseHealthCheckKind"
},
- "metricKey": {
- "description": "The metric key associated with a metric event check.",
+ "role": {
+ "description": "The member's base role. If the member has no additional roles, this role will be in effect.",
+ "example": "admin",
"type": "string"
},
- "message": {
- "description": "A description of the failed health check.",
+ "email": {
+ "description": "The member's email address",
+ "example": "ariel@acme.com",
"type": "string"
}
},
"required": [
- "kind",
- "message"
+ "_id",
+ "_links",
+ "email",
+ "role"
],
"type": "object"
},
- "StartEnvironmentReleaseBadRequest": {
- "example": {
- "failingChecks": [
- {
- "metricKey": "metricKey",
- "kind": "flag_evaluations_any",
- "message": "message"
- },
- {
- "metricKey": "metricKey",
- "kind": "flag_evaluations_any",
- "message": "message"
- }
- ],
- "code": "code",
- "message": "message"
- },
+ "EnvironmentReleasesFilter": {
"properties": {
- "code": {
+ "type": {
+ "description": "Filter type. One of [contextAttribute, eventProperty, group]",
+ "enum": [
+ "group",
+ "contextAttribute",
+ "eventProperty"
+ ],
+ "example": "contextAttribute",
"type": "string"
},
- "message": {
+ "attribute": {
+ "description": "If not a group node, the context attribute name or event property name to filter on",
+ "example": "country",
"type": "string"
},
- "failingChecks": {
- "description": "Present when `code` is `health_checks_failed`.",
- "items": {
- "$ref": "#/components/schemas/ReleaseHealthCheckFailure"
- },
+ "op": {
+ "type": "string"
+ },
+ "values": {
+ "description": "The context attribute / event property values or group member nodes",
+ "example": [
+ "JP"
+ ],
+ "items": {},
"type": "array"
+ },
+ "contextKind": {
+ "description": "For context attribute filters, the context kind.",
+ "example": "user",
+ "type": "string"
+ },
+ "negate": {
+ "description": "If set, then take the inverse of the operator. 'in' becomes 'not in'.",
+ "example": false,
+ "type": "boolean"
}
},
"required": [
- "code",
- "message"
+ "negate",
+ "op",
+ "type",
+ "values"
],
"type": "object"
},
- "ReleaseStep": {
- "description": "One step in a phase's rollout schedule.",
- "example": {
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
- },
+ "EnvironmentReleasesMetricDenominatorRep": {
"properties": {
- "stepIndex": {
- "description": "Zero-based index of this step.",
- "minimum": 0,
- "readOnly": true,
- "type": "integer"
+ "eventName": {
+ "description": "The warehouse event column for the denominator",
+ "type": "string"
},
- "allocation": {
- "description": "Thousandths of a percent. `100000` is 100%, and `10000` is 10%.\nGuarded releases cannot exceed `50000`, preserving a control\ngroup.\n",
- "maximum": 100000,
- "minimum": 1,
- "type": "integer"
+ "isNumeric": {
+ "description": "Whether the denominator aggregates a numeric value",
+ "type": "boolean"
},
- "durationMillis": {
- "format": "int64",
- "minimum": 1,
- "type": "integer"
+ "unitAggregationType": {
+ "description": "How individual unit values are aggregated for the denominator",
+ "type": "string"
},
- "startedAt": {
- "description": "Start of the step in Unix milliseconds.",
+ "unitAggregationField": {
+ "description": "The column to count distinct values of; required when unitAggregationType is count_distinct",
+ "type": "string"
+ },
+ "valueColumn": {
+ "description": "For a numeric denominator, the column holding the numeric value",
+ "type": "string"
+ },
+ "dataSource": {
+ "$ref": "#/components/schemas/MetricDataSourceRefRep"
+ },
+ "filters": {
+ "$ref": "#/components/schemas/EnvironmentReleasesFilter"
+ },
+ "windowStartOffset": {
+ "description": "Start of the measurement window in milliseconds",
"format": "int64",
- "readOnly": true,
"type": "integer"
},
- "endedAt": {
- "description": "End of the step in Unix milliseconds.",
+ "windowEndOffset": {
+ "description": "End of the measurement window in milliseconds",
"format": "int64",
- "readOnly": true,
"type": "integer"
+ },
+ "winsorLowerPercentile": {
+ "description": "Lower winsorization percentile in the open interval (0, 100)",
+ "type": "number"
+ },
+ "winsorUpperPercentile": {
+ "description": "Upper winsorization percentile in the open interval (0, 100)",
+ "type": "number"
+ },
+ "winsorIncludeImputed": {
+ "description": "When true, the percentile bound calculation includes imputed zeros",
+ "type": "boolean"
}
},
- "required": [
- "allocation",
- "durationMillis",
- "stepIndex"
- ],
"type": "object"
},
- "EnvironmentReleasePhase": {
- "description": "One ordered phase of an environment release.",
+ "PostEnvironmentReleasePlanRequest": {
"example": {
- "metricStatuses": {
- "key": "ok"
- },
- "statusReason": null,
- "endedAt": 3,
- "phaseIndex": 0,
- "description": "description",
- "currentStepIndex": 0,
- "startedAt": 9,
- "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "ruleId": "ruleId",
- "steps": [
- {
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
+ "releaseMethod": "progressive_release",
+ "progressiveRelease": {
+ "advancementMode": "manual",
+ "metrics": {
+ "key": {
+ "autoRollback": false,
+ "isGroup": true
+ }
},
- {
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
- }
- ],
- "status": null
+ "randomizationUnit": "user",
+ "cleanupBehavior": "remove_rules_and_update_default_rule",
+ "phases": [
+ {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
+ },
+ {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
+ }
+ ]
+ },
+ "name": "Checkout flow rollout",
+ "description": "Standard rollout for checkout changes",
+ "key": "checkout-flow-rollout"
},
"properties": {
- "id": {
- "format": "uuid",
+ "name": {
+ "description": "Human-readable name for this release plan",
+ "example": "Checkout flow rollout",
+ "maxLength": 256,
"type": "string"
},
- "phaseIndex": {
- "description": "Zero-based index of this phase.",
- "minimum": 0,
- "readOnly": true,
- "type": "integer"
- },
- "ruleId": {
- "description": "ID of the flag rule for this phase. New public-API releases always\nhave a rule ID. `null` is retained only when reading a historical\nrelease that ran on the default rule.\n",
- "nullable": true,
+ "key": {
+ "description": "Unique key identifying this release plan within the project. Immutable once created. Unique only among active (non-deleted) plans — a soft-deleted plan's key can be reused by a new plan.",
+ "example": "checkout-flow-rollout",
+ "maxLength": 256,
+ "minLength": 1,
+ "pattern": "^[a-zA-Z0-9][._\\-a-zA-Z0-9]*$",
"type": "string"
},
"description": {
- "description": "The description of the flag rule when this release was created.\nOmitted for default-rule phases.\n",
- "readOnly": true,
+ "description": "Human-readable description of this release plan's purpose",
+ "example": "Standard rollout for checkout changes",
"type": "string"
},
- "status": {
- "$ref": "#/components/schemas/ReleaseStatus"
- },
- "statusReason": {
- "$ref": "#/components/schemas/ReleaseStatusReason"
+ "releaseMethod": {
+ "default": "progressive_release",
+ "description": "Discriminates which nested config object is required",
+ "enum": [
+ "progressive_release"
+ ],
+ "type": "string"
},
- "steps": {
- "items": {
- "$ref": "#/components/schemas/ReleaseStep"
+ "progressiveRelease": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlanProgressiveRelease"
+ }
+ },
+ "required": [
+ "key",
+ "name",
+ "progressiveRelease"
+ ],
+ "type": "object"
+ },
+ "PutEnvironmentReleasePlanRequest": {
+ "example": {
+ "releaseMethod": "progressive_release",
+ "progressiveRelease": {
+ "advancementMode": "manual",
+ "metrics": {
+ "key": {
+ "autoRollback": false,
+ "isGroup": true
+ }
},
- "type": "array"
+ "randomizationUnit": "user",
+ "cleanupBehavior": "remove_rules_and_update_default_rule",
+ "phases": [
+ {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
+ },
+ {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
+ }
+ ]
},
- "currentStepIndex": {
- "description": "Zero-based index of the step the phase is on. Omitted until the\nfirst step starts. Once the phase completes or reverts, it stays at\nthe last step that started, unlike `currentPhaseIndex`, which\nbecomes `null` when the release reaches a terminal status.\n",
- "minimum": 0,
- "readOnly": true,
- "type": "integer"
+ "name": "Checkout flow rollout",
+ "description": "Standard rollout for checkout changes",
+ "version": 3
+ },
+ "properties": {
+ "name": {
+ "description": "Human-readable name for this release plan",
+ "example": "Checkout flow rollout",
+ "maxLength": 256,
+ "type": "string"
},
- "startedAt": {
- "description": "Start of the phase in Unix milliseconds.",
+ "version": {
+ "description": "Optional. The plan version this request was based on, from a previous read. Plans start at version 1. When present it must match the plan's current version — on mismatch the request is rejected with 409 and no changes are applied, so a stale copy can't silently overwrite a concurrent edit. When omitted, the plan's version is not checked.",
+ "example": 3,
"format": "int64",
- "readOnly": true,
+ "minimum": 1,
"type": "integer"
},
- "endedAt": {
- "description": "End of the phase in Unix milliseconds.",
- "format": "int64",
- "readOnly": true,
- "type": "integer"
+ "description": {
+ "description": "Human-readable description of this release plan's purpose",
+ "example": "Standard rollout for checkout changes",
+ "type": "string"
},
- "metricStatuses": {
- "additionalProperties": {
- "$ref": "#/components/schemas/ReleaseMetricStatus"
- },
- "description": "Per-phase metric status keyed by metric key. Empty for progressive\nreleases. Metric definitions and monitoring preferences live once\nin the parent release's `metrics` array.\n",
- "readOnly": true,
- "type": "object"
+ "releaseMethod": {
+ "default": "progressive_release",
+ "description": "Discriminates which nested config object is required",
+ "enum": [
+ "progressive_release"
+ ],
+ "type": "string"
+ },
+ "progressiveRelease": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlanProgressiveRelease"
}
},
"required": [
- "id",
- "metricStatuses",
- "phaseIndex",
- "ruleId",
- "status",
- "steps"
+ "name",
+ "progressiveRelease"
],
"type": "object"
},
- "ReleaseMetric": {
- "description": "A metric shared by every phase of a guarded release.",
+ "EnvironmentReleasePlanProgressiveRelease": {
"example": {
- "metricKey": "metricKey",
- "definition": "",
- "autoRollback": true,
- "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ "advancementMode": "manual",
+ "metrics": {
+ "key": {
+ "autoRollback": false,
+ "isGroup": true
+ }
+ },
+ "randomizationUnit": "user",
+ "cleanupBehavior": "remove_rules_and_update_default_rule",
+ "phases": [
+ {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
+ },
+ {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
+ }
+ ]
},
"properties": {
- "metricKey": {
+ "randomizationUnit": {
+ "description": "Context kind used to bucket contexts for allocation",
+ "example": "user",
"type": "string"
},
- "metricVersionId": {
- "format": "uuid",
- "readOnly": true,
+ "advancementMode": {
+ "default": "manual",
+ "description": "Whether a release started from this plan advances to the next phase automatically once the current phase's steps complete, or waits for a user/API action",
+ "enum": [
+ "manual",
+ "automatic"
+ ],
"type": "string"
},
- "autoRollback": {
- "description": "Whether a regression automatically reverts the release.",
- "type": "boolean"
- },
- "definition": {
- "allOf": [
- {
- "$ref": "#/components/schemas/EnvironmentReleasesMetricListingRep"
- }
+ "cleanupBehavior": {
+ "default": "remove_rules_and_update_default_rule",
+ "description": "What happens to the flag's rules once a release started from this plan completes. Defaults to `remove_rules_and_update_default_rule`, which removes the release's targeting rules and updates the flag's default rule to serve the target variation; `leave_rules_in_place` leaves the targeting rules untouched.",
+ "enum": [
+ "remove_rules_and_update_default_rule",
+ "leave_rules_in_place"
],
- "description": "Present only when the caller requests `expand=metrics` and the pinned\nmetric version still exists. A metric whose pinned version has been\ndeleted keeps its `metricKey` and `metricVersionId` but has no definition.\n",
- "readOnly": true
+ "type": "string"
+ },
+ "phases": {
+ "description": "Ordered list of phases this release plan configures",
+ "items": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlanPhase"
+ },
+ "minItems": 1,
+ "type": "array"
+ },
+ "metrics": {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlanMetric"
+ },
+ "description": "Metrics/metric groups to monitor during rollout, keyed by metric/group key",
+ "type": "object"
}
},
"required": [
- "autoRollback",
- "metricKey"
+ "phases",
+ "randomizationUnit"
],
"type": "object"
},
- "ReleaseMetricStatus": {
- "enum": [
- "ok",
- "regressed",
- "regression_dismissed"
- ],
- "type": "string",
- "x-enum-varnames": [
- "ReleaseMetricStatusOK",
- "ReleaseMetricStatusRegressed",
- "ReleaseMetricStatusRegressionDismissed"
- ]
- },
- "EnvironmentRelease": {
- "description": "A flag release in one environment, made up of one or more ordered\nphases. The top-level status is derived from the phases: it reflects\nthe active phase, reports `waiting` between successfully completed\nphases, and reports the terminal outcome of the release.\n",
+ "EnvironmentReleasePlanProgressiveReleaseRep": {
"example": {
- "originalVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "_links": {
+ "advancementMode": "manual",
+ "metrics": {
"key": {
- "href": "href",
- "type": "type"
+ "autoRollback": false,
+ "isGroup": true
}
},
- "kind": "progressive",
- "startedAt": 7,
- "originalVariationValue": "",
+ "randomizationUnit": "user",
"cleanupBehavior": "remove_rules_and_update_default_rule",
- "environmentKey": "environmentKey",
- "targetVariationValue": "",
- "createdAt": 4,
- "projectKey": "projectKey",
- "statusReason": "waiting_regression_detected",
- "advancementMode": "manual",
- "endedAt": 1,
- "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "targetVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "metrics": [
- {
- "metricKey": "metricKey",
- "definition": "",
- "autoRollback": true,
- "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
- },
- {
- "metricKey": "metricKey",
- "definition": "",
- "autoRollback": true,
- "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
- }
- ],
- "randomizationUnit": "randomizationUnit",
- "currentPhaseIndex": 0,
- "flagKey": "flagKey",
"phases": [
{
- "metricStatuses": {
- "key": "ok"
- },
- "statusReason": null,
- "endedAt": 3,
- "phaseIndex": 0,
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
"description": "description",
- "currentStepIndex": 0,
- "startedAt": 9,
- "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "ruleId": "ruleId",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"steps": [
{
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
},
{
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}
- ],
- "status": null
+ ]
},
{
- "metricStatuses": {
- "key": "ok"
- },
- "statusReason": null,
- "endedAt": 3,
- "phaseIndex": 0,
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
"description": "description",
- "currentStepIndex": 0,
- "startedAt": 9,
- "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "ruleId": "ruleId",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"steps": [
{
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
},
{
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}
- ],
- "status": null
+ ]
}
- ],
- "status": "pending"
+ ]
},
"properties": {
- "id": {
- "format": "uuid",
- "type": "string"
- },
- "status": {
- "$ref": "#/components/schemas/ReleaseStatus"
- },
- "statusReason": {
- "$ref": "#/components/schemas/ReleaseStatusReason"
- },
- "projectKey": {
- "type": "string"
- },
- "environmentKey": {
- "type": "string"
- },
- "flagKey": {
- "type": "string"
- },
- "originalVariationId": {
- "description": "ID of the variation the release started from.",
- "format": "uuid",
- "type": "string"
- },
- "originalVariationValue": {
- "description": "The value of the variation. This may be a string, boolean, number, JSON object, or array."
- },
- "targetVariationId": {
- "description": "ID of the variation being released.",
- "format": "uuid",
+ "randomizationUnit": {
+ "description": "Context kind used to bucket contexts for allocation. Required when you create or update a plan.",
+ "example": "user",
"type": "string"
},
- "targetVariationValue": {
- "description": "The value of the variation. This may be a string, boolean, number, JSON object, or array."
- },
- "randomizationUnit": {
- "description": "Key of the context kind the release randomizes on.",
+ "advancementMode": {
+ "description": "Whether a release started from this plan advances to the next phase automatically once the current phase's steps complete, or waits for a user/API action",
+ "enum": [
+ "manual",
+ "automatic"
+ ],
"type": "string"
},
"cleanupBehavior": {
- "$ref": "#/components/schemas/CleanupBehavior"
- },
- "kind": {
- "$ref": "#/components/schemas/ReleaseType"
- },
- "metrics": {
- "items": {
- "$ref": "#/components/schemas/ReleaseMetric"
- },
- "type": "array"
+ "description": "What happens to the flag's rules once a release started from this plan completes. `remove_rules_and_update_default_rule` removes the release's targeting rules and updates the flag's default rule to serve the target variation; `leave_rules_in_place` leaves the targeting rules untouched.",
+ "enum": [
+ "remove_rules_and_update_default_rule",
+ "leave_rules_in_place"
+ ],
+ "type": "string"
},
"phases": {
+ "description": "Ordered list of phases this release plan configures",
"items": {
- "$ref": "#/components/schemas/EnvironmentReleasePhase"
+ "$ref": "#/components/schemas/EnvironmentReleasePlanPhase"
},
"minItems": 1,
"type": "array"
},
- "currentPhaseIndex": {
- "description": "Zero-based index of the active phase. Null before the first phase, between phases, and after the release reaches a terminal status.",
- "minimum": 0,
- "nullable": true,
- "type": "integer"
- },
- "advancementMode": {
- "$ref": "#/components/schemas/EnvironmentReleaseAdvancementMode"
- },
- "createdAt": {
- "description": "Creation time in Unix milliseconds.",
- "format": "int64",
- "type": "integer"
- },
- "startedAt": {
- "description": "Start of the first phase in Unix milliseconds. Absent until a phase has started.",
- "format": "int64",
- "readOnly": true,
- "type": "integer"
- },
- "endedAt": {
- "description": "End of the last started phase in Unix milliseconds. Present only after the release reaches a terminal status of `completed` or `reverted`.",
- "format": "int64",
- "readOnly": true,
- "type": "integer"
- },
- "_links": {
+ "metrics": {
"additionalProperties": {
- "$ref": "#/components/schemas/EnvironmentReleaseLink"
+ "$ref": "#/components/schemas/EnvironmentReleasePlanMetric"
},
+ "description": "Metrics/metric groups to monitor during rollout, keyed by metric/group key",
"type": "object"
}
},
"required": [
- "advancementMode",
- "cleanupBehavior",
- "createdAt",
- "currentPhaseIndex",
- "environmentKey",
- "flagKey",
- "id",
- "kind",
- "metrics",
- "originalVariationId",
- "originalVariationValue",
- "phases",
- "projectKey",
- "randomizationUnit",
- "status",
- "targetVariationId",
- "targetVariationValue"
+ "phases"
],
"type": "object"
},
- "EnvironmentReleaseAdvancementMode": {
- "description": "Whether a multi-phase release advances to the next phase automatically\nonce the current phase's steps complete, or waits for an explicit\nadvance. Has no effect on a single-phase release.\n",
- "enum": [
- "manual",
- "automatic"
- ],
- "type": "string",
- "x-enum-varnames": [
- "EnvironmentReleaseAdvancementModeManual",
- "EnvironmentReleaseAdvancementModeAutomatic"
- ]
- },
- "EnvironmentReleaseClause": {
- "description": "One targeting clause of a rule created for the release.",
+ "EnvironmentReleasePlanPhase": {
+ "example": {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
+ },
"properties": {
- "contextKind": {
- "description": "Context kind the clause applies to. Omit for `segmentMatch`.",
- "type": "string"
- },
- "attribute": {
+ "_id": {
+ "description": "The phase's server-generated identifier",
+ "format": "uuid",
+ "readOnly": true,
"type": "string"
},
- "op": {
- "description": "One of `in`, `endsWith`, `startsWith`, `matches`, `contains`,\n`lessThan`, `lessThanOrEqual`, `greaterThan`, `greaterThanOrEqual`,\n`before`, `after`, `segmentMatch`, `semVerEqual`, `semVerLessThan`,\n`semVerGreaterThan`.\n",
+ "description": {
+ "description": "Human-readable description of this phase",
"type": "string"
},
- "values": {
- "description": "JSON primitives only (strings, numbers, booleans); objects, arrays, and null are rejected.",
- "items": {},
+ "steps": {
+ "description": "Ordered allocation increments within this phase",
+ "items": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlanStep"
+ },
+ "minItems": 1,
"type": "array"
},
- "negate": {
- "default": false,
- "type": "boolean"
+ "clauses": {
+ "description": "Targeting clauses scoping this phase's audience. Each phase's clauses must include the randomization unit clause {\"contextKind\": \"\", \"attribute\": \"kind\", \"op\": \"in\", \"values\": [\"\"]}, so the release only reaches contexts with that context kind. To release to every context of the randomization unit, provide exactly that clause.",
+ "items": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlanClause"
+ },
+ "type": "array"
}
},
"required": [
- "attribute",
- "op",
- "values"
+ "steps"
],
"type": "object"
},
- "EnvironmentReleaseStepInput": {
- "description": "One step of a phase's rollout schedule.",
+ "EnvironmentReleasePlanStep": {
"example": {
- "allocation": 8009,
- "durationMillis": 1
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
},
"properties": {
+ "_id": {
+ "description": "The step's server-generated identifier",
+ "format": "uuid",
+ "readOnly": true,
+ "type": "string"
+ },
"allocation": {
- "description": "Thousandths of a percent. `100000` is 100%, and `10000` is 10%.\nGuarded releases cannot exceed `50000`, preserving a control\ngroup. Each step's allocation must be greater than the previous\nstep's.\n\nIn a progressive release, an allocation of N% serves the target\nvariation to N% of the phase's contexts and the original\nvariation to the rest. In a guarded release, it serves the\ntarget variation to N%, the original variation to another N% as\nthe measured control group, and the original variation to the\nrest without measuring them.\n",
+ "description": "Traffic allocation in per-100k units (100000 = 100%)",
+ "example": 50000,
+ "format": "int64",
"maximum": 100000,
- "minimum": 1,
+ "minimum": 0,
"type": "integer"
},
"durationMillis": {
+ "description": "How long this step holds before the next one starts",
+ "example": 3600000,
"format": "int64",
- "minimum": 1,
+ "minimum": 0,
"type": "integer"
}
},
@@ -84500,510 +85508,541 @@
"durationMillis"
],
"type": "object"
- },
- "EnvironmentReleaseMetricInput": {
- "description": "A metric to monitor across every phase of a guarded release.",
- "example": {
- "metricKey": "metricKey",
- "autoRollback": false
- },
- "properties": {
- "metricKey": {
- "type": "string"
- },
- "autoRollback": {
- "default": false,
- "description": "Whether a regression on this metric automatically reverts the\nrelease. When `false`, a detected regression pauses the release\ninstead: it reports `waiting` with reason\n`waiting_regression_detected` and does not advance until the\nregression is dismissed or the release is stopped.\n",
- "type": "boolean"
- }
- },
- "required": [
- "metricKey"
- ],
- "type": "object"
- },
- "EnvironmentReleasePhaseInput": {
- "description": "One phase of a release. Each phase creates a flag rule unless it sets `ruleId`.",
- "oneOf": [
- {
- "$ref": "#/components/schemas/EnvironmentReleaseExistingRulePhaseInput"
- },
- {
- "$ref": "#/components/schemas/EnvironmentReleaseNewRulePhaseInput"
- }
- ]
- },
- "EnvironmentReleaseExistingRulePhaseInput": {
- "additionalProperties": false,
- "description": "A phase that releases on an existing rule. Allowed only on a single-phase release.",
+ },
+ "EnvironmentReleasePlanClause": {
"example": {
- "ruleId": "ruleId",
- "steps": [
- {
- "allocation": 8009,
- "durationMillis": 1
- },
- {
- "allocation": 8009,
- "durationMillis": 1
- }
- ]
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
},
"properties": {
- "ruleId": {
- "description": "Existing rule to release on. The rule must already include the\n`kind` clause for `randomizationUnit` described in\n`startEnvironmentRelease`.\n",
+ "_id": {
+ "description": "The clause's server-generated identifier",
+ "format": "uuid",
+ "readOnly": true,
"type": "string"
},
- "steps": {
+ "contextKind": {
+ "default": "user",
+ "description": "Context kind this clause applies to",
+ "type": "string"
+ },
+ "attribute": {
+ "description": "Context attribute to match on (may be empty for segmentMatch)",
+ "example": "email",
+ "type": "string"
+ },
+ "op": {
+ "description": "Clause operator",
+ "enum": [
+ "in",
+ "endsWith",
+ "startsWith",
+ "matches",
+ "contains",
+ "lessThan",
+ "lessThanOrEqual",
+ "greaterThan",
+ "greaterThanOrEqual",
+ "before",
+ "after",
+ "semVerEqual",
+ "semVerLessThan",
+ "semVerGreaterThan",
+ "segmentMatch"
+ ],
+ "example": "endsWith",
+ "type": "string"
+ },
+ "values": {
+ "description": "Values to match against (strings, numbers, or booleans). Each string value can be at most 1,024 bytes when UTF-8 encoded, so a value with multibyte characters can be rejected even if it has fewer than 1,024 characters.",
"items": {
- "$ref": "#/components/schemas/EnvironmentReleaseStepInput"
+ "maxLength": 1024
},
- "minItems": 1,
"type": "array"
+ },
+ "negate": {
+ "default": false,
+ "description": "Whether to negate the clause",
+ "type": "boolean"
}
},
"required": [
- "ruleId",
- "steps"
+ "attribute",
+ "op",
+ "values"
],
"type": "object"
},
- "EnvironmentReleaseNewRulePhaseInput": {
- "additionalProperties": false,
- "description": "A phase that creates a new rule.",
+ "EnvironmentReleasePlanMetric": {
+ "example": {
+ "autoRollback": false,
+ "isGroup": true
+ },
"properties": {
- "clauses": {
- "description": "Clauses for a new rule. Must include the `kind` clause for\n`randomizationUnit` described in `startEnvironmentRelease`. A\nnew rule that exactly duplicates an existing rule on the flag\nreturns `400` with\n`new rule is exact duplicate of an existing rule at index `.\n",
- "items": {
- "$ref": "#/components/schemas/EnvironmentReleaseClause"
- },
- "minItems": 1,
- "type": "array"
- },
- "description": {
- "description": "Description for a new rule. Must differ from the description of\nevery other rule on the flag, including rules an earlier release\nleft in place, or the request returns `400` with\n`duplicate rule description not allowed`.\n",
- "type": "string"
+ "isGroup": {
+ "description": "true if this key identifies a metric group, false if it identifies a single metric",
+ "type": "boolean"
},
- "steps": {
- "items": {
- "$ref": "#/components/schemas/EnvironmentReleaseStepInput"
- },
- "minItems": 1,
- "type": "array"
+ "autoRollback": {
+ "default": false,
+ "description": "Whether to automatically roll back the release if this metric/group regresses",
+ "type": "boolean"
}
},
"required": [
- "clauses",
- "steps"
+ "isGroup"
],
"type": "object"
},
- "StartEnvironmentReleaseRequest": {
+ "EnvironmentReleasePlan": {
"example": {
- "beforeRuleId": "beforeRuleId",
- "originalVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "advancementMode": "",
- "bypassHealthChecks": [
- "flag_evaluations_any",
- "flag_evaluations_with_context",
- "metric_events_any",
- "metric_events_with_context"
- ],
- "comment": "comment",
- "targetVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "metrics": [
- {
- "metricKey": "metricKey",
- "autoRollback": false
- },
- {
- "metricKey": "metricKey",
- "autoRollback": false
- }
- ],
- "randomizationUnit": "randomizationUnit",
- "releasePlanKey": "releasePlanKey",
- "cleanupBehavior": "",
- "phases": [
- {
- "ruleId": "ruleId",
- "steps": [
- {
- "allocation": 8009,
- "durationMillis": 1
- },
- {
- "allocation": 8009,
- "durationMillis": 1
- }
- ]
+ "releaseMethod": "progressive_release",
+ "createdAt": 6,
+ "default": true,
+ "progressiveRelease": {
+ "advancementMode": "manual",
+ "metrics": {
+ "key": {
+ "autoRollback": false,
+ "isGroup": true
+ }
},
- {
- "ruleId": "ruleId",
- "steps": [
- {
- "allocation": 8009,
- "durationMillis": 1
- },
- {
- "allocation": 8009,
- "durationMillis": 1
- }
- ]
- }
- ]
+ "randomizationUnit": "user",
+ "cleanupBehavior": "remove_rules_and_update_default_rule",
+ "phases": [
+ {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
+ },
+ {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
+ }
+ ]
+ },
+ "name": "name",
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "version": 0,
+ "key": "key",
+ "environmentKey": "environmentKey",
+ "updatedAt": 1
},
"properties": {
- "beforeRuleId": {
- "description": "Insert the newly created rule or phase rules before this rule. If\nomitted, append them to the end of the rule list.\n",
+ "_id": {
+ "description": "The release plan's unique identifier",
+ "format": "uuid",
"type": "string"
},
- "originalVariationId": {
- "description": "ID of the variation the release starts from. The release\ngradually moves traffic from it to the target variation, and\nmoves traffic back to it if the release reverts.\n",
- "format": "uuid",
+ "key": {
+ "description": "Unique key identifying this release plan within the project",
+ "maxLength": 256,
+ "minLength": 1,
+ "pattern": "^[a-zA-Z0-9][._\\-a-zA-Z0-9]*$",
"type": "string"
},
- "targetVariationId": {
- "description": "ID of the variation being released. The release gradually moves\ntraffic to it from the original variation, and moves traffic back\nto the original variation if the release reverts.\n",
- "format": "uuid",
+ "name": {
+ "description": "Human-readable name for this release plan",
+ "maxLength": 256,
"type": "string"
},
- "releasePlanKey": {
- "description": "Key of an environment release plan in this environment. The plan\nsupplies `randomizationUnit`, `phases`, `metrics`, `advancementMode`,\nand `cleanupBehavior`, so omit them. Omit this field to configure\nthe release inline.\n",
- "minLength": 1,
+ "description": {
+ "description": "Human-readable description of this release plan's purpose",
"type": "string"
},
- "randomizationUnit": {
- "description": "Key of an existing, non-archived context kind in the project that\nthe release randomizes on, such as `user`. Each phase's rule must\ninclude the clause `{\"contextKind\": \"\", \"attribute\": \"kind\",\n\"op\": \"in\", \"values\": [\"\"]}`. Required unless `releasePlanKey`\nis set.\n",
- "minLength": 1,
+ "environmentKey": {
+ "description": "The environment this release plan is scoped to",
"type": "string"
},
- "advancementMode": {
- "allOf": [
- {
- "$ref": "#/components/schemas/EnvironmentReleaseAdvancementMode"
- }
+ "releaseMethod": {
+ "description": "Discriminates which nested config object is present",
+ "enum": [
+ "progressive_release"
],
- "description": "How the release moves between phases. Required when `phases` has\nmore than one entry; a single-phase release ignores it and may omit it.\nOmit when `releasePlanKey` is set.\n"
+ "type": "string"
},
- "phases": {
- "description": "Ordered phases of the release. Required unless `releasePlanKey` is set.",
- "items": {
- "$ref": "#/components/schemas/EnvironmentReleasePhaseInput"
- },
- "minItems": 1,
- "type": "array"
+ "version": {
+ "description": "The release plan's version, starting at 1 and incremented on every update",
+ "format": "int64",
+ "type": "integer"
},
- "metrics": {
- "description": "Metrics shared by every phase. Omit or pass an empty array for a\nprogressive release. Metric groups cannot be listed inline; a\nrelease plan's metric groups expand into their member metrics at\nstart. Omit when `releasePlanKey` is set.\n",
- "items": {
- "$ref": "#/components/schemas/EnvironmentReleaseMetricInput"
- },
- "type": "array"
+ "createdAt": {
+ "format": "int64",
+ "type": "integer"
},
- "bypassHealthChecks": {
- "description": "Health check kinds that do not block this request. LaunchDarkly\nstill runs and enforces every health check kind not listed here.\n",
- "example": [
- "flag_evaluations_any",
- "flag_evaluations_with_context",
- "metric_events_any",
- "metric_events_with_context"
- ],
- "items": {
- "$ref": "#/components/schemas/ReleaseHealthCheckKind"
- },
- "type": "array",
- "uniqueItems": true
+ "updatedAt": {
+ "format": "int64",
+ "type": "integer"
},
- "cleanupBehavior": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CleanupBehavior"
- }
- ],
- "description": "What happens to the release rules after the release completes. Omit\nfor `leave_rules_in_place`. Omit when `releasePlanKey` is set.\n"
+ "default": {
+ "description": "Whether this plan is the default for its environment. At most one active plan per environment is the default. Managed via the environment's default-release-plan sub-resource, not this request body.",
+ "readOnly": true,
+ "type": "boolean"
},
- "comment": {
- "description": "Optional comment written to the flag's audit-log entry.",
- "type": "string"
+ "progressiveRelease": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlanProgressiveReleaseRep"
}
},
"required": [
- "originalVariationId",
- "targetVariationId"
+ "_id",
+ "environmentKey",
+ "key",
+ "name",
+ "progressiveRelease",
+ "releaseMethod",
+ "version"
],
"type": "object"
},
- "EnvironmentReleaseResolution": {
- "description": "How to resolve each phase of the release when you stop it:\n\n- `roll_forward_all_phases`: All phases serve the target variation.\n Pending phases stay on the flag and are enabled.\n- `roll_forward_current_phase_and_remove_pending_phases`: Current and\n completed phases serve the target variation. Pending phases are\n removed.\n- `roll_back_all_phases_and_remove_pending_phases`: Current and\n completed phases serve the original variation. Pending phases are\n removed.\n- `roll_back_current_phase_and_remove_pending_phases`: The current\n phase serves the original variation, and completed phases keep\n serving the target variation. Pending phases are removed.\n\nFor a single-phase release there are no completed or pending phases,\nso the two roll-forward values are equivalent, as are the two roll-back\nvalues.\n\nThe `current_phase` values return `400` if the release is between\nphases. Use an `all_phases` value instead. A terminal release returns\n`200` unchanged for every resolution.\n",
- "enum": [
- "roll_forward_all_phases",
- "roll_forward_current_phase_and_remove_pending_phases",
- "roll_back_all_phases_and_remove_pending_phases",
- "roll_back_current_phase_and_remove_pending_phases"
- ],
- "type": "string",
- "x-enum-varnames": [
- "EnvironmentReleaseResolutionRollForwardAllPhases",
- "EnvironmentReleaseResolutionRollForwardCurrentPhaseAndRemovePendingPhases",
- "EnvironmentReleaseResolutionRollBackAllPhasesAndRemovePendingPhases",
- "EnvironmentReleaseResolutionRollBackCurrentPhaseAndRemovePendingPhases"
- ]
- },
- "StopEnvironmentReleaseRequest": {
+ "PutDefaultEnvironmentReleasePlanRequest": {
"example": {
- "comment": "comment",
- "resolution": "roll_forward_all_phases"
+ "key": "checkout-flow-rollout"
},
"properties": {
- "resolution": {
- "$ref": "#/components/schemas/EnvironmentReleaseResolution"
- },
- "comment": {
- "description": "Optional comment written to the flag's audit-log entry.",
+ "key": {
+ "description": "Key of the release plan to set as the environment's default",
+ "example": "checkout-flow-rollout",
+ "maxLength": 256,
+ "minLength": 1,
"type": "string"
}
},
"required": [
- "resolution"
+ "key"
],
"type": "object"
},
- "EnvironmentReleaseCollection": {
- "description": "One page of environment releases for one flag in one environment, newest first.",
+ "EnvironmentReleasePlans": {
"example": {
"_links": {
- "key": {
+ "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,
+ "totalCount": 5,
"items": [
{
- "originalVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "_links": {
- "key": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "progressive",
- "startedAt": 7,
- "originalVariationValue": "",
- "cleanupBehavior": "remove_rules_and_update_default_rule",
- "environmentKey": "environmentKey",
- "targetVariationValue": "",
- "createdAt": 4,
- "projectKey": "projectKey",
- "statusReason": "waiting_regression_detected",
- "advancementMode": "manual",
- "endedAt": 1,
- "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "targetVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "metrics": [
- {
- "metricKey": "metricKey",
- "definition": "",
- "autoRollback": true,
- "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
- },
- {
- "metricKey": "metricKey",
- "definition": "",
- "autoRollback": true,
- "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
- }
- ],
- "randomizationUnit": "randomizationUnit",
- "currentPhaseIndex": 0,
- "flagKey": "flagKey",
- "phases": [
- {
- "metricStatuses": {
- "key": "ok"
- },
- "statusReason": null,
- "endedAt": 3,
- "phaseIndex": 0,
- "description": "description",
- "currentStepIndex": 0,
- "startedAt": 9,
- "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "ruleId": "ruleId",
- "steps": [
- {
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
- },
- {
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
- }
- ],
- "status": null
- },
- {
- "metricStatuses": {
- "key": "ok"
- },
- "statusReason": null,
- "endedAt": 3,
- "phaseIndex": 0,
- "description": "description",
- "currentStepIndex": 0,
- "startedAt": 9,
- "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "ruleId": "ruleId",
- "steps": [
- {
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
- },
- {
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
- }
- ],
- "status": null
- }
- ],
- "status": "pending"
- },
- {
- "originalVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "_links": {
- "key": {
- "href": "href",
- "type": "type"
- }
- },
- "kind": "progressive",
- "startedAt": 7,
- "originalVariationValue": "",
- "cleanupBehavior": "remove_rules_and_update_default_rule",
- "environmentKey": "environmentKey",
- "targetVariationValue": "",
- "createdAt": 4,
- "projectKey": "projectKey",
- "statusReason": "waiting_regression_detected",
- "advancementMode": "manual",
- "endedAt": 1,
- "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "targetVariationId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "metrics": [
- {
- "metricKey": "metricKey",
- "definition": "",
- "autoRollback": true,
- "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
- },
- {
- "metricKey": "metricKey",
- "definition": "",
- "autoRollback": true,
- "metricVersionId": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
- }
- ],
- "randomizationUnit": "randomizationUnit",
- "currentPhaseIndex": 0,
- "flagKey": "flagKey",
- "phases": [
- {
- "metricStatuses": {
- "key": "ok"
- },
- "statusReason": null,
- "endedAt": 3,
- "phaseIndex": 0,
- "description": "description",
- "currentStepIndex": 0,
- "startedAt": 9,
- "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "ruleId": "ruleId",
- "steps": [
- {
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
- },
- {
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
- }
- ],
- "status": null
+ "releaseMethod": "progressive_release",
+ "createdAt": 6,
+ "default": true,
+ "progressiveRelease": {
+ "advancementMode": "manual",
+ "metrics": {
+ "key": {
+ "autoRollback": false,
+ "isGroup": true
+ }
},
- {
- "metricStatuses": {
- "key": "ok"
+ "randomizationUnit": "user",
+ "cleanupBehavior": "remove_rules_and_update_default_rule",
+ "phases": [
+ {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
},
- "statusReason": null,
- "endedAt": 3,
- "phaseIndex": 0,
- "description": "description",
- "currentStepIndex": 0,
- "startedAt": 9,
- "id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
- "ruleId": "ruleId",
- "steps": [
- {
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
- },
- {
- "allocation": 14658,
- "stepIndex": 0,
- "endedAt": 2,
- "startedAt": 5,
- "durationMillis": 1
- }
- ],
- "status": null
- }
- ],
- "status": "pending"
+ {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
+ }
+ ]
+ },
+ "name": "name",
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "version": 0,
+ "key": "key",
+ "environmentKey": "environmentKey",
+ "updatedAt": 1
+ },
+ {
+ "releaseMethod": "progressive_release",
+ "createdAt": 6,
+ "default": true,
+ "progressiveRelease": {
+ "advancementMode": "manual",
+ "metrics": {
+ "key": {
+ "autoRollback": false,
+ "isGroup": true
+ }
+ },
+ "randomizationUnit": "user",
+ "cleanupBehavior": "remove_rules_and_update_default_rule",
+ "phases": [
+ {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
+ },
+ {
+ "clauses": [
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ },
+ {
+ "op": "endsWith",
+ "negate": false,
+ "values": [
+ "",
+ ""
+ ],
+ "contextKind": "user",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "attribute": "email"
+ }
+ ],
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "steps": [
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ },
+ {
+ "allocation": 50000,
+ "durationMillis": 3600000,
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
+ }
+ ]
+ }
+ ]
+ },
+ "name": "name",
+ "description": "description",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "version": 0,
+ "key": "key",
+ "environmentKey": "environmentKey",
+ "updatedAt": 1
}
]
},
"properties": {
+ "_links": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlansPaginatedLinks"
+ },
"items": {
- "description": "The releases on this page.",
+ "description": "One page of the listed release plans, ordered by creation time",
"items": {
- "$ref": "#/components/schemas/EnvironmentRelease"
+ "$ref": "#/components/schemas/EnvironmentReleasePlan"
},
"type": "array"
},
"totalCount": {
- "description": "The total number of releases that match the request, before `limit` and `offset` are applied.",
+ "description": "The total number of release plans in the listed scope, before pagination",
"type": "integer"
- },
- "_links": {
- "additionalProperties": {
- "$ref": "#/components/schemas/EnvironmentReleaseLink"
- },
- "description": "Links to this page (`self`), the flag (`parent`), and, where they apply, the `first`, `prev`, `next`, and `last` pages.",
- "type": "object"
}
},
"required": [
@@ -85012,7 +86051,52 @@
],
"type": "object"
},
- "EnvironmentReleaseLink": {
+ "EnvironmentReleasePlansPaginatedLinks": {
+ "example": {
+ "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"
+ }
+ },
+ "properties": {
+ "first": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlansLink"
+ },
+ "last": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlansLink"
+ },
+ "next": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlansLink"
+ },
+ "prev": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlansLink"
+ },
+ "self": {
+ "$ref": "#/components/schemas/EnvironmentReleasePlansLink"
+ }
+ },
+ "required": [
+ "self"
+ ],
+ "type": "object"
+ },
+ "EnvironmentReleasePlansLink": {
"example": {
"href": "href",
"type": "type"
@@ -85025,502 +86109,831 @@
"type": "string"
}
},
- "required": [
- "href",
- "type"
- ],
"type": "object"
},
- "EnvironmentReleasesMetricListingRep": {
+ "FlagReleasePlansError": {
+ "example": {
+ "code": "code",
+ "message": "message"
+ },
"properties": {
- "experimentCount": {
- "description": "The number of experiments using this metric",
- "example": 0,
- "type": "integer"
- },
- "metricGroupCount": {
- "description": "The number of metric groups using this metric",
- "example": 0,
- "type": "integer"
- },
- "guardedRolloutCount": {
- "description": "The number of guarded rollouts using this metric",
- "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,
- "type": "integer"
- },
- "activeGuardedRolloutCount": {
- "description": "The number of active guarded rollouts using this metric",
- "example": 1,
- "type": "integer"
- },
- "_id": {
- "description": "The ID of this metric",
- "example": "5902deadbeef667524a01290",
- "type": "string"
- },
- "_versionId": {
- "description": "The version ID of the metric",
- "example": "version-id-123abc",
+ "message": {
+ "minLength": 1,
"type": "string"
},
- "_version": {
- "description": "Version of the metric",
- "example": 1,
- "type": "integer"
- },
- "key": {
- "description": "A unique key to reference the metric",
- "example": "metric-key-123abc",
+ "code": {
+ "minLength": 1,
"type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "message"
+ ],
+ "type": "object"
+ },
+ "MaintainerResponse": {
+ "description": "The flag's maintainer, either a member or a team.",
+ "discriminator": {
+ "mapping": {
+ "member": "#/components/schemas/MaintainerResponseMember",
+ "team": "#/components/schemas/MaintainerResponseTeam"
},
- "name": {
- "description": "A human-friendly name for the metric",
- "example": "My metric",
- "type": "string"
+ "propertyName": "kind"
+ },
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/MaintainerResponseMember"
},
+ {
+ "$ref": "#/components/schemas/MaintainerResponseTeam"
+ }
+ ]
+ },
+ "MaintainerResponseMember": {
+ "example": {
+ "firstName": "firstName",
+ "lastName": "lastName",
+ "kind": "member",
+ "email": "email",
+ "memberId": "memberId"
+ },
+ "properties": {
"kind": {
- "description": "The kind of event the metric tracks",
"enum": [
- "pageview",
- "click",
- "custom",
- "trace"
+ "member"
],
- "example": "custom",
"type": "string"
},
- "_attachedFlagCount": {
- "description": "The number of feature flags currently attached to this metric",
- "example": 0,
- "type": "integer"
- },
- "_links": {
- "additionalProperties": {
- "$ref": "#/components/schemas/Link"
- },
- "description": "The location and content type of related resources",
- "example": {
- "parent": {
- "href": "/api/v2/metrics/my-project",
- "type": "application/json"
- },
- "self": {
- "href": "/api/v2/metrics/my-project/my-metric",
- "type": "application/json"
- }
- },
- "type": "object"
- },
- "_site": {
- "$ref": "#/components/schemas/Link"
- },
- "_access": {
- "$ref": "#/components/schemas/EnvironmentReleasesAccess"
- },
- "tags": {
- "description": "Tags for the metric",
- "example": [],
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "_creationDate": {
- "format": "int64",
- "type": "integer"
- },
- "lastModified": {
- "$ref": "#/components/schemas/EnvironmentReleasesModification"
- },
- "maintainerId": {
- "description": "The ID of the member who maintains this metric",
- "example": "569fdeadbeef1644facecafe",
+ "memberId": {
"type": "string"
},
- "_maintainer": {
- "$ref": "#/components/schemas/EnvironmentReleasesMemberSummary"
- },
- "description": {
- "description": "Description of the metric",
+ "firstName": {
"type": "string"
},
- "category": {
- "description": "The category of the metric",
- "example": "Error monitoring",
+ "lastName": {
"type": "string"
},
- "isNumeric": {
- "description": "For custom and trace metrics, whether to track numeric changes in value against a baseline (true) or to track a conversion when an end user takes an action (false).",
- "example": true,
- "type": "boolean"
- },
- "successCriteria": {
- "description": "For custom and trace metrics, the success criteria",
+ "email": {
+ "description": "The member's email, used to show their avatar.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "kind"
+ ],
+ "type": "object"
+ },
+ "MaintainerResponseTeam": {
+ "properties": {
+ "kind": {
"enum": [
- "HigherThanBaseline",
- "LowerThanBaseline"
+ "team"
],
"type": "string"
},
- "unit": {
- "description": "For numeric custom and trace metrics, the unit of measure",
+ "key": {
"type": "string"
},
- "eventKey": {
- "description": "For custom metrics, the event key to use in your code",
- "example": "Order placed",
+ "name": {
"type": "string"
+ }
+ },
+ "required": [
+ "kind"
+ ],
+ "type": "object"
+ },
+ "ExecutionMode": {
+ "default": "sequential",
+ "description": "`sequential` releases environments in array order. `parallel` is not accepted on create or update; it is only returned for plans and releases created with it.",
+ "enum": [
+ "sequential",
+ "parallel"
+ ],
+ "type": "string"
+ },
+ "TriggerType": {
+ "enum": [
+ "flag_eval",
+ "webhook",
+ "manual",
+ "promotion"
+ ],
+ "type": "string"
+ },
+ "MaintainerIdentifier": {
+ "description": "The maintainer to assign, either a member or a team.",
+ "discriminator": {
+ "mapping": {
+ "member": "#/components/schemas/MaintainerIdentifierMember",
+ "team": "#/components/schemas/MaintainerIdentifierTeam"
},
- "randomizationUnits": {
- "deprecated": true,
- "description": "Deprecated, use analysisUnits instead.",
- "example": [
- "user"
- ],
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "analysisUnits": {
- "description": "An array of analysis units allowed for this metric.",
- "example": [
- "user"
- ],
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "filters": {
- "$ref": "#/components/schemas/EnvironmentReleasesFilter"
+ "propertyName": "kind"
+ },
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/MaintainerIdentifierMember"
},
- "unitAggregationType": {
- "description": "The method by which multiple unit event values are aggregated",
+ {
+ "$ref": "#/components/schemas/MaintainerIdentifierTeam"
+ }
+ ]
+ },
+ "MaintainerIdentifierMember": {
+ "example": {
+ "kind": "member",
+ "memberId": "memberId"
+ },
+ "properties": {
+ "kind": {
"enum": [
- "average",
- "sum",
- "count_distinct"
+ "member"
],
- "example": "average",
"type": "string"
},
- "analysisType": {
- "description": "The method for analyzing metric events",
+ "memberId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "kind",
+ "memberId"
+ ],
+ "type": "object"
+ },
+ "MaintainerIdentifierTeam": {
+ "properties": {
+ "kind": {
"enum": [
- "mean",
- "percentile"
+ "team"
],
- "example": "mean",
"type": "string"
},
- "percentileValue": {
- "description": "The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when analysisType is percentile.",
- "example": 95,
- "type": "integer"
- },
- "eventDefault": {
- "$ref": "#/components/schemas/MetricEventDefaultRep"
- },
- "dataSource": {
- "$ref": "#/components/schemas/MetricDataSourceRefRep"
+ "teamKey": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "kind",
+ "teamKey"
+ ],
+ "type": "object"
+ },
+ "FlagReleasePlanEnvironment": {
+ "example": {
+ "environmentReleasePlanKey": "environmentReleasePlanKey",
+ "isImmediate": true,
+ "triggerType": "flag_eval",
+ "environmentKey": "environmentKey"
+ },
+ "properties": {
+ "environmentKey": {
+ "type": "string"
},
- "lastSeen": {
- "format": "int64",
- "type": "integer"
+ "environmentReleasePlanKey": {
+ "description": "The environment release plan to run. Omitted for an immediate release.",
+ "type": "string"
},
- "archived": {
- "description": "Whether the metric version is archived",
+ "isImmediate": {
"type": "boolean"
},
- "archivedAt": {
- "format": "int64",
- "type": "integer"
- },
- "selector": {
- "description": "For click metrics, the CSS selectors",
- "type": "string"
- },
- "urls": {
- "items": {
- "$ref": "#/components/schemas/UrlMatcher"
+ "triggerType": {
+ "$ref": "#/components/schemas/TriggerType"
+ }
+ },
+ "required": [
+ "environmentKey",
+ "triggerType"
+ ],
+ "type": "object"
+ },
+ "FlagReleasePlan": {
+ "example": {
+ "applicationKeys": [
+ "applicationKeys",
+ "applicationKeys"
+ ],
+ "default": false,
+ "environments": [
+ {
+ "environmentReleasePlanKey": "environmentReleasePlanKey",
+ "isImmediate": true,
+ "triggerType": "flag_eval",
+ "environmentKey": "environmentKey"
},
- "type": "array"
- },
- "windowStartOffset": {
- "description": "Not yet implemented - The start of the measurement window, in milliseconds relative to the unit's first exposure to a flag variation",
- "format": "int64",
- "type": "integer"
- },
- "windowEndOffset": {
- "description": "Not yet implemented - The end of the measurement window, in milliseconds relative to the unit's first exposure to a flag variation",
- "format": "int64",
- "type": "integer"
- },
- "winsorLowerPercentile": {
- "description": "Lower winsorization percentile, expressed as a percent in the open interval (0, 100). When both bounds are set, defines a two-sided clamp range. Otherwise lower-only winsorization.",
- "example": 1,
- "type": "number"
- },
- "winsorUpperPercentile": {
- "description": "Upper winsorization percentile, expressed as a percent in the open interval (0, 100). When both bounds are set, must be greater than winsorLowerPercentile.",
- "example": 99.5,
- "type": "number"
- },
- "winsorIncludeImputed": {
- "description": "When true, the percentile bound calculation includes imputed zeros. Only meaningful when at least one bound is set and the metric includes units that didn't send events.",
- "example": false,
- "type": "boolean"
+ {
+ "environmentReleasePlanKey": "environmentReleasePlanKey",
+ "isImmediate": true,
+ "triggerType": "flag_eval",
+ "environmentKey": "environmentKey"
+ }
+ ],
+ "name": "name",
+ "description": "description",
+ "executionMode": "sequential",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "version": 0,
+ "key": "key",
+ "maintainer": {
+ "firstName": "firstName",
+ "lastName": "lastName",
+ "kind": "member",
+ "email": "email",
+ "memberId": "memberId"
+ }
+ },
+ "properties": {
+ "key": {
+ "type": "string"
},
- "traceQuery": {
- "description": "For trace metrics, the trace query to use for the metric.",
- "example": "service.name = \"checkout\"",
+ "_id": {
+ "format": "uuid",
"type": "string"
},
- "traceValueLocation": {
- "description": "For trace metrics, the location in the trace to use for numeric values.",
- "example": "duration",
+ "version": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "name": {
"type": "string"
},
- "unitAggregationField": {
- "description": "For count_distinct metrics, the column to count distinct values of",
+ "description": {
"type": "string"
},
- "denominator": {
- "$ref": "#/components/schemas/EnvironmentReleasesMetricDenominatorRep"
+ "maintainer": {
+ "$ref": "#/components/schemas/MaintainerResponse"
+ },
+ "executionMode": {
+ "$ref": "#/components/schemas/ExecutionMode"
+ },
+ "applicationKeys": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "default": {
+ "default": false,
+ "description": "Whether this plan is the project's default. At most one active plan per project is the default.",
+ "type": "boolean"
+ },
+ "environments": {
+ "items": {
+ "$ref": "#/components/schemas/FlagReleasePlanEnvironment"
+ },
+ "type": "array"
}
},
"required": [
- "_creationDate",
"_id",
- "_links",
- "_versionId",
- "dataSource",
+ "default",
+ "environments",
"key",
- "kind",
"name",
- "tags"
+ "version"
],
"type": "object"
},
- "EnvironmentReleasesAccess": {
+ "CreateFlagReleasePlanRequest": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/FlagReleasePlanRequest"
+ },
+ {
+ "properties": {
+ "key": {
+ "maxLength": 256,
+ "minLength": 1,
+ "pattern": "^[a-zA-Z0-9][._\\-a-zA-Z0-9]*$",
+ "type": "string"
+ }
+ },
+ "required": [
+ "key"
+ ],
+ "type": "object"
+ }
+ ],
+ "example": {
+ "applicationKeys": [
+ "applicationKeys",
+ "applicationKeys"
+ ],
+ "default": true,
+ "environments": [
+ {
+ "environmentReleasePlanKey": "environmentReleasePlanKey",
+ "isImmediate": true,
+ "triggerType": "flag_eval",
+ "environmentKey": "environmentKey"
+ },
+ {
+ "environmentReleasePlanKey": "environmentReleasePlanKey",
+ "isImmediate": true,
+ "triggerType": "flag_eval",
+ "environmentKey": "environmentKey"
+ }
+ ],
+ "name": "name",
+ "description": "description",
+ "executionMode": "sequential",
+ "maintainer": {
+ "kind": "member",
+ "memberId": "memberId"
+ },
+ "key": "key"
+ }
+ },
+ "FlagReleasePlanRequest": {
"properties": {
- "denied": {
+ "name": {
+ "maxLength": 256,
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "maintainer": {
+ "$ref": "#/components/schemas/MaintainerIdentifier"
+ },
+ "executionMode": {
+ "$ref": "#/components/schemas/ExecutionMode"
+ },
+ "applicationKeys": {
"items": {
- "$ref": "#/components/schemas/EnvironmentReleasesAccessDenied"
+ "type": "string"
},
"type": "array"
},
- "allowed": {
+ "default": {
+ "description": "Whether this plan is the project's default. At most one active plan per project is the default. On update, omitting it demotes the current default.",
+ "type": "boolean"
+ },
+ "environments": {
"items": {
- "$ref": "#/components/schemas/EnvironmentReleasesAccessAllowedRep"
+ "$ref": "#/components/schemas/FlagReleasePlanEnvironment"
},
"type": "array"
}
},
"required": [
- "allowed",
- "denied"
+ "environments",
+ "name"
],
"type": "object"
},
- "EnvironmentReleasesAccessDenied": {
+ "PutFlagReleasePlanRequest": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/FlagReleasePlanRequest"
+ },
+ {
+ "properties": {
+ "version": {
+ "description": "Optional. The plan version this request was based on, from a\nprevious read. Plans start at version 1. When present it must\nmatch the plan's current version — on mismatch the request is\nrejected with 409 and no changes are applied, so a stale copy\ncan't silently overwrite a concurrent edit. When omitted, the\nplan's version is not checked.\n",
+ "format": "int64",
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ ],
+ "example": {
+ "applicationKeys": [
+ "applicationKeys",
+ "applicationKeys"
+ ],
+ "default": true,
+ "environments": [
+ {
+ "environmentReleasePlanKey": "environmentReleasePlanKey",
+ "isImmediate": true,
+ "triggerType": "flag_eval",
+ "environmentKey": "environmentKey"
+ },
+ {
+ "environmentReleasePlanKey": "environmentReleasePlanKey",
+ "isImmediate": true,
+ "triggerType": "flag_eval",
+ "environmentKey": "environmentKey"
+ }
+ ],
+ "name": "name",
+ "description": "description",
+ "executionMode": "sequential",
+ "version": 1,
+ "maintainer": {
+ "kind": "member",
+ "memberId": "memberId"
+ }
+ }
+ },
+ "ListFlagReleasePlansResponse": {
+ "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": 6,
+ "items": [
+ {
+ "applicationKeys": [
+ "applicationKeys",
+ "applicationKeys"
+ ],
+ "default": false,
+ "environments": [
+ {
+ "environmentReleasePlanKey": "environmentReleasePlanKey",
+ "isImmediate": true,
+ "triggerType": "flag_eval",
+ "environmentKey": "environmentKey"
+ },
+ {
+ "environmentReleasePlanKey": "environmentReleasePlanKey",
+ "isImmediate": true,
+ "triggerType": "flag_eval",
+ "environmentKey": "environmentKey"
+ }
+ ],
+ "name": "name",
+ "description": "description",
+ "executionMode": "sequential",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "version": 0,
+ "key": "key",
+ "maintainer": {
+ "firstName": "firstName",
+ "lastName": "lastName",
+ "kind": "member",
+ "email": "email",
+ "memberId": "memberId"
+ }
+ },
+ {
+ "applicationKeys": [
+ "applicationKeys",
+ "applicationKeys"
+ ],
+ "default": false,
+ "environments": [
+ {
+ "environmentReleasePlanKey": "environmentReleasePlanKey",
+ "isImmediate": true,
+ "triggerType": "flag_eval",
+ "environmentKey": "environmentKey"
+ },
+ {
+ "environmentReleasePlanKey": "environmentReleasePlanKey",
+ "isImmediate": true,
+ "triggerType": "flag_eval",
+ "environmentKey": "environmentKey"
+ }
+ ],
+ "name": "name",
+ "description": "description",
+ "executionMode": "sequential",
+ "_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
+ "version": 0,
+ "key": "key",
+ "maintainer": {
+ "firstName": "firstName",
+ "lastName": "lastName",
+ "kind": "member",
+ "email": "email",
+ "memberId": "memberId"
+ }
+ }
+ ]
+ },
"properties": {
- "action": {
- "type": "string"
+ "items": {
+ "items": {
+ "$ref": "#/components/schemas/FlagReleasePlan"
+ },
+ "type": "array"
},
- "reason": {
- "$ref": "#/components/schemas/AccessDeniedReason"
+ "totalCount": {
+ "description": "The total number of flag release plans in the project, before pagination.",
+ "type": "integer"
+ },
+ "_links": {
+ "$ref": "#/components/schemas/FlagReleasePlansPaginatedLinks"
}
},
"required": [
- "action",
- "reason"
+ "items",
+ "totalCount"
],
"type": "object"
},
- "EnvironmentReleasesAccessAllowedRep": {
+ "FlagReleasePlansPaginatedLinks": {
+ "example": {
+ "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"
+ }
+ },
"properties": {
- "action": {
- "type": "string"
+ "first": {
+ "$ref": "#/components/schemas/FlagReleasePlansLink"
},
- "reason": {
- "$ref": "#/components/schemas/AccessAllowedReason"
+ "last": {
+ "$ref": "#/components/schemas/FlagReleasePlansLink"
+ },
+ "next": {
+ "$ref": "#/components/schemas/FlagReleasePlansLink"
+ },
+ "prev": {
+ "$ref": "#/components/schemas/FlagReleasePlansLink"
+ },
+ "self": {
+ "$ref": "#/components/schemas/FlagReleasePlansLink"
}
},
"required": [
- "action",
- "reason"
+ "self"
],
"type": "object"
},
- "EnvironmentReleasesModification": {
+ "FlagReleasePlansLink": {
+ "example": {
+ "href": "href",
+ "type": "type"
+ },
"properties": {
- "date": {
- "example": "2021-08-05T19:46:31.148Z",
- "format": "date-time",
+ "href": {
+ "type": "string"
+ },
+ "type": {
"type": "string"
}
},
"type": "object"
},
- "EnvironmentReleasesMemberSummary": {
+ "SegmentInstruction": {
+ "additionalProperties": true,
+ "description": "A segment semantic patch instruction, such as {\"kind\": \"addIncludedTargets\", \"contextKind\": \"user\", \"values\": [\"user-key\"]}. The kind and the other fields follow the instructions for updating a segment with a semantic patch.",
+ "type": "object",
+ "x-go-type": "json.RawMessage"
+ },
+ "PostSegmentScheduledChangeInput": {
+ "example": {
+ "instructions": [
+ null,
+ null
+ ],
+ "executionDate": 0,
+ "comment": "comment"
+ },
"properties": {
- "_links": {
- "additionalProperties": {
- "$ref": "#/components/schemas/Link"
- },
- "description": "The location and content type of related resources",
- "example": {
- "self": {
- "href": "/api/v2/members/569f183514f4432160000007",
- "type": "application/json"
- }
- },
- "type": "object"
- },
- "_id": {
- "description": "The member's ID",
- "example": "569f183514f4432160000007",
- "type": "string"
- },
- "firstName": {
- "description": "The member's first name",
- "example": "Ariel",
- "type": "string"
- },
- "lastName": {
- "description": "The member's last name",
- "example": "Flores",
- "type": "string"
+ "executionDate": {
+ "format": "int64",
+ "type": "integer"
},
- "role": {
- "description": "The member's base role. If the member has no additional roles, this role will be in effect.",
- "example": "admin",
+ "comment": {
+ "description": "Optional comment describing the scheduled change",
"type": "string"
},
- "email": {
- "description": "The member's email address",
- "example": "ariel@acme.com",
- "type": "string"
+ "instructions": {
+ "description": "The segment semantic patch instructions to apply on the execution date",
+ "items": {
+ "$ref": "#/components/schemas/SegmentInstruction"
+ },
+ "type": "array"
}
},
"required": [
- "_id",
- "_links",
- "email",
- "role"
+ "executionDate",
+ "instructions"
],
"type": "object"
},
- "EnvironmentReleasesFilter": {
+ "PatchSegmentScheduledChangeInput": {
+ "example": {
+ "executionDate": 0,
+ "comment": "comment"
+ },
+ "minProperties": 1,
"properties": {
- "type": {
- "description": "Filter type. One of [contextAttribute, eventProperty, group]",
- "enum": [
- "group",
- "contextAttribute",
- "eventProperty"
- ],
- "example": "contextAttribute",
- "type": "string"
+ "executionDate": {
+ "format": "int64",
+ "type": "integer"
},
- "attribute": {
- "description": "If not a group node, the context attribute name or event property name to filter on",
- "example": "country",
+ "comment": {
+ "description": "The new comment describing the scheduled change. Leave out to keep the current comment, or send an empty string to clear it.",
"type": "string"
- },
- "op": {
+ }
+ },
+ "type": "object"
+ },
+ "SegmentScheduledChangesLink": {
+ "example": {
+ "href": "href",
+ "type": "type"
+ },
+ "properties": {
+ "href": {
"type": "string"
},
- "values": {
- "description": "The context attribute / event property values or group member nodes",
- "example": [
- "JP"
- ],
- "items": {},
- "type": "array"
- },
- "contextKind": {
- "description": "For context attribute filters, the context kind.",
- "example": "user",
+ "type": {
"type": "string"
- },
- "negate": {
- "description": "If set, then take the inverse of the operator. 'in' becomes 'not in'.",
- "example": false,
- "type": "boolean"
}
},
- "required": [
- "negate",
- "op",
- "type",
- "values"
- ],
"type": "object"
},
- "EnvironmentReleasesMetricDenominatorRep": {
+ "SegmentScheduledChangeStatus": {
+ "description": "Where the scheduled change is in its lifecycle. `pending` means the execution date is still in the future; `inFlight` means the change is being applied; `failed` means the change could not be applied on its execution date. More values may be added, so treat an unrecognized value as a change that has not been applied yet.\n",
+ "enum": [
+ "pending",
+ "inFlight",
+ "failed"
+ ],
+ "type": "string",
+ "x-enum-varnames": [
+ "SegmentScheduledChangeStatusPending",
+ "SegmentScheduledChangeStatusInFlight",
+ "SegmentScheduledChangeStatusFailed"
+ ]
+ },
+ "SegmentScheduledChange": {
+ "example": {
+ "instructions": [
+ null,
+ null
+ ],
+ "_maintainerId": "_maintainerId",
+ "_links": {
+ "key": {
+ "href": "href",
+ "type": "type"
+ }
+ },
+ "_maintainerServiceTokenId": "_maintainerServiceTokenId",
+ "executionDate": 6,
+ "comment": "comment",
+ "_id": "_id",
+ "_creationDate": 0,
+ "status": "pending"
+ },
"properties": {
- "eventName": {
- "description": "The warehouse event column for the denominator",
- "type": "string"
+ "_links": {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/SegmentScheduledChangesLink"
+ },
+ "description": "The location and content type of related resources",
+ "type": "object"
},
- "isNumeric": {
- "description": "Whether the denominator aggregates a numeric value",
- "type": "boolean"
+ "status": {
+ "$ref": "#/components/schemas/SegmentScheduledChangeStatus"
},
- "unitAggregationType": {
- "description": "How individual unit values are aggregated for the denominator",
+ "_id": {
+ "description": "The ID of this scheduled change",
"type": "string"
},
- "unitAggregationField": {
- "description": "The column to count distinct values of; required when unitAggregationType is count_distinct",
- "type": "string"
+ "_creationDate": {
+ "format": "int64",
+ "type": "integer"
},
- "valueColumn": {
- "description": "For a numeric denominator, the column holding the numeric value",
+ "_maintainerId": {
+ "description": "The ID of the member who scheduled the change",
"type": "string"
},
- "dataSource": {
- "$ref": "#/components/schemas/MetricDataSourceRefRep"
- },
- "filters": {
- "$ref": "#/components/schemas/EnvironmentReleasesFilter"
+ "_maintainerServiceTokenId": {
+ "description": "The ID of the service token that scheduled the change",
+ "type": "string"
},
- "windowStartOffset": {
- "description": "Start of the measurement window in milliseconds",
+ "executionDate": {
"format": "int64",
"type": "integer"
},
- "windowEndOffset": {
- "description": "End of the measurement window in milliseconds",
- "format": "int64",
- "type": "integer"
+ "comment": {
+ "description": "The comment describing the scheduled change",
+ "type": "string"
},
- "winsorLowerPercentile": {
- "description": "Lower winsorization percentile in the open interval (0, 100)",
- "type": "number"
+ "instructions": {
+ "description": "The segment semantic patch instructions to apply on the execution date",
+ "items": {
+ "$ref": "#/components/schemas/SegmentInstruction"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "_creationDate",
+ "_id",
+ "_links",
+ "executionDate",
+ "instructions",
+ "status"
+ ],
+ "type": "object"
+ },
+ "SegmentScheduledChanges": {
+ "example": {
+ "_links": {
+ "key": {
+ "href": "href",
+ "type": "type"
+ }
},
- "winsorUpperPercentile": {
- "description": "Upper winsorization percentile in the open interval (0, 100)",
- "type": "number"
+ "items": [
+ {
+ "instructions": [
+ null,
+ null
+ ],
+ "_maintainerId": "_maintainerId",
+ "_links": {
+ "key": {
+ "href": "href",
+ "type": "type"
+ }
+ },
+ "_maintainerServiceTokenId": "_maintainerServiceTokenId",
+ "executionDate": 6,
+ "comment": "comment",
+ "_id": "_id",
+ "_creationDate": 0,
+ "status": "pending"
+ },
+ {
+ "instructions": [
+ null,
+ null
+ ],
+ "_maintainerId": "_maintainerId",
+ "_links": {
+ "key": {
+ "href": "href",
+ "type": "type"
+ }
+ },
+ "_maintainerServiceTokenId": "_maintainerServiceTokenId",
+ "executionDate": 6,
+ "comment": "comment",
+ "_id": "_id",
+ "_creationDate": 0,
+ "status": "pending"
+ }
+ ]
+ },
+ "properties": {
+ "_links": {
+ "additionalProperties": {
+ "$ref": "#/components/schemas/SegmentScheduledChangesLink"
+ },
+ "description": "The location and content type of related resources",
+ "type": "object"
},
- "winsorIncludeImputed": {
- "description": "When true, the percentile bound calculation includes imputed zeros",
- "type": "boolean"
+ "items": {
+ "description": "The segment's scheduled changes that have not been applied yet, plus any that failed to apply, soonest first",
+ "items": {
+ "$ref": "#/components/schemas/SegmentScheduledChange"
+ },
+ "type": "array"
}
},
+ "required": [
+ "_links",
+ "items"
+ ],
"type": "object"
},
"CreateIpAllowlistEntryRequest": {